From b094426ba554690bd418e599661eabd99a4aa5ee Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 3 Aug 2015 18:33:57 +0200 Subject: [PATCH] BuildCraft 7.1.0 --- build.gradle | 2 +- buildcraft_resources/changelog/7.1.0 | 1 - common/buildcraft/BuildCraftCore.java | 2 +- common/buildcraft/BuildCraftRobotics.java | 8 +++----- .../buildcraft/builders/LibraryDatabase.java | 1 - .../builders/TileBlueprintLibrary.java | 1 - common/buildcraft/builders/TileFiller.java | 1 - .../builders/gui/GuiBlueprintLibrary.java | 1 - .../core/list/ContainerListOld.java | 1 - common/buildcraft/core/list/GuiListNew.java | 20 +++++++++---------- .../buildcraft/core/list/ListHandlerNew.java | 8 ++++++-- .../buildcraft/core/list/ListHandlerOld.java | 6 +++++- .../core/list/ListMatchHandlerClass.java | 3 --- .../core/list/ListOreDictionaryCache.java | 1 - common/buildcraft/core/list/ListRegistry.java | 6 +++++- common/buildcraft/core/tablet/GuiTablet.java | 1 - common/buildcraft/core/tablet/TabletBase.java | 1 - common/buildcraft/factory/BlockFloodGate.java | 1 - common/buildcraft/robotics/EntityRobot.java | 2 +- .../robotics/RoboticsProxyClient.java | 2 +- .../robotics/gui/ContainerZonePlan.java | 2 +- .../buildcraft/robotics/gui/GuiZonePlan.java | 2 +- .../statements/ActionStationRequestItems.java | 1 - 23 files changed, 35 insertions(+), 39 deletions(-) diff --git a/build.gradle b/build.gradle index d9f8f163..c199320d 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.0.18" +version = "7.1.0" 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.0 b/buildcraft_resources/changelog/7.1.0 index 90842f53..f94b49d8 100644 --- a/buildcraft_resources/changelog/7.1.0 +++ b/buildcraft_resources/changelog/7.1.0 @@ -31,7 +31,6 @@ Improvements: * Zone Planners now have a dynamic texture (asie) * Requesters now support the Comparator (asie) * Add events for robot interaction and removal (asie) - * Add the Breaker robot that mines stone materials (hea3ven) * Fix robots not using the correct sides when accessing inventories/tanks (hea3ven) * Fix loading break ai from nbt (hea3ven) * Transport: diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 7df207c0..4eccd666 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -126,12 +126,12 @@ import buildcraft.core.lib.engines.TileEngineBase; import buildcraft.core.lib.network.ChannelHandler; import buildcraft.core.lib.utils.ColorUtils; import buildcraft.core.lib.utils.NBTUtils; -import buildcraft.core.list.ListOreDictionaryCache; import buildcraft.core.lib.utils.Utils; import buildcraft.core.lib.utils.XorShift128Random; import buildcraft.core.list.ListMatchHandlerClass; import buildcraft.core.list.ListMatchHandlerFluid; import buildcraft.core.list.ListMatchHandlerOreDictionary; +import buildcraft.core.list.ListOreDictionaryCache; import buildcraft.core.list.ListRegistry; import buildcraft.core.list.ListTooltipHandler; import buildcraft.core.network.PacketHandlerCore; diff --git a/common/buildcraft/BuildCraftRobotics.java b/common/buildcraft/BuildCraftRobotics.java index 8726d66a..e1bdabd8 100644 --- a/common/buildcraft/BuildCraftRobotics.java +++ b/common/buildcraft/BuildCraftRobotics.java @@ -16,9 +16,7 @@ import java.util.List; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; - import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; @@ -34,7 +32,6 @@ import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; @@ -152,7 +149,6 @@ import buildcraft.robotics.statements.TriggerRobotInStation; import buildcraft.robotics.statements.TriggerRobotLinked; import buildcraft.robotics.statements.TriggerRobotSleep; import buildcraft.silicon.ItemRedstoneChipset; -import buildcraft.transport.ItemPipe; @Mod(name = "BuildCraft Robotics", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Robotics", dependencies = DefaultProps.DEPENDENCY_CORE) public class BuildCraftRobotics extends BuildCraftMod { @@ -238,7 +234,9 @@ public class BuildCraftRobotics extends BuildCraftMod { RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotButcher", "butcher", BoardRobotButcher.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:shovelman", "shovelman", BoardRobotShovelman.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotPump", "pump", BoardRobotPump.class, "blue"), 32000); - RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotBreaker", "breaker", BoardRobotBreaker.class, "blue"), 32000); + + // TODO: Discuss this one! + //RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotBreaker", "breaker", BoardRobotBreaker.class, "blue"), 32000); // Even more expensive // These handle complex multi-step operations. diff --git a/common/buildcraft/builders/LibraryDatabase.java b/common/buildcraft/builders/LibraryDatabase.java index 12fa0f95..5ba688c1 100644 --- a/common/buildcraft/builders/LibraryDatabase.java +++ b/common/buildcraft/builders/LibraryDatabase.java @@ -107,7 +107,6 @@ public class LibraryDatabase { byte[] data = NBTUtils.save(compound); base.generateUniqueId(data); File blueprintFile = getBlueprintOutputFile(base); - System.out.println(blueprintFile.getName() + " - " + data.length); if (!blueprintFile.exists()) { try { diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index 7c2b4f4d..9c6bfada 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -9,7 +9,6 @@ package buildcraft.builders; import java.io.IOException; -import java.util.ArrayList; import java.util.List; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index fe476041..48100a7e 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -27,7 +27,6 @@ import buildcraft.api.tiles.IControllable; import buildcraft.api.tiles.IHasWork; import buildcraft.core.Box; import buildcraft.core.Box.Kind; -import buildcraft.core.TileMarker; import buildcraft.core.blueprints.BptBuilderTemplate; import buildcraft.core.blueprints.BptContext; import buildcraft.core.builders.TileAbstractBuilder; diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 67091b7c..16e59d60 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -14,7 +14,6 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; -import buildcraft.BuildCraftBuilders; import buildcraft.api.library.LibraryAPI; import buildcraft.builders.TileBlueprintLibrary; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/core/list/ContainerListOld.java b/common/buildcraft/core/list/ContainerListOld.java index 7dbb654c..26aa3475 100755 --- a/common/buildcraft/core/list/ContainerListOld.java +++ b/common/buildcraft/core/list/ContainerListOld.java @@ -17,7 +17,6 @@ import cpw.mods.fml.relauncher.Side; import buildcraft.BuildCraftCore; import buildcraft.core.ItemList; -import buildcraft.core.list.ListHandlerOld; import buildcraft.core.lib.gui.BuildCraftContainer; import buildcraft.core.lib.network.command.CommandWriter; import buildcraft.core.lib.network.command.ICommandReceiver; diff --git a/common/buildcraft/core/list/GuiListNew.java b/common/buildcraft/core/list/GuiListNew.java index e2eca356..afcc61dd 100755 --- a/common/buildcraft/core/list/GuiListNew.java +++ b/common/buildcraft/core/list/GuiListNew.java @@ -79,6 +79,15 @@ public class GuiListNew extends GuiAdvancedInterface implements IButtonClickEven } } + public GuiListNew(EntityPlayer iPlayer) { + super(new ContainerListNew(iPlayer), iPlayer.inventory, TEXTURE_BASE); + + xSize = 176; + ySize = 192; + + player = iPlayer; + } + private void clearExamplesCache(int lineId) { Map> exampleList = exampleCache.get(lineId); if (exampleList != null) { @@ -112,15 +121,6 @@ public class GuiListNew extends GuiAdvancedInterface implements IButtonClickEven return exampleList.get(type); } - public GuiListNew(EntityPlayer iPlayer) { - super(new ContainerListNew(iPlayer), iPlayer.inventory, TEXTURE_BASE); - - xSize = 176; - ySize = 192; - - player = iPlayer; - } - @Override public void initGui() { super.initGui(); @@ -143,7 +143,7 @@ public class GuiListNew extends GuiAdvancedInterface implements IButtonClickEven } for (Object o : buttonList) { - GuiImageButton b = ((GuiImageButton) o); + GuiImageButton b = (GuiImageButton) o; int lineId = b.id / BUTTON_COUNT; int buttonId = b.id % BUTTON_COUNT; if (((ContainerListNew) getContainer()).lines[lineId].getOption(buttonId)) { diff --git a/common/buildcraft/core/list/ListHandlerNew.java b/common/buildcraft/core/list/ListHandlerNew.java index fd6eb096..0921feaa 100644 --- a/common/buildcraft/core/list/ListHandlerNew.java +++ b/common/buildcraft/core/list/ListHandlerNew.java @@ -11,7 +11,7 @@ import net.minecraft.nbt.NBTTagList; import buildcraft.core.lib.inventory.StackHelper; import buildcraft.core.lib.utils.NBTUtils; -public class ListHandlerNew { +public final class ListHandlerNew { public static final int WIDTH = 9; public static final int HEIGHT = 2; @@ -28,7 +28,7 @@ public class ListHandlerNew { } public boolean getOption(int id) { - return (id == 0 ? precise : (id == 1 ? byType : byMaterial)); + return id == 0 ? precise : (id == 1 ? byType : byMaterial); } public void toggleOption(int id) { @@ -143,6 +143,10 @@ public class ListHandlerNew { } } + private ListHandlerNew() { + + } + public static Line[] getLines(ItemStack item) { NBTTagCompound data = NBTUtils.getItemData(item); if (data.hasKey("written") && data.hasKey("lines")) { diff --git a/common/buildcraft/core/list/ListHandlerOld.java b/common/buildcraft/core/list/ListHandlerOld.java index ff040375..32a613aa 100644 --- a/common/buildcraft/core/list/ListHandlerOld.java +++ b/common/buildcraft/core/list/ListHandlerOld.java @@ -18,7 +18,7 @@ import net.minecraftforge.oredict.OreDictionary; import buildcraft.core.lib.inventory.StackHelper; import buildcraft.core.lib.utils.NBTUtils; -public class ListHandlerOld { +public final class ListHandlerOld { private static final WeakHashMap LINE_CACHE = new WeakHashMap(); public static class StackLine { @@ -195,6 +195,10 @@ public class ListHandlerOld { } } + private ListHandlerOld() { + + } + public static void saveLine(ItemStack stack, StackLine line, int index) { NBTTagCompound nbt = NBTUtils.getItemData(stack); diff --git a/common/buildcraft/core/list/ListMatchHandlerClass.java b/common/buildcraft/core/list/ListMatchHandlerClass.java index 415fe2f3..d4527992 100644 --- a/common/buildcraft/core/list/ListMatchHandlerClass.java +++ b/common/buildcraft/core/list/ListMatchHandlerClass.java @@ -1,11 +1,8 @@ package buildcraft.core.list; import java.util.ArrayList; -import java.util.Collection; import java.util.HashSet; -import java.util.Iterator; import java.util.List; -import java.util.ListIterator; import java.util.Set; import net.minecraft.creativetab.CreativeTabs; diff --git a/common/buildcraft/core/list/ListOreDictionaryCache.java b/common/buildcraft/core/list/ListOreDictionaryCache.java index 4ca2f5ba..85e3be42 100644 --- a/common/buildcraft/core/list/ListOreDictionaryCache.java +++ b/common/buildcraft/core/list/ListOreDictionaryCache.java @@ -5,7 +5,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.oredict.OreDictionary; public final class ListOreDictionaryCache { diff --git a/common/buildcraft/core/list/ListRegistry.java b/common/buildcraft/core/list/ListRegistry.java index d15b36e8..4dbbecc5 100644 --- a/common/buildcraft/core/list/ListRegistry.java +++ b/common/buildcraft/core/list/ListRegistry.java @@ -4,9 +4,13 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class ListRegistry { +public final class ListRegistry { private static final List handlers = new ArrayList(); + private ListRegistry() { + + } + public static void registerHandler(ListMatchHandler h) { if (h != null) { handlers.add(h); diff --git a/common/buildcraft/core/tablet/GuiTablet.java b/common/buildcraft/core/tablet/GuiTablet.java index 0381b3c7..70d86637 100644 --- a/common/buildcraft/core/tablet/GuiTablet.java +++ b/common/buildcraft/core/tablet/GuiTablet.java @@ -107,7 +107,6 @@ public class GuiTablet extends GuiScreen { } else if (buttonState == 2) { if (isButton(x, y)) { buttonState = ENABLE_HIGHLIGHT ? 0 : 1; - System.out.println("PRESS"); } else { buttonState = 1; } diff --git a/common/buildcraft/core/tablet/TabletBase.java b/common/buildcraft/core/tablet/TabletBase.java index 1835ff83..173a7844 100644 --- a/common/buildcraft/core/tablet/TabletBase.java +++ b/common/buildcraft/core/tablet/TabletBase.java @@ -59,7 +59,6 @@ public abstract class TabletBase implements ITablet { return true; } else { if (compound.hasKey("programToLaunch")) { - System.out.println("received"); launchProgramInternal(compound.getString("programToLaunch")); return true; } diff --git a/common/buildcraft/factory/BlockFloodGate.java b/common/buildcraft/factory/BlockFloodGate.java index 78b888af..3575f055 100644 --- a/common/buildcraft/factory/BlockFloodGate.java +++ b/common/buildcraft/factory/BlockFloodGate.java @@ -55,7 +55,6 @@ public class BlockFloodGate extends BlockBuildCraft { // Restart the flood gate if it's a wrench Item equipped = entityplayer.getCurrentEquippedItem() != null ? entityplayer.getCurrentEquippedItem().getItem() : null; if (equipped instanceof IToolWrench && ((IToolWrench) equipped).canWrench(entityplayer, i, j, k)) { - System.out.println("pre=" + side); if (side == 1) { floodGate.rebuildQueue(); } else { diff --git a/common/buildcraft/robotics/EntityRobot.java b/common/buildcraft/robotics/EntityRobot.java index fe3613d6..d23cfb51 100644 --- a/common/buildcraft/robotics/EntityRobot.java +++ b/common/buildcraft/robotics/EntityRobot.java @@ -34,6 +34,7 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; @@ -42,7 +43,6 @@ import net.minecraft.util.StringUtils; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldServer; - import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/common/buildcraft/robotics/RoboticsProxyClient.java b/common/buildcraft/robotics/RoboticsProxyClient.java index 1020695d..2f1fd5fe 100644 --- a/common/buildcraft/robotics/RoboticsProxyClient.java +++ b/common/buildcraft/robotics/RoboticsProxyClient.java @@ -14,8 +14,8 @@ import cpw.mods.fml.common.Loader; import net.minecraftforge.client.MinecraftForgeClient; import buildcraft.BuildCraftRobotics; -import buildcraft.robotics.render.RenderZonePlan; import buildcraft.robotics.render.RenderRobot; +import buildcraft.robotics.render.RenderZonePlan; import buildcraft.robotics.render.RobotStationItemRenderer; public class RoboticsProxyClient extends RoboticsProxy { diff --git a/common/buildcraft/robotics/gui/ContainerZonePlan.java b/common/buildcraft/robotics/gui/ContainerZonePlan.java index df7c1f56..f50483a8 100755 --- a/common/buildcraft/robotics/gui/ContainerZonePlan.java +++ b/common/buildcraft/robotics/gui/ContainerZonePlan.java @@ -18,7 +18,6 @@ import cpw.mods.fml.relauncher.Side; import buildcraft.BuildCraftCore; import buildcraft.BuildCraftRobotics; -import buildcraft.robotics.ZonePlan; import buildcraft.core.lib.gui.BuildCraftContainer; import buildcraft.core.lib.gui.slots.SlotOutput; import buildcraft.core.lib.network.command.CommandWriter; @@ -27,6 +26,7 @@ import buildcraft.core.lib.network.command.PacketCommand; import buildcraft.core.lib.render.DynamicTextureBC; import buildcraft.core.lib.utils.NetworkUtils; import buildcraft.robotics.TileZonePlan; +import buildcraft.robotics.ZonePlan; import buildcraft.robotics.map.MapWorld; public class ContainerZonePlan extends BuildCraftContainer implements ICommandReceiver { diff --git a/common/buildcraft/robotics/gui/GuiZonePlan.java b/common/buildcraft/robotics/gui/GuiZonePlan.java index 35517ae6..dee46c4e 100755 --- a/common/buildcraft/robotics/gui/GuiZonePlan.java +++ b/common/buildcraft/robotics/gui/GuiZonePlan.java @@ -25,7 +25,6 @@ import net.minecraft.util.ResourceLocation; import buildcraft.BuildCraftCore; import buildcraft.api.core.EnumColor; import buildcraft.core.DefaultProps; -import buildcraft.robotics.ZonePlan; import buildcraft.core.lib.gui.AdvancedSlot; import buildcraft.core.lib.gui.GuiAdvancedInterface; import buildcraft.core.lib.gui.buttons.GuiBetterButton; @@ -38,6 +37,7 @@ import buildcraft.core.lib.render.DynamicTextureBC; import buildcraft.core.lib.utils.NetworkUtils; import buildcraft.core.lib.utils.StringUtils; import buildcraft.robotics.TileZonePlan; +import buildcraft.robotics.ZonePlan; public class GuiZonePlan extends GuiAdvancedInterface { diff --git a/common/buildcraft/robotics/statements/ActionStationRequestItems.java b/common/buildcraft/robotics/statements/ActionStationRequestItems.java index ce57ace7..e3f4ad7d 100755 --- a/common/buildcraft/robotics/statements/ActionStationRequestItems.java +++ b/common/buildcraft/robotics/statements/ActionStationRequestItems.java @@ -11,7 +11,6 @@ package buildcraft.robotics.statements; import net.minecraft.client.renderer.texture.IIconRegister; import buildcraft.api.statements.IStatementParameter; -import buildcraft.api.statements.StatementParameterItemStack; import buildcraft.core.lib.utils.StringUtils; import buildcraft.core.statements.StatementParameterItemStackExact;