From 3e859b38d991a7aba72eaf09b025bffdb39721c7 Mon Sep 17 00:00:00 2001 From: Hea3veN Date: Fri, 10 Apr 2015 07:35:28 -0300 Subject: [PATCH 1/5] fix fluid dupe with the pump robot --- .../robots/ai/AIRobotPumpBlock.java | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/common/buildcraft/robots/ai/AIRobotPumpBlock.java b/common/buildcraft/robots/ai/AIRobotPumpBlock.java index ab2de1e9..ef6174f9 100644 --- a/common/buildcraft/robots/ai/AIRobotPumpBlock.java +++ b/common/buildcraft/robots/ai/AIRobotPumpBlock.java @@ -9,14 +9,11 @@ package buildcraft.robots.ai; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; - import buildcraft.api.core.BlockIndex; import buildcraft.api.robots.AIRobot; import buildcraft.api.robots.EntityRobotBase; +import buildcraft.core.utils.BlockUtils; public class AIRobotPumpBlock extends AIRobot { @@ -49,18 +46,13 @@ public class AIRobotPumpBlock extends AIRobot { if (waited < 40) { waited++; } else { - Fluid fluid = FluidRegistry.lookupFluidForBlock(robot.worldObj.getBlock(blockToPump.x, blockToPump.y, - blockToPump.z)); - - if (fluid != null) { - pumped = robot.fill(ForgeDirection.UNKNOWN, - new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME), true); - - if (pumped > 0) { - robot.worldObj.setBlockToAir(blockToPump.x, blockToPump.y, blockToPump.z); + FluidStack fluidStack = BlockUtils.drainBlock(robot.worldObj, blockToPump.x, blockToPump.y, blockToPump.z, false); + if (fluidStack != null) { + if (robot.fill(ForgeDirection.UNKNOWN, fluidStack, true) > 0) { + BlockUtils.drainBlock(robot.worldObj, blockToPump.x, blockToPump.y, + blockToPump.z, true); } } - terminate(); } From 5c767249a6f36bf41a55dd8c1a5973a9338a957b Mon Sep 17 00:00:00 2001 From: asiekierka Date: Fri, 10 Apr 2015 16:03:08 +0200 Subject: [PATCH 2/5] fix fluid pipe crash on Forge 1355+ --- .../transport/PipeTransportFluids.java | 19 ++++-------- .../transport/network/PacketFluidUpdate.java | 25 +++++++++------- .../transport/render/PipeRendererTESR.java | 29 +++++++++---------- .../transport/utils/FluidRenderData.java | 28 ++++++++++++++++++ 4 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 common/buildcraft/transport/utils/FluidRenderData.java diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index 25f96083..c5ae2cec 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -13,6 +13,7 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Map; +import buildcraft.transport.utils.FluidRenderData; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -160,8 +161,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler public byte initClient = 0; public int travelDelay = 12; public int flowRate; - public FluidStack[] renderCache = new FluidStack[orientations.length]; - public int[] colorRenderCache = new int[orientations.length]; + public FluidRenderData[] renderCache = new FluidRenderData[orientations.length]; public final PipeSection[] internalTanks = new PipeSection[orientations.length]; private final TransferState[] transferState = new TransferState[directions.length]; private final int[] inputPerTick = new int[directions.length]; @@ -258,12 +258,11 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler } } - FluidStack[] renderCacheCopy = this.renderCache.clone(); - int[] colorRenderCacheCopy = this.colorRenderCache.clone(); + FluidRenderData[] renderCacheCopy = this.renderCache.clone(); for (ForgeDirection dir : orientations) { FluidStack current = internalTanks[dir.ordinal()].getFluid(); - FluidStack prev = renderCacheCopy[dir.ordinal()]; + FluidStack prev = renderCacheCopy[dir.ordinal()] != null ? renderCacheCopy[dir.ordinal()].getFluidStack() : null; if (current != null && current.getFluid() == null) { continue; @@ -276,11 +275,9 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler if (prev == null ^ current == null) { changed = true; if (current != null) { - renderCacheCopy[dir.ordinal()] = current.copy(); - colorRenderCacheCopy[dir.ordinal()] = current.getFluid().getColor(current); + renderCacheCopy[dir.ordinal()] = new FluidRenderData(current); } else { renderCacheCopy[dir.ordinal()] = null; - colorRenderCacheCopy[dir.ordinal()] = 0xFFFFFF; } delta.set(dir.ordinal() * PacketFluidUpdate.FLUID_DATA_NUM + PacketFluidUpdate.FLUID_ID_BIT); delta.set(dir.ordinal() * PacketFluidUpdate.FLUID_DATA_NUM + PacketFluidUpdate.FLUID_AMOUNT_BIT); @@ -293,8 +290,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler if (!prev.equals(current) || initPacket) { changed = true; - renderCacheCopy[dir.ordinal()] = current; - colorRenderCacheCopy[dir.ordinal()] = current.getFluid().getColor(current); + renderCacheCopy[dir.ordinal()] = new FluidRenderData(current); delta.set(dir.ordinal() * PacketFluidUpdate.FLUID_DATA_NUM + PacketFluidUpdate.FLUID_ID_BIT); } @@ -313,13 +309,11 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler if (persistChange) { this.renderCache = renderCacheCopy; - this.colorRenderCache = colorRenderCacheCopy; } if (changed || initPacket) { PacketFluidUpdate packet = new PacketFluidUpdate(container.xCoord, container.yCoord, container.zCoord, initPacket); packet.renderCache = renderCacheCopy; - packet.colorRenderCache = colorRenderCacheCopy; packet.delta = delta; return packet; } @@ -528,7 +522,6 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler internalTanks[direction.ordinal()].reset(); transferState[direction.ordinal()] = TransferState.None; renderCache[direction.ordinal()] = null; - colorRenderCache[direction.ordinal()] = 0xFFFFFF; } } } diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index 44bd81f7..618e94c0 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -10,12 +10,15 @@ package buildcraft.transport.network; import java.util.BitSet; +import buildcraft.transport.utils.FluidRenderData; import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import buildcraft.core.network.PacketCoordinates; @@ -31,8 +34,7 @@ public class PacketFluidUpdate extends PacketCoordinates { public static int FLUID_AMOUNT_BIT = 1; public static int FLUID_DATA_NUM = 2; - public FluidStack[] renderCache = new FluidStack[ForgeDirection.values().length]; - public int[] colorRenderCache = new int[ForgeDirection.values().length]; + public FluidRenderData[] renderCache = new FluidRenderData[ForgeDirection.values().length]; public BitSet delta; public PacketFluidUpdate(int xCoord, int yCoord, int zCoord) { @@ -73,7 +75,6 @@ public class PacketFluidUpdate extends PacketCoordinates { PipeTransportFluids transLiq = (PipeTransportFluids) pipe.pipe.transport; renderCache = transLiq.renderCache; - colorRenderCache = transLiq.colorRenderCache; byte[] dBytes = new byte[2]; data.readBytes(dBytes); @@ -83,15 +84,17 @@ public class PacketFluidUpdate extends PacketCoordinates { for (ForgeDirection dir : ForgeDirection.values()) { if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_ID_BIT)) { + int id = data.readShort(); int amt = renderCache[dir.ordinal()] != null ? renderCache[dir.ordinal()].amount : 0; - renderCache[dir.ordinal()] = new FluidStack(data.readShort(), amt); - colorRenderCache[dir.ordinal()] = data.readInt(); + int color = data.readInt(); + + renderCache[dir.ordinal()] = new FluidRenderData(id, amt, color); } + if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_AMOUNT_BIT)) { - if (renderCache[dir.ordinal()] == null) { - renderCache[dir.ordinal()] = new FluidStack(0, 0); - } - renderCache[dir.ordinal()].amount = Math.min(transLiq.getCapacity(), data.readUnsignedShort()); + if (renderCache[dir.ordinal()] != null) { + renderCache[dir.ordinal()].amount = Math.min(transLiq.getCapacity(), data.readUnsignedShort()); + } } } } @@ -105,12 +108,12 @@ public class PacketFluidUpdate extends PacketCoordinates { data.writeBytes(dBytes); for (ForgeDirection dir : ForgeDirection.values()) { - FluidStack liquid = renderCache[dir.ordinal()]; + FluidRenderData liquid = renderCache[dir.ordinal()]; if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_ID_BIT)) { if (liquid != null) { data.writeShort(liquid.fluidID); - data.writeInt(colorRenderCache[dir.ordinal()]); + data.writeInt(liquid.color); } else { data.writeShort(0); data.writeInt(0xFFFFFF); diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 06ec67b3..139041d7 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -10,6 +10,7 @@ package buildcraft.transport.render; import java.util.HashMap; +import buildcraft.transport.utils.FluidRenderData; import com.google.common.collect.Maps; import org.lwjgl.opengl.GL11; @@ -32,7 +33,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore.RenderMode; @@ -669,8 +669,8 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { boolean needsRender = false; for (int i = 0; i < 7; ++i) { - FluidStack fluidStack = trans.renderCache[i]; - if (fluidStack != null && fluidStack.amount > 0) { + FluidRenderData renderData = trans.renderCache[i]; + if (renderData != null && renderData.amount > 0) { needsRender = true; break; } @@ -696,9 +696,9 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { int i = side.ordinal(); - FluidStack fluidStack = trans.renderCache[i]; + FluidRenderData fluidRenderData = trans.renderCache[i]; - if (fluidStack == null || fluidStack.amount <= 0) { + if (fluidRenderData == null || fluidRenderData.amount <= 0) { continue; } @@ -706,13 +706,13 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { continue; } - DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.getWorldObj()); + DisplayFluidList d = getListFromBuffer(fluidRenderData, pipe.container.getWorldObj()); if (d == null) { continue; } - int stage = (int) ((float) fluidStack.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); + int stage = (int) ((float) fluidRenderData.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); GL11.glPushMatrix(); int list = 0; @@ -741,21 +741,21 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { default: } bindTexture(TextureMap.locationBlocksTexture); - RenderUtils.setGLColorFromInt(trans.colorRenderCache[i]); + RenderUtils.setGLColorFromInt(fluidRenderData.color); GL11.glCallList(list); GL11.glPopMatrix(); } // CENTER - FluidStack fluidStack = trans.renderCache[ForgeDirection.UNKNOWN.ordinal()]; + FluidRenderData fluidRenderData = trans.renderCache[ForgeDirection.UNKNOWN.ordinal()]; - if (fluidStack != null && fluidStack.amount > 0) { - DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.getWorldObj()); + if (fluidRenderData != null && fluidRenderData.amount > 0) { + DisplayFluidList d = getListFromBuffer(fluidRenderData, pipe.container.getWorldObj()); if (d != null) { - int stage = (int) ((float) fluidStack.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); + int stage = (int) ((float) fluidRenderData.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); bindTexture(TextureMap.locationBlocksTexture); - RenderUtils.setGLColorFromInt(trans.colorRenderCache[ForgeDirection.UNKNOWN.ordinal()]); + RenderUtils.setGLColorFromInt(fluidRenderData.color); if (above) { GL11.glCallList(d.centerVertical[stage]); @@ -772,8 +772,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - private DisplayFluidList getListFromBuffer(FluidStack stack, World world) { - + private DisplayFluidList getListFromBuffer(FluidRenderData stack, World world) { int liquidId = stack.fluidID; if (liquidId == 0) { diff --git a/common/buildcraft/transport/utils/FluidRenderData.java b/common/buildcraft/transport/utils/FluidRenderData.java new file mode 100644 index 00000000..9f37e874 --- /dev/null +++ b/common/buildcraft/transport/utils/FluidRenderData.java @@ -0,0 +1,28 @@ +package buildcraft.transport.utils; + +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class FluidRenderData { + public int fluidID, amount, color; + + public FluidRenderData(int fluidID, int amount, int color) { + this.fluidID = fluidID; + this.amount = amount; + this.color = color; + } + + public FluidRenderData(FluidStack stack) { + this(stack.getFluid().getID(), stack.amount, stack.getFluid().getColor(stack)); + } + + public FluidStack getFluidStack() { + Fluid fluid = FluidRegistry.getFluid(fluidID); + if (fluid != null) { + return new FluidStack(fluid, amount); + } else { + return null; + } + } +} From 445957588fdc2f14ab1e16ca8188f11900bcde28 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Fri, 10 Apr 2015 20:34:55 +0200 Subject: [PATCH 3/5] cleanup, add warning checks for invalid item/block names in MappingRegistry --- .../api/blueprints/MappingRegistry.java | 28 ++++++++++++++++--- .../transport/network/PacketFluidUpdate.java | 11 +++++--- .../transport/render/PipeRendererTESR.java | 22 ++++++--------- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/api/buildcraft/api/blueprints/MappingRegistry.java b/api/buildcraft/api/blueprints/MappingRegistry.java index dd91cec0..be9d2b8a 100755 --- a/api/buildcraft/api/blueprints/MappingRegistry.java +++ b/api/buildcraft/api/blueprints/MappingRegistry.java @@ -243,8 +243,12 @@ public class MappingRegistry { for (Block b : idToBlock) { NBTTagCompound sub = new NBTTagCompound(); - sub.setString("name", - Block.blockRegistry.getNameForObject(b)); + String name = Block.blockRegistry.getNameForObject(b); + if (name == null || name.length() == 0) { + BCLog.logger.error("Block " + b.getUnlocalizedName() + " (" + b.getClass().getName() + ") has an empty registry name! This is a bug!"); + } else { + sub.setString("name", name); + } blocksMapping.appendTag(sub); } @@ -254,8 +258,12 @@ public class MappingRegistry { for (Item i : idToItem) { NBTTagCompound sub = new NBTTagCompound(); - sub.setString("name", - Item.itemRegistry.getNameForObject(i)); + String name = Item.itemRegistry.getNameForObject(i); + if (name == null || name.length() == 0) { + BCLog.logger.error("Item " + i.getUnlocalizedName() + " (" + i.getClass().getName() + ") has an empty registry name! This is a bug!"); + } else { + sub.setString("name", name); + } itemsMapping.appendTag(sub); } @@ -278,6 +286,12 @@ public class MappingRegistry { for (int i = 0; i < blocksMapping.tagCount(); ++i) { NBTTagCompound sub = blocksMapping.getCompoundTagAt(i); + if (!sub.hasKey("name")) { + // Keeping the order correct + idToBlock.add(null); + BCLog.logger.log(Level.WARN, "Can't load a block - corrupt blueprint!"); + continue; + } String name = sub.getString("name"); Block b = null; @@ -299,6 +313,12 @@ public class MappingRegistry { for (int i = 0; i < itemsMapping.tagCount(); ++i) { NBTTagCompound sub = itemsMapping.getCompoundTagAt(i); + if (!sub.hasKey("name")) { + // Keeping the order correct + idToItem.add(null); + BCLog.logger.log(Level.WARN, "Can't load an item - corrupt blueprint!"); + continue; + } String name = sub.getString("name"); Item item = null; diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index 618e94c0..501440a7 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -86,14 +86,18 @@ public class PacketFluidUpdate extends PacketCoordinates { if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_ID_BIT)) { int id = data.readShort(); int amt = renderCache[dir.ordinal()] != null ? renderCache[dir.ordinal()].amount : 0; - int color = data.readInt(); + int color = id != 0 ? data.readInt() : 0xFFFFFF; renderCache[dir.ordinal()] = new FluidRenderData(id, amt, color); } if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_AMOUNT_BIT)) { + int amt = Math.min(transLiq.getCapacity(), data.readUnsignedShort()); + if (renderCache[dir.ordinal()] != null) { - renderCache[dir.ordinal()].amount = Math.min(transLiq.getCapacity(), data.readUnsignedShort()); + renderCache[dir.ordinal()].amount = amt; + } else { + renderCache[dir.ordinal()] = new FluidRenderData(0, amt, 0xFFFFFF); } } } @@ -111,12 +115,11 @@ public class PacketFluidUpdate extends PacketCoordinates { FluidRenderData liquid = renderCache[dir.ordinal()]; if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_ID_BIT)) { - if (liquid != null) { + if (liquid != null && liquid.fluidID != 0) { data.writeShort(liquid.fluidID); data.writeInt(liquid.color); } else { data.writeShort(0); - data.writeInt(0xFFFFFF); } } if (delta.get(dir.ordinal() * FLUID_DATA_NUM + FLUID_AMOUNT_BIT)) { diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 139041d7..8f140ded 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -108,17 +108,23 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { return displayFluidLists.get(liquidId); } + Fluid fluid = FluidRegistry.getFluid(liquidId); + + if (fluid == null) { + return null; + } + DisplayFluidList d = new DisplayFluidList(); displayFluidLists.put(liquidId, d); RenderInfo block = new RenderInfo(); - Fluid fluid = FluidRegistry.getFluid(liquidId); if (fluid.getBlock() != null) { block.baseBlock = fluid.getBlock(); } else { block.baseBlock = Blocks.water; } + block.texture = fluid.getStillIcon(); float size = CoreConstants.PIPE_MAX_POS - CoreConstants.PIPE_MIN_POS; @@ -706,7 +712,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { continue; } - DisplayFluidList d = getListFromBuffer(fluidRenderData, pipe.container.getWorldObj()); + DisplayFluidList d = getDisplayFluidLists(fluidRenderData.fluidID, pipe.container.getWorldObj()); if (d == null) { continue; @@ -749,7 +755,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { FluidRenderData fluidRenderData = trans.renderCache[ForgeDirection.UNKNOWN.ordinal()]; if (fluidRenderData != null && fluidRenderData.amount > 0) { - DisplayFluidList d = getListFromBuffer(fluidRenderData, pipe.container.getWorldObj()); + DisplayFluidList d = getDisplayFluidLists(fluidRenderData.fluidID, pipe.container.getWorldObj()); if (d != null) { int stage = (int) ((float) fluidRenderData.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); @@ -772,16 +778,6 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - private DisplayFluidList getListFromBuffer(FluidRenderData stack, World world) { - int liquidId = stack.fluidID; - - if (liquidId == 0) { - return null; - } - - return getDisplayFluidLists(liquidId, world); - } - private void renderSolids(Pipe pipe, double x, double y, double z) { GL11.glPushMatrix(); From b291458e4a6e2f94a8ccefc2a93d65a5e9067ea0 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Fri, 10 Apr 2015 20:43:42 +0200 Subject: [PATCH 4/5] BuildCraft 6.4.9 --- build.gradle | 2 +- buildcraft_resources/changelog/6.4.9 | 3 +++ buildcraft_resources/versions.txt | 2 +- common/buildcraft/transport/PipeTransportFluids.java | 2 +- common/buildcraft/transport/network/PacketFluidUpdate.java | 5 +---- common/buildcraft/transport/render/PipeRendererTESR.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 buildcraft_resources/changelog/6.4.9 diff --git a/build.gradle b/build.gradle index c739bc1a..2ab2299f 100755 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ apply plugin: 'forge' // adds the forge dependency apply plugin: 'maven' // for uploading to a maven repo apply plugin: 'checkstyle' -version = "6.4.8" +version = "6.4.9" group= "com.mod-buildcraft" archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension] diff --git a/buildcraft_resources/changelog/6.4.9 b/buildcraft_resources/changelog/6.4.9 new file mode 100644 index 00000000..26025596 --- /dev/null +++ b/buildcraft_resources/changelog/6.4.9 @@ -0,0 +1,3 @@ +Bugfixes: +[#2621] FluidStack crash with Forge 1355+ (asie) +Crash on invalid mapping - instead reports error to console (asie) diff --git a/buildcraft_resources/versions.txt b/buildcraft_resources/versions.txt index acbd65eb..636d8299 100755 --- a/buildcraft_resources/versions.txt +++ b/buildcraft_resources/versions.txt @@ -1,3 +1,3 @@ 1.6.4:BuildCraft:4.2.2 1.7.2:BuildCraft:6.0.16 -1.7.10:BuildCraft:6.4.8 +1.7.10:BuildCraft:6.4.9 diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index c5ae2cec..d7301db6 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -13,7 +13,6 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Map; -import buildcraft.transport.utils.FluidRenderData; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -43,6 +42,7 @@ import buildcraft.transport.pipes.PipeFluidsStone; import buildcraft.transport.pipes.PipeFluidsVoid; import buildcraft.transport.pipes.PipeFluidsWood; import buildcraft.transport.pipes.events.PipeEventFluid; +import buildcraft.transport.utils.FluidRenderData; public class PipeTransportFluids extends PipeTransport implements IFluidHandler { public static final Map>, Integer> fluidCapacities = new HashMap>, Integer>(); diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index 501440a7..17f3b26e 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -10,16 +10,12 @@ package buildcraft.transport.network; import java.util.BitSet; -import buildcraft.transport.utils.FluidRenderData; import io.netty.buffer.ByteBuf; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketIds; @@ -27,6 +23,7 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BitSetUtils; import buildcraft.transport.PipeTransportFluids; import buildcraft.transport.TileGenericPipe; +import buildcraft.transport.utils.FluidRenderData; public class PacketFluidUpdate extends PacketCoordinates { diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 8f140ded..f257b0e0 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -10,7 +10,6 @@ package buildcraft.transport.render; import java.util.HashMap; -import buildcraft.transport.utils.FluidRenderData; import com.google.common.collect.Maps; import org.lwjgl.opengl.GL11; @@ -56,6 +55,7 @@ import buildcraft.transport.PipeTransportPower; import buildcraft.transport.TileGenericPipe; import buildcraft.transport.TravelingItem; import buildcraft.transport.gates.GatePluggable; +import buildcraft.transport.utils.FluidRenderData; public class PipeRendererTESR extends TileEntitySpecialRenderer { public static final float DISPLAY_MULTIPLIER = 0.1f; From bce4720a2b398108a37e5a2254b1ba63b9af5754 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Fri, 10 Apr 2015 20:50:10 +0200 Subject: [PATCH 5/5] last-minute changelog update --- buildcraft_resources/changelog/6.4.9 | 1 + 1 file changed, 1 insertion(+) diff --git a/buildcraft_resources/changelog/6.4.9 b/buildcraft_resources/changelog/6.4.9 index 26025596..06045e89 100644 --- a/buildcraft_resources/changelog/6.4.9 +++ b/buildcraft_resources/changelog/6.4.9 @@ -1,3 +1,4 @@ Bugfixes: [#2621] FluidStack crash with Forge 1355+ (asie) Crash on invalid mapping - instead reports error to console (asie) +Fluid dupe bug with pump robot (hea3ven)