From d32e50c16d965aad5a22b16c654b718ddadbe65b Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 25 Oct 2015 11:36:51 +0100 Subject: [PATCH] BuildCraft 7.1.12 --- build.gradle | 2 +- buildcraft_resources/changelog/7.1.12 | 2 +- buildcraft_resources/versions.txt | 2 +- common/buildcraft/core/lib/utils/BlockUtils.java | 11 ++++++++++- common/buildcraft/core/proxy/CoreProxy.java | 3 --- common/buildcraft/core/proxy/CoreProxyClient.java | 5 ----- common/buildcraft/robotics/EntityRobot.java | 2 -- .../robotics/boards/BoardRobotGenericBreakBlock.java | 1 - .../buildcraft/robotics/boards/BoardRobotMiner.java | 1 - common/buildcraft/silicon/TileIntegrationTable.java | 4 +++- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index a03ad422..4225bf0e 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 = "7.1.11" +version = "7.1.12" 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/7.1.12 b/buildcraft_resources/changelog/7.1.12 index 60547efb..b9683c8d 100644 --- a/buildcraft_resources/changelog/7.1.12 +++ b/buildcraft_resources/changelog/7.1.12 @@ -16,4 +16,4 @@ Bugs fixed: * [#3089] Integration Table dupe (asie) * [#3082] Void not killing robots (asie) * [#3081] Emzuli Pipe behaviour bug (asie) - +* Robot crash with TConstruct pickaxe on world reload (asie) diff --git a/buildcraft_resources/versions.txt b/buildcraft_resources/versions.txt index 13c7fd3b..ba7d1c4d 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:7.1.11 +1.7.10:BuildCraft:7.1.12 diff --git a/common/buildcraft/core/lib/utils/BlockUtils.java b/common/buildcraft/core/lib/utils/BlockUtils.java index 9dcaafb9..a5971661 100644 --- a/common/buildcraft/core/lib/utils/BlockUtils.java +++ b/common/buildcraft/core/lib/utils/BlockUtils.java @@ -97,6 +97,9 @@ public final class BlockUtils { return false; } + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer(world, x, y, z).get(); int i = 0; while (player.getHeldItem() != tool && i < 9) { @@ -107,7 +110,13 @@ public final class BlockUtils { player.inventory.setInventorySlotContents(i, tool); i++; } - world.getBlock(x, y, z).harvestBlock(world, player, x, y, z, world.getBlockMetadata(x, y, z)); + + if (!block.canHarvestBlock(player, meta)) { + return false; + } + + block.onBlockHarvested(world, x, y, z, meta, player); + block.harvestBlock(world, player, x, y, z, meta); world.setBlockToAir(x, y, z); return true; diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 9ea90c73..e3b35cc5 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -9,10 +9,7 @@ package buildcraft.core.proxy; import java.lang.ref.WeakReference; -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 5a410797..63c7435f 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -8,15 +8,10 @@ */ package buildcraft.core.proxy; -import java.util.List; - -import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; diff --git a/common/buildcraft/robotics/EntityRobot.java b/common/buildcraft/robotics/EntityRobot.java index 5b4196c2..07ebb200 100644 --- a/common/buildcraft/robotics/EntityRobot.java +++ b/common/buildcraft/robotics/EntityRobot.java @@ -18,7 +18,6 @@ import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; import io.netty.buffer.ByteBuf; -import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -69,7 +68,6 @@ import buildcraft.api.boards.RedstoneBoardRobot; import buildcraft.api.boards.RedstoneBoardRobotNBT; import buildcraft.api.core.BCLog; import buildcraft.api.core.BlockIndex; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.IZone; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.events.RobotEvent; diff --git a/common/buildcraft/robotics/boards/BoardRobotGenericBreakBlock.java b/common/buildcraft/robotics/boards/BoardRobotGenericBreakBlock.java index 28cad82b..82b6a16e 100644 --- a/common/buildcraft/robotics/boards/BoardRobotGenericBreakBlock.java +++ b/common/buildcraft/robotics/boards/BoardRobotGenericBreakBlock.java @@ -17,7 +17,6 @@ import buildcraft.robotics.ai.AIRobotBreak; import buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack; import buildcraft.robotics.ai.AIRobotGotoSleep; import buildcraft.robotics.ai.AIRobotGotoStationAndUnload; -import buildcraft.robotics.ai.AIRobotUnload; public abstract class BoardRobotGenericBreakBlock extends BoardRobotGenericSearchBlock { diff --git a/common/buildcraft/robotics/boards/BoardRobotMiner.java b/common/buildcraft/robotics/boards/BoardRobotMiner.java index ae0c9a3a..4516c1ec 100755 --- a/common/buildcraft/robotics/boards/BoardRobotMiner.java +++ b/common/buildcraft/robotics/boards/BoardRobotMiner.java @@ -8,7 +8,6 @@ */ package buildcraft.robotics.boards; -import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.world.World; diff --git a/common/buildcraft/silicon/TileIntegrationTable.java b/common/buildcraft/silicon/TileIntegrationTable.java index 84354499..35f36b8f 100644 --- a/common/buildcraft/silicon/TileIntegrationTable.java +++ b/common/buildcraft/silicon/TileIntegrationTable.java @@ -27,10 +27,12 @@ import buildcraft.core.lib.utils.Utils; public class TileIntegrationTable extends TileLaserTableBase implements ISidedInventory { public static final int SLOT_OUTPUT = 9; - public final IInventory clientOutputInv = new SimpleInventory(1, "Preview", 64); private static final int CYCLE_LENGTH = 16; private static final int[] SLOTS = Utils.createSlotArray(0, 10); + + public final IInventory clientOutputInv = new SimpleInventory(1, "Preview", 64); + private int tick = 0; private IIntegrationRecipe activeRecipe; private boolean activeRecipeValid = false;