fix #3050 and other things

This commit is contained in:
asiekierka 2015-10-03 09:37:13 +02:00
parent a9dc45e72e
commit 6b49bb6513
14 changed files with 44 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 757 B

View file

@ -0,0 +1,9 @@
Improvements:
* New robot board texture (asie)
Bugs fixed:
* [#3050] Oil biome configs not changing from defaults (asie)
* Rare crash with engines (asie)
* Very rare rendering glitch with items in BC pipes (asie)

View file

@ -162,7 +162,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
BiomeGenBase[] biomeGenArray = BiomeGenBase.getBiomeGenArray(); BiomeGenBase[] biomeGenArray = BiomeGenBase.getBiomeGenArray();
if (oilDesertBiomeId > 0) { if (oilDesertBiomeId > 0) {
if (biomeGenArray.length >= oilDesertBiomeId || biomeGenArray[oilDesertBiomeId] != null) { if (oilDesertBiomeId >= biomeGenArray.length || biomeGenArray[oilDesertBiomeId] != null) {
oilDesertBiomeId = findUnusedBiomeID("oilDesert"); oilDesertBiomeId = findUnusedBiomeID("oilDesert");
// save changes to config file // save changes to config file
BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilDesert", oilDesertBiomeId).set(oilDesertBiomeId); BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilDesert", oilDesertBiomeId).set(oilDesertBiomeId);
@ -172,7 +172,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
} }
if (oilOceanBiomeId > 0) { if (oilOceanBiomeId > 0) {
if (biomeGenArray.length >= oilOceanBiomeId || biomeGenArray[oilOceanBiomeId] != null) { if (oilOceanBiomeId >= biomeGenArray.length || biomeGenArray[oilOceanBiomeId] != null) {
oilOceanBiomeId = findUnusedBiomeID("oilOcean"); oilOceanBiomeId = findUnusedBiomeID("oilOcean");
// save changes to config file // save changes to config file
BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilOcean", oilOceanBiomeId).set(oilOceanBiomeId); BuildCraftCore.mainConfiguration.get("worldgen.biomes", "biomeOilOcean", oilOceanBiomeId).set(oilOceanBiomeId);

View file

@ -10,6 +10,7 @@ package buildcraft.core.lib.engines;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.ICrafting;
@ -73,17 +74,44 @@ public abstract class TileEngineBase extends TileBuildCraft implements IPipeConn
} }
} }
private String getTexturePrefix() {
if (!(blockType instanceof BlockEngineBase)) {
Block engineBase = worldObj.getBlock(xCoord, yCoord, zCoord);
if (engineBase instanceof BlockEngineBase) {
blockType = engineBase;
getBlockMetadata();
} else {
return null;
}
}
return ((BlockEngineBase) blockType).getTexturePrefix(getBlockMetadata(), true);
}
public ResourceLocation getBaseTexture() { public ResourceLocation getBaseTexture() {
return new ResourceLocation(((BlockEngineBase) getBlockType()).getTexturePrefix(getBlockMetadata(), true) + "/base.png"); if (getTexturePrefix() != null) {
return new ResourceLocation(getTexturePrefix() + "/base.png");
} else {
return new ResourceLocation("missingno");
}
} }
public ResourceLocation getChamberTexture() { public ResourceLocation getChamberTexture() {
return new ResourceLocation(((BlockEngineBase) getBlockType()).getTexturePrefix(getBlockMetadata(), true) + "/chamber.png"); if (getTexturePrefix() != null) {
return new ResourceLocation(getTexturePrefix() + "/chamber.png");
} else {
return new ResourceLocation("missingno");
}
} }
public ResourceLocation getTrunkTexture(EnergyStage stage) { public ResourceLocation getTrunkTexture(EnergyStage stage) {
if (ResourceUtils.resourceExists(((BlockEngineBase) getBlockType()).getTexturePrefix(getBlockMetadata(), true) + "/trunk.png")) { if (getTexturePrefix() == null) {
return new ResourceLocation(((BlockEngineBase) getBlockType()).getTexturePrefix(getBlockMetadata(), true) + "/trunk.png"); return TRUNK_OVERHEAT_TEXTURE;
}
if (ResourceUtils.resourceExists(getTexturePrefix() + "/trunk.png")) {
return new ResourceLocation(getTexturePrefix() + "/trunk.png");
} }
switch (stage) { switch (stage) {

View file

@ -60,6 +60,7 @@ public class PipeTransportItemsRenderer extends PipeTransportRenderer<PipeTransp
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y + 0.25F, (float) z); GL11.glTranslatef((float) x, (float) y + 0.25F, (float) z);
GL11.glEnable(GL11.GL_ALPHA_TEST);
//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, skylight << 4, Math.max(blocklight, getItemLightLevel(itemstack)) << 4); //OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, skylight << 4, Math.max(blocklight, getItemLightLevel(itemstack)) << 4);