From be872d3692eaf936c24c91f6f13d468f12907691 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 12 Jan 2014 19:12:40 +0100 Subject: [PATCH 01/31] Starting the port to Minecraft 1.7 Initial set of very obvious fixes for Minecraft 1.7 port, with an early version of Forge. --- common/buildcraft/BuildCraftBuilders.java | 4 ++-- common/buildcraft/BuildCraftCore.java | 4 ++-- common/buildcraft/BuildCraftEnergy.java | 4 ++-- common/buildcraft/BuildCraftFactory.java | 4 ++-- common/buildcraft/BuildCraftSilicon.java | 2 +- common/buildcraft/BuildCraftTransport.java | 6 +++--- common/buildcraft/api/core/Position.java | 2 +- common/buildcraft/api/filler/IFillerPattern.java | 2 +- common/buildcraft/api/gates/ITileTrigger.java | 2 +- common/buildcraft/api/inventory/ISpecialInventory.java | 2 +- common/buildcraft/api/power/IPowerEmitter.java | 2 +- common/buildcraft/api/power/IPowerReceptor.java | 2 +- common/buildcraft/api/power/PowerHandler.java | 2 +- common/buildcraft/api/transport/IPipeConnection.java | 2 +- common/buildcraft/api/transport/IPipeTile.java | 2 +- common/buildcraft/api/transport/PipeBehavior.java | 2 +- common/buildcraft/builders/BlockArchitect.java | 2 +- common/buildcraft/builders/BlockBuilder.java | 2 +- common/buildcraft/builders/BlockMarker.java | 2 +- common/buildcraft/builders/TileArchitect.java | 2 +- common/buildcraft/builders/TileBuilder.java | 2 +- common/buildcraft/builders/TileFiller.java | 2 +- .../buildcraft/builders/filler/pattern/FillerPattern.java | 2 +- common/buildcraft/core/BuildCraftConfiguration.java | 4 ++-- common/buildcraft/core/EntityRobot.java | 8 +++++--- common/buildcraft/core/ITileBufferHolder.java | 2 +- common/buildcraft/core/ItemWrench.java | 2 +- common/buildcraft/core/TileBuffer.java | 2 +- common/buildcraft/core/Version.java | 2 +- common/buildcraft/core/fluids/FluidUtils.java | 2 +- common/buildcraft/core/fluids/TankManager.java | 2 +- common/buildcraft/core/inventory/ITransactor.java | 2 +- common/buildcraft/core/inventory/InvUtils.java | 2 +- common/buildcraft/core/inventory/InventoryIterator.java | 2 +- .../buildcraft/core/inventory/InventoryIteratorSided.java | 2 +- common/buildcraft/core/inventory/Transactor.java | 2 +- .../buildcraft/core/inventory/TransactorRoundRobin.java | 2 +- common/buildcraft/core/inventory/TransactorSimple.java | 2 +- common/buildcraft/core/inventory/TransactorSpecial.java | 2 +- common/buildcraft/core/recipes/AssemblyRecipeManager.java | 2 +- .../buildcraft/core/triggers/DefaultTriggerProvider.java | 2 +- .../buildcraft/core/triggers/TriggerFluidContainer.java | 2 +- common/buildcraft/core/triggers/TriggerInventory.java | 2 +- .../buildcraft/core/triggers/TriggerInventoryLevel.java | 2 +- common/buildcraft/core/triggers/TriggerMachine.java | 2 +- common/buildcraft/core/utils/ConfigUtils.java | 4 ++-- common/buildcraft/core/utils/MatrixTranformations.java | 2 +- common/buildcraft/core/utils/Utils.java | 2 +- common/buildcraft/energy/BlockBuildcraftFluid.java | 2 +- common/buildcraft/energy/BlockEngine.java | 2 +- common/buildcraft/energy/BptBlockEngine.java | 2 +- common/buildcraft/energy/TileEngine.java | 2 +- common/buildcraft/energy/TileEngineIron.java | 2 +- common/buildcraft/energy/TileEngineStone.java | 2 +- common/buildcraft/energy/TileEngineWood.java | 2 +- common/buildcraft/energy/render/RenderEngine.java | 2 +- common/buildcraft/energy/triggers/TriggerEngineHeat.java | 2 +- common/buildcraft/energy/worldgen/OilPopulate.java | 2 +- common/buildcraft/factory/BlockMiningWell.java | 2 +- common/buildcraft/factory/BlockQuarry.java | 2 +- common/buildcraft/factory/BlockRefinery.java | 2 +- common/buildcraft/factory/BlockTank.java | 2 +- common/buildcraft/factory/BptBlockRefinery.java | 2 +- common/buildcraft/factory/TileAutoWorkbench.java | 2 +- common/buildcraft/factory/TileFloodGate.java | 2 +- common/buildcraft/factory/TileHopper.java | 2 +- common/buildcraft/factory/TileMiningWell.java | 2 +- common/buildcraft/factory/TilePump.java | 2 +- common/buildcraft/factory/TileQuarry.java | 2 +- common/buildcraft/factory/TileRefinery.java | 2 +- common/buildcraft/factory/TileTank.java | 2 +- common/buildcraft/silicon/BlockLaser.java | 2 +- common/buildcraft/silicon/SiliconRenderBlock.java | 2 +- common/buildcraft/silicon/TileAdvancedCraftingTable.java | 2 +- common/buildcraft/silicon/TileAssemblyTable.java | 2 +- common/buildcraft/silicon/TileIntegrationTable.java | 2 +- common/buildcraft/silicon/TileLaser.java | 2 +- common/buildcraft/transport/BlockGenericPipe.java | 2 +- common/buildcraft/transport/Gate.java | 2 +- common/buildcraft/transport/IPipeConnectionForced.java | 2 +- common/buildcraft/transport/IPipeTransportFluidsHook.java | 2 +- common/buildcraft/transport/IPipeTransportItemsHook.java | 2 +- common/buildcraft/transport/IPipeTransportPowerHook.java | 2 +- common/buildcraft/transport/ISolidSideTile.java | 2 +- common/buildcraft/transport/ItemFacade.java | 2 +- common/buildcraft/transport/Pipe.java | 2 +- common/buildcraft/transport/PipeTransport.java | 2 +- common/buildcraft/transport/PipeTransportFluids.java | 2 +- common/buildcraft/transport/PipeTransportItems.java | 2 +- common/buildcraft/transport/PipeTransportPower.java | 2 +- common/buildcraft/transport/PipeTransportStructure.java | 2 +- common/buildcraft/transport/TileGenericPipe.java | 2 +- common/buildcraft/transport/TravelingItem.java | 2 +- .../transport/blueprints/BptItemPipeDiamond.java | 2 +- .../buildcraft/transport/blueprints/BptItemPipeIron.java | 2 +- .../transport/blueprints/BptItemPipeWooden.java | 2 +- .../buildcraft/transport/gates/GateExpansionPulsar.java | 2 +- .../buildcraft/transport/gui/ContainerGateInterface.java | 2 +- .../buildcraft/transport/network/PacketFluidUpdate.java | 2 +- .../transport/network/PacketPipeTransportTraveler.java | 2 +- .../buildcraft/transport/pipes/PipeFluidsCobblestone.java | 2 +- common/buildcraft/transport/pipes/PipeFluidsGold.java | 2 +- common/buildcraft/transport/pipes/PipeFluidsIron.java | 2 +- .../buildcraft/transport/pipes/PipeFluidsSandstone.java | 2 +- common/buildcraft/transport/pipes/PipeFluidsStone.java | 2 +- common/buildcraft/transport/pipes/PipeFluidsVoid.java | 2 +- common/buildcraft/transport/pipes/PipeFluidsWood.java | 2 +- .../buildcraft/transport/pipes/PipeItemsCobblestone.java | 2 +- common/buildcraft/transport/pipes/PipeItemsDaizuli.java | 2 +- common/buildcraft/transport/pipes/PipeItemsDiamond.java | 2 +- common/buildcraft/transport/pipes/PipeItemsEmerald.java | 2 +- common/buildcraft/transport/pipes/PipeItemsEmzuli.java | 2 +- common/buildcraft/transport/pipes/PipeItemsGold.java | 2 +- common/buildcraft/transport/pipes/PipeItemsIron.java | 2 +- common/buildcraft/transport/pipes/PipeItemsLapis.java | 2 +- common/buildcraft/transport/pipes/PipeItemsObsidian.java | 2 +- common/buildcraft/transport/pipes/PipeItemsQuartz.java | 2 +- common/buildcraft/transport/pipes/PipeItemsSandstone.java | 2 +- common/buildcraft/transport/pipes/PipeItemsStone.java | 2 +- common/buildcraft/transport/pipes/PipeItemsVoid.java | 2 +- common/buildcraft/transport/pipes/PipeItemsWood.java | 2 +- common/buildcraft/transport/pipes/PipeLogicIron.java | 2 +- common/buildcraft/transport/pipes/PipeLogicWood.java | 2 +- .../buildcraft/transport/pipes/PipePowerCobblestone.java | 2 +- common/buildcraft/transport/pipes/PipePowerDiamond.java | 2 +- common/buildcraft/transport/pipes/PipePowerGold.java | 2 +- common/buildcraft/transport/pipes/PipePowerIron.java | 2 +- common/buildcraft/transport/pipes/PipePowerQuartz.java | 2 +- common/buildcraft/transport/pipes/PipePowerStone.java | 2 +- common/buildcraft/transport/pipes/PipePowerWood.java | 2 +- .../transport/pipes/PipeStructureCobblestone.java | 2 +- .../buildcraft/transport/pipes/events/PipeEventItem.java | 2 +- .../buildcraft/transport/render/FacadeRenderHelper.java | 2 +- common/buildcraft/transport/render/PipeRendererTESR.java | 2 +- common/buildcraft/transport/render/PipeRendererWorld.java | 2 +- .../transport/triggers/ActionPipeDirection.java | 2 +- .../transport/triggers/TriggerPipeContents.java | 2 +- common/buildcraft/transport/utils/ConnectionMatrix.java | 2 +- common/buildcraft/transport/utils/FacadeMatrix.java | 2 +- common/buildcraft/transport/utils/TextureMatrix.java | 2 +- common/buildcraft/transport/utils/WireMatrix.java | 2 +- 141 files changed, 153 insertions(+), 151 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index ec240852..075a92eb 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -87,9 +87,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index ce791129..76ddb43a 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -18,10 +18,10 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.fluids.IFluidBlock; diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 85653d82..5c7630d9 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -52,9 +52,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index 4ed83863..0137787a 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -58,11 +58,11 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.common.Configuration; +import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE) diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 0962c691..6bb2e70d 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -50,7 +50,7 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; @Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT) @NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerSilicon.class, clientSideRequired = true, serverSideRequired = true) diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 902f13ed..a01d9f48 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -107,9 +107,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.ForgeDirection; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.common.config.Property; @Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE) @NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerTransport.class, connectionHandler = TransportConnectionHandler.class) diff --git a/common/buildcraft/api/core/Position.java b/common/buildcraft/api/core/Position.java index 5cdddbc8..72bdbf87 100644 --- a/common/buildcraft/api/core/Position.java +++ b/common/buildcraft/api/core/Position.java @@ -11,7 +11,7 @@ package buildcraft.api.core; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class Position { diff --git a/common/buildcraft/api/filler/IFillerPattern.java b/common/buildcraft/api/filler/IFillerPattern.java index 45dce17b..3b39dafc 100644 --- a/common/buildcraft/api/filler/IFillerPattern.java +++ b/common/buildcraft/api/filler/IFillerPattern.java @@ -5,7 +5,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface IFillerPattern { diff --git a/common/buildcraft/api/gates/ITileTrigger.java b/common/buildcraft/api/gates/ITileTrigger.java index 2063cbb8..db088158 100644 --- a/common/buildcraft/api/gates/ITileTrigger.java +++ b/common/buildcraft/api/gates/ITileTrigger.java @@ -9,7 +9,7 @@ package buildcraft.api.gates; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/api/inventory/ISpecialInventory.java b/common/buildcraft/api/inventory/ISpecialInventory.java index 27b735d4..fd535153 100644 --- a/common/buildcraft/api/inventory/ISpecialInventory.java +++ b/common/buildcraft/api/inventory/ISpecialInventory.java @@ -2,7 +2,7 @@ package buildcraft.api.inventory; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface ISpecialInventory extends IInventory { diff --git a/common/buildcraft/api/power/IPowerEmitter.java b/common/buildcraft/api/power/IPowerEmitter.java index 7ccf62b9..7a06f4a4 100644 --- a/common/buildcraft/api/power/IPowerEmitter.java +++ b/common/buildcraft/api/power/IPowerEmitter.java @@ -8,7 +8,7 @@ */ package buildcraft.api.power; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * Essentially only used for Wooden Power Pipe connection rules. diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/common/buildcraft/api/power/IPowerReceptor.java index 48b84c90..b781423e 100644 --- a/common/buildcraft/api/power/IPowerReceptor.java +++ b/common/buildcraft/api/power/IPowerReceptor.java @@ -8,7 +8,7 @@ package buildcraft.api.power; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * This interface should be implemented by any Tile Entity that wishes to be diff --git a/common/buildcraft/api/power/PowerHandler.java b/common/buildcraft/api/power/PowerHandler.java index f9c2eed2..13da19f0 100644 --- a/common/buildcraft/api/power/PowerHandler.java +++ b/common/buildcraft/api/power/PowerHandler.java @@ -9,7 +9,7 @@ package buildcraft.api.power; import buildcraft.api.core.SafeTimeTracker; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * The PowerHandler is similar to FluidTank in that it holds your power and diff --git a/common/buildcraft/api/transport/IPipeConnection.java b/common/buildcraft/api/transport/IPipeConnection.java index cbb1d003..02904099 100644 --- a/common/buildcraft/api/transport/IPipeConnection.java +++ b/common/buildcraft/api/transport/IPipeConnection.java @@ -8,7 +8,7 @@ package buildcraft.api.transport; import buildcraft.api.transport.IPipeTile.PipeType; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface IPipeConnection { diff --git a/common/buildcraft/api/transport/IPipeTile.java b/common/buildcraft/api/transport/IPipeTile.java index 00b76ce9..91c70eb7 100644 --- a/common/buildcraft/api/transport/IPipeTile.java +++ b/common/buildcraft/api/transport/IPipeTile.java @@ -8,7 +8,7 @@ package buildcraft.api.transport; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface IPipeTile { diff --git a/common/buildcraft/api/transport/PipeBehavior.java b/common/buildcraft/api/transport/PipeBehavior.java index bf1c2123..ef0b3605 100644 --- a/common/buildcraft/api/transport/PipeBehavior.java +++ b/common/buildcraft/api/transport/PipeBehavior.java @@ -11,7 +11,7 @@ package buildcraft.api.transport; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index dd86918d..d925dfc2 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -29,7 +29,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockArchitect extends BlockContainer { diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index 0fa76e91..24728860 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -26,7 +26,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockBuilder extends BlockContainer { diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index f4001be8..bcf61fb1 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -23,7 +23,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockMarker extends BlockContainer { diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 6ab31506..1be244bc 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -12,7 +12,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftBuilders; import buildcraft.api.core.IAreaProvider; import buildcraft.api.core.LaserKind; diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 2774ff84..51a48c9a 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -44,7 +44,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IPowerReceptor, IMachine { diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index a4d18f55..24877e0c 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -42,7 +42,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileFiller extends TileBuildCraft implements IInventory, IPowerReceptor, IMachine, IActionReceptor, IGuiReturnHandler { diff --git a/common/buildcraft/builders/filler/pattern/FillerPattern.java b/common/buildcraft/builders/filler/pattern/FillerPattern.java index f7c141fb..684b0514 100644 --- a/common/buildcraft/builders/filler/pattern/FillerPattern.java +++ b/common/buildcraft/builders/filler/pattern/FillerPattern.java @@ -22,7 +22,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class FillerPattern implements IFillerPattern { diff --git a/common/buildcraft/core/BuildCraftConfiguration.java b/common/buildcraft/core/BuildCraftConfiguration.java index 9f925e9f..0aec3428 100644 --- a/common/buildcraft/core/BuildCraftConfiguration.java +++ b/common/buildcraft/core/BuildCraftConfiguration.java @@ -10,8 +10,8 @@ package buildcraft.core; import java.io.File; -import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; public class BuildCraftConfiguration extends Configuration { diff --git a/common/buildcraft/core/EntityRobot.java b/common/buildcraft/core/EntityRobot.java index 9e5bb507..ca01412d 100644 --- a/common/buildcraft/core/EntityRobot.java +++ b/common/buildcraft/core/EntityRobot.java @@ -9,6 +9,8 @@ package buildcraft.core; +import io.netty.buffer.ByteBuf; + import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -87,12 +89,12 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { } @Override - public void writeSpawnData(ByteArrayDataOutput data) { + public void writeSpawnData(ByteBuf data) { if (box == null) { box = new Box(); } - + data.writeInt(box.xMin); data.writeInt(box.yMin); data.writeInt(box.zMin); @@ -102,7 +104,7 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { } @Override - public void readSpawnData(ByteArrayDataInput data) { + public void readSpawnData(ByteBuf data) { box = new Box(); box.xMin = data.readInt(); diff --git a/common/buildcraft/core/ITileBufferHolder.java b/common/buildcraft/core/ITileBufferHolder.java index 39aea034..7af1f4c8 100644 --- a/common/buildcraft/core/ITileBufferHolder.java +++ b/common/buildcraft/core/ITileBufferHolder.java @@ -10,7 +10,7 @@ package buildcraft.core; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface ITileBufferHolder { diff --git a/common/buildcraft/core/ItemWrench.java b/common/buildcraft/core/ItemWrench.java index ae105191..69356d42 100644 --- a/common/buildcraft/core/ItemWrench.java +++ b/common/buildcraft/core/ItemWrench.java @@ -10,7 +10,7 @@ import net.minecraft.block.BlockLever; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class ItemWrench extends ItemBuildCraft implements IToolWrench { diff --git a/common/buildcraft/core/TileBuffer.java b/common/buildcraft/core/TileBuffer.java index f06debd2..63e3bc9f 100644 --- a/common/buildcraft/core/TileBuffer.java +++ b/common/buildcraft/core/TileBuffer.java @@ -11,7 +11,7 @@ import buildcraft.api.core.SafeTimeTracker; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public final class TileBuffer { diff --git a/common/buildcraft/core/Version.java b/common/buildcraft/core/Version.java index 4cecd0e6..3269ca07 100644 --- a/common/buildcraft/core/Version.java +++ b/common/buildcraft/core/Version.java @@ -8,7 +8,7 @@ import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Property; public class Version implements Runnable { diff --git a/common/buildcraft/core/fluids/FluidUtils.java b/common/buildcraft/core/fluids/FluidUtils.java index 6f600b54..0ae28fa3 100644 --- a/common/buildcraft/core/fluids/FluidUtils.java +++ b/common/buildcraft/core/fluids/FluidUtils.java @@ -7,7 +7,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/common/buildcraft/core/fluids/TankManager.java b/common/buildcraft/core/fluids/TankManager.java index 39d4abbf..3de658cc 100644 --- a/common/buildcraft/core/fluids/TankManager.java +++ b/common/buildcraft/core/fluids/TankManager.java @@ -18,7 +18,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; diff --git a/common/buildcraft/core/inventory/ITransactor.java b/common/buildcraft/core/inventory/ITransactor.java index 25363183..1a6a19fc 100644 --- a/common/buildcraft/core/inventory/ITransactor.java +++ b/common/buildcraft/core/inventory/ITransactor.java @@ -2,7 +2,7 @@ package buildcraft.core.inventory; import buildcraft.core.inventory.filters.IStackFilter; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface ITransactor { diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index 8eb604ff..8d3daef0 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -12,7 +12,7 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/core/inventory/InventoryIterator.java b/common/buildcraft/core/inventory/InventoryIterator.java index ac349368..e04f8f5d 100644 --- a/common/buildcraft/core/inventory/InventoryIterator.java +++ b/common/buildcraft/core/inventory/InventoryIterator.java @@ -3,7 +3,7 @@ package buildcraft.core.inventory; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * @author CovertJaguar diff --git a/common/buildcraft/core/inventory/InventoryIteratorSided.java b/common/buildcraft/core/inventory/InventoryIteratorSided.java index 02db8127..f9d8af65 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSided.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSided.java @@ -4,7 +4,7 @@ import buildcraft.core.inventory.InventoryIterator.IInvSlot; import java.util.Iterator; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * @author CovertJaguar diff --git a/common/buildcraft/core/inventory/Transactor.java b/common/buildcraft/core/inventory/Transactor.java index 0321bd0d..58400ac4 100644 --- a/common/buildcraft/core/inventory/Transactor.java +++ b/common/buildcraft/core/inventory/Transactor.java @@ -4,7 +4,7 @@ import buildcraft.api.inventory.ISpecialInventory; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class Transactor implements ITransactor { diff --git a/common/buildcraft/core/inventory/TransactorRoundRobin.java b/common/buildcraft/core/inventory/TransactorRoundRobin.java index 89c21ecd..fa6fa815 100644 --- a/common/buildcraft/core/inventory/TransactorRoundRobin.java +++ b/common/buildcraft/core/inventory/TransactorRoundRobin.java @@ -3,7 +3,7 @@ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TransactorRoundRobin extends TransactorSimple { diff --git a/common/buildcraft/core/inventory/TransactorSimple.java b/common/buildcraft/core/inventory/TransactorSimple.java index 4f8a5b4d..d7de9b5b 100644 --- a/common/buildcraft/core/inventory/TransactorSimple.java +++ b/common/buildcraft/core/inventory/TransactorSimple.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TransactorSimple extends Transactor { diff --git a/common/buildcraft/core/inventory/TransactorSpecial.java b/common/buildcraft/core/inventory/TransactorSpecial.java index bd1c7f03..3cf6388b 100644 --- a/common/buildcraft/core/inventory/TransactorSpecial.java +++ b/common/buildcraft/core/inventory/TransactorSpecial.java @@ -3,7 +3,7 @@ package buildcraft.core.inventory; import buildcraft.api.inventory.ISpecialInventory; import buildcraft.core.inventory.filters.IStackFilter; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TransactorSpecial extends Transactor { diff --git a/common/buildcraft/core/recipes/AssemblyRecipeManager.java b/common/buildcraft/core/recipes/AssemblyRecipeManager.java index a500d339..4c116ded 100644 --- a/common/buildcraft/core/recipes/AssemblyRecipeManager.java +++ b/common/buildcraft/core/recipes/AssemblyRecipeManager.java @@ -12,7 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; public class AssemblyRecipeManager implements IAssemblyRecipeManager { diff --git a/common/buildcraft/core/triggers/DefaultTriggerProvider.java b/common/buildcraft/core/triggers/DefaultTriggerProvider.java index 2c681c68..bb958314 100644 --- a/common/buildcraft/core/triggers/DefaultTriggerProvider.java +++ b/common/buildcraft/core/triggers/DefaultTriggerProvider.java @@ -10,7 +10,7 @@ import java.util.LinkedList; import net.minecraft.block.Block; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; diff --git a/common/buildcraft/core/triggers/TriggerFluidContainer.java b/common/buildcraft/core/triggers/TriggerFluidContainer.java index 8aff2fd6..aa3c27e7 100644 --- a/common/buildcraft/core/triggers/TriggerFluidContainer.java +++ b/common/buildcraft/core/triggers/TriggerFluidContainer.java @@ -12,7 +12,7 @@ import buildcraft.api.gates.ITriggerParameter; import buildcraft.core.utils.StringUtils; import java.util.Locale; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; diff --git a/common/buildcraft/core/triggers/TriggerInventory.java b/common/buildcraft/core/triggers/TriggerInventory.java index db7af481..973a8347 100644 --- a/common/buildcraft/core/triggers/TriggerInventory.java +++ b/common/buildcraft/core/triggers/TriggerInventory.java @@ -18,7 +18,7 @@ import java.util.Locale; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TriggerInventory extends BCTrigger implements ITileTrigger { diff --git a/common/buildcraft/core/triggers/TriggerInventoryLevel.java b/common/buildcraft/core/triggers/TriggerInventoryLevel.java index cae03387..b29aa6f3 100644 --- a/common/buildcraft/core/triggers/TriggerInventoryLevel.java +++ b/common/buildcraft/core/triggers/TriggerInventoryLevel.java @@ -17,7 +17,7 @@ import java.util.Locale; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TriggerInventoryLevel extends BCTrigger implements ITileTrigger { diff --git a/common/buildcraft/core/triggers/TriggerMachine.java b/common/buildcraft/core/triggers/TriggerMachine.java index e2eecfe9..604feed8 100644 --- a/common/buildcraft/core/triggers/TriggerMachine.java +++ b/common/buildcraft/core/triggers/TriggerMachine.java @@ -12,7 +12,7 @@ import buildcraft.api.gates.ITriggerParameter; import buildcraft.core.IMachine; import buildcraft.core.utils.StringUtils; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TriggerMachine extends BCTrigger implements ITileTrigger { diff --git a/common/buildcraft/core/utils/ConfigUtils.java b/common/buildcraft/core/utils/ConfigUtils.java index cb439f66..53f0eada 100644 --- a/common/buildcraft/core/utils/ConfigUtils.java +++ b/common/buildcraft/core/utils/ConfigUtils.java @@ -10,8 +10,8 @@ package buildcraft.core.utils; import buildcraft.BuildCraftCore; import java.util.logging.Level; -import net.minecraftforge.common.Configuration; -import net.minecraftforge.common.Property; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; /** * diff --git a/common/buildcraft/core/utils/MatrixTranformations.java b/common/buildcraft/core/utils/MatrixTranformations.java index c5eae1a4..60d4712f 100644 --- a/common/buildcraft/core/utils/MatrixTranformations.java +++ b/common/buildcraft/core/utils/MatrixTranformations.java @@ -8,7 +8,7 @@ */ package buildcraft.core.utils; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 8d88b8ec..d40d96b1 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -46,7 +46,7 @@ import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class Utils { diff --git a/common/buildcraft/energy/BlockBuildcraftFluid.java b/common/buildcraft/energy/BlockBuildcraftFluid.java index b2fe7b3b..a2f248eb 100644 --- a/common/buildcraft/energy/BlockBuildcraftFluid.java +++ b/common/buildcraft/energy/BlockBuildcraftFluid.java @@ -19,7 +19,7 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index 7953ac46..e05880f0 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -22,7 +22,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockEngine extends BlockBuildCraft { diff --git a/common/buildcraft/energy/BptBlockEngine.java b/common/buildcraft/energy/BptBlockEngine.java index 554aaf30..973f8423 100644 --- a/common/buildcraft/energy/BptBlockEngine.java +++ b/common/buildcraft/energy/BptBlockEngine.java @@ -15,7 +15,7 @@ import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.IBptContext; import buildcraft.core.Version; import net.minecraft.block.Block; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; @Deprecated public class BptBlockEngine extends BptBlock { diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index bfc8804f..5c5086ba 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -14,7 +14,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftEnergy; import buildcraft.api.gates.IOverrideDefaultTriggers; import buildcraft.api.gates.ITrigger; diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index 67656185..30efdd6d 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/common/buildcraft/energy/TileEngineStone.java b/common/buildcraft/energy/TileEngineStone.java index 21988f4f..48ce2ed5 100644 --- a/common/buildcraft/energy/TileEngineStone.java +++ b/common/buildcraft/energy/TileEngineStone.java @@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftCore; import buildcraft.BuildCraftEnergy; import buildcraft.api.gates.ITrigger; diff --git a/common/buildcraft/energy/TileEngineWood.java b/common/buildcraft/energy/TileEngineWood.java index a610a660..6891ae8d 100644 --- a/common/buildcraft/energy/TileEngineWood.java +++ b/common/buildcraft/energy/TileEngineWood.java @@ -9,7 +9,7 @@ package buildcraft.energy; import buildcraft.api.power.PowerHandler; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.transport.IPipeTile.PipeType; import buildcraft.core.proxy.CoreProxy; diff --git a/common/buildcraft/energy/render/RenderEngine.java b/common/buildcraft/energy/render/RenderEngine.java index a72a96c8..4c8b746f 100644 --- a/common/buildcraft/energy/render/RenderEngine.java +++ b/common/buildcraft/energy/render/RenderEngine.java @@ -19,7 +19,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.ForgeDirection.DOWN; import static net.minecraftforge.common.ForgeDirection.EAST; import static net.minecraftforge.common.ForgeDirection.NORTH; diff --git a/common/buildcraft/energy/triggers/TriggerEngineHeat.java b/common/buildcraft/energy/triggers/TriggerEngineHeat.java index 8e8f5006..256ce300 100644 --- a/common/buildcraft/energy/triggers/TriggerEngineHeat.java +++ b/common/buildcraft/energy/triggers/TriggerEngineHeat.java @@ -19,7 +19,7 @@ import java.util.Locale; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TriggerEngineHeat extends BCTrigger implements ITileTrigger { diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 7e8377b9..05070fd6 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -26,7 +26,7 @@ import static net.minecraftforge.common.BiomeDictionary.Type.FOREST; import static net.minecraftforge.common.BiomeDictionary.Type.FROZEN; import static net.minecraftforge.common.BiomeDictionary.Type.WASTELAND; import net.minecraftforge.common.EnumHelper; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType; diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index dd80e671..d3ce8b11 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -23,7 +23,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockMiningWell extends BlockBuildCraft { diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index 08eb9c12..548e87ae 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -27,7 +27,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockQuarry extends BlockBuildCraft { diff --git a/common/buildcraft/factory/BlockRefinery.java b/common/buildcraft/factory/BlockRefinery.java index c8d7682d..8265161b 100644 --- a/common/buildcraft/factory/BlockRefinery.java +++ b/common/buildcraft/factory/BlockRefinery.java @@ -28,7 +28,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.ForgeDirection.EAST; import static net.minecraftforge.common.ForgeDirection.NORTH; import static net.minecraftforge.common.ForgeDirection.SOUTH; diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index 265e102a..27089070 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -23,7 +23,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/common/buildcraft/factory/BptBlockRefinery.java b/common/buildcraft/factory/BptBlockRefinery.java index 4b320c07..f68ff457 100644 --- a/common/buildcraft/factory/BptBlockRefinery.java +++ b/common/buildcraft/factory/BptBlockRefinery.java @@ -11,7 +11,7 @@ package buildcraft.factory; import buildcraft.api.blueprints.BptBlock; import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.IBptContext; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; @Deprecated public class BptBlockRefinery extends BptBlock { diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 2dfc0171..ea04cdd2 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -29,7 +29,7 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory { diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index 7cb99338..8dea9153 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -21,7 +21,7 @@ import java.util.LinkedList; import java.util.Set; import java.util.TreeMap; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/common/buildcraft/factory/TileHopper.java b/common/buildcraft/factory/TileHopper.java index c375bd06..caeabde1 100644 --- a/common/buildcraft/factory/TileHopper.java +++ b/common/buildcraft/factory/TileHopper.java @@ -5,7 +5,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.core.TileBuildCraft; import buildcraft.core.inventory.ITransactor; import buildcraft.core.inventory.SimpleInventory; diff --git a/common/buildcraft/factory/TileMiningWell.java b/common/buildcraft/factory/TileMiningWell.java index 03c8b3fd..3e50ed4a 100644 --- a/common/buildcraft/factory/TileMiningWell.java +++ b/common/buildcraft/factory/TileMiningWell.java @@ -22,7 +22,7 @@ import java.util.List; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileMiningWell extends TileBuildCraft implements IMachine, IPowerReceptor { diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index 2baa9b3b..bf5b00a5 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -40,7 +40,7 @@ import java.util.TreeMap; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index b8d0fe31..ce668878 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -22,7 +22,7 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; import net.minecraftforge.common.ForgeChunkManager.Type; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftCore; import buildcraft.BuildCraftFactory; import buildcraft.api.core.IAreaProvider; diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 37a9e0b1..476b5e1e 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -33,7 +33,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index ffc08e27..115552c8 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -22,7 +22,7 @@ import java.io.IOException; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.EnumSkyBlock; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index b0eb8320..3b7fbb74 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -18,7 +18,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BlockLaser extends BlockContainer { diff --git a/common/buildcraft/silicon/SiliconRenderBlock.java b/common/buildcraft/silicon/SiliconRenderBlock.java index fcb1f0f8..58740c11 100644 --- a/common/buildcraft/silicon/SiliconRenderBlock.java +++ b/common/buildcraft/silicon/SiliconRenderBlock.java @@ -15,7 +15,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 4f3eb7b0..2ffe3efd 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -39,7 +39,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.ForgeDirection.DOWN; import static net.minecraftforge.common.ForgeDirection.EAST; import static net.minecraftforge.common.ForgeDirection.NORTH; diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index c4862e44..40c991f2 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -21,7 +21,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileAssemblyTable extends TileLaserTableBase implements IMachine, IInventory { diff --git a/common/buildcraft/silicon/TileIntegrationTable.java b/common/buildcraft/silicon/TileIntegrationTable.java index 55876291..5e96d069 100644 --- a/common/buildcraft/silicon/TileIntegrationTable.java +++ b/common/buildcraft/silicon/TileIntegrationTable.java @@ -20,7 +20,7 @@ import buildcraft.core.utils.Utils; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 735d7336..161d56cd 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -26,7 +26,7 @@ import java.util.LinkedList; import java.util.List; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TileLaser extends TileBuildCraft implements IPowerReceptor, IActionReceptor, IMachine { diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index f181580b..199e9d56 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -34,7 +34,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.gates.GateExpansions; import buildcraft.api.gates.IGateExpansion; diff --git a/common/buildcraft/transport/Gate.java b/common/buildcraft/transport/Gate.java index 109b0436..393f83f5 100644 --- a/common/buildcraft/transport/Gate.java +++ b/common/buildcraft/transport/Gate.java @@ -35,7 +35,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public final class Gate { diff --git a/common/buildcraft/transport/IPipeConnectionForced.java b/common/buildcraft/transport/IPipeConnectionForced.java index 209e5c31..25a7bbf1 100644 --- a/common/buildcraft/transport/IPipeConnectionForced.java +++ b/common/buildcraft/transport/IPipeConnectionForced.java @@ -1,6 +1,6 @@ package buildcraft.transport; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface IPipeConnectionForced { diff --git a/common/buildcraft/transport/IPipeTransportFluidsHook.java b/common/buildcraft/transport/IPipeTransportFluidsHook.java index 0d12c212..c4e77923 100644 --- a/common/buildcraft/transport/IPipeTransportFluidsHook.java +++ b/common/buildcraft/transport/IPipeTransportFluidsHook.java @@ -9,7 +9,7 @@ package buildcraft.transport; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public interface IPipeTransportFluidsHook { diff --git a/common/buildcraft/transport/IPipeTransportItemsHook.java b/common/buildcraft/transport/IPipeTransportItemsHook.java index 3be90a42..31d2fe1f 100644 --- a/common/buildcraft/transport/IPipeTransportItemsHook.java +++ b/common/buildcraft/transport/IPipeTransportItemsHook.java @@ -9,7 +9,7 @@ package buildcraft.transport; import buildcraft.api.core.Position; import java.util.LinkedList; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * @deprecated This has been replaced by the Pipe Event system. diff --git a/common/buildcraft/transport/IPipeTransportPowerHook.java b/common/buildcraft/transport/IPipeTransportPowerHook.java index 898019ca..70e47bf0 100644 --- a/common/buildcraft/transport/IPipeTransportPowerHook.java +++ b/common/buildcraft/transport/IPipeTransportPowerHook.java @@ -9,7 +9,7 @@ package buildcraft.transport; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface IPipeTransportPowerHook { diff --git a/common/buildcraft/transport/ISolidSideTile.java b/common/buildcraft/transport/ISolidSideTile.java index 81cef096..7b3b4e8a 100644 --- a/common/buildcraft/transport/ISolidSideTile.java +++ b/common/buildcraft/transport/ISolidSideTile.java @@ -1,6 +1,6 @@ package buildcraft.transport; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public interface ISolidSideTile { public boolean isSolidOnSide(ForgeDirection side); diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 7c19f782..ee054943 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -26,7 +26,7 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class ItemFacade extends ItemBuildCraft { diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 1c6c77d7..9b244595 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -33,7 +33,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class Pipe implements IDropControlInventory { diff --git a/common/buildcraft/transport/PipeTransport.java b/common/buildcraft/transport/PipeTransport.java index fc0a7ca7..bd5982e3 100644 --- a/common/buildcraft/transport/PipeTransport.java +++ b/common/buildcraft/transport/PipeTransport.java @@ -11,7 +11,7 @@ import buildcraft.api.transport.IPipeTile.PipeType; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class PipeTransport { diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index ba8312a3..7f666a64 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -11,7 +11,7 @@ import java.util.BitSet; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index bdaee203..da593099 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -34,7 +34,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeTransportItems extends PipeTransport { diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 9e924c2b..edc9b138 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -13,7 +13,7 @@ import java.util.Map; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftCore; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.ITrigger; diff --git a/common/buildcraft/transport/PipeTransportStructure.java b/common/buildcraft/transport/PipeTransportStructure.java index 6d32fa3d..b2488978 100644 --- a/common/buildcraft/transport/PipeTransportStructure.java +++ b/common/buildcraft/transport/PipeTransportStructure.java @@ -2,7 +2,7 @@ package buildcraft.transport; import buildcraft.api.transport.IPipeTile.PipeType; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeTransportStructure extends PipeTransport { diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 465dd18b..4699b2a9 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -21,7 +21,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index 85cacf70..087e8fc7 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -25,7 +25,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public final class TravelingItem { diff --git a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java index 88b23ae7..80432134 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java @@ -16,7 +16,7 @@ import buildcraft.core.blueprints.BptItem; import java.util.LinkedList; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BptItemPipeDiamond extends BptItem { diff --git a/common/buildcraft/transport/blueprints/BptItemPipeIron.java b/common/buildcraft/transport/blueprints/BptItemPipeIron.java index 5f5539d1..7bb5d57e 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeIron.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeIron.java @@ -14,7 +14,7 @@ import buildcraft.api.blueprints.IBptContext; import buildcraft.core.blueprints.BptItem; import java.util.LinkedList; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BptItemPipeIron extends BptItem { diff --git a/common/buildcraft/transport/blueprints/BptItemPipeWooden.java b/common/buildcraft/transport/blueprints/BptItemPipeWooden.java index 66ef7240..835ad040 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeWooden.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeWooden.java @@ -14,7 +14,7 @@ import buildcraft.api.blueprints.IBptContext; import buildcraft.core.blueprints.BptItem; import java.util.LinkedList; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class BptItemPipeWooden extends BptItem { diff --git a/common/buildcraft/transport/gates/GateExpansionPulsar.java b/common/buildcraft/transport/gates/GateExpansionPulsar.java index a1fb1955..6f09d0d7 100644 --- a/common/buildcraft/transport/gates/GateExpansionPulsar.java +++ b/common/buildcraft/transport/gates/GateExpansionPulsar.java @@ -23,7 +23,7 @@ import java.util.List; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index c7f5910f..048c15f2 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -41,7 +41,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class ContainerGateInterface extends BuildCraftContainer { diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index 115770e2..d1dae319 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -11,7 +11,7 @@ import java.io.IOException; import java.util.BitSet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class PacketFluidUpdate extends PacketCoordinates { diff --git a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java index c5eae053..f6497967 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java +++ b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java @@ -8,7 +8,7 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import net.minecraft.util.MathHelper; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PacketPipeTransportTraveler extends BuildCraftPacket { diff --git a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java index 6c43e2ab..20206c9b 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsCobblestone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeFluidsGold.java b/common/buildcraft/transport/pipes/PipeFluidsGold.java index f5c87bf2..8354f0b0 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsGold.java +++ b/common/buildcraft/transport/pipes/PipeFluidsGold.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsGold extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeFluidsIron.java b/common/buildcraft/transport/pipes/PipeFluidsIron.java index f7738cd4..33de7d99 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsIron.java +++ b/common/buildcraft/transport/pipes/PipeFluidsIron.java @@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; public class PipeFluidsIron extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java index 1483426c..a8f992e0 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java @@ -8,7 +8,7 @@ package buildcraft.transport.pipes; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; diff --git a/common/buildcraft/transport/pipes/PipeFluidsStone.java b/common/buildcraft/transport/pipes/PipeFluidsStone.java index 77324206..7ffed323 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsStone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsStone.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsStone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeFluidsVoid.java b/common/buildcraft/transport/pipes/PipeFluidsVoid.java index 02ac8a0b..24206dff 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsVoid.java +++ b/common/buildcraft/transport/pipes/PipeFluidsVoid.java @@ -15,7 +15,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class PipeFluidsVoid extends Pipe implements IPipeTransportFluidsHook { diff --git a/common/buildcraft/transport/pipes/PipeFluidsWood.java b/common/buildcraft/transport/pipes/PipeFluidsWood.java index 22792a15..3aa52449 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsWood.java +++ b/common/buildcraft/transport/pipes/PipeFluidsWood.java @@ -24,7 +24,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java index 38c78a81..dac45cb7 100644 --- a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsCobblestone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java index 1ae28871..7f9fa24e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java @@ -32,7 +32,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsDaizuli extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index 21be7f68..8d6b0b2e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -18,7 +18,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; import buildcraft.core.GuiIds; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 724dffd0..59156263 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -17,7 +17,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.inventory.ISpecialInventory; import buildcraft.core.GuiIds; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index 65f74d78..c10ba616 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -18,7 +18,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.gates.IAction; import buildcraft.api.inventory.ISpecialInventory; diff --git a/common/buildcraft/transport/pipes/PipeItemsGold.java b/common/buildcraft/transport/pipes/PipeItemsGold.java index a1ce5994..7f201b9e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsGold.java +++ b/common/buildcraft/transport/pipes/PipeItemsGold.java @@ -18,7 +18,7 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsGold extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsIron.java b/common/buildcraft/transport/pipes/PipeItemsIron.java index 2b884897..716abf28 100644 --- a/common/buildcraft/transport/pipes/PipeItemsIron.java +++ b/common/buildcraft/transport/pipes/PipeItemsIron.java @@ -22,7 +22,7 @@ import java.util.Map; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsIron extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsLapis.java b/common/buildcraft/transport/pipes/PipeItemsLapis.java index 6e7d5352..949a0444 100644 --- a/common/buildcraft/transport/pipes/PipeItemsLapis.java +++ b/common/buildcraft/transport/pipes/PipeItemsLapis.java @@ -27,7 +27,7 @@ import java.util.Map; import java.util.Map.Entry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsLapis extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index a48de240..d2293b8f 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -36,7 +36,7 @@ import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsObsidian extends Pipe implements IPowerReceptor { diff --git a/common/buildcraft/transport/pipes/PipeItemsQuartz.java b/common/buildcraft/transport/pipes/PipeItemsQuartz.java index 6873ffde..64a781ef 100644 --- a/common/buildcraft/transport/pipes/PipeItemsQuartz.java +++ b/common/buildcraft/transport/pipes/PipeItemsQuartz.java @@ -17,7 +17,7 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsQuartz extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsSandstone.java b/common/buildcraft/transport/pipes/PipeItemsSandstone.java index 6e23d15a..3d947e9c 100644 --- a/common/buildcraft/transport/pipes/PipeItemsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeItemsSandstone.java @@ -8,7 +8,7 @@ package buildcraft.transport.pipes; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; import buildcraft.transport.IPipeConnectionForced; diff --git a/common/buildcraft/transport/pipes/PipeItemsStone.java b/common/buildcraft/transport/pipes/PipeItemsStone.java index 86c96858..0a720fed 100644 --- a/common/buildcraft/transport/pipes/PipeItemsStone.java +++ b/common/buildcraft/transport/pipes/PipeItemsStone.java @@ -17,7 +17,7 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsStone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsVoid.java b/common/buildcraft/transport/pipes/PipeItemsVoid.java index 352cf815..e90a8599 100644 --- a/common/buildcraft/transport/pipes/PipeItemsVoid.java +++ b/common/buildcraft/transport/pipes/PipeItemsVoid.java @@ -15,7 +15,7 @@ import buildcraft.transport.PipeTransportItems; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsVoid extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index b2b8282c..ec990c96 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -30,7 +30,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsWood extends Pipe implements IPowerReceptor { diff --git a/common/buildcraft/transport/pipes/PipeLogicIron.java b/common/buildcraft/transport/pipes/PipeLogicIron.java index 6c6c1e73..71d62f93 100644 --- a/common/buildcraft/transport/pipes/PipeLogicIron.java +++ b/common/buildcraft/transport/pipes/PipeLogicIron.java @@ -13,7 +13,7 @@ import buildcraft.transport.Pipe; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class PipeLogicIron { diff --git a/common/buildcraft/transport/pipes/PipeLogicWood.java b/common/buildcraft/transport/pipes/PipeLogicWood.java index 05f269b9..f05ea2cc 100644 --- a/common/buildcraft/transport/pipes/PipeLogicWood.java +++ b/common/buildcraft/transport/pipes/PipeLogicWood.java @@ -14,7 +14,7 @@ import buildcraft.transport.Pipe; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public abstract class PipeLogicWood { diff --git a/common/buildcraft/transport/pipes/PipePowerCobblestone.java b/common/buildcraft/transport/pipes/PipePowerCobblestone.java index 790b6e0e..156ffa9c 100644 --- a/common/buildcraft/transport/pipes/PipePowerCobblestone.java +++ b/common/buildcraft/transport/pipes/PipePowerCobblestone.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerCobblestone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerDiamond.java b/common/buildcraft/transport/pipes/PipePowerDiamond.java index 47294ecb..92df3f5b 100644 --- a/common/buildcraft/transport/pipes/PipePowerDiamond.java +++ b/common/buildcraft/transport/pipes/PipePowerDiamond.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerDiamond extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerGold.java b/common/buildcraft/transport/pipes/PipePowerGold.java index cfff315f..60a082ba 100644 --- a/common/buildcraft/transport/pipes/PipePowerGold.java +++ b/common/buildcraft/transport/pipes/PipePowerGold.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerGold extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerIron.java b/common/buildcraft/transport/pipes/PipePowerIron.java index 2a6b30bd..20237e3c 100644 --- a/common/buildcraft/transport/pipes/PipePowerIron.java +++ b/common/buildcraft/transport/pipes/PipePowerIron.java @@ -22,7 +22,7 @@ import java.util.LinkedList; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerIron extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerQuartz.java b/common/buildcraft/transport/pipes/PipePowerQuartz.java index d0e80fe9..49b2ad87 100644 --- a/common/buildcraft/transport/pipes/PipePowerQuartz.java +++ b/common/buildcraft/transport/pipes/PipePowerQuartz.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerQuartz extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerStone.java b/common/buildcraft/transport/pipes/PipePowerStone.java index df488faf..810bc4c7 100644 --- a/common/buildcraft/transport/pipes/PipePowerStone.java +++ b/common/buildcraft/transport/pipes/PipePowerStone.java @@ -14,7 +14,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerStone extends Pipe { diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index f6e804a0..31196ea1 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -21,7 +21,7 @@ import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipePowerWood extends Pipe implements IPowerReceptor, IPipeTransportPowerHook { diff --git a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java index 90e94beb..c04b84e6 100644 --- a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java @@ -7,7 +7,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportStructure; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeStructureCobblestone extends Pipe { diff --git a/common/buildcraft/transport/pipes/events/PipeEventItem.java b/common/buildcraft/transport/pipes/events/PipeEventItem.java index 0671c8ad..641606af 100644 --- a/common/buildcraft/transport/pipes/events/PipeEventItem.java +++ b/common/buildcraft/transport/pipes/events/PipeEventItem.java @@ -12,7 +12,7 @@ import buildcraft.transport.TravelingItem; import java.util.List; import net.minecraft.entity.item.EntityItem; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/transport/render/FacadeRenderHelper.java b/common/buildcraft/transport/render/FacadeRenderHelper.java index 6ff9e549..94843f51 100644 --- a/common/buildcraft/transport/render/FacadeRenderHelper.java +++ b/common/buildcraft/transport/render/FacadeRenderHelper.java @@ -20,7 +20,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; /** * diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 3c4d4df4..658a7c1c 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -46,7 +46,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.util.Timer; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/common/buildcraft/transport/render/PipeRendererWorld.java b/common/buildcraft/transport/render/PipeRendererWorld.java index 7e17074b..d6bf7098 100644 --- a/common/buildcraft/transport/render/PipeRendererWorld.java +++ b/common/buildcraft/transport/render/PipeRendererWorld.java @@ -17,7 +17,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class PipeRendererWorld implements ISimpleBlockRenderingHandler { diff --git a/common/buildcraft/transport/triggers/ActionPipeDirection.java b/common/buildcraft/transport/triggers/ActionPipeDirection.java index 1759a1a3..7bf08014 100644 --- a/common/buildcraft/transport/triggers/ActionPipeDirection.java +++ b/common/buildcraft/transport/triggers/ActionPipeDirection.java @@ -11,7 +11,7 @@ import buildcraft.core.triggers.BCAction; import java.util.Locale; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class ActionPipeDirection extends BCAction { diff --git a/common/buildcraft/transport/triggers/TriggerPipeContents.java b/common/buildcraft/transport/triggers/TriggerPipeContents.java index 75574c8f..6724a586 100644 --- a/common/buildcraft/transport/triggers/TriggerPipeContents.java +++ b/common/buildcraft/transport/triggers/TriggerPipeContents.java @@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.Locale; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; diff --git a/common/buildcraft/transport/utils/ConnectionMatrix.java b/common/buildcraft/transport/utils/ConnectionMatrix.java index dff1f469..e7dbc670 100644 --- a/common/buildcraft/transport/utils/ConnectionMatrix.java +++ b/common/buildcraft/transport/utils/ConnectionMatrix.java @@ -3,7 +3,7 @@ package buildcraft.transport.utils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class ConnectionMatrix { private int mask = 0; diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index b4ce11d4..b7fc5c45 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -3,7 +3,7 @@ package buildcraft.transport.utils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class FacadeMatrix { diff --git a/common/buildcraft/transport/utils/TextureMatrix.java b/common/buildcraft/transport/utils/TextureMatrix.java index 2da1e5d7..005c65f2 100644 --- a/common/buildcraft/transport/utils/TextureMatrix.java +++ b/common/buildcraft/transport/utils/TextureMatrix.java @@ -3,7 +3,7 @@ package buildcraft.transport.utils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class TextureMatrix { diff --git a/common/buildcraft/transport/utils/WireMatrix.java b/common/buildcraft/transport/utils/WireMatrix.java index 1837278a..b95509db 100644 --- a/common/buildcraft/transport/utils/WireMatrix.java +++ b/common/buildcraft/transport/utils/WireMatrix.java @@ -6,7 +6,7 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.BitSet; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; public class WireMatrix { From 13213cd59d77859453bfdbdeee4adb50ad1cc8f5 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 12 Jan 2014 23:05:36 +0100 Subject: [PATCH 02/31] fixed IIcon and IIconRegister names --- common/buildcraft/BuildCraftCore.java | 10 +++--- common/buildcraft/api/core/IIconProvider.java | 8 ++--- .../buildcraft/api/filler/IFillerPattern.java | 4 +-- common/buildcraft/api/gates/IAction.java | 8 ++--- .../buildcraft/api/gates/IGateExpansion.java | 12 +++---- common/buildcraft/api/gates/ITrigger.java | 8 ++--- .../api/transport/IPipeDefinition.java | 10 +++--- .../buildcraft/builders/BlockArchitect.java | 20 ++++++------ .../builders/BlockBlueprintLibrary.java | 12 +++---- common/buildcraft/builders/BlockBuilder.java | 14 ++++---- common/buildcraft/builders/BlockFiller.java | 16 +++++----- common/buildcraft/builders/BlockMarker.java | 4 +-- .../buildcraft/builders/BlockPathMarker.java | 10 +++--- common/buildcraft/builders/ItemBptBase.java | 4 +-- .../buildcraft/builders/ItemBptBluePrint.java | 12 +++---- .../buildcraft/builders/ItemBptTemplate.java | 10 +++--- .../filler/pattern/FillerPattern.java | 10 +++--- .../builders/triggers/ActionFiller.java | 4 +-- common/buildcraft/core/BlockSpring.java | 4 +-- common/buildcraft/core/CoreIconProvider.java | 12 +++---- common/buildcraft/core/EntityBlock.java | 4 +-- common/buildcraft/core/ItemBuildCraft.java | 4 +-- .../core/gui/GuiAdvancedInterface.java | 6 ++-- common/buildcraft/core/gui/GuiBuildCraft.java | 4 +-- .../core/gui/widgets/FluidGaugeWidget.java | 4 +-- .../buildcraft/core/render/FluidRenderer.java | 8 ++--- .../core/render/RenderEntityBlock.java | 8 ++--- .../core/render/RenderingMarkers.java | 4 +-- .../triggers/ActionTriggerIconProvider.java | 10 +++--- common/buildcraft/core/triggers/BCAction.java | 8 ++--- .../buildcraft/core/triggers/BCTrigger.java | 8 ++--- .../energy/BlockBuildcraftFluid.java | 10 +++--- common/buildcraft/energy/BlockEngine.java | 14 ++++---- common/buildcraft/energy/BlockPollution.java | 4 +-- .../energy/ItemBucketBuildcraft.java | 4 +-- .../energy/gui/GuiCombustionEngine.java | 4 +-- .../energy/triggers/TriggerEngineHeat.java | 10 +++--- .../factory/BlockAutoWorkbench.java | 12 +++---- common/buildcraft/factory/BlockFloodGate.java | 14 ++++---- common/buildcraft/factory/BlockFrame.java | 4 +-- common/buildcraft/factory/BlockHopper.java | 10 +++--- .../buildcraft/factory/BlockMiningWell.java | 8 ++--- common/buildcraft/factory/BlockPlainPipe.java | 4 +-- common/buildcraft/factory/BlockPump.java | 14 ++++---- common/buildcraft/factory/BlockQuarry.java | 14 ++++---- common/buildcraft/factory/BlockRefinery.java | 10 +++--- common/buildcraft/factory/BlockTank.java | 16 +++++----- .../factory/FactoryProxyClient.java | 8 ++--- common/buildcraft/silicon/BlockLaser.java | 10 +++--- .../buildcraft/silicon/BlockLaserTable.java | 10 +++--- .../silicon/ItemRedstoneChipset.java | 10 +++--- .../transport/BlockFilteredBuffer.java | 10 +++--- .../transport/BlockGenericPipe.java | 10 +++--- common/buildcraft/transport/ItemFacade.java | 4 +-- common/buildcraft/transport/ItemPipe.java | 8 ++--- common/buildcraft/transport/ItemPipeWire.java | 8 ++--- common/buildcraft/transport/ItemPlug.java | 4 +-- .../transport/PipeIconProvider.java | 14 ++++---- .../buildcraft/transport/PipeRenderState.java | 6 ++-- .../transport/WireIconProvider.java | 12 +++---- .../transport/gates/GateDefinition.java | 32 +++++++++---------- .../gates/GateExpansionBuildcraft.java | 16 +++++----- .../buildcraft/transport/gates/ItemGate.java | 8 ++--- .../transport/gui/GuiGateInterface.java | 6 ++-- .../transport/render/FacadeItemRenderer.java | 2 +- .../transport/render/FacadeRenderHelper.java | 2 +- .../transport/render/GateItemRenderer.java | 2 +- .../transport/render/PipeItemRenderer.java | 2 +- .../transport/render/PipeRendererTESR.java | 4 +-- .../transport/render/PlugItemRenderer.java | 2 +- .../triggers/ActionEnergyPulsar.java | 10 +++--- .../triggers/ActionExtractionPreset.java | 10 +++--- .../transport/triggers/ActionPipeColor.java | 10 +++--- .../triggers/ActionPipeDirection.java | 10 +++--- .../triggers/ActionPowerLimiter.java | 10 +++--- .../triggers/ActionRedstoneFaderOutput.java | 10 +++--- .../triggers/ActionSingleEnergyPulse.java | 10 +++--- .../transport/triggers/TriggerClockTimer.java | 10 +++--- .../triggers/TriggerPipeContents.java | 10 +++--- .../triggers/TriggerRedstoneFaderInput.java | 10 +++--- 80 files changed, 351 insertions(+), 351 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 76ddb43a..b1ba8145 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -16,7 +16,7 @@ import net.minecraft.block.BlockFluid; import net.minecraft.entity.EntityList; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.IPlantable; @@ -112,13 +112,13 @@ public class BuildCraftCore { public static Item diamondGearItem; public static Item wrenchItem; @SideOnly(Side.CLIENT) - public static Icon redLaserTexture; + public static IIcon redLaserTexture; @SideOnly(Side.CLIENT) - public static Icon blueLaserTexture; + public static IIcon blueLaserTexture; @SideOnly(Side.CLIENT) - public static Icon stripesLaserTexture; + public static IIcon stripesLaserTexture; @SideOnly(Side.CLIENT) - public static Icon transparentTexture; + public static IIcon transparentTexture; @SideOnly(Side.CLIENT) public static IIconProvider iconProvider; public static int blockByEntityModel; diff --git a/common/buildcraft/api/core/IIconProvider.java b/common/buildcraft/api/core/IIconProvider.java index 666d32e3..8b0370ea 100644 --- a/common/buildcraft/api/core/IIconProvider.java +++ b/common/buildcraft/api/core/IIconProvider.java @@ -2,8 +2,8 @@ package buildcraft.api.core; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public interface IIconProvider { @@ -12,13 +12,13 @@ public interface IIconProvider { * @return */ @SideOnly(Side.CLIENT) - public Icon getIcon(int iconIndex); + public IIcon getIcon(int iconIndex); /** * A call for the provider to register its Icons. This may be called multiple times but should only be executed once per provider * @param iconRegister */ @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister); + public void registerIcons(IIconRegister iconRegister); } diff --git a/common/buildcraft/api/filler/IFillerPattern.java b/common/buildcraft/api/filler/IFillerPattern.java index 3b39dafc..0575af61 100644 --- a/common/buildcraft/api/filler/IFillerPattern.java +++ b/common/buildcraft/api/filler/IFillerPattern.java @@ -4,7 +4,7 @@ import buildcraft.api.core.IBox; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; public interface IFillerPattern { @@ -23,7 +23,7 @@ public interface IFillerPattern { public IPatternIterator createPatternIterator(TileEntity tile, IBox box, ForgeDirection orientation); @SideOnly(Side.CLIENT) - public Icon getIcon(); + public IIcon getIcon(); public String getDisplayName(); } diff --git a/common/buildcraft/api/gates/IAction.java b/common/buildcraft/api/gates/IAction.java index 689d22a9..bd1d3874 100644 --- a/common/buildcraft/api/gates/IAction.java +++ b/common/buildcraft/api/gates/IAction.java @@ -2,18 +2,18 @@ package buildcraft.api.gates; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public interface IAction { String getUniqueTag(); @SideOnly(Side.CLIENT) - Icon getIcon(); + IIcon getIcon(); @SideOnly(Side.CLIENT) - void registerIcons(IconRegister iconRegister); + void registerIcons(IIconRegister iconRegister); boolean hasParameter(); diff --git a/common/buildcraft/api/gates/IGateExpansion.java b/common/buildcraft/api/gates/IGateExpansion.java index 46ea76a0..60cd7dd2 100644 --- a/common/buildcraft/api/gates/IGateExpansion.java +++ b/common/buildcraft/api/gates/IGateExpansion.java @@ -8,9 +8,9 @@ */ package buildcraft.api.gates; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; /** * @@ -24,11 +24,11 @@ public interface IGateExpansion { GateExpansionController makeController(TileEntity pipeTile); - void registerBlockOverlay(IconRegister iconRegister); + void registerBlockOverlay(IIconRegister iconRegister); - void registerItemOverlay(IconRegister iconRegister); + void registerItemOverlay(IIconRegister iconRegister); - Icon getOverlayBlock(); + IIcon getOverlayBlock(); - Icon getOverlayItem(); + IIcon getOverlayItem(); } diff --git a/common/buildcraft/api/gates/ITrigger.java b/common/buildcraft/api/gates/ITrigger.java index e3b15d82..94a074e8 100644 --- a/common/buildcraft/api/gates/ITrigger.java +++ b/common/buildcraft/api/gates/ITrigger.java @@ -2,8 +2,8 @@ package buildcraft.api.gates; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public interface ITrigger { @@ -16,10 +16,10 @@ public interface ITrigger { String getUniqueTag(); @SideOnly(Side.CLIENT) - Icon getIcon(); + IIcon getIcon(); @SideOnly(Side.CLIENT) - void registerIcons(IconRegister iconRegister); + void registerIcons(IIconRegister iconRegister); /** * Return true if this trigger can accept parameters diff --git a/common/buildcraft/api/transport/IPipeDefinition.java b/common/buildcraft/api/transport/IPipeDefinition.java index 4f5382a8..d6e39a6a 100644 --- a/common/buildcraft/api/transport/IPipeDefinition.java +++ b/common/buildcraft/api/transport/IPipeDefinition.java @@ -8,9 +8,9 @@ */ package buildcraft.api.transport; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; /** * @@ -20,11 +20,11 @@ public interface IPipeDefinition { String getUniqueTag(); - void registerIcons(IconRegister iconRegister); + void registerIcons(IIconRegister iconRegister); - Icon getIcon(int index); + IIcon getIcon(int index); - Icon getItemIcon(); + IIcon getItemIcon(); PipeBehavior makePipeBehavior(TileEntity tile); } diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index d925dfc2..766c7b7c 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -20,24 +20,24 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockArchitect extends BlockContainer { - Icon blockTextureSides; - Icon blockTextureFront; - Icon blockTextureTopPos; - Icon blockTextureTopNeg; - Icon blockTextureTopArchitect; + IIcon blockTextureSides; + IIcon blockTextureFront; + IIcon blockTextureTopPos; + IIcon blockTextureTopNeg; + IIcon blockTextureTopArchitect; public BlockArchitect(int i) { super(i, Material.iron); @@ -108,7 +108,7 @@ public class BlockArchitect extends BlockContainer { } @SuppressWarnings({ "all" }) - public Icon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { int m = iblockaccess.getBlockMetadata(i, j, k); if (l == 1) @@ -118,7 +118,7 @@ public class BlockArchitect extends BlockContainer { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (j == 0 && i == 3) return blockTextureFront; @@ -139,7 +139,7 @@ public class BlockArchitect extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { blockTextureSides = par1IconRegister.registerIcon("buildcraft:architect_sides"); blockTextureTopNeg = par1IconRegister.registerIcon("buildcraft:architect_top_neg"); diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 10276562..4cf71c99 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -17,18 +17,18 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockBlueprintLibrary extends BlockContainer { - private Icon textureTop; - private Icon textureSide; + private IIcon textureTop; + private IIcon textureSide; public BlockBlueprintLibrary(int i) { super(i, Material.wood); @@ -60,7 +60,7 @@ public class BlockBlueprintLibrary extends BlockContainer { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { switch (i) { case 0: case 1: @@ -86,7 +86,7 @@ public class BlockBlueprintLibrary extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:library_topbottom"); textureSide = par1IconRegister.registerIcon("buildcraft:library_side"); diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index 24728860..748840b1 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -18,21 +18,21 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockBuilder extends BlockContainer { - Icon blockTextureTop; - Icon blockTextureSide; - Icon blockTextureFront; + IIcon blockTextureTop; + IIcon blockTextureSide; + IIcon blockTextureFront; public BlockBuilder(int i) { super(i, Material.iron); @@ -46,7 +46,7 @@ public class BlockBuilder extends BlockContainer { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (j == 0 && i == 3) return blockTextureFront; @@ -124,7 +124,7 @@ public class BlockBuilder extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { blockTextureTop = par1IconRegister.registerIcon("buildcraft:builder_top"); blockTextureSide = par1IconRegister.registerIcon("buildcraft:builder_side"); blockTextureFront = par1IconRegister.registerIcon("buildcraft:builder_front"); diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index 0bc65309..b9e4ae0d 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -20,19 +20,19 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockFiller extends BlockContainer { - Icon textureSides; - Icon textureTopOn; - Icon textureTopOff; + IIcon textureSides; + IIcon textureTopOn; + IIcon textureTopOff; public IFillerPattern currentPattern; public BlockFiller(int i) { @@ -57,7 +57,7 @@ public class BlockFiller extends BlockContainer { } @Override - public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) { + public IIcon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) { int m = world.getBlockMetadata(x, y, z); TileEntity tile = world.getBlockTileEntity(x, y, z); @@ -78,7 +78,7 @@ public class BlockFiller extends BlockContainer { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (i == 0 || i == 1) return textureTopOn; else @@ -104,7 +104,7 @@ public class BlockFiller extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureTopOn = par1IconRegister.registerIcon("buildcraft:blockFillerTopOn"); textureTopOff = par1IconRegister.registerIcon("buildcraft:blockFillerTopOff"); textureSides = par1IconRegister.registerIcon("buildcraft:blockFillerSides"); diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index bcf61fb1..ba0fe56f 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -16,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -150,7 +150,7 @@ public class BlockMarker extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("buildcraft:blockMarker"); } } diff --git a/common/buildcraft/builders/BlockPathMarker.java b/common/buildcraft/builders/BlockPathMarker.java index 7389ac49..60315d93 100644 --- a/common/buildcraft/builders/BlockPathMarker.java +++ b/common/buildcraft/builders/BlockPathMarker.java @@ -13,16 +13,16 @@ import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockPathMarker extends BlockMarker { - private Icon activeMarker; + private IIcon activeMarker; public BlockPathMarker(int i) { super(i); @@ -41,7 +41,7 @@ public class BlockPathMarker extends BlockMarker { @SuppressWarnings({ "all" }) // @Override (client only) - public Icon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { TilePathMarker marker = (TilePathMarker) iblockaccess.getBlockTileEntity(i, j, k); if (l == 1 || (marker != null && marker.tryingToConnect)) @@ -58,7 +58,7 @@ public class BlockPathMarker extends BlockMarker { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("buildcraft:blockPathMarker"); activeMarker = par1IconRegister.registerIcon("buildcraft:blockPathMarkerActive"); diff --git a/common/buildcraft/builders/ItemBptBase.java b/common/buildcraft/builders/ItemBptBase.java index 040137ad..8babfafd 100644 --- a/common/buildcraft/builders/ItemBptBase.java +++ b/common/buildcraft/builders/ItemBptBase.java @@ -18,7 +18,7 @@ import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public abstract class ItemBptBase extends ItemBuildCraft { @@ -32,7 +32,7 @@ public abstract class ItemBptBase extends ItemBuildCraft { @SuppressWarnings({ "all" }) // @Override (client only) - public abstract Icon getIconFromDamage(int i); + public abstract IIcon getIconFromDamage(int i); @SuppressWarnings({ "all" }) // @Override (client only) diff --git a/common/buildcraft/builders/ItemBptBluePrint.java b/common/buildcraft/builders/ItemBptBluePrint.java index aa50c903..46a9645d 100644 --- a/common/buildcraft/builders/ItemBptBluePrint.java +++ b/common/buildcraft/builders/ItemBptBluePrint.java @@ -11,13 +11,13 @@ package buildcraft.builders; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ItemBptBluePrint extends ItemBptBase { - private Icon cleanBlueprint; - private Icon usedBlueprint; + private IIcon cleanBlueprint; + private IIcon usedBlueprint; public ItemBptBluePrint(int i) { super(i); @@ -25,7 +25,7 @@ public class ItemBptBluePrint extends ItemBptBase { } @Override - public Icon getIconFromDamage(int i) { + public IIcon getIconFromDamage(int i) { if (i == 0) return cleanBlueprint; else @@ -34,7 +34,7 @@ public class ItemBptBluePrint extends ItemBptBase { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { cleanBlueprint = par1IconRegister.registerIcon("buildcraft:blueprint_clean"); usedBlueprint = par1IconRegister.registerIcon("buildcraft:blueprint_used"); diff --git a/common/buildcraft/builders/ItemBptTemplate.java b/common/buildcraft/builders/ItemBptTemplate.java index 8f0557f6..dccb3c4e 100644 --- a/common/buildcraft/builders/ItemBptTemplate.java +++ b/common/buildcraft/builders/ItemBptTemplate.java @@ -2,17 +2,17 @@ package buildcraft.builders; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ItemBptTemplate extends ItemBptBase { - private Icon usedTemplate; + private IIcon usedTemplate; public ItemBptTemplate(int i) { super(i); } @Override - public Icon getIconFromDamage(int i) { + public IIcon getIconFromDamage(int i) { if (i == 0) return itemIcon; else @@ -21,7 +21,7 @@ public class ItemBptTemplate extends ItemBptBase { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { itemIcon = par1IconRegister.registerIcon("buildcraft:template_clean"); usedTemplate = par1IconRegister.registerIcon("buildcraft:template_used"); diff --git a/common/buildcraft/builders/filler/pattern/FillerPattern.java b/common/buildcraft/builders/filler/pattern/FillerPattern.java index 684b0514..c436d0b6 100644 --- a/common/buildcraft/builders/filler/pattern/FillerPattern.java +++ b/common/buildcraft/builders/filler/pattern/FillerPattern.java @@ -17,10 +17,10 @@ import buildcraft.core.utils.StringUtils; import java.util.HashSet; import java.util.Set; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -28,7 +28,7 @@ public abstract class FillerPattern implements IFillerPattern { public static final Set patterns = new HashSet(); private final String tag; - private Icon icon; + private IIcon icon; public FillerPattern(String tag) { this.tag = tag; @@ -54,12 +54,12 @@ public abstract class FillerPattern implements IFillerPattern { return "buildcraft:" + tag; } - public void registerIcon(IconRegister iconRegister) { + public void registerIcon(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:fillerPatterns/" + tag); } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } diff --git a/common/buildcraft/builders/triggers/ActionFiller.java b/common/buildcraft/builders/triggers/ActionFiller.java index 05be1a8f..09ca8444 100644 --- a/common/buildcraft/builders/triggers/ActionFiller.java +++ b/common/buildcraft/builders/triggers/ActionFiller.java @@ -9,7 +9,7 @@ package buildcraft.builders.triggers; import buildcraft.api.filler.IFillerPattern; import buildcraft.core.triggers.*; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; public class ActionFiller extends BCAction { @@ -26,7 +26,7 @@ public class ActionFiller extends BCAction { } @Override - public Icon getIcon() { + public IIcon getIcon() { return pattern.getIcon(); } diff --git a/common/buildcraft/core/BlockSpring.java b/common/buildcraft/core/BlockSpring.java index 6859e820..06dcdc14 100644 --- a/common/buildcraft/core/BlockSpring.java +++ b/common/buildcraft/core/BlockSpring.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -100,7 +100,7 @@ public class BlockSpring extends Block { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("bedrock"); } } diff --git a/common/buildcraft/core/CoreIconProvider.java b/common/buildcraft/core/CoreIconProvider.java index 7b288956..8b5fb490 100644 --- a/common/buildcraft/core/CoreIconProvider.java +++ b/common/buildcraft/core/CoreIconProvider.java @@ -3,8 +3,8 @@ package buildcraft.core; import buildcraft.api.core.IIconProvider; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class CoreIconProvider implements IIconProvider { @@ -12,18 +12,18 @@ public class CoreIconProvider implements IIconProvider { public static int MAX = 1; - private Icon[] _icons; + private IIcon[] _icons; @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int iconIndex) { + public IIcon getIcon(int iconIndex) { return _icons[iconIndex]; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { - _icons = new Icon[MAX]; + public void registerIcons(IIconRegister iconRegister) { + _icons = new IIcon[MAX]; _icons[ENERGY] = iconRegister.registerIcon("buildcraft:icons/energy"); diff --git a/common/buildcraft/core/EntityBlock.java b/common/buildcraft/core/EntityBlock.java index 6c833306..e5d0bdea 100644 --- a/common/buildcraft/core/EntityBlock.java +++ b/common/buildcraft/core/EntityBlock.java @@ -11,13 +11,13 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class EntityBlock extends Entity { @SideOnly(Side.CLIENT) - public Icon texture; + public IIcon texture; public float shadowSize = 0; public float rotationX = 0; public float rotationY = 0; diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index 8b4980bb..cbf403f3 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -10,7 +10,7 @@ package buildcraft.core; import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -38,7 +38,7 @@ public class ItemBuildCraft extends Item { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("buildcraft:" + iconName); } diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 539d01f6..5aaccf1c 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -5,7 +5,7 @@ import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; @@ -32,7 +32,7 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { return ""; } - public Icon getIcon() { + public IIcon getIcon() { return null; } @@ -194,7 +194,7 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { } @Override - public Icon getIcon() { + public IIcon getIcon() { return FluidRenderer.getFluidTexture(fluid, false); } diff --git a/common/buildcraft/core/gui/GuiBuildCraft.java b/common/buildcraft/core/gui/GuiBuildCraft.java index 0cc2d27b..6f652d44 100644 --- a/common/buildcraft/core/gui/GuiBuildCraft.java +++ b/common/buildcraft/core/gui/GuiBuildCraft.java @@ -18,7 +18,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -456,7 +456,7 @@ public abstract class GuiBuildCraft extends GuiContainer { GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); } - protected void drawIcon(Icon icon, int x, int y) { + protected void drawIcon(IIcon icon, int x, int y) { GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0F); drawTexturedModelRectFromIcon(x, y, icon, 16, 16); diff --git a/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java b/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java index acdbbbf0..885283e2 100644 --- a/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java +++ b/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java @@ -5,7 +5,7 @@ import buildcraft.core.fluids.Tank; import buildcraft.core.gui.GuiBuildCraft; import buildcraft.core.gui.tooltips.ToolTip; import buildcraft.core.render.FluidRenderer; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidStack; /** @@ -34,7 +34,7 @@ public class FluidGaugeWidget extends Widget { if (fluidStack == null || fluidStack.amount <= 0 || fluidStack.getFluid() == null) return; - Icon liquidIcon = FluidRenderer.getFluidTexture(fluidStack, false); + IIcon liquidIcon = FluidRenderer.getFluidTexture(fluidStack, false); if (liquidIcon == null) return; diff --git a/common/buildcraft/core/render/FluidRenderer.java b/common/buildcraft/core/render/FluidRenderer.java index 2b32c7be..e7a37d1a 100644 --- a/common/buildcraft/core/render/FluidRenderer.java +++ b/common/buildcraft/core/render/FluidRenderer.java @@ -14,7 +14,7 @@ import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; @@ -33,18 +33,18 @@ public class FluidRenderer { public static final int DISPLAY_STAGES = 100; private static final RenderInfo liquidBlock = new RenderInfo(); - public static Icon getFluidTexture(FluidStack fluidStack, boolean flowing) { + public static IIcon getFluidTexture(FluidStack fluidStack, boolean flowing) { if (fluidStack == null) { return null; } return getFluidTexture(fluidStack.getFluid(), flowing); } - public static Icon getFluidTexture(Fluid fluid, boolean flowing) { + public static IIcon getFluidTexture(Fluid fluid, boolean flowing) { if (fluid == null) { return null; } - Icon icon = flowing ? fluid.getFlowingIcon() : fluid.getStillIcon(); + IIcon icon = flowing ? fluid.getFlowingIcon() : fluid.getStillIcon(); if (icon == null) { icon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); } diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index 11955ee3..4470aa1d 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -14,7 +14,7 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -38,8 +38,8 @@ public class RenderEntityBlock extends Render { public double maxY; public double maxZ; public Block baseBlock = Block.sand; - public Icon texture = null; - public Icon[] textureArray = null; + public IIcon texture = null; + public IIcon[] textureArray = null; public boolean[] renderSide = new boolean[6]; public float light = -1f; public int brightness = -1; @@ -103,7 +103,7 @@ public class RenderEntityBlock extends Render { maxZ = 1 - temp; } - public Icon getBlockTextureFromSide(int i) { + public IIcon getBlockTextureFromSide(int i) { if (texture != null) return texture; if (textureArray == null || textureArray.length == 0) diff --git a/common/buildcraft/core/render/RenderingMarkers.java b/common/buildcraft/core/render/RenderingMarkers.java index 5b92c7ba..890dd90e 100644 --- a/common/buildcraft/core/render/RenderingMarkers.java +++ b/common/buildcraft/core/render/RenderingMarkers.java @@ -5,7 +5,7 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; public class RenderingMarkers implements ISimpleBlockRenderingHandler { @@ -125,7 +125,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { int yCoord = (int) y; int zCoord = (int) z; - Icon i = block.getBlockTexture(iblockaccess, xCoord, yCoord, zCoord, 1); + IIcon i = block.getBlockTexture(iblockaccess, xCoord, yCoord, zCoord, 1); int m = metaToOld[meta]; x += 0.5D; diff --git a/common/buildcraft/core/triggers/ActionTriggerIconProvider.java b/common/buildcraft/core/triggers/ActionTriggerIconProvider.java index d853b201..c3c67a98 100644 --- a/common/buildcraft/core/triggers/ActionTriggerIconProvider.java +++ b/common/buildcraft/core/triggers/ActionTriggerIconProvider.java @@ -3,8 +3,8 @@ package buildcraft.core.triggers; import buildcraft.api.core.IIconProvider; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; /** * Don't put new Trigger Icons in here please, put them in the Trigger classes @@ -53,20 +53,20 @@ public class ActionTriggerIconProvider implements IIconProvider { public static final int Trigger_Inventory_Below75 = 35; public static final int MAX = 39; @SideOnly(Side.CLIENT) - private final Icon[] icons = new Icon[MAX]; + private final IIcon[] icons = new IIcon[MAX]; private ActionTriggerIconProvider() { } @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int iconIndex) { + public IIcon getIcon(int iconIndex) { return icons[iconIndex]; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icons[ActionTriggerIconProvider.Action_MachineControl_On] = iconRegister.registerIcon("buildcraft:triggers/action_machinecontrol_on"); icons[ActionTriggerIconProvider.Action_MachineControl_Off] = iconRegister.registerIcon("buildcraft:triggers/action_machinecontrol_off"); icons[ActionTriggerIconProvider.Action_MachineControl_Loop] = iconRegister.registerIcon("buildcraft:triggers/action_machinecontrol_loop"); diff --git a/common/buildcraft/core/triggers/BCAction.java b/common/buildcraft/core/triggers/BCAction.java index 5b2d916a..2130a140 100644 --- a/common/buildcraft/core/triggers/BCAction.java +++ b/common/buildcraft/core/triggers/BCAction.java @@ -12,8 +12,8 @@ import static buildcraft.api.gates.ActionManager.actions; import buildcraft.api.gates.IAction; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public abstract class BCAction implements IAction { @@ -44,7 +44,7 @@ public abstract class BCAction implements IAction { @Override @SideOnly(Side.CLIENT) - public Icon getIcon() { + public IIcon getIcon() { return ActionTriggerIconProvider.INSTANCE.getIcon(getIconIndex()); } @@ -54,7 +54,7 @@ public abstract class BCAction implements IAction { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { } @Override diff --git a/common/buildcraft/core/triggers/BCTrigger.java b/common/buildcraft/core/triggers/BCTrigger.java index c8205d93..084a8b15 100644 --- a/common/buildcraft/core/triggers/BCTrigger.java +++ b/common/buildcraft/core/triggers/BCTrigger.java @@ -13,8 +13,8 @@ import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.TriggerParameter; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; /** * This class has to be implemented to create new triggers kinds to BuildCraft @@ -50,13 +50,13 @@ public abstract class BCTrigger implements ITrigger { @Override @SideOnly(Side.CLIENT) - public Icon getIcon() { + public IIcon getIcon() { return ActionTriggerIconProvider.INSTANCE.getIcon(getIconIndex()); } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { } @Override diff --git a/common/buildcraft/energy/BlockBuildcraftFluid.java b/common/buildcraft/energy/BlockBuildcraftFluid.java index a2f248eb..ab4e28e3 100644 --- a/common/buildcraft/energy/BlockBuildcraftFluid.java +++ b/common/buildcraft/energy/BlockBuildcraftFluid.java @@ -15,8 +15,8 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -37,18 +37,18 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { super(id, fluid, material); } @SideOnly(Side.CLIENT) - protected Icon[] theIcon; + protected IIcon[] theIcon; protected boolean flammable; protected int flammability = 0; @Override - public Icon getIcon(int side, int meta) { + public IIcon getIcon(int side, int meta) { return side != 0 && side != 1 ? this.theIcon[1] : this.theIcon[0]; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { this.theIcon = new Icon[] { iconRegister.registerIcon("buildcraft:" + fluidName + "_still"), iconRegister.registerIcon("buildcraft:" + fluidName + "_flow") }; } diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index e05880f0..e5a711f3 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -15,20 +15,20 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.Random; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockEngine extends BlockBuildCraft { - private static Icon woodTexture; - private static Icon stoneTexture; - private static Icon ironTexture; + private static IIcon woodTexture; + private static IIcon stoneTexture; + private static IIcon ironTexture; public BlockEngine(int i) { super(i, Material.iron); @@ -47,7 +47,7 @@ public class BlockEngine extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { woodTexture = par1IconRegister.registerIcon("buildcraft:engineWoodBottom"); stoneTexture = par1IconRegister.registerIcon("buildcraft:engineStoneBottom"); ironTexture = par1IconRegister.registerIcon("buildcraft:engineIronBottom"); @@ -161,7 +161,7 @@ public class BlockEngine extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int side, int meta) { + public IIcon getIcon(int side, int meta) { switch (meta) { case 0: return woodTexture; diff --git a/common/buildcraft/energy/BlockPollution.java b/common/buildcraft/energy/BlockPollution.java index ae50a074..0d9a9cdb 100644 --- a/common/buildcraft/energy/BlockPollution.java +++ b/common/buildcraft/energy/BlockPollution.java @@ -13,7 +13,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -40,7 +40,7 @@ public class BlockPollution extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { par1IconRegister.registerIcon("buildcraft:blockPollution"); } diff --git a/common/buildcraft/energy/ItemBucketBuildcraft.java b/common/buildcraft/energy/ItemBucketBuildcraft.java index 8501e23d..9f073d28 100644 --- a/common/buildcraft/energy/ItemBucketBuildcraft.java +++ b/common/buildcraft/energy/ItemBucketBuildcraft.java @@ -11,7 +11,7 @@ import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; @@ -39,7 +39,7 @@ public class ItemBucketBuildcraft extends ItemBucket { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("buildcraft:" + iconName); } } diff --git a/common/buildcraft/energy/gui/GuiCombustionEngine.java b/common/buildcraft/energy/gui/GuiCombustionEngine.java index 3566aab9..e29923e7 100644 --- a/common/buildcraft/energy/gui/GuiCombustionEngine.java +++ b/common/buildcraft/energy/gui/GuiCombustionEngine.java @@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; @@ -62,7 +62,7 @@ public class GuiCombustionEngine extends GuiEngine { } int start = 0; - Icon liquidIcon = null; + IIcon liquidIcon = null; Fluid fluid = liquid.getFluid(); if (fluid != null && fluid.getStillIcon() != null) { liquidIcon = fluid.getStillIcon(); diff --git a/common/buildcraft/energy/triggers/TriggerEngineHeat.java b/common/buildcraft/energy/triggers/TriggerEngineHeat.java index 256ce300..93ae505c 100644 --- a/common/buildcraft/energy/triggers/TriggerEngineHeat.java +++ b/common/buildcraft/energy/triggers/TriggerEngineHeat.java @@ -16,16 +16,16 @@ import buildcraft.energy.TileEngine.EnergyStage; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; public class TriggerEngineHeat extends BCTrigger implements ITileTrigger { public EnergyStage stage; @SideOnly(Side.CLIENT) - private Icon icon; + private IIcon icon; public TriggerEngineHeat(EnergyStage stage) { super("buildcraft:engine.stage." + stage.name().toLowerCase(Locale.ENGLISH), "buildcraft.engine.stage." + stage.name().toLowerCase(Locale.ENGLISH)); @@ -51,13 +51,13 @@ public class TriggerEngineHeat extends BCTrigger implements ITileTrigger { @Override @SideOnly(Side.CLIENT) - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/trigger_engineheat_" + stage.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/factory/BlockAutoWorkbench.java b/common/buildcraft/factory/BlockAutoWorkbench.java index 45e1e90e..e7bd8bd9 100644 --- a/common/buildcraft/factory/BlockAutoWorkbench.java +++ b/common/buildcraft/factory/BlockAutoWorkbench.java @@ -18,17 +18,17 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockAutoWorkbench extends BlockBuildCraft { - Icon topTexture; - Icon sideTexture; + IIcon topTexture; + IIcon sideTexture; public BlockAutoWorkbench(int i) { super(i, Material.wood); @@ -36,7 +36,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (i == 1 || i == 0) return topTexture; else @@ -75,7 +75,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft { } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { topTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_top"); sideTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_side"); diff --git a/common/buildcraft/factory/BlockFloodGate.java b/common/buildcraft/factory/BlockFloodGate.java index e78ff8bc..fcb39e9f 100644 --- a/common/buildcraft/factory/BlockFloodGate.java +++ b/common/buildcraft/factory/BlockFloodGate.java @@ -15,19 +15,19 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockFloodGate extends BlockBuildCraft { - private Icon textureTop; - private Icon textureBottom; - private Icon textureSide; + private IIcon textureTop; + private IIcon textureBottom; + private IIcon textureSide; public BlockFloodGate(int i) { super(i, Material.iron); @@ -39,7 +39,7 @@ public class BlockFloodGate extends BlockBuildCraft { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { switch (i) { case 0: return textureBottom; @@ -97,7 +97,7 @@ public class BlockFloodGate extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:floodgate_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:floodgate_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:floodgate_side"); diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index 19a96c38..60273c5c 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; @@ -194,7 +194,7 @@ public class BlockFrame extends Block implements IFramePipeConnection { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("buildcraft:blockFrame"); } diff --git a/common/buildcraft/factory/BlockHopper.java b/common/buildcraft/factory/BlockHopper.java index 702989a0..9bd19eb8 100644 --- a/common/buildcraft/factory/BlockHopper.java +++ b/common/buildcraft/factory/BlockHopper.java @@ -10,16 +10,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockHopper extends BlockBuildCraft { - private static Icon icon; + private static IIcon icon; public BlockHopper(int blockId) { super(blockId, Material.iron); @@ -75,13 +75,13 @@ public class BlockHopper extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { icon = par1IconRegister.registerIcon("buildcraft:hopperBottom"); } @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int par1, int par2) { + public IIcon getIcon(int par1, int par2) { return icon; } } diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index d3ce8b11..60be5562 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -17,11 +17,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -38,7 +38,7 @@ public class BlockMiningWell extends BlockBuildCraft { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (j == 0 && i == 3) return textureFront; @@ -90,7 +90,7 @@ public class BlockMiningWell extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { textureFront = par1IconRegister.registerIcon("buildcraft:miningwell_front"); textureSides = par1IconRegister.registerIcon("buildcraft:miningwell_side"); diff --git a/common/buildcraft/factory/BlockPlainPipe.java b/common/buildcraft/factory/BlockPlainPipe.java index c49a6685..a6e8554f 100644 --- a/common/buildcraft/factory/BlockPlainPipe.java +++ b/common/buildcraft/factory/BlockPlainPipe.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; @@ -70,7 +70,7 @@ public class BlockPlainPipe extends Block implements IFramePipeConnection { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("buildcraft:blockPlainPipe"); } } diff --git a/common/buildcraft/factory/BlockPump.java b/common/buildcraft/factory/BlockPump.java index e951ad48..b4f3fcbe 100644 --- a/common/buildcraft/factory/BlockPump.java +++ b/common/buildcraft/factory/BlockPump.java @@ -15,19 +15,19 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockPump extends BlockBuildCraft { - private Icon textureTop; - private Icon textureBottom; - private Icon textureSide; + private IIcon textureTop; + private IIcon textureBottom; + private IIcon textureSide; public BlockPump(int i) { super(i, Material.iron); @@ -39,7 +39,7 @@ public class BlockPump extends BlockBuildCraft { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { switch (i) { case 0: return textureBottom; @@ -98,7 +98,7 @@ public class BlockPump extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:pump_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:pump_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:pump_side"); diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index 548e87ae..755a5edb 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -18,22 +18,22 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockQuarry extends BlockBuildCraft { - Icon textureTop; - Icon textureFront; - Icon textureSide; + IIcon textureTop; + IIcon textureFront; + IIcon textureSide; public BlockQuarry(int i) { super(i, Material.iron); @@ -57,7 +57,7 @@ public class BlockQuarry extends BlockBuildCraft { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { // If no metadata is set, then this is an icon. if (j == 0 && i == 3) return textureFront; @@ -230,7 +230,7 @@ public class BlockQuarry extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureSide = par1IconRegister.registerIcon("buildcraft:quarry_side"); textureTop = par1IconRegister.registerIcon("buildcraft:quarry_top"); textureFront = par1IconRegister.registerIcon("buildcraft:quarry_front"); diff --git a/common/buildcraft/factory/BlockRefinery.java b/common/buildcraft/factory/BlockRefinery.java index 8265161b..f3c9454e 100644 --- a/common/buildcraft/factory/BlockRefinery.java +++ b/common/buildcraft/factory/BlockRefinery.java @@ -20,13 +20,13 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.ForgeDirection.EAST; @@ -37,7 +37,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry; public class BlockRefinery extends BlockContainer { - private static Icon icon; + private static IIcon icon; public BlockRefinery(int i) { super(i, Material.iron); @@ -141,13 +141,13 @@ public class BlockRefinery extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { icon = par1IconRegister.registerIcon("buildcraft:refineryBack"); } @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int par1, int par2) { + public IIcon getIcon(int par1, int par2) { return icon; } } diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index 27089070..c615c612 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -16,11 +16,11 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -30,9 +30,9 @@ import net.minecraftforge.fluids.FluidStack; public class BlockTank extends BlockContainer { - private Icon textureStackedSide; - private Icon textureBottomSide; - private Icon textureTop; + private IIcon textureStackedSide; + private IIcon textureBottomSide; + private IIcon textureTop; public BlockTank(int i) { super(i, Material.glass); @@ -62,7 +62,7 @@ public class BlockTank extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int par1, int par2) { + public IIcon getIcon(int par1, int par2) { switch (par1) { case 0: case 1: @@ -74,7 +74,7 @@ public class BlockTank extends BlockContainer { @SuppressWarnings({"all"}) @Override - public Icon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { switch (l) { case 0: case 1: @@ -154,7 +154,7 @@ public class BlockTank extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureStackedSide = par1IconRegister.registerIcon("buildcraft:tank_stacked_side"); textureBottomSide = par1IconRegister.registerIcon("buildcraft:tank_bottom_side"); textureTop = par1IconRegister.registerIcon("buildcraft:tank_top"); diff --git a/common/buildcraft/factory/FactoryProxyClient.java b/common/buildcraft/factory/FactoryProxyClient.java index a988c1f5..9c45b3bb 100644 --- a/common/buildcraft/factory/FactoryProxyClient.java +++ b/common/buildcraft/factory/FactoryProxyClient.java @@ -13,14 +13,14 @@ import buildcraft.factory.render.RenderTank; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import java.lang.reflect.Method; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class FactoryProxyClient extends FactoryProxy { - public static Icon pumpTexture; - public static Icon drillTexture; - public static Icon drillHeadTexture; + public static IIcon pumpTexture; + public static IIcon drillTexture; + public static IIcon drillHeadTexture; @Override public void initializeTileEntities() { diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index 3b7fbb74..049ada17 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -13,17 +13,17 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockLaser extends BlockContainer { @SideOnly(Side.CLIENT) - private Icon textureTop, textureBottom, textureSide; + private IIcon textureTop, textureBottom, textureSide; public BlockLaser(int i) { super(i, Material.iron); @@ -56,7 +56,7 @@ public class BlockLaser extends BlockContainer { } @Override - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { if (i == ForgeDirection.values()[j].getOpposite().ordinal()) return textureBottom; else if (i == j) @@ -85,7 +85,7 @@ public class BlockLaser extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:laser_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:laser_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:laser_side"); diff --git a/common/buildcraft/silicon/BlockLaserTable.java b/common/buildcraft/silicon/BlockLaserTable.java index 18b0f1c1..e2ce8f34 100644 --- a/common/buildcraft/silicon/BlockLaserTable.java +++ b/common/buildcraft/silicon/BlockLaserTable.java @@ -9,18 +9,18 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockLaserTable extends BlockContainer { @SideOnly(Side.CLIENT) - private Icon[][] icons; + private IIcon[][] icons; public BlockLaserTable(int i) { super(i, Material.iron); @@ -64,7 +64,7 @@ public class BlockLaserTable extends BlockContainer { } @Override - public Icon getIcon(int side, int meta) { + public IIcon getIcon(int side, int meta) { int s = side > 1 ? 2 : side; return icons[meta][s]; } @@ -103,7 +103,7 @@ public class BlockLaserTable extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { icons = new Icon[3][]; icons[0] = new Icon[3]; icons[1] = new Icon[3]; diff --git a/common/buildcraft/silicon/ItemRedstoneChipset.java b/common/buildcraft/silicon/ItemRedstoneChipset.java index 448a3d58..b70c7227 100644 --- a/common/buildcraft/silicon/ItemRedstoneChipset.java +++ b/common/buildcraft/silicon/ItemRedstoneChipset.java @@ -7,10 +7,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; public class ItemRedstoneChipset extends ItemBuildCraft { @@ -24,7 +24,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft { QUARTZ, COMP; public static final Chipset[] VALUES = values(); - private Icon icon; + private IIcon icon; public String getChipsetName() { return "redstone_" + name().toLowerCase(Locale.ENGLISH) + "_chipset"; @@ -52,7 +52,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft { } @Override - public Icon getIconFromDamage(int damage) { + public IIcon getIconFromDamage(int damage) { return Chipset.fromOrdinal(damage).icon; } @@ -72,7 +72,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { for (Chipset chipset : Chipset.VALUES) { chipset.icon = par1IconRegister.registerIcon("buildcraft:" + chipset.getChipsetName()); } diff --git a/common/buildcraft/transport/BlockFilteredBuffer.java b/common/buildcraft/transport/BlockFilteredBuffer.java index 9e1188c5..ef7988e1 100644 --- a/common/buildcraft/transport/BlockFilteredBuffer.java +++ b/common/buildcraft/transport/BlockFilteredBuffer.java @@ -16,11 +16,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; /** @@ -29,7 +29,7 @@ import net.minecraft.world.World; */ public class BlockFilteredBuffer extends BlockBuildCraft { - private static Icon blockTexture; + private static IIcon blockTexture; public BlockFilteredBuffer(int blockId) { super(blockId, Material.iron); @@ -72,13 +72,13 @@ public class BlockFilteredBuffer extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { blockTexture = par1IconRegister.registerIcon("buildcraft:filteredBuffer_all"); } @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int i, int j) { + public IIcon getIcon(int i, int j) { return blockTexture; } } diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 199e9d56..224b411c 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -20,7 +20,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -29,7 +29,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.IBlockAccess; @@ -867,7 +867,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @SuppressWarnings({"all"}) @SideOnly(Side.CLIENT) @Override - public Icon getBlockTexture(IBlockAccess iblockaccess, int x, int y, int z, int side) { + public IIcon getBlockTexture(IBlockAccess iblockaccess, int x, int y, int z, int side) { TileEntity tile = iblockaccess.getBlockTileEntity(x, y, z); if (!(tile instanceof TileGenericPipe)) return null; @@ -1008,7 +1008,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { if (!skippedFirstIconRegister) { skippedFirstIconRegister = true; return; @@ -1037,7 +1037,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int par1, int par2) { + public IIcon getIcon(int par1, int par2) { return BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.Stripes.ordinal()); } diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index ee054943..9d099dca 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -16,7 +16,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.InventoryCrafting; @@ -239,7 +239,7 @@ public class ItemFacade extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { // NOOP } diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index 13893649..290f5296 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -17,10 +17,10 @@ import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import java.util.logging.Level; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class ItemPipe extends ItemBuildCraft implements IItemPipe { @@ -98,7 +98,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { @Override @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int par1) { + public IIcon getIconFromDamage(int par1) { if (iconProvider != null) { // invalid pipes won't have this set return iconProvider.getIcon(pipeIconIndex); } else { @@ -108,7 +108,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { // NOOP } diff --git a/common/buildcraft/transport/ItemPipeWire.java b/common/buildcraft/transport/ItemPipeWire.java index ef4dd284..1394070f 100644 --- a/common/buildcraft/transport/ItemPipeWire.java +++ b/common/buildcraft/transport/ItemPipeWire.java @@ -7,10 +7,10 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; public class ItemPipeWire extends ItemBuildCraft { @@ -25,7 +25,7 @@ public class ItemPipeWire extends ItemBuildCraft { } @Override - public Icon getIconFromDamage(int damage) { + public IIcon getIconFromDamage(int damage) { return icons[damage]; } @@ -45,7 +45,7 @@ public class ItemPipeWire extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) { + public void registerIcons(IIconRegister par1IconRegister) { icons = new Icon[PipeWire.VALUES.length]; for (PipeWire pipeWire : PipeWire.VALUES) { icons[pipeWire.ordinal()] = par1IconRegister.registerIcon("buildcraft:" + pipeWire.getTag()); diff --git a/common/buildcraft/transport/ItemPlug.java b/common/buildcraft/transport/ItemPlug.java index 94b5fcbf..d8d15a49 100644 --- a/common/buildcraft/transport/ItemPlug.java +++ b/common/buildcraft/transport/ItemPlug.java @@ -3,7 +3,7 @@ package buildcraft.transport; import buildcraft.core.ItemBuildCraft; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -50,7 +50,7 @@ public class ItemPlug extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) + public void registerIcons(IIconRegister par1IconRegister) { // NOOP } diff --git a/common/buildcraft/transport/PipeIconProvider.java b/common/buildcraft/transport/PipeIconProvider.java index 40f951fd..43bca23e 100644 --- a/common/buildcraft/transport/PipeIconProvider.java +++ b/common/buildcraft/transport/PipeIconProvider.java @@ -1,7 +1,7 @@ package buildcraft.transport; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import buildcraft.BuildCraftCore; import buildcraft.api.core.IIconProvider; import cpw.mods.fml.relauncher.Side; @@ -111,7 +111,7 @@ public class PipeIconProvider implements IIconProvider { public static final TYPE[] VALUES = values(); private final String iconTag; private final String iconTagColorBlind; - private Icon icon; + private IIcon icon; private TYPE(String iconTag, String IconTagColorBlind) { this.iconTag = iconTag; @@ -122,18 +122,18 @@ public class PipeIconProvider implements IIconProvider { this(iconTag, iconTag); } - private void registerIcon(IconRegister iconRegister) { + private void registerIcon(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:" + (BuildCraftCore.colorBlindMode ? iconTagColorBlind : iconTag)); } - public Icon getIcon() { + public IIcon getIcon() { return icon; } } @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int pipeIconIndex) { + public IIcon getIcon(int pipeIconIndex) { if (pipeIconIndex == -1) return null; return TYPE.VALUES[pipeIconIndex].icon; @@ -141,7 +141,7 @@ public class PipeIconProvider implements IIconProvider { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { for (TYPE type : TYPE.VALUES) { type.registerIcon(iconRegister); } diff --git a/common/buildcraft/transport/PipeRenderState.java b/common/buildcraft/transport/PipeRenderState.java index 31b97d0a..b37378c5 100644 --- a/common/buildcraft/transport/PipeRenderState.java +++ b/common/buildcraft/transport/PipeRenderState.java @@ -10,7 +10,7 @@ import cpw.mods.fml.relauncher.SideOnly; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; public class PipeRenderState implements IClientState { @@ -28,9 +28,9 @@ public class PipeRenderState implements IClientState { * This is a placeholder for the pipe renderer to set to a value that the BlockGenericPipe->TileGenericPipe will then return the the WorldRenderer */ @SideOnly(Side.CLIENT) - public Icon currentTexture; + public IIcon currentTexture; @SideOnly(Side.CLIENT) - public Icon[] textureArray; + public IIcon[] textureArray; public void setIsGateLit(boolean value) { if (isGateLit != value) { diff --git a/common/buildcraft/transport/WireIconProvider.java b/common/buildcraft/transport/WireIconProvider.java index 9e65ad41..7eb2eb12 100644 --- a/common/buildcraft/transport/WireIconProvider.java +++ b/common/buildcraft/transport/WireIconProvider.java @@ -3,8 +3,8 @@ package buildcraft.transport; import buildcraft.api.core.IIconProvider; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class WireIconProvider implements IIconProvider { @@ -20,18 +20,18 @@ public class WireIconProvider implements IIconProvider { public static final int MAX = 8; @SideOnly(Side.CLIENT) - private Icon[] icons; + private IIcon[] icons; @Override @SideOnly(Side.CLIENT) - public Icon getIcon(int pipeIconIndex) { + public IIcon getIcon(int pipeIconIndex) { return icons[pipeIconIndex]; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { - icons = new Icon[MAX]; + public void registerIcons(IIconRegister iconRegister) { + icons = new IIcon[MAX]; icons[WireIconProvider.Texture_Red_Dark] = iconRegister.registerIcon("buildcraft:texture_red_dark"); icons[WireIconProvider.Texture_Red_Lit] = iconRegister.registerIcon("buildcraft:texture_red_lit"); diff --git a/common/buildcraft/transport/gates/GateDefinition.java b/common/buildcraft/transport/gates/GateDefinition.java index 4a37b9da..5fa11ca4 100644 --- a/common/buildcraft/transport/gates/GateDefinition.java +++ b/common/buildcraft/transport/gates/GateDefinition.java @@ -11,8 +11,8 @@ package buildcraft.transport.gates; import buildcraft.core.DefaultProps; import buildcraft.core.utils.StringUtils; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; /** @@ -38,14 +38,14 @@ public final class GateDefinition { public final int guiHeight; public final int numSlots; public final boolean hasParameterSlot; - private Icon iconBlock; - private Icon iconItem; + private IIcon iconBlock; + private IIcon iconItem; - public Icon getIconBlock() { + public IIcon getIconBlock() { return iconBlock; } - public Icon getIconItem() { + public IIcon getIconItem() { return iconItem; } @@ -53,12 +53,12 @@ public final class GateDefinition { return name().toLowerCase(Locale.ENGLISH); } - public void registerBlockIcon(IconRegister iconRegister) { + public void registerBlockIcon(IIconRegister iconRegister) { if (this != REDSTONE) iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag()); } - public void registerItemIcon(IconRegister iconRegister) { + public void registerItemIcon(IIconRegister iconRegister) { if (this != REDSTONE) iconItem = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag()); } @@ -81,19 +81,19 @@ public final class GateDefinition { AND, OR; public static final GateLogic[] VALUES = values(); - private Icon iconLit; - private Icon iconDark; - private Icon iconItem; + private IIcon iconLit; + private IIcon iconDark; + private IIcon iconItem; - public Icon getIconLit() { + public IIcon getIconLit() { return iconLit; } - public Icon getIconDark() { + public IIcon getIconDark() { return iconDark; } - public Icon getIconItem() { + public IIcon getIconItem() { return iconItem; } @@ -101,12 +101,12 @@ public final class GateDefinition { return name().toLowerCase(Locale.ENGLISH); } - public void registerBlockIcon(IconRegister iconRegister) { + public void registerBlockIcon(IIconRegister iconRegister) { iconLit = iconRegister.registerIcon("buildcraft:gates/gate_lit_" + getTag()); iconDark = iconRegister.registerIcon("buildcraft:gates/gate_dark_" + getTag()); } - public void registerItemIcon(IconRegister iconRegister) { + public void registerItemIcon(IIconRegister iconRegister) { iconItem = iconRegister.registerIcon("buildcraft:gates/gate_logic_" + getTag()); } diff --git a/common/buildcraft/transport/gates/GateExpansionBuildcraft.java b/common/buildcraft/transport/gates/GateExpansionBuildcraft.java index 3f44ff24..3e801c8d 100644 --- a/common/buildcraft/transport/gates/GateExpansionBuildcraft.java +++ b/common/buildcraft/transport/gates/GateExpansionBuildcraft.java @@ -10,8 +10,8 @@ package buildcraft.transport.gates; import buildcraft.api.gates.IGateExpansion; import buildcraft.core.utils.StringUtils; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; /** * @@ -20,8 +20,8 @@ import net.minecraft.util.Icon; public abstract class GateExpansionBuildcraft implements IGateExpansion { private final String tag; - private Icon iconBlock; - private Icon iconItem; + private IIcon iconBlock; + private IIcon iconItem; public GateExpansionBuildcraft(String tag) { this.tag = tag; @@ -38,22 +38,22 @@ public abstract class GateExpansionBuildcraft implements IGateExpansion { } @Override - public void registerBlockOverlay(IconRegister iconRegister) { + public void registerBlockOverlay(IIconRegister iconRegister) { iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_expansion_" + tag); } @Override - public void registerItemOverlay(IconRegister iconRegister) { + public void registerItemOverlay(IIconRegister iconRegister) { iconItem = iconRegister.registerIcon("buildcraft:gates/gate_expansion_" + tag); } @Override - public Icon getOverlayBlock() { + public IIcon getOverlayBlock() { return iconBlock; } @Override - public Icon getOverlayItem() { + public IIcon getOverlayItem() { return iconItem; } } diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index 3e7da7ae..f020b57a 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -19,14 +19,14 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; -import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; public class ItemGate extends ItemBuildCraft { @@ -182,13 +182,13 @@ public class ItemGate extends ItemBuildCraft { } @Override - public Icon getIconIndex(ItemStack stack) { + public IIcon getIconIndex(ItemStack stack) { return getLogic(stack).getIconItem(); } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { for (GateDefinition.GateMaterial material : GateDefinition.GateMaterial.VALUES) { material.registerItemIcon(iconRegister); diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index e81d3752..53495075 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -20,7 +20,7 @@ import java.util.Iterator; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -54,7 +54,7 @@ public class GuiGateInterface extends GuiAdvancedInterface { @SideOnly(Side.CLIENT) @Override - public Icon getIcon() { + public IIcon getIcon() { ITrigger trigger = pipe.gate.getTrigger(slot); if (trigger != null) return trigger.getIcon(); @@ -95,7 +95,7 @@ public class GuiGateInterface extends GuiAdvancedInterface { @SideOnly(Side.CLIENT) @Override - public Icon getIcon() { + public IIcon getIcon() { IAction action = pipe.gate.getAction(slot); if (action != null) return action.getIcon(); diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index 749fc0d6..2e7e297e 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -10,7 +10,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON; import org.lwjgl.opengl.GL11; diff --git a/common/buildcraft/transport/render/FacadeRenderHelper.java b/common/buildcraft/transport/render/FacadeRenderHelper.java index 94843f51..600c21df 100644 --- a/common/buildcraft/transport/render/FacadeRenderHelper.java +++ b/common/buildcraft/transport/render/FacadeRenderHelper.java @@ -19,7 +19,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; /** diff --git a/common/buildcraft/transport/render/GateItemRenderer.java b/common/buildcraft/transport/render/GateItemRenderer.java index a6fed8f9..e0155983 100644 --- a/common/buildcraft/transport/render/GateItemRenderer.java +++ b/common/buildcraft/transport/render/GateItemRenderer.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.client.renderer.ItemRenderer; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.IItemRenderer.ItemRenderType; diff --git a/common/buildcraft/transport/render/PipeItemRenderer.java b/common/buildcraft/transport/render/PipeItemRenderer.java index 28b58bd2..ef0aabce 100644 --- a/common/buildcraft/transport/render/PipeItemRenderer.java +++ b/common/buildcraft/transport/render/PipeItemRenderer.java @@ -8,7 +8,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 658a7c1c..784b1349 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -43,7 +43,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraft.util.Timer; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -507,7 +507,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glPopMatrix(); } - private void renderGate(TileGenericPipe tile, Icon icon, int layer, float trim, float translateCenter, float extraDepth) { + private void renderGate(TileGenericPipe tile, IIcon icon, int layer, float trim, float translateCenter, float extraDepth) { PipeRenderState state = tile.renderState; RenderInfo box = new RenderInfo(); diff --git a/common/buildcraft/transport/render/PlugItemRenderer.java b/common/buildcraft/transport/render/PlugItemRenderer.java index 88602f67..b4a37bb9 100644 --- a/common/buildcraft/transport/render/PlugItemRenderer.java +++ b/common/buildcraft/transport/render/PlugItemRenderer.java @@ -6,7 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; +import net.minecraft.util.IIcon; import net.minecraftforge.client.IItemRenderer; import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON; import org.lwjgl.opengl.GL11; diff --git a/common/buildcraft/transport/triggers/ActionEnergyPulsar.java b/common/buildcraft/transport/triggers/ActionEnergyPulsar.java index 8b44fee3..89281975 100644 --- a/common/buildcraft/transport/triggers/ActionEnergyPulsar.java +++ b/common/buildcraft/transport/triggers/ActionEnergyPulsar.java @@ -1,21 +1,21 @@ package buildcraft.transport.triggers; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.BCAction; import buildcraft.core.utils.StringUtils; public class ActionEnergyPulsar extends BCAction { - private Icon icon; + private IIcon icon; public ActionEnergyPulsar() { super("buildcraft:pulsar.constant", "buildcraft.pulser.constant"); } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @@ -25,7 +25,7 @@ public class ActionEnergyPulsar extends BCAction { } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/action_pulsar"); } diff --git a/common/buildcraft/transport/triggers/ActionExtractionPreset.java b/common/buildcraft/transport/triggers/ActionExtractionPreset.java index cc6ceedc..6498cd85 100644 --- a/common/buildcraft/transport/triggers/ActionExtractionPreset.java +++ b/common/buildcraft/transport/triggers/ActionExtractionPreset.java @@ -11,12 +11,12 @@ import buildcraft.core.triggers.BCAction; import buildcraft.core.utils.EnumColor; import buildcraft.core.utils.StringUtils; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ActionExtractionPreset extends BCAction { - private Icon icon; + private IIcon icon; public final EnumColor color; public ActionExtractionPreset(EnumColor color) { @@ -31,12 +31,12 @@ public class ActionExtractionPreset extends BCAction { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/extraction_preset_" + color.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/ActionPipeColor.java b/common/buildcraft/transport/triggers/ActionPipeColor.java index d70fbe99..a11946dd 100644 --- a/common/buildcraft/transport/triggers/ActionPipeColor.java +++ b/common/buildcraft/transport/triggers/ActionPipeColor.java @@ -11,12 +11,12 @@ import buildcraft.core.triggers.BCAction; import buildcraft.core.utils.EnumColor; import buildcraft.core.utils.StringUtils; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ActionPipeColor extends BCAction { - private Icon icon; + private IIcon icon; public final EnumColor color; public ActionPipeColor(EnumColor color) { @@ -31,12 +31,12 @@ public class ActionPipeColor extends BCAction { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/color_" + color.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/ActionPipeDirection.java b/common/buildcraft/transport/triggers/ActionPipeDirection.java index 7bf08014..43ec6ade 100644 --- a/common/buildcraft/transport/triggers/ActionPipeDirection.java +++ b/common/buildcraft/transport/triggers/ActionPipeDirection.java @@ -9,13 +9,13 @@ package buildcraft.transport.triggers; import buildcraft.core.triggers.BCAction; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; public class ActionPipeDirection extends BCAction { - private Icon icon; + private IIcon icon; public final ForgeDirection direction; public ActionPipeDirection(ForgeDirection direction) { @@ -30,12 +30,12 @@ public class ActionPipeDirection extends BCAction { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/trigger_dir_" + direction.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/ActionPowerLimiter.java b/common/buildcraft/transport/triggers/ActionPowerLimiter.java index cef377e9..d8aa0068 100644 --- a/common/buildcraft/transport/triggers/ActionPowerLimiter.java +++ b/common/buildcraft/transport/triggers/ActionPowerLimiter.java @@ -10,12 +10,12 @@ package buildcraft.transport.triggers; import buildcraft.core.triggers.BCAction; import buildcraft.transport.pipes.PipePowerIron.PowerMode; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ActionPowerLimiter extends BCAction { - private Icon icon; + private IIcon icon; public final PowerMode limit; public ActionPowerLimiter(PowerMode limit) { @@ -30,12 +30,12 @@ public class ActionPowerLimiter extends BCAction { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/trigger_limiter_" + limit.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java b/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java index 6ec826fd..bf73bd72 100644 --- a/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java +++ b/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java @@ -11,14 +11,14 @@ import buildcraft.core.triggers.BCAction; import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class ActionRedstoneFaderOutput extends BCAction { public final int level; @SideOnly(Side.CLIENT) - private Icon icon; + private IIcon icon; public ActionRedstoneFaderOutput(int level) { super(String.format("buildcraft:redstone.output.%02d", level)); @@ -33,13 +33,13 @@ public class ActionRedstoneFaderOutput extends BCAction { @Override @SideOnly(Side.CLIENT) - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level)); } } diff --git a/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java b/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java index 6d9fc51b..cd4725d9 100644 --- a/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java +++ b/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java @@ -1,21 +1,21 @@ package buildcraft.transport.triggers; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import buildcraft.core.triggers.ActionTriggerIconProvider; import buildcraft.core.triggers.BCAction; import buildcraft.core.utils.StringUtils; public class ActionSingleEnergyPulse extends BCAction { - private Icon icon; + private IIcon icon; public ActionSingleEnergyPulse() { super("buildcraft:pulsar.single", "buildcraft.pulser.single"); } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @@ -25,7 +25,7 @@ public class ActionSingleEnergyPulse extends BCAction { } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/action_single_pulsar"); } diff --git a/common/buildcraft/transport/triggers/TriggerClockTimer.java b/common/buildcraft/transport/triggers/TriggerClockTimer.java index f9b88b16..05579388 100644 --- a/common/buildcraft/transport/triggers/TriggerClockTimer.java +++ b/common/buildcraft/transport/triggers/TriggerClockTimer.java @@ -4,8 +4,8 @@ import java.util.Locale; import buildcraft.core.triggers.BCTrigger; import buildcraft.core.utils.StringUtils; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class TriggerClockTimer extends BCTrigger { @@ -20,7 +20,7 @@ public class TriggerClockTimer extends BCTrigger { } } public final Time time; - private Icon icon; + private IIcon icon; public TriggerClockTimer(Time time) { super("buildcraft:timer." + time.name().toLowerCase(Locale.ENGLISH)); @@ -29,7 +29,7 @@ public class TriggerClockTimer extends BCTrigger { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @@ -39,7 +39,7 @@ public class TriggerClockTimer extends BCTrigger { } @Override - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_" + time.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/TriggerPipeContents.java b/common/buildcraft/transport/triggers/TriggerPipeContents.java index 6724a586..d0300ee6 100644 --- a/common/buildcraft/transport/triggers/TriggerPipeContents.java +++ b/common/buildcraft/transport/triggers/TriggerPipeContents.java @@ -20,8 +20,8 @@ import buildcraft.transport.pipes.PipePowerWood; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.Locale; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; @@ -40,7 +40,7 @@ public class TriggerPipeContents extends BCTrigger implements IPipeTrigger { public BCTrigger trigger; }; private PipeContents kind; - private Icon icon; + private IIcon icon; public TriggerPipeContents(PipeContents kind) { super("buildcraft:pipe.contents." + kind.name().toLowerCase(Locale.ENGLISH), "buildcraft.pipe.contents." + kind.name()); @@ -136,13 +136,13 @@ public class TriggerPipeContents extends BCTrigger implements IPipeTrigger { } @Override - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("buildcraft:triggers/trigger_pipecontents_" + kind.name().toLowerCase(Locale.ENGLISH)); } } diff --git a/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java b/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java index 34b14ca5..f3560a5b 100644 --- a/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java +++ b/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java @@ -14,14 +14,14 @@ import buildcraft.transport.IPipeTrigger; import buildcraft.transport.Pipe; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; public class TriggerRedstoneFaderInput extends BCTrigger implements IPipeTrigger { public final int level; @SideOnly(Side.CLIENT) - private Icon icon; + private IIcon icon; public TriggerRedstoneFaderInput(int level) { super(String.format("buildcraft:redtone.input.%02d", level)); @@ -41,13 +41,13 @@ public class TriggerRedstoneFaderInput extends BCTrigger implements IPipeTrigger @Override @SideOnly(Side.CLIENT) - public Icon getIcon() { + public IIcon getIcon() { return icon; } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) { + public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon(String.format("buildcraft:triggers/redstone_%02d", level)); } } From 14003341e38f9da8df9a9ab719ff8c3fbe19d988 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 13 Jan 2014 20:26:16 +0100 Subject: [PATCH 03/31] progress made in MC 1.7 network support --- common/buildcraft/BuildCraftBuilders.java | 11 ++- common/buildcraft/BuildCraftCore.java | 19 ++-- common/buildcraft/BuildCraftEnergy.java | 5 +- common/buildcraft/BuildCraftFactory.java | 13 ++- common/buildcraft/BuildCraftMod.java | 34 +++++++ common/buildcraft/BuildCraftSilicon.java | 11 ++- common/buildcraft/BuildCraftTransport.java | 10 +- .../network/PacketHandlerBuilders.java | 37 +++++--- .../builders/network/PacketLibraryAction.java | 6 +- common/buildcraft/core/TileBuildCraft.java | 2 +- .../network/BuildCraftChannelHandler.java | 21 +++++ .../core/network/BuildCraftPacket.java | 30 +----- .../core/network/ISynchronizedTile.java | 2 +- .../core/network/PacketCoordinates.java | 6 +- .../core/network/PacketGuiReturn.java | 6 +- .../core/network/PacketGuiWidget.java | 7 +- .../core/network/PacketHandler.java | 39 ++++---- common/buildcraft/core/network/PacketNBT.java | 7 +- .../core/network/PacketPayload.java | 6 +- .../core/network/PacketPayloadArrays.java | 10 +- .../core/network/PacketPayloadStream.java | 10 +- .../core/network/PacketSlotChange.java | 7 +- .../core/network/PacketTileState.java | 6 +- .../buildcraft/core/network/PacketUpdate.java | 6 +- common/buildcraft/core/proxy/CoreProxy.java | 37 ++++---- .../core/proxy/CoreProxyClient.java | 12 ++- common/buildcraft/core/utils/BlockUtil.java | 2 +- common/buildcraft/core/utils/Utils.java | 26 ++++++ common/buildcraft/factory/TileQuarry.java | 2 +- .../factory/network/PacketHandlerFactory.java | 32 ++++--- .../silicon/network/PacketHandlerSilicon.java | 48 +++++----- .../buildcraft/transport/TileGenericPipe.java | 2 +- .../transport/gui/ContainerGateInterface.java | 2 +- .../transport/network/PacketFluidUpdate.java | 7 +- .../network/PacketGateExpansionMap.java | 13 ++- .../network/PacketHandlerTransport.java | 91 +++++++++---------- .../network/PacketPipeTransportItemStack.java | 9 +- .../PacketPipeTransportItemStackRequest.java | 6 +- .../network/PacketPipeTransportTraveler.java | 7 +- .../transport/network/PacketPowerUpdate.java | 6 +- .../network/TransportConnectionHandler.java | 2 +- 41 files changed, 384 insertions(+), 231 deletions(-) create mode 100755 common/buildcraft/BuildCraftMod.java create mode 100755 common/buildcraft/core/network/BuildCraftChannelHandler.java diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 075a92eb..70d2bcbd 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -64,6 +64,7 @@ import buildcraft.core.InterModComms; import buildcraft.core.Version; import buildcraft.core.blueprints.BptPlayerIndex; import buildcraft.core.blueprints.BptRootIndex; +import buildcraft.core.network.PacketHandler; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BCLog; import cpw.mods.fml.common.Mod; @@ -79,9 +80,11 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.io.IOException; import java.util.LinkedList; import java.util.TreeMap; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -93,8 +96,7 @@ import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE) -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerBuilders.class, clientSideRequired = true, serverSideRequired = true) -public class BuildCraftBuilders { +public class BuildCraftBuilders extends BuildCraftMod { public static final int LIBRARY_PAGE_SIZE = 12; public static final int MAX_BLUEPRINTS_NAME_SIZE = 14; @@ -118,8 +120,11 @@ public class BuildCraftBuilders { @EventHandler public void init(FMLInitializationEvent evt) { + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-BUILDERS", new PacketHandlerBuilders()); + // Register gui handler - NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler()); + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); // Register save handler MinecraftForge.EVENT_BUS.register(new EventHandlerBuilders()); diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index b1ba8145..ca644063 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -8,15 +8,21 @@ package buildcraft; import static buildcraft.BuildCraftEnergy.spawnOilSprings; + import java.io.File; +import java.util.EnumMap; import java.util.TreeMap; import net.minecraft.block.Block; import net.minecraft.block.BlockFluid; import net.minecraft.entity.EntityList; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.network.Packet; import net.minecraft.util.IIcon; +import net.minecraft.world.World; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.IPlantable; @@ -47,6 +53,7 @@ import buildcraft.core.SpringPopulate; import buildcraft.core.TickHandlerCoreClient; import buildcraft.core.Version; import buildcraft.core.blueprints.BptItem; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.EntityIds; import buildcraft.core.network.PacketHandler; import buildcraft.core.network.PacketUpdate; @@ -76,7 +83,8 @@ import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.network.FMLEmbeddedChannel; +import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.TickRegistry; @@ -84,11 +92,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.6.4,1.7)", dependencies = "required-after:Forge@[9.11.1.953,)") -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true) -public class BuildCraftCore { - +public class BuildCraftCore extends BuildCraftMod { public static enum RenderMode { - Full, NoDynamic }; public static RenderMode render = RenderMode.Full; @@ -264,7 +269,9 @@ public class BuildCraftCore { @EventHandler public void initialize(FMLInitializationEvent evt) { - // MinecraftForge.registerConnectionHandler(new ConnectionHandler()); + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-CORE", new PacketHandler()); + ActionManager.registerTriggerProvider(new DefaultTriggerProvider()); ActionManager.registerActionProvider(new DefaultActionProvider()); diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 5c7630d9..0ece1f6c 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -62,8 +62,7 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @Mod(name = "BuildCraft Energy", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Energy", dependencies = DefaultProps.DEPENDENCY_CORE) -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, clientSideRequired = true, serverSideRequired = true) -public class BuildCraftEnergy { +public class BuildCraftEnergy extends BuildCraftMod { public final static int ENERGY_REMOVE_BLOCK = 25; public final static int ENERGY_EXTRACT_ITEM = 2; @@ -222,7 +221,7 @@ public class BuildCraftEnergy { @EventHandler public void init(FMLInitializationEvent evt) { - NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler()); + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); new BptBlockEngine(engineBlock.blockID); diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index 0137787a..62cf52ec 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -10,6 +10,7 @@ package buildcraft; import buildcraft.core.DefaultProps; import buildcraft.core.InterModComms; import buildcraft.core.Version; +import buildcraft.core.network.PacketHandler; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.ConfigUtils; import buildcraft.factory.BlockAutoWorkbench; @@ -39,7 +40,9 @@ import buildcraft.factory.TileQuarry; import buildcraft.factory.TileRefinery; import buildcraft.factory.TileTank; import buildcraft.factory.network.PacketHandlerFactory; + import com.google.common.collect.Lists; + import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -51,7 +54,9 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.Item; @@ -66,8 +71,7 @@ import net.minecraftforge.common.config.Property; import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE) -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerFactory.class, clientSideRequired = true, serverSideRequired = true) -public class BuildCraftFactory { +public class BuildCraftFactory extends BuildCraftMod { public static final int MINING_MJ_COST_PER_BLOCK = 64; public static BlockQuarry quarryBlock; @@ -127,7 +131,7 @@ public class BuildCraftFactory { @EventHandler public void load(FMLInitializationEvent evt) { - NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler()); + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); // EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechanicalArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true); @@ -154,6 +158,9 @@ public class BuildCraftFactory { @EventHandler public void initialize(FMLPreInitializationEvent evt) { + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-FACTORY", new PacketHandlerFactory()); + ConfigUtils genCat = new ConfigUtils(BuildCraftCore.mainConfiguration, Configuration.CATEGORY_GENERAL); allowMining = genCat.get("mining.enabled", true, "disables the recipes for automated mining machines"); diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java new file mode 100755 index 00000000..2064175a --- /dev/null +++ b/common/buildcraft/BuildCraftMod.java @@ -0,0 +1,34 @@ +package buildcraft; + +import java.util.EnumMap; + +import cpw.mods.fml.common.network.FMLEmbeddedChannel; +import cpw.mods.fml.common.network.FMLOutboundHandler; +import cpw.mods.fml.common.network.FMLOutboundHandler.OutboundTarget; +import cpw.mods.fml.relauncher.Side; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.Packet; +import net.minecraft.world.World; +import buildcraft.core.network.BuildCraftPacket; + +public class BuildCraftMod { + public EnumMap channels; + + public void sendToPlayers(BuildCraftPacket packet, World world, int x, int y, int z, int maxDistance) { + channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); + channels.get(Side.SERVER).writeOutbound(packet); + } + + public void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) { + channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); + channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(entityplayer); + channels.get(Side.SERVER).writeOutbound(packet); + } + + public void sendToServer(BuildCraftPacket packet) { + channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.TOSERVER); + channels.get(Side.CLIENT).writeOutbound(packet); + } + +} \ No newline at end of file diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 6bb2e70d..ae72053e 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -16,6 +16,7 @@ import buildcraft.core.InterModComms; import buildcraft.silicon.ItemRedstoneChipset; import buildcraft.silicon.ItemRedstoneChipset.Chipset; import buildcraft.core.Version; +import buildcraft.core.network.PacketHandler; import buildcraft.core.proxy.CoreProxy; import buildcraft.silicon.BlockLaser; import buildcraft.silicon.BlockLaserTable; @@ -44,17 +45,18 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; + import java.util.ArrayList; import java.util.EnumSet; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Property; @Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT) -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerSilicon.class, clientSideRequired = true, serverSideRequired = true) -public class BuildCraftSilicon { +public class BuildCraftSilicon extends BuildCraftMod { public static ItemRedstoneChipset redstoneChipset; public static BlockLaser laserBlock; @@ -91,7 +93,10 @@ public class BuildCraftSilicon { @EventHandler public void init(FMLInitializationEvent evt) { - NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler()); + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-SILICON", new PacketHandlerSilicon()); + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); CoreProxy.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser"); CoreProxy.proxy.registerTileEntity(TileAssemblyTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyTable"); CoreProxy.proxy.registerTileEntity(TileAdvancedCraftingTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench"); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index a01d9f48..2491280f 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -16,6 +16,7 @@ import buildcraft.core.DefaultProps; import buildcraft.core.InterModComms; import buildcraft.core.ItemBuildCraft; import buildcraft.core.Version; +import buildcraft.core.network.PacketHandler; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.triggers.BCAction; import buildcraft.core.triggers.BCTrigger; @@ -101,7 +102,9 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; + import java.util.LinkedList; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; @@ -113,7 +116,7 @@ import net.minecraftforge.common.config.Property; @Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE) @NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerTransport.class, connectionHandler = TransportConnectionHandler.class) -public class BuildCraftTransport { +public class BuildCraftTransport extends BuildCraftMod { public static BlockGenericPipe genericPipeBlock; public static float pipeDurability; @@ -344,6 +347,9 @@ public class BuildCraftTransport { @EventHandler public void init(FMLInitializationEvent evt) { + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new PacketHandlerTransport()); + // Register connection handler // MinecraftForge.registerConnectionHandler(new ConnectionHandler()); @@ -377,7 +383,7 @@ public class BuildCraftTransport { } TransportProxy.proxy.registerRenderers(); - NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler()); + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); } @EventHandler diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index 56576f7b..84eb18c3 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -2,41 +2,50 @@ package buildcraft.builders.network; import buildcraft.builders.TileArchitect; import buildcraft.builders.TileBlueprintLibrary; +import buildcraft.core.network.BuildCraftChannelHandler; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPayloadArrays; import buildcraft.core.network.PacketUpdate; +import buildcraft.core.proxy.CoreProxy; import cpw.mods.fml.common.network.IPacketHandler; +import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.Player; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; + import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.network.INetHandler; import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.network.Packet250CustomPayload; import net.minecraft.tileentity.TileEntity; -public class PacketHandlerBuilders implements IPacketHandler { +public class PacketHandlerBuilders extends BuildCraftChannelHandler { @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + super.decodeInto(ctx, data, packet); - DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); try { - int packetID = data.read(); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + + EntityPlayer player = + CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + + int packetID = packet.getID(); + switch (packetID) { case PacketIds.ARCHITECT_NAME: - PacketUpdate packetA = new PacketUpdate(); - packetA.readData(data); - onArchitectName((EntityPlayer) player, packetA); + onArchitectName(player, (PacketUpdate) packet); break; case PacketIds.LIBRARY_ACTION: - PacketLibraryAction packetB = new PacketLibraryAction(); - packetB.readData(data); - onLibraryAction((EntityPlayer) player, packetB); + onLibraryAction(player, (PacketLibraryAction) packet); break; case PacketIds.LIBRARY_SELECT: - PacketLibraryAction packetC = new PacketLibraryAction(); - packetC.readData(data); - onLibrarySelect((EntityPlayer) player, packetC); + onLibrarySelect(player, (PacketLibraryAction) packet); break; } } catch (Exception ex) { diff --git a/common/buildcraft/builders/network/PacketLibraryAction.java b/common/buildcraft/builders/network/PacketLibraryAction.java index 5aa18491..4fcb5f28 100644 --- a/common/buildcraft/builders/network/PacketLibraryAction.java +++ b/common/buildcraft/builders/network/PacketLibraryAction.java @@ -1,6 +1,8 @@ package buildcraft.builders.network; import buildcraft.core.network.PacketCoordinates; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -17,13 +19,13 @@ public class PacketLibraryAction extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(actionId); super.writeData(data); } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { actionId = data.readInt(); super.readData(data); } diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 773f46b7..aece4119 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -23,7 +23,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; diff --git a/common/buildcraft/core/network/BuildCraftChannelHandler.java b/common/buildcraft/core/network/BuildCraftChannelHandler.java new file mode 100755 index 00000000..9de015aa --- /dev/null +++ b/common/buildcraft/core/network/BuildCraftChannelHandler.java @@ -0,0 +1,21 @@ +package buildcraft.core.network; + +import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + +public class BuildCraftChannelHandler extends FMLIndexedMessageToMessageCodec { + + public BuildCraftChannelHandler() { + } + + @Override + public void encodeInto(ChannelHandlerContext ctx, BuildCraftPacket packet, ByteBuf data) throws Exception { + packet.writeData(data); + } + + @Override + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + packet.readData(data); + } +} diff --git a/common/buildcraft/core/network/BuildCraftPacket.java b/common/buildcraft/core/network/BuildCraftPacket.java index e1712054..70a946f4 100644 --- a/common/buildcraft/core/network/BuildCraftPacket.java +++ b/common/buildcraft/core/network/BuildCraftPacket.java @@ -1,39 +1,15 @@ package buildcraft.core.network; import buildcraft.core.DefaultProps; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet250CustomPayload; +import io.netty.buffer.ByteBuf; public abstract class BuildCraftPacket { protected boolean isChunkDataPacket = false; - protected String channel = DefaultProps.NET_CHANNEL_NAME; public abstract int getID(); - public Packet getPacket() { + public abstract void readData(ByteBuf data); - ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - DataOutputStream data = new DataOutputStream(bytes); - try { - data.writeByte(getID()); - writeData(data); - } catch (IOException e) { - e.printStackTrace(); - } - Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = channel; - packet.data = bytes.toByteArray(); - packet.length = packet.data.length; - packet.isChunkDataPacket = this.isChunkDataPacket; - return packet; - } - - public abstract void readData(DataInputStream data) throws IOException; - - public abstract void writeData(DataOutputStream data) throws IOException; + public abstract void writeData(ByteBuf data); } diff --git a/common/buildcraft/core/network/ISynchronizedTile.java b/common/buildcraft/core/network/ISynchronizedTile.java index a72e0643..4e5c2a44 100644 --- a/common/buildcraft/core/network/ISynchronizedTile.java +++ b/common/buildcraft/core/network/ISynchronizedTile.java @@ -8,7 +8,7 @@ package buildcraft.core.network; import java.io.IOException; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.Packet; public interface ISynchronizedTile { diff --git a/common/buildcraft/core/network/PacketCoordinates.java b/common/buildcraft/core/network/PacketCoordinates.java index c73a9640..3b9bb47f 100644 --- a/common/buildcraft/core/network/PacketCoordinates.java +++ b/common/buildcraft/core/network/PacketCoordinates.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -25,7 +27,7 @@ public class PacketCoordinates extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(posX); data.writeInt(posY); @@ -33,7 +35,7 @@ public class PacketCoordinates extends BuildCraftPacket { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { posX = data.readInt(); posY = data.readInt(); diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index e559b24b..ce4abd21 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -35,7 +37,7 @@ public class PacketGuiReturn extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(obj.getWorld().provider.dimensionId); if (obj instanceof TileEntity) { TileEntity tile = (TileEntity) obj; @@ -55,7 +57,7 @@ public class PacketGuiReturn extends BuildCraftPacket { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { int dim = data.readInt(); World world = DimensionManager.getWorld(dim); boolean tileReturn = data.readBoolean(); diff --git a/common/buildcraft/core/network/PacketGuiWidget.java b/common/buildcraft/core/network/PacketGuiWidget.java index e8a78843..bdc1c4c8 100644 --- a/common/buildcraft/core/network/PacketGuiWidget.java +++ b/common/buildcraft/core/network/PacketGuiWidget.java @@ -10,9 +10,12 @@ package buildcraft.core.network; import buildcraft.core.gui.BuildCraftContainer; import cpw.mods.fml.client.FMLClientHandler; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.client.entity.EntityClientPlayerMP; /** * @@ -34,14 +37,14 @@ public class PacketGuiWidget extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeByte(windowId); data.writeByte(widgetId); data.write(payload); } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { windowId = data.readByte(); widgetId = data.readByte(); diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index 8c0feb94..eaf2b61d 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -1,18 +1,20 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; +import buildcraft.core.proxy.CoreProxy; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.network.INetHandler; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.Player; +import cpw.mods.fml.common.network.NetworkRegistry; -public class PacketHandler implements IPacketHandler { +public class PacketHandler extends BuildCraftChannelHandler { private void onTileUpdate(EntityPlayer player, PacketTileUpdate packet) throws IOException { World world = player.worldObj; @@ -30,23 +32,28 @@ public class PacketHandler implements IPacketHandler { } @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { - DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + super.decodeInto(ctx, data, packet); + try { - int packetID = data.read(); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + + EntityPlayer player = + CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + + int packetID = packet.getID(); + switch (packetID) { case PacketIds.TILE_UPDATE: { - PacketTileUpdate pkt = new PacketTileUpdate(); - pkt.readData(data); - onTileUpdate((EntityPlayer) player, pkt); + onTileUpdate(player, (PacketTileUpdate) packet); break; } case PacketIds.STATE_UPDATE: { - PacketTileState pkt = new PacketTileState(); + PacketTileState pkt = (PacketTileState) packet; pkt.readData(data); - World world = ((EntityPlayer) player).worldObj; + World world = player.worldObj; TileEntity tile = world.getBlockTileEntity(pkt.posX, pkt.posY, pkt.posZ); if (tile instanceof ISyncedTile) { pkt.applyStates(data, (ISyncedTile) tile); @@ -55,14 +62,12 @@ public class PacketHandler implements IPacketHandler { } case PacketIds.GUI_RETURN: { - PacketGuiReturn pkt = new PacketGuiReturn((EntityPlayer) player); - pkt.readData(data); + // action will have happened already at read time break; } case PacketIds.GUI_WIDGET: { - PacketGuiWidget pkt = new PacketGuiWidget(); - pkt.readData(data); + // action will have happened already at read time break; } } diff --git a/common/buildcraft/core/network/PacketNBT.java b/common/buildcraft/core/network/PacketNBT.java index 0cf5a19a..92a1a929 100644 --- a/common/buildcraft/core/network/PacketNBT.java +++ b/common/buildcraft/core/network/PacketNBT.java @@ -1,8 +1,11 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; @@ -19,7 +22,7 @@ public class PacketNBT extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { super.writeData(data); @@ -29,7 +32,7 @@ public class PacketNBT extends PacketCoordinates { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { super.readData(data); diff --git a/common/buildcraft/core/network/PacketPayload.java b/common/buildcraft/core/network/PacketPayload.java index 98eaa9df..973c6ef8 100644 --- a/common/buildcraft/core/network/PacketPayload.java +++ b/common/buildcraft/core/network/PacketPayload.java @@ -2,6 +2,8 @@ package buildcraft.core.network; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -21,9 +23,9 @@ public abstract class PacketPayload { return null; } - public abstract void writeData(DataOutputStream data) throws IOException; + public abstract void writeData(ByteBuf data); - public abstract void readData(DataInputStream data) throws IOException; + public abstract void readData(ByteBuf data); public abstract Type getType(); } diff --git a/common/buildcraft/core/network/PacketPayloadArrays.java b/common/buildcraft/core/network/PacketPayloadArrays.java index 09710642..429cd480 100644 --- a/common/buildcraft/core/network/PacketPayloadArrays.java +++ b/common/buildcraft/core/network/PacketPayloadArrays.java @@ -9,6 +9,8 @@ package buildcraft.core.network; import buildcraft.core.utils.Utils; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -71,7 +73,7 @@ public class PacketPayloadArrays extends PacketPayload { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(intPayload.length); data.writeInt(floatPayload.length); data.writeInt(stringPayload.length); @@ -83,12 +85,12 @@ public class PacketPayloadArrays extends PacketPayload { data.writeFloat(floatData); } for (String stringData : stringPayload) { - data.writeUTF(stringData); + Utils.writeUTF(data, stringData); } } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { intPayload = new int[data.readInt()]; floatPayload = new float[data.readInt()]; stringPayload = new String[data.readInt()]; @@ -100,7 +102,7 @@ public class PacketPayloadArrays extends PacketPayload { floatPayload[i] = data.readFloat(); } for (int i = 0; i < stringPayload.length; i++) { - stringPayload[i] = data.readUTF(); + stringPayload[i] = Utils.readUTF(data); } } diff --git a/common/buildcraft/core/network/PacketPayloadStream.java b/common/buildcraft/core/network/PacketPayloadStream.java index 651d5b2f..9c164088 100644 --- a/common/buildcraft/core/network/PacketPayloadStream.java +++ b/common/buildcraft/core/network/PacketPayloadStream.java @@ -8,6 +8,8 @@ */ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -25,10 +27,10 @@ public class PacketPayloadStream extends PacketPayload { public static interface StreamWriter { - public void writeData(DataOutputStream data) throws IOException; + public void writeData(ByteBuf data); } private StreamWriter handler; - public DataInputStream stream; + public ByteBuf stream; public PacketPayloadStream() { } @@ -38,12 +40,12 @@ public class PacketPayloadStream extends PacketPayload { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { handler.writeData(data); } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { stream = data; } diff --git a/common/buildcraft/core/network/PacketSlotChange.java b/common/buildcraft/core/network/PacketSlotChange.java index 43aa772b..3b276020 100644 --- a/common/buildcraft/core/network/PacketSlotChange.java +++ b/common/buildcraft/core/network/PacketSlotChange.java @@ -1,8 +1,11 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; @@ -21,7 +24,7 @@ public class PacketSlotChange extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { super.writeData(data); @@ -45,7 +48,7 @@ public class PacketSlotChange extends PacketCoordinates { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { super.readData(data); diff --git a/common/buildcraft/core/network/PacketTileState.java b/common/buildcraft/core/network/PacketTileState.java index fd4c2581..df9ccce4 100644 --- a/common/buildcraft/core/network/PacketTileState.java +++ b/common/buildcraft/core/network/PacketTileState.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -43,7 +45,7 @@ public class PacketTileState extends PacketCoordinates { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { super.readData(data); } @@ -61,7 +63,7 @@ public class PacketTileState extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { super.writeData(data); data.writeByte(stateList.size()); for (StateWithId stateWithId : stateList) { diff --git a/common/buildcraft/core/network/PacketUpdate.java b/common/buildcraft/core/network/PacketUpdate.java index afd82b80..35d6b53d 100644 --- a/common/buildcraft/core/network/PacketUpdate.java +++ b/common/buildcraft/core/network/PacketUpdate.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -36,7 +38,7 @@ public class PacketUpdate extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(posX); data.writeInt(posY); @@ -51,7 +53,7 @@ public class PacketUpdate extends BuildCraftPacket { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { posX = data.readInt(); posY = data.readInt(); diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 14ea71c5..2b9d0de4 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -14,9 +14,11 @@ import buildcraft.core.network.BuildCraftPacket; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.registry.GameRegistry; + import java.io.File; import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -28,7 +30,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; @@ -131,26 +135,6 @@ public class CoreProxy { //GameRegistry.addShapelessRecipe(result, recipe); } - public void sendToPlayers(Packet packet, World world, int x, int y, int z, int maxDistance) { - if (packet != null) { - for (int j = 0; j < world.playerEntities.size(); j++) { - EntityPlayerMP player = (EntityPlayerMP) world.playerEntities.get(j); - - if (Math.abs(player.posX - x) <= maxDistance && Math.abs(player.posY - y) <= maxDistance && Math.abs(player.posZ - z) <= maxDistance) { - player.playerNetServerHandler.sendPacketToPlayer(packet); - } - } - } - } - - public void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) { - EntityPlayerMP player = (EntityPlayerMP) entityplayer; - player.playerNetServerHandler.sendPacketToPlayer(packet.getPacket()); - } - - public void sendToServer(Packet packet) { - } - public int addCustomTexture(String pathToTexture) { return 0; } @@ -237,4 +221,15 @@ public class CoreProxy { public EntityBlock newEntityBlock(World world, double i, double j, double k, double iSize, double jSize, double kSize, LaserKind laserKind) { return new EntityBlock(world, i, j, k, iSize, jSize, kSize); } + + /** + * This function returns either the player from the handler if it's on the + * server, or directly from the minecraft instance if it's the client. + * + * TODO: This is a bit kludgy, probably better to separate the client and + * server channels instead. + */ + public EntityPlayer getPlayerFromNetHandler (INetHandler hander) { + return ((NetHandlerPlayServer) hander).field_147369_b; + } } diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index ebbde727..222e9a36 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -26,18 +26,23 @@ import buildcraft.transport.render.TileEntityPickupFX; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; + import java.io.File; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; @@ -185,4 +190,9 @@ public class CoreProxyClient extends CoreProxy { } return eb; } + + @Override + public EntityPlayer getPlayerFromNetHandler (INetHandler hander) { + return Minecraft.getMinecraft().thePlayer; + } } diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 358bee7a..37c1cffe 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -22,7 +22,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; -import net.minecraft.network.packet.Packet60Explosion; +import net.minecraft.network.Packet60Explosion; import net.minecraft.world.ChunkPosition; import net.minecraft.world.Explosion; import net.minecraft.world.World; diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index d40d96b1..154834ec 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -25,8 +25,11 @@ import buildcraft.core.network.ISynchronizedTile; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.energy.TileEngine; +import io.netty.buffer.ByteBuf; import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -397,4 +400,27 @@ public class Utils { } return slots; } + + public static void writeUTF (ByteBuf data, String str) { + try { + byte [] b = str.getBytes("UTF-8"); + data.writeInt (b.length); + data.writeBytes(b); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + data.writeInt (0); + } + } + + public static String readUTF (ByteBuf data) { + try { + int len = data.readInt(); + byte [] b = new byte [len]; + data.readBytes(b); + return new String (b, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + return null; + } + } } diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index ce668878..ed500438 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -15,7 +15,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet3Chat; +import net.minecraft.network.Packet3Chat; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatMessageComponent; import net.minecraft.world.ChunkCoordIntPair; diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index bf9d7dd0..6a5b305f 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -1,37 +1,45 @@ package buildcraft.factory.network; +import buildcraft.core.network.BuildCraftChannelHandler; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; +import buildcraft.core.proxy.CoreProxy; import buildcraft.factory.TileRefinery; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.Player; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; + +import cpw.mods.fml.common.network.NetworkRegistry; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.network.INetHandler; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidRegistry; -public class PacketHandlerFactory implements IPacketHandler { +public class PacketHandlerFactory extends BuildCraftChannelHandler { @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { - - DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + super.decodeInto(ctx, data, packet); + try { - int packetID = data.read(); - PacketUpdate packetU = new PacketUpdate(); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + + EntityPlayer player = + CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + + int packetID = packet.getID(); switch (packetID) { case PacketIds.REFINERY_FILTER_SET: - packetU.readData(data); - onRefinerySelect((EntityPlayer) player, packetU); + onRefinerySelect(player, (PacketUpdate) packet); break; } diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index 6faa57db..6dbd3c23 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -1,53 +1,55 @@ package buildcraft.silicon.network; +import buildcraft.core.network.BuildCraftChannelHandler; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketNBT; import buildcraft.core.network.PacketSlotChange; +import buildcraft.core.proxy.CoreProxy; import buildcraft.silicon.TileAdvancedCraftingTable; import buildcraft.silicon.TileAssemblyTable; import buildcraft.silicon.TileAssemblyTable.SelectionMessage; import buildcraft.silicon.gui.ContainerAssemblyTable; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.Player; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; + +import cpw.mods.fml.common.network.NetworkRegistry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.network.INetHandler; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -public class PacketHandlerSilicon implements IPacketHandler { +public class PacketHandlerSilicon extends BuildCraftChannelHandler { @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { - - DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data)); + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + super.decodeInto(ctx, data, packet); + try { - int packetID = data.read(); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + + EntityPlayer player = + CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + + int packetID = packet.getID(); + switch (packetID) { - case PacketIds.SELECTION_ASSEMBLY_SEND: - PacketNBT packetT = new PacketNBT(); - packetT.readData(data); - onSelectionUpdate((EntityPlayer) player, packetT); + case PacketIds.SELECTION_ASSEMBLY_SEND: + onSelectionUpdate(player, (PacketNBT) packet); break; - case PacketIds.SELECTION_ASSEMBLY: - PacketNBT packetA = new PacketNBT(); - packetA.readData(data); - onAssemblySelect((EntityPlayer) player, packetA); + onAssemblySelect(player, (PacketNBT) packet); break; case PacketIds.SELECTION_ASSEMBLY_GET: - PacketCoordinates packetC = new PacketCoordinates(); - packetC.readData(data); - onAssemblyGetSelection((EntityPlayer) player, packetC); + onAssemblyGetSelection(player, (PacketCoordinates) packet); break; case PacketIds.ADVANCED_WORKBENCH_SETSLOT: - PacketSlotChange packet1 = new PacketSlotChange(); - packet1.readData(data); - onAdvancedWorkbenchSet((EntityPlayer) player, packet1); + onAdvancedWorkbenchSet(player, (PacketSlotChange) packet); break; } diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 4699b2a9..51fa6cb7 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -18,7 +18,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index 048c15f2..0f0f988e 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -38,7 +38,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index d1dae319..e90f6d0a 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -5,10 +5,13 @@ import buildcraft.core.network.PacketIds; import buildcraft.core.proxy.CoreProxy; import buildcraft.transport.PipeTransportFluids; import buildcraft.transport.TileGenericPipe; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.BitSet; + import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -37,7 +40,7 @@ public class PacketFluidUpdate extends PacketCoordinates { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { super.readData(data); World world = CoreProxy.proxy.getClientWorld(); @@ -82,7 +85,7 @@ public class PacketFluidUpdate extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { super.writeData(data); byte[] dBytes = toByteArray(delta); diff --git a/common/buildcraft/transport/network/PacketGateExpansionMap.java b/common/buildcraft/transport/network/PacketGateExpansionMap.java index 4f390f6d..efacbc5c 100644 --- a/common/buildcraft/transport/network/PacketGateExpansionMap.java +++ b/common/buildcraft/transport/network/PacketGateExpansionMap.java @@ -3,8 +3,13 @@ package buildcraft.transport.network; import buildcraft.api.gates.GateExpansions; import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; +import buildcraft.core.utils.Utils; + import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; + +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -16,22 +21,22 @@ public class PacketGateExpansionMap extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { BiMap map = GateExpansions.getServerMap(); data.writeByte(map.size()); for (Map.Entry entry : map.entrySet()) { data.writeByte(entry.getKey()); - data.writeUTF(entry.getValue()); + Utils.writeUTF(data, entry.getValue()); } } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { int numEntries = data.readByte(); BiMap map = HashBiMap.create(numEntries); for (int i = 0; i < numEntries; i++) { byte id = data.readByte(); - String identifier = data.readUTF(); + String identifier = Utils.readUTF(data); map.put(id, identifier); } GateExpansions.setClientMap(map); diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index 75e3d47e..dd50c5cb 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -1,115 +1,110 @@ package buildcraft.transport.network; +import buildcraft.core.network.BuildCraftChannelHandler; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketSlotChange; import buildcraft.core.network.PacketUpdate; +import buildcraft.core.proxy.CoreProxy; import buildcraft.transport.PipeTransportItems; import buildcraft.transport.PipeTransportPower; import buildcraft.transport.TileGenericPipe; import buildcraft.transport.gui.ContainerGateInterface; import buildcraft.transport.pipes.PipeItemsDiamond; import buildcraft.transport.pipes.PipeItemsEmerald; -import cpw.mods.fml.common.network.IPacketHandler; -import cpw.mods.fml.common.network.Player; +import cpw.mods.fml.common.network.NetworkRegistry; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; + +import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.Container; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.network.play.INetHandlerPlayServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -public class PacketHandlerTransport implements IPacketHandler { +public class PacketHandlerTransport extends BuildCraftChannelHandler { + /** + * TODO: A lot of this is based on the player to retrieve the world. + * Passing a dimension id would be more appropriate. More generally, it + * seems like a lot of these packets could be replaced with tile-based + * RPCs. + */ @Override - public void onPacketData(INetworkManager manager, Packet250CustomPayload packet2, Player player) { - DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet2.data)); + public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { + super.decodeInto(ctx, data, packet); try { - // NetClientHandler net = (NetClientHandler) network.getNetHandler(); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + + EntityPlayer player = + CoreProxy.proxy.getPlayerFromNetHandler(netHandler); - int packetID = data.read(); + int packetID = packet.getID(); - PacketUpdate packet = new PacketUpdate(); switch (packetID) { case PacketIds.PIPE_POWER: - PacketPowerUpdate packetPower = new PacketPowerUpdate(); - packetPower.readData(data); - onPacketPower((EntityPlayer) player, packetPower); + onPacketPower(player, (PacketPowerUpdate) packet); break; case PacketIds.PIPE_LIQUID: - PacketFluidUpdate packetFluid = new PacketFluidUpdate(); - packetFluid.readData(data); + // action will have happened already at read time break; case PacketIds.PIPE_TRAVELER: { - PacketPipeTransportTraveler pkt = new PacketPipeTransportTraveler(); - pkt.readData(data); - onPipeTravelerUpdate((EntityPlayer) player, pkt); + onPipeTravelerUpdate(player, (PacketPipeTransportTraveler) packet); break; } case PacketIds.GATE_ACTIONS: - packet.readData(data); - onGateActions((EntityPlayer) player, packet); + onGateActions(player, (PacketUpdate) packet); break; case PacketIds.GATE_TRIGGERS: - packet.readData(data); - onGateTriggers((EntityPlayer) player, packet); + onGateTriggers(player, (PacketUpdate) packet); break; case PacketIds.GATE_SELECTION: - packet.readData(data); - onGateSelection((EntityPlayer) player, packet); + onGateSelection(player, (PacketUpdate) packet); break; case PacketIds.PIPE_ITEMSTACK: { - PacketPipeTransportItemStack pkt = new PacketPipeTransportItemStack(); - pkt.readData(data); + // action will have happened already at read time break; } case PacketIds.PIPE_GATE_EXPANSION_MAP: { - PacketGateExpansionMap pkt = new PacketGateExpansionMap(); - pkt.readData(data); + // action will have happened already at read time break; } /** * SERVER SIDE * */ - case PacketIds.DIAMOND_PIPE_SELECT: { - PacketSlotChange packet1 = new PacketSlotChange(); - packet1.readData(data); - onDiamondPipeSelect((EntityPlayer) player, packet1); + case PacketIds.DIAMOND_PIPE_SELECT: { + onDiamondPipeSelect((EntityPlayer) player, (PacketSlotChange) packet); break; } - case PacketIds.EMERALD_PIPE_SELECT: { - PacketSlotChange packet1 = new PacketSlotChange(); - packet1.readData(data); - onEmeraldPipeSelect((EntityPlayer) player, packet1); + case PacketIds.EMERALD_PIPE_SELECT: { + onEmeraldPipeSelect((EntityPlayer) player, (PacketSlotChange) packet); break; } - case PacketIds.GATE_REQUEST_INIT: - PacketCoordinates packetU = new PacketCoordinates(); - packetU.readData(data); - onGateInitRequest((EntityPlayer) player, packetU); + case PacketIds.GATE_REQUEST_INIT: + onGateInitRequest((EntityPlayer) player, (PacketCoordinates) packet); break; case PacketIds.GATE_REQUEST_SELECTION: - PacketCoordinates packetS = new PacketCoordinates(); - packetS.readData(data); - onGateSelectionRequest((EntityPlayerMP) player, packetS); + onGateSelectionRequest((EntityPlayer) player, (PacketCoordinates) packet); break; case PacketIds.GATE_SELECTION_CHANGE: - PacketUpdate packet3 = new PacketUpdate(); - packet3.readData(data); - onGateSelectionChange((EntityPlayerMP) player, packet3); + onGateSelectionChange((EntityPlayer) player, (PacketUpdate) packet); break; case PacketIds.PIPE_ITEMSTACK_REQUEST: { - PacketPipeTransportItemStackRequest pkt = new PacketPipeTransportItemStackRequest(player); - pkt.readData(data); + // action will have happened already at read time break; } } diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java index b8217be3..d7f76db4 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java @@ -3,11 +3,14 @@ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.transport.TravelingItem; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.item.ItemStack; -import net.minecraft.network.packet.Packet; +import net.minecraft.network.Packet; public class PacketPipeTransportItemStack extends BuildCraftPacket { @@ -23,13 +26,13 @@ public class PacketPipeTransportItemStack extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(entityId); Packet.writeItemStack(stack, data); } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { this.entityId = data.readInt(); stack = Packet.readItemStack(data); TravelingItem item = TravelingItem.clientCache.get(entityId); diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java index c4b12f95..16f4a879 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java @@ -5,6 +5,8 @@ import buildcraft.core.network.PacketIds; import buildcraft.transport.TravelingItem; import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.network.Player; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -23,12 +25,12 @@ public class PacketPipeTransportItemStackRequest extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeShort(travelerID); } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { travelerID = data.readShort(); TravelingItem.TravelingItemCache cache = TravelingItem.serverCache; TravelingItem item = cache.get(travelerID); diff --git a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java index f6497967..b8429d62 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java +++ b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java @@ -4,9 +4,12 @@ import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.core.utils.EnumColor; import buildcraft.transport.TravelingItem; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.util.MathHelper; import net.minecraftforge.common.util.ForgeDirection; @@ -35,7 +38,7 @@ public class PacketPipeTransportTraveler extends BuildCraftPacket { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeFloat((float) item.xCoord); data.writeFloat((float) item.yCoord); data.writeFloat((float) item.zCoord); @@ -53,7 +56,7 @@ public class PacketPipeTransportTraveler extends BuildCraftPacket { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { this.itemX = data.readFloat(); this.itemY = data.readFloat(); this.itemZ = data.readFloat(); diff --git a/common/buildcraft/transport/network/PacketPowerUpdate.java b/common/buildcraft/transport/network/PacketPowerUpdate.java index 64f86e35..bb45d617 100644 --- a/common/buildcraft/transport/network/PacketPowerUpdate.java +++ b/common/buildcraft/transport/network/PacketPowerUpdate.java @@ -2,6 +2,8 @@ package buildcraft.transport.network; import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketIds; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -19,7 +21,7 @@ public class PacketPowerUpdate extends PacketCoordinates { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { displayPower = new short[] { 0, 0, 0, 0, 0, 0 }; super.readData(data); overload = data.readBoolean(); @@ -29,7 +31,7 @@ public class PacketPowerUpdate extends PacketCoordinates { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { super.writeData(data); data.writeBoolean(overload); for (int i = 0; i < displayPower.length; i++) { diff --git a/common/buildcraft/transport/network/TransportConnectionHandler.java b/common/buildcraft/transport/network/TransportConnectionHandler.java index 65ec35f0..0e796a5e 100644 --- a/common/buildcraft/transport/network/TransportConnectionHandler.java +++ b/common/buildcraft/transport/network/TransportConnectionHandler.java @@ -14,7 +14,7 @@ import cpw.mods.fml.common.network.Player; import net.minecraft.network.INetworkManager; import net.minecraft.network.NetLoginHandler; import net.minecraft.network.packet.NetHandler; -import net.minecraft.network.packet.Packet1Login; +import net.minecraft.network.Packet1Login; import net.minecraft.server.MinecraftServer; /** From 3b973044ea1583e0d12ce49638c3a304b70ea20b Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Tue, 14 Jan 2014 19:22:10 +0100 Subject: [PATCH 04/31] migrated part of the sendTo* calls to the new network API --- .../builders/gui/GuiBlueprintLibrary.java | 4 ++-- common/buildcraft/builders/gui/GuiTemplate.java | 6 +++++- common/buildcraft/core/TileBuildCraft.java | 7 +++++-- .../buildcraft/factory/gui/ContainerRefinery.java | 9 ++++++--- .../silicon/TileAdvancedCraftingTable.java | 7 ++++++- common/buildcraft/silicon/TileAssemblyTable.java | 5 ++++- common/buildcraft/silicon/gui/GuiAssemblyTable.java | 10 +++++++--- .../buildcraft/transport/PipeTransportFluids.java | 3 ++- common/buildcraft/transport/PipeTransportPower.java | 3 ++- .../transport/gui/ContainerGateInterface.java | 13 +++++++------ 10 files changed, 46 insertions(+), 21 deletions(-) diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 11f9be53..822e25ae 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -140,7 +140,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { } else if (deleteButton != null && button == deleteButton) { packet.actionId = TileBlueprintLibrary.COMMAND_DELETE; } - CoreProxy.proxy.sendToServer(packet.getPacket()); + BuildCraftBuilders.instance.sendToServer(packet); } @Override @@ -162,7 +162,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { payload.intPayload = new int[]{ySlot}; PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_SELECT, library.xCoord, library.yCoord, library.zCoord); packet.actionId = ySlot; - CoreProxy.proxy.sendToServer(packet.getPacket()); + BuildCraftBuilders.instance.sendToServer(packet); } } } diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index a54f8f1b..d105b0c0 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -7,6 +7,7 @@ */ package buildcraft.builders.gui; +import buildcraft.BuildCraftBuilders; import buildcraft.builders.TileArchitect; import buildcraft.core.DefaultProps; import buildcraft.core.gui.GuiBuildCraft; @@ -16,9 +17,12 @@ import buildcraft.core.network.PacketPayloadArrays; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.StringUtils; + import java.util.Date; + import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; public class GuiTemplate extends GuiBuildCraft { @@ -87,7 +91,7 @@ public class GuiTemplate extends GuiBuildCraft { PacketPayloadArrays payload = new PacketPayloadArrays(); payload.intPayload = new int[]{c}; PacketUpdate packet = new PacketUpdate(PacketIds.ARCHITECT_NAME, template.xCoord, template.yCoord, template.zCoord, payload); - CoreProxy.proxy.sendToServer(packet.getPacket()); + BuildCraftBuilders.instance.sendToServer(packet); } else { super.keyTyped(c, i); } diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index aece4119..5fc46dd7 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -7,6 +7,7 @@ */ package buildcraft.core; +import buildcraft.BuildCraftMod; import buildcraft.api.power.IPowerReceptor; import buildcraft.core.network.ISynchronizedTile; import buildcraft.core.network.PacketPayload; @@ -16,9 +17,11 @@ import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.TilePacketWrapper; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; + import java.io.IOException; import java.util.HashMap; import java.util.Map; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -87,9 +90,9 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized public void destroy() { } - public void sendNetworkUpdate() { + public void sendNetworkUpdate(BuildCraftMod mod) { if (CoreProxy.proxy.isSimulating(worldObj)) { - CoreProxy.proxy.sendToPlayers(getUpdatePacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE); + mod.sendToPlayers(getUpdatePacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE); } } diff --git a/common/buildcraft/factory/gui/ContainerRefinery.java b/common/buildcraft/factory/gui/ContainerRefinery.java index 52cc1af3..bfdd3945 100644 --- a/common/buildcraft/factory/gui/ContainerRefinery.java +++ b/common/buildcraft/factory/gui/ContainerRefinery.java @@ -7,14 +7,18 @@ */ package buildcraft.factory.gui; +import buildcraft.BuildCraftFactory; import buildcraft.core.gui.BuildCraftContainer; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.factory.TileRefinery; +import io.netty.buffer.ByteBuf; + import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; @@ -54,13 +58,12 @@ public class ContainerRefinery extends BuildCraftContainer { if (CoreProxy.proxy.isRenderWorld(refinery.worldObj)) { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeByte(slot); data.writeShort(filter != null ? filter.getID() : -1); } }); - CoreProxy.proxy.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord, refinery.zCoord, payload) - .getPacket()); + BuildCraftFactory.instance.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord, refinery.zCoord, payload)); } } diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 2ffe3efd..18f814c6 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -2,6 +2,7 @@ package buildcraft.silicon; import buildcraft.api.power.ILaserTarget; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftSilicon; import buildcraft.api.gates.IAction; import buildcraft.api.gates.IActionReceptor; import buildcraft.core.IMachine; @@ -23,9 +24,12 @@ import buildcraft.core.triggers.ActionMachineControl; import buildcraft.core.utils.CraftingHelper; import buildcraft.core.utils.StringUtils; import buildcraft.core.utils.Utils; + import com.google.common.collect.Lists; + import java.util.EnumSet; import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; @@ -46,6 +50,7 @@ import static net.minecraftforge.common.ForgeDirection.NORTH; import static net.minecraftforge.common.ForgeDirection.SOUTH; import static net.minecraftforge.common.ForgeDirection.WEST; import net.minecraftforge.oredict.OreDictionary; + import org.bouncycastle.util.Arrays; public class TileAdvancedCraftingTable extends TileLaserTableBase implements IInventory, ILaserTarget, IMachine, IActionReceptor, ISidedInventory { @@ -366,7 +371,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn updateRecipe(); if (CoreProxy.proxy.isRenderWorld(worldObj)) { PacketSlotChange packet = new PacketSlotChange(PacketIds.ADVANCED_WORKBENCH_SETSLOT, xCoord, yCoord, zCoord, slot, stack); - CoreProxy.proxy.sendToServer(packet.getPacket()); + BuildCraftSilicon.instance.sendToServer(packet); } } diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 40c991f2..5f9fb26b 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -1,5 +1,6 @@ package buildcraft.silicon; +import buildcraft.BuildCraftSilicon; import buildcraft.core.recipes.AssemblyRecipeManager; import buildcraft.api.gates.IAction; import buildcraft.core.DefaultProps; @@ -11,10 +12,12 @@ import buildcraft.core.utils.Utils; import buildcraft.core.recipes.AssemblyRecipeManager.AssemblyRecipe; import buildcraft.core.utils.StringUtils; import cpw.mods.fml.common.FMLCommonHandler; + import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; + import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -272,7 +275,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I packet.posY = yCoord; packet.posZ = zCoord; // FIXME: This needs to be switched over to new synch system. - CoreProxy.proxy.sendToPlayers(packet.getPacket(), worldObj, (int) player.posX, (int) player.posY, (int) player.posZ, + BuildCraftSilicon.instance.sendToPlayers(packet, worldObj, (int) player.posX, (int) player.posY, (int) player.posZ, DefaultProps.NETWORK_UPDATE_RANGE); } } diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index a7af3c15..8a961c6a 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -8,6 +8,7 @@ package buildcraft.silicon.gui; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftSilicon; import buildcraft.core.CoreIconProvider; import buildcraft.core.DefaultProps; import buildcraft.core.gui.GuiAdvancedInterface; @@ -19,13 +20,16 @@ import buildcraft.core.utils.StringUtils; import buildcraft.core.recipes.AssemblyRecipeManager.AssemblyRecipe; import buildcraft.silicon.TileAssemblyTable; import buildcraft.silicon.TileAssemblyTable.SelectionMessage; + import java.util.Iterator; import java.util.List; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; public class GuiAssemblyTable extends GuiAdvancedInterface { @@ -112,8 +116,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { // Request current selection from server if (CoreProxy.proxy.isRenderWorld(assemblyTable.worldObj)) { - CoreProxy.proxy.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord, assemblyTable.yCoord, - assemblyTable.zCoord).getPacket()); + BuildCraftSilicon.instance.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord, assemblyTable.yCoord, + assemblyTable.zCoord)); } } @@ -197,7 +201,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { PacketNBT packet = new PacketNBT(PacketIds.SELECTION_ASSEMBLY, message.getNBT(), table.xCoord, table.yCoord, table.zCoord); - CoreProxy.proxy.sendToServer(packet.getPacket()); + BuildCraftSilicon.instance.sendToServer(packet); } } diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index 7f666a64..575f65ce 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -19,6 +19,7 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftTransport; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.ITrigger; import buildcraft.api.transport.IPipeTile.PipeType; @@ -201,7 +202,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler } PacketFluidUpdate packet = computeFluidUpdate(init, true); if (packet != null) { - CoreProxy.proxy.sendToPlayers(packet.getPacket(), container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); + BuildCraftTransport.instance.sendToPlayers(packet, container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); } } } diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index edc9b138..25714679 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftTransport; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.ITrigger; import buildcraft.api.power.IPowerEmitter; @@ -258,7 +259,7 @@ public class PipeTransportPower extends PipeTransport { packet.displayPower = clientDisplayPower; packet.overload = isOverloaded(); - CoreProxy.proxy.sendToPlayers(packet.getPacket(), container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); + BuildCraftTransport.instance.sendToPlayers(packet, container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); } } diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index 0f0f988e..e0a1a2cf 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -7,6 +7,7 @@ */ package buildcraft.transport.gui; +import buildcraft.BuildCraftTransport; import buildcraft.api.gates.ActionManager; import buildcraft.api.gates.IAction; import buildcraft.api.gates.IOverrideDefaultTriggers; @@ -215,7 +216,7 @@ public class ContainerGateInterface extends BuildCraftContainer { } public void sendSelectionChange(int position) { - CoreProxy.proxy.sendToServer(new PacketUpdate(PacketIds.GATE_SELECTION_CHANGE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position)).getPacket()); + BuildCraftTransport.instance.sendToServer(new PacketUpdate(PacketIds.GATE_SELECTION_CHANGE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position))); } /** @@ -226,12 +227,12 @@ public class ContainerGateInterface extends BuildCraftContainer { if (!isNetInitialized && CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { isNetInitialized = true; - CoreProxy.proxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord).getPacket()); + BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } if (!isSynchronized && CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { isSynchronized = true; - CoreProxy.proxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord).getPacket()); + BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } } @@ -301,7 +302,7 @@ public class ContainerGateInterface extends BuildCraftContainer { PacketUpdate packet = new PacketUpdate(PacketIds.GATE_ACTIONS, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload); // Send to player - CoreProxy.proxy.sendToPlayer(player, packet); + BuildCraftTransport.instance.sendToPlayer(player, packet); } /** @@ -324,7 +325,7 @@ public class ContainerGateInterface extends BuildCraftContainer { PacketUpdate packet = new PacketUpdate(PacketIds.GATE_TRIGGERS, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload); // Send to player - CoreProxy.proxy.sendToPlayer(player, packet); + BuildCraftTransport.instance.sendToPlayer(player, packet); } /** @@ -336,7 +337,7 @@ public class ContainerGateInterface extends BuildCraftContainer { if (pipe == null || pipe.gate == null) return; for (int position = 0; position < pipe.gate.material.numSlots; position++) { - CoreProxy.proxy.sendToPlayer(player, new PacketUpdate(PacketIds.GATE_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position))); + BuildCraftTransport.instance.sendToPlayer(player, new PacketUpdate(PacketIds.GATE_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position))); } // System.out.println("Sending current selection to player"); From 2bc0a85bbe19a0822f2a0e6cb76714251dba5f01 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 8 Feb 2014 14:47:31 +0100 Subject: [PATCH 05/31] made progress with 1.7.2 port --- common/buildcraft/BuildCraftBuilders.java | 56 +++--- common/buildcraft/BuildCraftCore.java | 39 ++-- common/buildcraft/BuildCraftEnergy.java | 177 ++++-------------- common/buildcraft/BuildCraftFactory.java | 152 +++++++-------- common/buildcraft/BuildCraftSilicon.java | 69 ++++--- common/buildcraft/BuildCraftTransport.java | 97 +++++----- .../api/blueprints/BlueprintManager.java | 17 +- .../buildcraft/api/blueprints/BptBlock.java | 29 +-- .../api/blueprints/BptBlockUtils.java | 10 +- .../api/blueprints/BptSlotInfo.java | 2 + .../buildcraft/api/bptblocks/BptBlockBed.java | 9 +- .../api/bptblocks/BptBlockDelegate.java | 30 +-- .../api/bptblocks/BptBlockDirt.java | 9 +- .../api/bptblocks/BptBlockDoor.java | 4 +- .../api/bptblocks/BptBlockFluid.java | 12 +- .../api/bptblocks/BptBlockIgnore.java | 2 +- .../api/bptblocks/BptBlockIgnoreMeta.java | 5 +- .../api/bptblocks/BptBlockInventory.java | 2 +- .../api/bptblocks/BptBlockLever.java | 2 +- .../api/bptblocks/BptBlockPiston.java | 2 +- .../api/bptblocks/BptBlockPumpkin.java | 5 +- .../bptblocks/BptBlockRedstoneRepeater.java | 2 +- .../bptblocks/BptBlockRotateInventory.java | 2 +- .../api/bptblocks/BptBlockRotateMeta.java | 5 +- .../api/bptblocks/BptBlockSign.java | 2 +- .../api/bptblocks/BptBlockStairs.java | 5 +- .../api/bptblocks/BptBlockWallSide.java | 2 +- common/buildcraft/api/core/StackWrapper.java | 2 +- .../api/fuels/IronEngineCoolant.java | 13 +- .../api/gates/TriggerParameter.java | 2 +- common/buildcraft/api/power/PowerHandler.java | 2 +- .../buildcraft/builders/BlockArchitect.java | 15 +- .../builders/BlockBlueprintLibrary.java | 12 +- common/buildcraft/builders/BlockBuilder.java | 15 +- common/buildcraft/builders/BlockFiller.java | 17 +- common/buildcraft/builders/BlockMarker.java | 23 ++- .../buildcraft/builders/BlockPathMarker.java | 16 +- common/buildcraft/builders/BuildersProxy.java | 2 +- common/buildcraft/builders/GuiHandler.java | 4 +- common/buildcraft/builders/ItemBptBase.java | 4 +- .../buildcraft/builders/ItemBptBluePrint.java | 4 +- .../buildcraft/builders/ItemBptTemplate.java | 4 +- common/buildcraft/builders/TileArchitect.java | 13 +- .../builders/TileBlueprintLibrary.java | 13 +- common/buildcraft/builders/TileBuilder.java | 15 +- common/buildcraft/builders/TileFiller.java | 13 +- common/buildcraft/builders/TileMarker.java | 23 ++- .../buildcraft/builders/TilePathMarker.java | 8 +- .../filler/pattern/FillerPattern.java | 2 +- .../builders/filler/pattern/PatternBox.java | 12 +- .../builders/filler/pattern/PatternClear.java | 2 +- .../filler/pattern/PatternCylinder.java | 6 +- .../builders/filler/pattern/PatternFill.java | 2 +- .../filler/pattern/PatternFlatten.java | 4 +- .../filler/pattern/PatternHorizon.java | 4 +- .../filler/pattern/PatternPyramid.java | 2 +- .../filler/pattern/PatternStairs.java | 4 +- .../network/PacketHandlerBuilders.java | 6 +- common/buildcraft/core/BlockBuildCraft.java | 15 +- common/buildcraft/core/BlockIndex.java | 5 +- common/buildcraft/core/BlockSpring.java | 20 +- .../core/CreativeTabBuildCraft.java | 11 +- common/buildcraft/core/ITileBufferHolder.java | 5 +- common/buildcraft/core/ItemBuildCraft.java | 8 +- common/buildcraft/core/ItemWrench.java | 4 +- common/buildcraft/core/TileBuffer.java | 27 ++- .../core/blueprints/BptBlueprint.java | 6 +- .../core/inventory/InventoryConcatenator.java | 6 +- .../core/inventory/InventoryCopy.java | 8 +- .../core/inventory/InventoryMapper.java | 12 +- .../core/inventory/InventoryWrapper.java | 6 +- .../core/inventory/SimpleInventory.java | 6 +- .../core/network/PacketGuiReturn.java | 2 +- .../core/network/PacketHandler.java | 2 +- .../core/network/PacketTileUpdate.java | 2 +- common/buildcraft/core/proxy/CoreProxy.java | 4 +- .../core/proxy/CoreProxyClient.java | 4 +- .../buildcraft/core/render/FluidRenderer.java | 10 +- .../core/render/RenderEntityBlock.java | 101 +--------- .../core/render/RenderingEntityBlocks.java | 4 +- .../core/render/RenderingMarkers.java | 5 +- .../buildcraft/core/render/RenderingOil.java | 3 +- .../core/triggers/DefaultActionProvider.java | 2 +- .../triggers/TriggerFluidContainerLevel.java | 2 +- common/buildcraft/core/utils/BlockUtil.java | 44 ++--- common/buildcraft/core/utils/Utils.java | 20 +- .../energy/BlockBuildcraftFluid.java | 21 ++- common/buildcraft/energy/BlockEngine.java | 33 ++-- common/buildcraft/energy/BlockPollution.java | 47 ----- common/buildcraft/energy/BptBlockEngine.java | 4 +- common/buildcraft/energy/BucketHandler.java | 4 +- common/buildcraft/energy/GuiHandler.java | 4 +- .../energy/ItemBucketBuildcraft.java | 12 +- common/buildcraft/energy/TileEngineIron.java | 5 + .../buildcraft/energy/TileEngineLegacy.java | 4 +- common/buildcraft/energy/TileEngineStone.java | 5 + .../energy/TileEngineWithInventory.java | 8 +- common/buildcraft/energy/TilePollution.java | 54 ------ .../energy/render/EntityDropParticleFX.java | 2 +- .../energy/render/RenderEngine.java | 12 +- .../factory/BlockAutoWorkbench.java | 8 +- common/buildcraft/factory/BlockFloodGate.java | 25 +-- common/buildcraft/factory/BlockFrame.java | 19 +- common/buildcraft/factory/BlockHopper.java | 8 +- .../buildcraft/factory/BlockMiningWell.java | 21 ++- common/buildcraft/factory/BlockPlainPipe.java | 11 +- common/buildcraft/factory/BlockPump.java | 25 +-- common/buildcraft/factory/BlockQuarry.java | 55 ++---- common/buildcraft/factory/BlockRefinery.java | 23 ++- common/buildcraft/factory/BlockTank.java | 14 +- .../factory/BptBlockAutoWorkbench.java | 4 +- .../buildcraft/factory/BptBlockRefinery.java | 4 +- .../factory/EntityMechanicalArm.java | 2 +- common/buildcraft/factory/GuiHandler.java | 4 +- .../buildcraft/factory/TileAutoWorkbench.java | 13 +- common/buildcraft/factory/TileFloodGate.java | 19 +- common/buildcraft/factory/TileHopper.java | 17 +- common/buildcraft/factory/TileMiningWell.java | 4 +- common/buildcraft/factory/TilePump.java | 19 +- common/buildcraft/factory/TileQuarry.java | 30 +-- common/buildcraft/factory/TileRefinery.java | 13 +- common/buildcraft/factory/TileTank.java | 4 +- .../factory/gui/ContainerAutoWorkbench.java | 2 +- .../factory/gui/ContainerRefinery.java | 2 +- .../factory/network/PacketHandlerFactory.java | 4 +- .../factory/render/RenderRefinery.java | 8 +- .../buildcraft/factory/render/RenderTank.java | 2 +- common/buildcraft/silicon/BlockLaser.java | 8 +- .../buildcraft/silicon/BlockLaserTable.java | 26 +-- common/buildcraft/silicon/GuiHandler.java | 4 +- .../silicon/ItemRedstoneChipset.java | 9 +- .../silicon/TileAdvancedCraftingTable.java | 21 ++- .../buildcraft/silicon/TileAssemblyTable.java | 10 +- .../silicon/TileIntegrationTable.java | 7 +- common/buildcraft/silicon/TileLaser.java | 2 +- .../silicon/TileLaserTableBase.java | 6 +- .../silicon/gui/GuiAssemblyTable.java | 4 +- .../buildcraft/silicon/gui/GuiLaserTable.java | 2 +- .../silicon/network/PacketHandlerSilicon.java | 4 +- .../transport/BlockFilteredBuffer.java | 8 +- .../transport/BlockGenericPipe.java | 50 ++--- common/buildcraft/transport/Gate.java | 2 +- common/buildcraft/transport/GuiHandler.java | 4 +- common/buildcraft/transport/ItemFacade.java | 6 +- common/buildcraft/transport/ItemPipe.java | 16 +- common/buildcraft/transport/ItemPipeWire.java | 6 +- common/buildcraft/transport/ItemPlug.java | 6 +- common/buildcraft/transport/Pipe.java | 12 +- .../buildcraft/transport/PipeTransport.java | 2 +- .../transport/PipeTransportFluids.java | 14 +- .../transport/PipeTransportItems.java | 22 +-- .../transport/PipeTransportPower.java | 12 +- .../transport/TileFilteredBuffer.java | 19 +- .../buildcraft/transport/TileGenericPipe.java | 35 ++-- .../buildcraft/transport/TravelingItem.java | 18 +- .../blueprints/BptItemPipeDiamond.java | 4 +- .../blueprints/BptItemPipeEmerald.java | 4 +- .../buildcraft/transport/gates/ItemGate.java | 4 +- .../transport/gui/ContainerGateInterface.java | 15 +- .../transport/gui/GuiDiamondPipe.java | 2 +- .../transport/gui/GuiEmeraldPipe.java | 2 +- .../transport/network/PacketFluidUpdate.java | 2 +- .../network/PacketHandlerTransport.java | 6 +- .../transport/pipes/PipeFluidsWood.java | 6 +- .../transport/pipes/PipeItemsDiamond.java | 4 +- .../transport/pipes/PipeItemsEmerald.java | 4 +- .../transport/pipes/PipeItemsEmzuli.java | 4 +- .../transport/pipes/PipeItemsLapis.java | 2 +- .../transport/pipes/PipeItemsObsidian.java | 12 +- .../transport/pipes/PipeItemsWood.java | 6 +- .../transport/pipes/PipeLogicIron.java | 8 +- .../transport/pipes/PipeLogicWood.java | 6 +- .../transport/pipes/PipePowerIron.java | 2 +- .../transport/pipes/PipePowerWood.java | 2 +- .../transport/render/FacadeItemRenderer.java | 7 +- .../transport/render/FacadeRenderHelper.java | 13 +- .../transport/render/GateItemRenderer.java | 4 +- .../transport/render/PipeItemRenderer.java | 2 +- .../transport/render/PipeRendererTESR.java | 33 ++-- .../transport/render/PipeRendererWorld.java | 7 +- .../transport/render/PlugItemRenderer.java | 2 +- .../triggers/TriggerPipeContents.java | 2 +- .../transport/utils/FacadeMatrix.java | 20 +- 183 files changed, 1126 insertions(+), 1325 deletions(-) delete mode 100644 common/buildcraft/energy/BlockPollution.java delete mode 100644 common/buildcraft/energy/TilePollution.java diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 70d2bcbd..5053ec95 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -86,6 +86,8 @@ import java.util.LinkedList; import java.util.TreeMap; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -129,6 +131,7 @@ public class BuildCraftBuilders extends BuildCraftMod { // Register save handler MinecraftForge.EVENT_BUS.register(new EventHandlerBuilders()); + /* new BptBlock(0); // default bpt block new BptBlockIgnore(Block.snow.blockID); @@ -214,7 +217,7 @@ public class BuildCraftBuilders extends BuildCraftMod { new BptBlockInventory(libraryBlock.blockID); new BptBlockWallSide(markerBlock.blockID); - new BptBlockWallSide(pathMarkerBlock.blockID); + new BptBlockWallSide(pathMarkerBlock.blockID);*/ if (BuildCraftCore.loadDefaultRecipes) { loadRecipes(); @@ -224,15 +227,6 @@ public class BuildCraftBuilders extends BuildCraftMod { @EventHandler public void preInit(FMLPreInitializationEvent evt) { - Property templateItemId = BuildCraftCore.mainConfiguration.getItem("templateItem.id", DefaultProps.TEMPLATE_ITEM_ID); - Property blueprintItemId = BuildCraftCore.mainConfiguration.getItem("blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID); - Property markerId = BuildCraftCore.mainConfiguration.getBlock("marker.id", DefaultProps.MARKER_ID); - Property pathMarkerId = BuildCraftCore.mainConfiguration.getBlock("pathMarker.id", DefaultProps.PATH_MARKER_ID); - Property fillerId = BuildCraftCore.mainConfiguration.getBlock("filler.id", DefaultProps.FILLER_ID); - Property builderId = BuildCraftCore.mainConfiguration.getBlock("builder.id", DefaultProps.BUILDER_ID); - Property architectId = BuildCraftCore.mainConfiguration.getBlock("architect.id", DefaultProps.ARCHITECT_ID); - Property libraryId = BuildCraftCore.mainConfiguration.getBlock("blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID); - Property fillerDestroyProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "filler.destroy", DefaultProps.FILLER_DESTROY); fillerDestroyProp.comment = "If true, Filler will destroy blocks instead of breaking them."; fillerDestroy = fillerDestroyProp.getBoolean(DefaultProps.FILLER_DESTROY); @@ -245,38 +239,38 @@ public class BuildCraftBuilders extends BuildCraftMod { fillerLifespanNormalProp.comment = "Lifespan in ticks of items dropped by the filler from non-tough blocks (those that can be broken by hand)"; fillerLifespanNormal = fillerLifespanNormalProp.getInt(DefaultProps.FILLER_LIFESPAN_NORMAL); - templateItem = new ItemBptTemplate(templateItemId.getInt()); - templateItem.setUnlocalizedName("templateItem"); + templateItem = new ItemBptTemplate(); + templateItem.setBlockName("templateItem"); LanguageRegistry.addName(templateItem, "Template"); CoreProxy.proxy.registerItem(templateItem); - blueprintItem = new ItemBptBluePrint(blueprintItemId.getInt()); - blueprintItem.setUnlocalizedName("blueprintItem"); + blueprintItem = new ItemBptBluePrint(); + blueprintItem.setBlockName("blueprintItem"); LanguageRegistry.addName(blueprintItem, "Blueprint"); CoreProxy.proxy.registerItem(blueprintItem); - markerBlock = new BlockMarker(markerId.getInt()); - CoreProxy.proxy.registerBlock(markerBlock.setUnlocalizedName("markerBlock")); + markerBlock = new BlockMarker(); + CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock")); CoreProxy.proxy.addName(markerBlock, "Land Mark"); - pathMarkerBlock = new BlockPathMarker(pathMarkerId.getInt()); - CoreProxy.proxy.registerBlock(pathMarkerBlock.setUnlocalizedName("pathMarkerBlock")); + pathMarkerBlock = new BlockPathMarker(); + CoreProxy.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock")); CoreProxy.proxy.addName(pathMarkerBlock, "Path Mark"); - fillerBlock = new BlockFiller(fillerId.getInt()); - CoreProxy.proxy.registerBlock(fillerBlock.setUnlocalizedName("fillerBlock")); + fillerBlock = new BlockFiller(); + CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock")); CoreProxy.proxy.addName(fillerBlock, "Filler"); - builderBlock = new BlockBuilder(builderId.getInt()); - CoreProxy.proxy.registerBlock(builderBlock.setUnlocalizedName("builderBlock")); + builderBlock = new BlockBuilder(); + CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock")); CoreProxy.proxy.addName(builderBlock, "Builder"); - architectBlock = new BlockArchitect(architectId.getInt()); - CoreProxy.proxy.registerBlock(architectBlock.setUnlocalizedName("architectBlock")); + architectBlock = new BlockArchitect(); + CoreProxy.proxy.registerBlock(architectBlock.setBlockName("architectBlock")); CoreProxy.proxy.addName(architectBlock, "Architect Table"); - libraryBlock = new BlockBlueprintLibrary(libraryId.getInt()); - CoreProxy.proxy.registerBlock(libraryBlock.setUnlocalizedName("libraryBlock")); + libraryBlock = new BlockBlueprintLibrary(); + CoreProxy.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock")); CoreProxy.proxy.addName(libraryBlock, "Blueprint Library"); GameRegistry.registerTileEntity(TileMarker.class, "Marker"); @@ -322,14 +316,14 @@ public class BuildCraftBuilders extends BuildCraftMod { // new ItemStack(Item.dyePowder, 1, 4), 'p', Item.paper}); CoreProxy.proxy.addCraftingRecipe(new ItemStack(markerBlock, 1), new Object[]{"l ", "r ", 'l', - new ItemStack(Item.dyePowder, 1, 4), 'r', Block.torchRedstoneActive}); + new ItemStack(Items.dye, 1, 4), 'r', Blocks.redstone_torch}); // CoreProxy.proxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), new Object[]{"l ", "r ", 'l', // new ItemStack(Item.dyePowder, 1, 2), 'r', Block.torchRedstoneActive}); CoreProxy.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), new Object[]{"btb", "ycy", "gCg", 'b', - new ItemStack(Item.dyePowder, 1, 0), 't', markerBlock, 'y', new ItemStack(Item.dyePowder, 1, 11), - 'c', Block.workbench, 'g', BuildCraftCore.goldGearItem, 'C', Block.chest}); + new ItemStack(Items.dye, 1, 0), 't', markerBlock, 'y', new ItemStack(Items.dye, 1, 11), + 'c', Blocks.crafting_table, 'g', BuildCraftCore.goldGearItem, 'C', Blocks.chest}); // CoreProxy.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), new Object[]{"btb", "ycy", "gCg", 'b', // new ItemStack(Item.dyePowder, 1, 0), 't', markerBlock, 'y', new ItemStack(Item.dyePowder, 1, 11), @@ -383,7 +377,7 @@ public class BuildCraftBuilders extends BuildCraftMod { return rootBptIndex; } - public static ItemStack getBptItemStack(int id, int damage, String name) { + /*public static ItemStack getBptItemStack(int id, int damage, String name) { ItemStack stack = new ItemStack(id, 1, damage); NBTTagCompound nbt = new NBTTagCompound(); if (name != null && !"".equals(name)) { @@ -391,7 +385,7 @@ public class BuildCraftBuilders extends BuildCraftMod { stack.setTagCompound(nbt); } return stack; - } + }*/ public static void addHook(IBuilderHook hook) { if (!hooks.contains(hook)) { diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 2978df8e..5e6a13fc 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -18,6 +18,8 @@ import net.minecraft.block.BlockFluid; import net.minecraft.entity.EntityList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.network.Packet; @@ -156,7 +158,7 @@ public class BuildCraftCore extends BuildCraftMod { public static boolean loadDefaultRecipes = true; public static boolean forcePneumaticPower = true; public static boolean consumeWaterSources = false; - public static BptItem[] itemBptProps = new BptItem[Item.itemsList.length]; + //public static BptItem[] itemBptProps = new BptItem[Item.itemsList.length]; @Instance("BuildCraft|Core") public static BuildCraftCore instance; @@ -206,26 +208,17 @@ public class BuildCraftCore extends BuildCraftMod { longFactor.comment = "delay between full client sync packets, increasing it saves bandwidth, decreasing makes for better client syncronization."; longUpdateFactor = longFactor.getInt(40); - Property wrenchId = BuildCraftCore.mainConfiguration.getItem("wrench.id", DefaultProps.WRENCH_ID); - - wrenchItem = (new ItemWrench(wrenchId.getInt(DefaultProps.WRENCH_ID))).setUnlocalizedName("wrenchItem"); + wrenchItem = (new ItemWrench()).setBlockName("wrenchItem"); LanguageRegistry.addName(wrenchItem, "Wrench"); CoreProxy.proxy.registerItem(wrenchItem); - int springId = BuildCraftCore.mainConfiguration.getBlock("springBlock.id", DefaultProps.SPRING_ID).getInt(DefaultProps.SPRING_ID); - - Property woodenGearId = BuildCraftCore.mainConfiguration.getItem("woodenGearItem.id", DefaultProps.WOODEN_GEAR_ID); - Property stoneGearId = BuildCraftCore.mainConfiguration.getItem("stoneGearItem.id", DefaultProps.STONE_GEAR_ID); - Property ironGearId = BuildCraftCore.mainConfiguration.getItem("ironGearItem.id", DefaultProps.IRON_GEAR_ID); - Property goldenGearId = BuildCraftCore.mainConfiguration.getItem("goldenGearItem.id", DefaultProps.GOLDEN_GEAR_ID); - Property diamondGearId = BuildCraftCore.mainConfiguration.getItem("diamondGearItem.id", DefaultProps.DIAMOND_GEAR_ID); Property modifyWorldProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "modifyWorld", true); modifyWorldProp.comment = "set to false if BuildCraft should not generate custom blocks (e.g. oil)"; modifyWorld = modifyWorldProp.getBoolean(true); - if (BuildCraftCore.modifyWorld && springId > 0) { + if (BuildCraftCore.modifyWorld) { BlockSpring.EnumSpring.WATER.canGen = BuildCraftCore.mainConfiguration.get("worldgen", "waterSpring", true).getBoolean(true); - springBlock = new BlockSpring(springId).setUnlocalizedName("eternalSpring"); + springBlock = new BlockSpring().setBlockName("eternalSpring"); CoreProxy.proxy.registerBlock(springBlock, ItemSpring.class); } @@ -233,27 +226,27 @@ public class BuildCraftCore extends BuildCraftMod { consumeWaterSources = consumeWater.getBoolean(consumeWaterSources); consumeWater.comment = "set to true if the Pump should consume water"; - woodenGearItem = (new ItemBuildCraft(woodenGearId.getInt())).setUnlocalizedName("woodenGearItem"); + woodenGearItem = (new ItemBuildCraft()).setBlockName("woodenGearItem"); LanguageRegistry.addName(woodenGearItem, "Wooden Gear"); CoreProxy.proxy.registerItem(woodenGearItem); OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem)); - stoneGearItem = (new ItemBuildCraft(stoneGearId.getInt())).setUnlocalizedName("stoneGearItem"); + stoneGearItem = (new ItemBuildCraft()).setBlockName("stoneGearItem"); LanguageRegistry.addName(stoneGearItem, "Stone Gear"); CoreProxy.proxy.registerItem(stoneGearItem); OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem)); - ironGearItem = (new ItemBuildCraft(ironGearId.getInt())).setUnlocalizedName("ironGearItem"); + ironGearItem = (new ItemBuildCraft()).setBlockName("ironGearItem"); LanguageRegistry.addName(ironGearItem, "Iron Gear"); CoreProxy.proxy.registerItem(ironGearItem); OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem)); - goldGearItem = (new ItemBuildCraft(goldenGearId.getInt())).setUnlocalizedName("goldGearItem"); + goldGearItem = (new ItemBuildCraft()).setBlockName("goldGearItem"); LanguageRegistry.addName(goldGearItem, "Gold Gear"); CoreProxy.proxy.registerItem(goldGearItem); OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem)); - diamondGearItem = (new ItemBuildCraft(diamondGearId.getInt())).setUnlocalizedName("diamondGearItem"); + diamondGearItem = (new ItemBuildCraft()).setBlockName("diamondGearItem"); LanguageRegistry.addName(diamondGearItem, "Diamond Gear"); CoreProxy.proxy.registerItem(diamondGearItem); OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem)); @@ -311,7 +304,7 @@ public class BuildCraftCore extends BuildCraftMod { } } - BuildCraftAPI.softBlocks[Block.snow.blockID] = true; + BuildCraftAPI.softBlocks[Blocks.snow.blockID] = true; BuildCraftAPI.softBlocks[Block.vine.blockID] = true; BuildCraftAPI.softBlocks[Block.fire.blockID] = true; TickRegistry.registerTickHandler(new TickHandlerCoreClient(), Side.CLIENT); @@ -340,13 +333,13 @@ public class BuildCraftCore extends BuildCraftMod { } public void loadRecipes() { - CoreProxy.proxy.addCraftingRecipe(new ItemStack(wrenchItem), "I I", " G ", " I ", 'I', Item.ingotIron, 'G', stoneGearItem); + CoreProxy.proxy.addCraftingRecipe(new ItemStack(wrenchItem), "I I", " G ", " I ", 'I', Items.iron_ingot, 'G', stoneGearItem); CoreProxy.proxy.addCraftingRecipe(new ItemStack(woodenGearItem), " S ", "S S", " S ", 'S', "stickWood"); CoreProxy.proxy.addCraftingRecipe(new ItemStack(stoneGearItem), " I ", "IGI", " I ", 'I', "cobblestone", 'G', woodenGearItem); - CoreProxy.proxy.addCraftingRecipe(new ItemStack(ironGearItem), " I ", "IGI", " I ", 'I', Item.ingotIron, 'G', stoneGearItem); - CoreProxy.proxy.addCraftingRecipe(new ItemStack(goldGearItem), " I ", "IGI", " I ", 'I', Item.ingotGold, 'G', ironGearItem); - CoreProxy.proxy.addCraftingRecipe(new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', Item.diamond, 'G', goldGearItem); + CoreProxy.proxy.addCraftingRecipe(new ItemStack(ironGearItem), " I ", "IGI", " I ", 'I', Items.iron_ingot, 'G', stoneGearItem); + CoreProxy.proxy.addCraftingRecipe(new ItemStack(goldGearItem), " I ", "IGI", " I ", 'I', Items.gold_ingot, 'G', ironGearItem); + CoreProxy.proxy.addCraftingRecipe(new ItemStack(diamondGearItem), " I ", "IGI", " I ", 'I', Items.diamond, 'G', goldGearItem); } @EventHandler diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 0ece1f6c..752dd9c5 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -40,14 +40,17 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.TreeMap; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.biome.BiomeGenBase; @@ -91,19 +94,13 @@ public class BuildCraftEnergy extends BuildCraftMod { @EventHandler public void preInit(FMLPreInitializationEvent evt) { - Property engineId = BuildCraftCore.mainConfiguration.getBlock("engine.id", DefaultProps.ENGINE_ID); - // Update oil tag int defaultOilId = DefaultProps.OIL_ID; if (BuildCraftCore.mainConfiguration.hasKey(Configuration.CATEGORY_BLOCK, "oilStill.id")) { defaultOilId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "oilStill.id", defaultOilId).getInt(defaultOilId); BuildCraftCore.mainConfiguration.getCategory(Configuration.CATEGORY_BLOCK).remove("oilStill.id"); } - int blockOilId = BuildCraftCore.mainConfiguration.getBlock("oil.id", defaultOilId).getInt(defaultOilId); - - int blockFuelId = BuildCraftCore.mainConfiguration.getBlock("fuel.id", DefaultProps.FUEL_ID).getInt(DefaultProps.FUEL_ID); - int bucketOilId = BuildCraftCore.mainConfiguration.getItem("bucketOil.id", DefaultProps.BUCKET_OIL_ID).getInt(DefaultProps.BUCKET_OIL_ID); - int bucketFuelId = BuildCraftCore.mainConfiguration.getItem("bucketFuel.id", DefaultProps.BUCKET_FUEL_ID).getInt(DefaultProps.BUCKET_FUEL_ID); + int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT); int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN); canOilBurn = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "burnOil", true, "Can oil burn?").getBoolean(true); @@ -135,7 +132,7 @@ public class BuildCraftEnergy extends BuildCraftMod { } - engineBlock = new BlockEngine(engineId.getInt(DefaultProps.ENGINE_ID)); + engineBlock = new BlockEngine(); CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); LanguageRegistry.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine"); @@ -153,16 +150,14 @@ public class BuildCraftEnergy extends BuildCraftMod { FluidRegistry.registerFluid(buildcraftFluidFuel); fluidFuel = FluidRegistry.getFluid("fuel"); - if (fluidOil.getBlockID() == -1) { - if (blockOilId > 0) { - blockOil = new BlockBuildcraftFluid(blockOilId, fluidOil, Material.water).setFlammable(canOilBurn).setFlammability(0); - blockOil.setUnlocalizedName("blockOil"); - CoreProxy.proxy.addName(blockOil, "Oil"); - CoreProxy.proxy.registerBlock(blockOil); - fluidOil.setBlockID(blockOil); - } + if (fluidOil.getBlock() == null) { + blockOil = new BlockBuildcraftFluid(fluidOil, Material.water).setFlammable(canOilBurn).setFlammability(0); + blockOil.setBlockName("blockOil"); + CoreProxy.proxy.addName(blockOil, "Oil"); + CoreProxy.proxy.registerBlock(blockOil); + fluidOil.setBlock(blockOil); } else { - blockOil = Block.blocksList[fluidOil.getBlockID()]; + blockOil = fluidOil.getBlock(); } if (blockOil != null) { @@ -171,34 +166,32 @@ public class BuildCraftEnergy extends BuildCraftMod { BlockSpring.EnumSpring.OIL.liquidBlock = blockOil; } - if (fluidFuel.getBlockID() == -1) { - if (blockFuelId > 0) { - blockFuel = new BlockBuildcraftFluid(blockFuelId, fluidFuel, Material.water).setFlammable(true).setFlammability(5).setParticleColor(0.7F, 0.7F, 0.0F); - blockFuel.setUnlocalizedName("blockFuel"); - CoreProxy.proxy.addName(blockFuel, "Fuel"); - CoreProxy.proxy.registerBlock(blockFuel); - fluidFuel.setBlockID(blockFuel); - } + if (fluidFuel.getBlock() == null) { + blockFuel = new BlockBuildcraftFluid(fluidFuel, Material.water).setFlammable(true).setFlammability(5).setParticleColor(0.7F, 0.7F, 0.0F); + blockFuel.setBlockName("blockFuel"); + CoreProxy.proxy.addName(blockFuel, "Fuel"); + CoreProxy.proxy.registerBlock(blockFuel); + fluidFuel.setBlock(blockFuel); } else { - blockFuel = Block.blocksList[fluidFuel.getBlockID()]; + blockFuel = fluidFuel.getBlock(); } // Buckets - if (blockOil != null && bucketOilId > 0) { - bucketOil = new ItemBucketBuildcraft(bucketOilId, blockOil.blockID); - bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Item.bucketEmpty); + if (blockOil != null) { + bucketOil = new ItemBucketBuildcraft(blockOil); + bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Items.bucket); LanguageRegistry.addName(bucketOil, "Oil Bucket"); CoreProxy.proxy.registerItem(bucketOil); - FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Items.bucket)); } - if (blockFuel != null && bucketFuelId > 0) { - bucketFuel = new ItemBucketBuildcraft(bucketFuelId, blockFuel.blockID); - bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Item.bucketEmpty); + if (blockFuel != null) { + bucketFuel = new ItemBucketBuildcraft(blockFuel); + bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Items.bucket); LanguageRegistry.addName(bucketFuel, "Fuel Bucket"); CoreProxy.proxy.registerItem(bucketFuel); - FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty)); + FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket)); } BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil); @@ -214,7 +207,7 @@ public class BuildCraftEnergy extends BuildCraftMod { // Iron Engine Coolants IronEngineCoolant.addCoolant(FluidRegistry.getFluid("water"), 0.0023F); - IronEngineCoolant.addCoolant(Block.ice.blockID, 0, FluidRegistry.getFluidStack("water", FluidContainerRegistry.BUCKET_VOLUME * 2)); + IronEngineCoolant.addCoolant(Blocks.ice, 0, FluidRegistry.getFluidStack("water", FluidContainerRegistry.BUCKET_VOLUME * 2)); MinecraftForge.EVENT_BUS.register(this); } @@ -223,7 +216,7 @@ public class BuildCraftEnergy extends BuildCraftMod { public void init(FMLInitializationEvent evt) { NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); - new BptBlockEngine(engineBlock.blockID); + //new BptBlockEngine(engineBlock.blockID); if (BuildCraftCore.loadDefaultRecipes) { loadRecipes(); @@ -251,116 +244,16 @@ public class BuildCraftEnergy extends BuildCraftMod { public static void loadRecipes() { CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0), - new Object[]{"www", " g ", "GpG", 'w', "plankWood", 'g', Block.glass, 'G', - BuildCraftCore.woodenGearItem, 'p', Block.pistonBase}); + new Object[]{"www", " g ", "GpG", 'w', "plankWood", 'g', Blocks.glass, 'G', + BuildCraftCore.woodenGearItem, 'p', Blocks.piston}); CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 1), new Object[]{"www", " g ", "GpG", 'w', "cobblestone", - 'g', Block.glass, 'G', BuildCraftCore.stoneGearItem, 'p', Block.pistonBase}); - CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[]{"www", " g ", "GpG", 'w', Item.ingotIron, - 'g', Block.glass, 'G', BuildCraftCore.ironGearItem, 'p', Block.pistonBase}); + 'g', Blocks.glass, 'G', BuildCraftCore.stoneGearItem, 'p', Blocks.piston}); + CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[]{"www", " g ", "GpG", 'w', Items.iron_ingot, + 'g', Blocks.glass, 'G', BuildCraftCore.ironGearItem, 'p', Blocks.piston}); } @EventHandler public void processIMCRequests(FMLInterModComms.IMCEvent event) { InterModComms.processIMC(event); } - // public static int createPollution (World world, int i, int j, int k, int - // saturation) { - // int remainingSaturation = saturation; - // - // if (world.rand.nextFloat() > 0.7) { - // // Try to place an item on the sides - // - // LinkedList orientations = new LinkedList(); - // - // for (int id = -1; id <= 1; id += 2) { - // for (int kd = -1; kd <= 1; kd += 2) { - // if (canPollute(world, i + id, j, k + kd)) { - // orientations.add(new BlockIndex(i + id, j, k + kd)); - // } - // } - // } - // - // if (orientations.size() > 0) { - // BlockIndex toPollute = - // orientations.get(world.rand.nextInt(orientations.size())); - // - // int x = toPollute.i; - // int y = toPollute.j; - // int z = toPollute.k; - // - // if (world.getBlockId(x, y, z) == 0) { - // world.setBlock(x, y, z, - // BuildCraftEnergy.pollution.blockID, - // saturation * 16 / 100); - // - // saturationStored.put(new BlockIndex(x, y, z), new Integer( - // saturation)); - // remainingSaturation = 0; - // } else if (world.getBlockTileEntity(z, y, z) instanceof TilePollution) { - // remainingSaturation = updateExitingPollution(world, x, y, z, saturation); - // } - // } - // } - // - // if (remainingSaturation > 0) { - // if (world.getBlockId(i, j + 1, k) == 0) { - // if (j + 1 < 128) { - // world.setBlock(i, j + 1, k, - // BuildCraftEnergy.pollution.blockID, - // saturation * 16 / 100); - // saturationStored.put(new BlockIndex(i, j + 1, k), - // new Integer(remainingSaturation)); - // } - // - // remainingSaturation = 0; - // } else if (world.getBlockTileEntity(i, j + 1, k) instanceof - // TilePollution) { - // remainingSaturation = updateExitingPollution(world, i, j + 1, - // k, remainingSaturation); - // } - // } - // - // if (remainingSaturation == 0) { - // System.out.println ("EXIT 1"); - // return 0; - // } else if (remainingSaturation == saturation) { - // System.out.println ("EXIT 2"); - // return saturation; - // } else { - // System.out.println ("EXIT 3"); - // return createPollution (world, i, j, k, remainingSaturation); - // } - // } - // - // private static int updateExitingPollution (World world, int i, int j, int - // k, int saturation) { - // int remainingSaturation = saturation; - // - // TilePollution tile = (TilePollution) world.getBlockTileEntity( - // i, j, k); - // - // if (tile.saturation + saturation <= 100) { - // remainingSaturation = 0; - // tile.saturation += saturation; - // } else { - // remainingSaturation = (tile.saturation + saturation) - 100; - // tile.saturation += saturation - remainingSaturation; - // } - // - // world.setBlockMetadata(i, j, k, saturation * 16 / 100); - // world.markBlockNeedsUpdate(i, j, k); - // - // return remainingSaturation; - // } - // - // private static boolean canPollute (World world, int i, int j, int k) { - // if (world.getBlockId(i, j, k) == 0) { - // return true; - // } else { - // TileEntity tile = world.getBlockTileEntity(i, j, k); - // - // return (tile instanceof TilePollution && ((TilePollution) - // tile).saturation < 100); - // } - // } } diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index 62cf52ec..b513ed8b 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -59,6 +59,8 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -106,7 +108,7 @@ public class BuildCraftFactory extends BuildCraftMod { int quarryX = ticket.getModData().getInteger("quarryX"); int quarryY = ticket.getModData().getInteger("quarryY"); int quarryZ = ticket.getModData().getInteger("quarryZ"); - TileQuarry tq = (TileQuarry) world.getBlockTileEntity(quarryX, quarryY, quarryZ); + TileQuarry tq = (TileQuarry) world.getTileEntity(quarryX, quarryY, quarryZ); tq.forceChunkLoading(ticket); } @@ -146,10 +148,10 @@ public class BuildCraftFactory extends BuildCraftMod { FactoryProxy.proxy.initializeTileEntities(); - new BptBlockAutoWorkbench(autoWorkbenchBlock.blockID); - new BptBlockFrame(frameBlock.blockID); - new BptBlockRefinery(refineryBlock.blockID); - new BptBlockTank(tankBlock.blockID); + //new BptBlockAutoWorkbench(autoWorkbenchBlock.blockID); + //new BptBlockFrame(frameBlock.blockID); + //new BptBlockRefinery(refineryBlock.blockID); + //new BptBlockTank(tankBlock.blockID); if (BuildCraftCore.loadDefaultRecipes) { loadRecipes(); @@ -174,72 +176,52 @@ public class BuildCraftFactory extends BuildCraftMod { + "Entries are comma seperated, banned fluids have precedence over allowed ones." + "Default is \"+/*/*,+/-1/Lava\" - the second redundant entry (\"+/-1/lava\") is there to show the format."; pumpDimensionList = new PumpDimensionList(pumpList.getString()); - - int miningWellId = BuildCraftCore.mainConfiguration.getBlock("miningWell.id", DefaultProps.MINING_WELL_ID).getInt(DefaultProps.MINING_WELL_ID); - int plainPipeId = BuildCraftCore.mainConfiguration.getBlock("drill.id", DefaultProps.DRILL_ID).getInt(DefaultProps.DRILL_ID); - int autoWorkbenchId = BuildCraftCore.mainConfiguration.getBlock("autoWorkbench.id", DefaultProps.AUTO_WORKBENCH_ID).getInt(DefaultProps.AUTO_WORKBENCH_ID); - int frameId = BuildCraftCore.mainConfiguration.getBlock("frame.id", DefaultProps.FRAME_ID).getInt(DefaultProps.FRAME_ID); - int quarryId = BuildCraftCore.mainConfiguration.getBlock("quarry.id", DefaultProps.QUARRY_ID).getInt(DefaultProps.QUARRY_ID); - int pumpId = BuildCraftCore.mainConfiguration.getBlock("pump.id", DefaultProps.PUMP_ID).getInt(DefaultProps.PUMP_ID); - int floodGateId = BuildCraftCore.mainConfiguration.getBlock("floodGate.id", DefaultProps.FLOOD_GATE_ID).getInt(DefaultProps.FLOOD_GATE_ID); - int tankId = BuildCraftCore.mainConfiguration.getBlock("tank.id", DefaultProps.TANK_ID).getInt(DefaultProps.TANK_ID); - int refineryId = BuildCraftCore.mainConfiguration.getBlock("refinery.id", DefaultProps.REFINERY_ID).getInt(DefaultProps.REFINERY_ID); - int hopperId = BuildCraftCore.mainConfiguration.getBlock("hopper.id", DefaultProps.HOPPER_ID).getInt(DefaultProps.HOPPER_ID); - + if (BuildCraftCore.mainConfiguration.hasChanged()) { BuildCraftCore.mainConfiguration.save(); } - if (miningWellId > 0) { - miningWellBlock = new BlockMiningWell(miningWellId); - CoreProxy.proxy.registerBlock(miningWellBlock.setUnlocalizedName("miningWellBlock")); - CoreProxy.proxy.addName(miningWellBlock, "Mining Well"); - } - if (plainPipeId > 0) { - plainPipeBlock = new BlockPlainPipe(plainPipeId); - CoreProxy.proxy.registerBlock(plainPipeBlock.setUnlocalizedName("plainPipeBlock")); - CoreProxy.proxy.addName(plainPipeBlock, "Mining Pipe"); - } - if (autoWorkbenchId > 0) { - autoWorkbenchBlock = new BlockAutoWorkbench(autoWorkbenchId); - CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setUnlocalizedName("autoWorkbenchBlock")); - CoreProxy.proxy.addName(autoWorkbenchBlock, "Automatic Crafting Table"); - } - if (frameId > 0) { - frameBlock = new BlockFrame(frameId); - CoreProxy.proxy.registerBlock(frameBlock.setUnlocalizedName("frameBlock")); - CoreProxy.proxy.addName(frameBlock, "Frame"); - } - if (quarryId > 0) { - quarryBlock = new BlockQuarry(quarryId); - CoreProxy.proxy.registerBlock(quarryBlock.setUnlocalizedName("machineBlock")); - CoreProxy.proxy.addName(quarryBlock, "Quarry"); - } - if (tankId > 0) { - tankBlock = new BlockTank(tankId); - CoreProxy.proxy.registerBlock(tankBlock.setUnlocalizedName("tankBlock")); - CoreProxy.proxy.addName(tankBlock, "Tank"); - } - if (pumpId > 0) { - pumpBlock = new BlockPump(pumpId); - CoreProxy.proxy.registerBlock(pumpBlock.setUnlocalizedName("pumpBlock")); - CoreProxy.proxy.addName(pumpBlock, "Pump"); - } - if (floodGateId > 0) { - floodGateBlock = new BlockFloodGate(floodGateId); - CoreProxy.proxy.registerBlock(floodGateBlock.setUnlocalizedName("floodGateBlock")); - CoreProxy.proxy.addName(floodGateBlock, "Flood Gate"); - } - if (refineryId > 0) { - refineryBlock = new BlockRefinery(refineryId); - CoreProxy.proxy.registerBlock(refineryBlock.setUnlocalizedName("refineryBlock")); - CoreProxy.proxy.addName(refineryBlock, "Refinery"); - } - if (hopperId > 0) { - hopperBlock = new BlockHopper(hopperId); - CoreProxy.proxy.registerBlock(hopperBlock.setUnlocalizedName("blockHopper")); - CoreProxy.proxy.addName(hopperBlock, "Hopper"); - } + + miningWellBlock = new BlockMiningWell(); + CoreProxy.proxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock")); + CoreProxy.proxy.addName(miningWellBlock, "Mining Well"); + + plainPipeBlock = new BlockPlainPipe(); + CoreProxy.proxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock")); + CoreProxy.proxy.addName(plainPipeBlock, "Mining Pipe"); + + autoWorkbenchBlock = new BlockAutoWorkbench(); + CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock")); + CoreProxy.proxy.addName(autoWorkbenchBlock, "Automatic Crafting Table"); + + frameBlock = new BlockFrame(); + CoreProxy.proxy.registerBlock(frameBlock.setBlockName("frameBlock")); + CoreProxy.proxy.addName(frameBlock, "Frame"); + + quarryBlock = new BlockQuarry(); + CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock")); + CoreProxy.proxy.addName(quarryBlock, "Quarry"); + + tankBlock = new BlockTank(); + CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock")); + CoreProxy.proxy.addName(tankBlock, "Tank"); + + pumpBlock = new BlockPump(); + CoreProxy.proxy.registerBlock(pumpBlock.setBlockName("pumpBlock")); + CoreProxy.proxy.addName(pumpBlock, "Pump"); + + floodGateBlock = new BlockFloodGate(); + CoreProxy.proxy.registerBlock(floodGateBlock.setBlockName("floodGateBlock")); + CoreProxy.proxy.addName(floodGateBlock, "Flood Gate"); + + refineryBlock = new BlockRefinery(); + CoreProxy.proxy.registerBlock(refineryBlock.setBlockName("refineryBlock")); + CoreProxy.proxy.addName(refineryBlock, "Refinery"); + + hopperBlock = new BlockHopper(); + CoreProxy.proxy.registerBlock(hopperBlock.setBlockName("blockHopper")); + CoreProxy.proxy.addName(hopperBlock, "Hopper"); + FactoryProxy.proxy.initializeEntityRenders(); if (BuildCraftCore.mainConfiguration.hasChanged()) { @@ -257,10 +239,10 @@ public class BuildCraftFactory extends BuildCraftMod { "ipi", "igi", "iPi", - 'p', Item.redstone, - 'i', Item.ingotIron, + 'p', Items.redstone, + 'i', Items.iron_ingot, 'g', BuildCraftCore.ironGearItem, - 'P', Item.pickaxeIron); + 'P', Items.iron_pickaxe); if (quarryBlock != null) CoreProxy.proxy.addCraftingRecipe( @@ -269,16 +251,16 @@ public class BuildCraftFactory extends BuildCraftMod { "gig", "dDd", 'i', BuildCraftCore.ironGearItem, - 'p', Item.redstone, + 'p', Items.redstone, 'g', BuildCraftCore.goldGearItem, 'd', BuildCraftCore.diamondGearItem, - 'D', Item.pickaxeDiamond); + 'D', Items.diamond_pickaxe); if (pumpBlock != null && miningWellBlock != null) CoreProxy.proxy.addCraftingRecipe(new ItemStack(pumpBlock), "T", "W", - 'T', tankBlock != null ? tankBlock : Block.glass, + 'T', tankBlock != null ? tankBlock : Blocks.glass, 'W', miningWellBlock); } @@ -288,9 +270,9 @@ public class BuildCraftFactory extends BuildCraftMod { "iri", "iTi", "gpg", - 'r', Item.redstone, - 'i', Item.ingotIron, - 'T', tankBlock != null ? tankBlock : Block.glass, + 'r', Items.redstone, + 'i', Items.iron_ingot, + 'T', tankBlock != null ? tankBlock : Blocks.glass, 'g', BuildCraftCore.ironGearItem, 'p', BuildCraftTransport.pipeFluidsGold); } @@ -300,7 +282,7 @@ public class BuildCraftFactory extends BuildCraftMod { " g ", "gwg", " g ", - 'w', Block.workbench, + 'w', Blocks.crafting_table, 'g', BuildCraftCore.woodenGearItem); @@ -309,23 +291,23 @@ public class BuildCraftFactory extends BuildCraftMod { "ggg", "g g", "ggg", - 'g', Block.glass); + 'g', Blocks.glass); if (refineryBlock != null) CoreProxy.proxy.addCraftingRecipe(new ItemStack(refineryBlock), "RTR", "TGT", - 'T', tankBlock != null ? tankBlock : Block.glass, + 'T', tankBlock != null ? tankBlock : Blocks.glass, 'G', BuildCraftCore.diamondGearItem, - 'R', Block.torchRedstoneActive); + 'R', Blocks.redstone_torch); if (hopperBlock != null) CoreProxy.proxy.addCraftingRecipe(new ItemStack(hopperBlock), "ICI", "IGI", " I ", - 'I', Item.ingotIron, - 'C', Block.chest, + 'I', Items.iron_ingot, + 'C', Blocks.chest, 'G', BuildCraftCore.stoneGearItem); if (floodGateBlock != null) @@ -333,10 +315,10 @@ public class BuildCraftFactory extends BuildCraftMod { "IGI", "FTF", "IFI", - 'I', Item.ingotIron, - 'T', tankBlock != null ? tankBlock : Block.glass, + 'I', Items.iron_ingot, + 'T', tankBlock != null ? tankBlock : Blocks.glass, 'G', BuildCraftCore.ironGearItem, - 'F', new ItemStack(Block.fenceIron)); + 'F', new ItemStack(Blocks.iron_bars)); } @EventHandler diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index ae72053e..cd64e438 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -42,7 +42,6 @@ import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -51,6 +50,8 @@ import java.util.EnumSet; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Property; @@ -65,28 +66,22 @@ public class BuildCraftSilicon extends BuildCraftMod { public static BuildCraftSilicon instance; @EventHandler - public void preInit(FMLPreInitializationEvent evt) { - Property laserId = BuildCraftCore.mainConfiguration.getBlock("laser.id", DefaultProps.LASER_ID); - - Property assemblyTableId = BuildCraftCore.mainConfiguration.getBlock("assemblyTable.id", DefaultProps.ASSEMBLY_TABLE_ID); - - Property redstoneChipsetId = BuildCraftCore.mainConfiguration.getItem("redstoneChipset.id", DefaultProps.REDSTONE_CHIPSET); - + public void preInit(FMLPreInitializationEvent evt) { BuildCraftCore.mainConfiguration.save(); - laserBlock = new BlockLaser(laserId.getInt()); - CoreProxy.proxy.addName(laserBlock.setUnlocalizedName("laserBlock"), "Laser"); + laserBlock = new BlockLaser(); + CoreProxy.proxy.addName(laserBlock.setBlockName("laserBlock"), "Laser"); CoreProxy.proxy.registerBlock(laserBlock); - assemblyTableBlock = new BlockLaserTable(assemblyTableId.getInt()); + assemblyTableBlock = new BlockLaserTable(); CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class); LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 0), "Assembly Table"); LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 1), "Advanced Crafting Table"); LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 2), "Integration Table"); - redstoneChipset = new ItemRedstoneChipset(redstoneChipsetId.getInt()); - redstoneChipset.setUnlocalizedName("redstoneChipset"); + redstoneChipset = new ItemRedstoneChipset(); + redstoneChipset.setBlockName("redstoneChipset"); CoreProxy.proxy.registerItem(redstoneChipset); redstoneChipset.registerItemStacks(); } @@ -102,8 +97,8 @@ public class BuildCraftSilicon extends BuildCraftMod { CoreProxy.proxy.registerTileEntity(TileAdvancedCraftingTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench"); CoreProxy.proxy.registerTileEntity(TileIntegrationTable.class, "net.minecraft.src.buildcraft.factory.TileIntegrationTable"); - new BptBlockRotateMeta(laserBlock.blockID, new int[]{2, 5, 3, 4}, true); - new BptBlockInventory(assemblyTableBlock.blockID); + //new BptBlockRotateMeta(laserBlock.blockID, new int[]{2, 5, 3, 4}, true); + //new BptBlockInventory(assemblyTableBlock.blockID); if (BuildCraftCore.loadDefaultRecipes) { loadRecipes(); @@ -119,51 +114,51 @@ public class BuildCraftSilicon extends BuildCraftMod { "ORR", "DDR", "ORR", - 'O', Block.obsidian, - 'R', Item.redstone, - 'D', Item.diamond); + 'O', Blocks.obsidian, + 'R', Items.redstone, + 'D', Items.diamond); CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 0), "ORO", "ODO", "OGO", - 'O', Block.obsidian, - 'R', Item.redstone, - 'D', Item.diamond, + 'O', Blocks.obsidian, + 'R', Items.redstone, + 'D', Items.diamond, 'G', BuildCraftCore.diamondGearItem); CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 1), "OWO", "OCO", "ORO", - 'O', Block.obsidian, - 'W', Block.workbench, - 'C', Block.chest, + 'O', Blocks.obsidian, + 'W', Blocks.crafting_table, + 'C', Blocks.chest, 'R', new ItemStack(redstoneChipset, 1, 0)); CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 2), "ORO", "OCO", "OGO", - 'O', Block.obsidian, - 'R', Item.redstone, + 'O', Blocks.obsidian, + 'R', Items.redstone, 'C', new ItemStack(redstoneChipset, 1, 0), 'G', BuildCraftCore.diamondGearItem); // PIPE WIRE - BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.RED.getStack(8), "dyeRed", 1, Item.redstone, Item.ingotIron); - BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.BLUE.getStack(8), "dyeBlue", 1, Item.redstone, Item.ingotIron); - BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.GREEN.getStack(8), "dyeGreen", 1, Item.redstone, Item.ingotIron); - BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.YELLOW.getStack(8), "dyeYellow", 1, Item.redstone, Item.ingotIron); + BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.RED.getStack(8), "dyeRed", 1, Items.redstone, Items.iron_ingot); + BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.BLUE.getStack(8), "dyeBlue", 1, Items.redstone, Items.iron_ingot); + BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.GREEN.getStack(8), "dyeGreen", 1, Items.redstone, Items.iron_ingot); + BuildcraftRecipes.assemblyTable.addRecipe(500, PipeWire.YELLOW.getStack(8), "dyeYellow", 1, Items.redstone, Items.iron_ingot); // CHIPSETS - BuildcraftRecipes.assemblyTable.addRecipe(10000, Chipset.RED.getStack(), Item.redstone); - BuildcraftRecipes.assemblyTable.addRecipe(20000, Chipset.IRON.getStack(), Item.redstone, Item.ingotIron); - BuildcraftRecipes.assemblyTable.addRecipe(40000, Chipset.GOLD.getStack(), Item.redstone, Item.ingotGold); - BuildcraftRecipes.assemblyTable.addRecipe(80000, Chipset.DIAMOND.getStack(), Item.redstone, Item.diamond); - BuildcraftRecipes.assemblyTable.addRecipe(40000, Chipset.PULSATING.getStack(2), Item.redstone, Item.enderPearl); - BuildcraftRecipes.assemblyTable.addRecipe(60000, Chipset.QUARTZ.getStack(), Item.redstone, Item.netherQuartz); - BuildcraftRecipes.assemblyTable.addRecipe(60000, Chipset.COMP.getStack(), Item.redstone, Item.comparator); + BuildcraftRecipes.assemblyTable.addRecipe(10000, Chipset.RED.getStack(), Items.redstone); + BuildcraftRecipes.assemblyTable.addRecipe(20000, Chipset.IRON.getStack(), Items.redstone, Items.iron_ingot); + BuildcraftRecipes.assemblyTable.addRecipe(40000, Chipset.GOLD.getStack(), Items.redstone, Items.gold_ingot); + BuildcraftRecipes.assemblyTable.addRecipe(80000, Chipset.DIAMOND.getStack(), Items.redstone, Items.diamond); + BuildcraftRecipes.assemblyTable.addRecipe(40000, Chipset.PULSATING.getStack(2), Items.redstone, Items.ender_pearl); + BuildcraftRecipes.assemblyTable.addRecipe(60000, Chipset.QUARTZ.getStack(), Items.redstone, Items.quartz); + BuildcraftRecipes.assemblyTable.addRecipe(60000, Chipset.COMP.getStack(), Items.redstone, Items.comparator); // GATES BuildcraftRecipes.assemblyTable.addRecipe(10000, ItemGate.makeGateItem(GateMaterial.REDSTONE, GateLogic.AND), Chipset.RED.getStack(), PipeWire.RED.getStack()); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 2491280f..21589b6f 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -98,7 +98,6 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -106,6 +105,8 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import java.util.LinkedList; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -264,33 +265,28 @@ public class BuildCraftTransport extends BuildCraftMod { groupItemsTriggerProp.comment = "when reaching this amount of objects in a pipes, items will be automatically grouped"; groupItemsTrigger = groupItemsTriggerProp.getInt(); - - Property genericPipeId = BuildCraftCore.mainConfiguration.getBlock("pipe.id", DefaultProps.GENERIC_PIPE_ID); - - Property pipeWaterproofId = BuildCraftCore.mainConfiguration.getItem("pipeWaterproof.id", DefaultProps.PIPE_WATERPROOF_ID); - - pipeWaterproof = new ItemBuildCraft(pipeWaterproofId.getInt()); + pipeWaterproof = new ItemBuildCraft(); pipeWaterproof.setUnlocalizedName("pipeWaterproof"); LanguageRegistry.addName(pipeWaterproof, "Pipe Sealant"); CoreProxy.proxy.registerItem(pipeWaterproof); - genericPipeBlock = new BlockGenericPipe(genericPipeId.getInt()); - CoreProxy.proxy.registerBlock(genericPipeBlock.setUnlocalizedName("pipeBlock"), ItemBlock.class); + genericPipeBlock = new BlockGenericPipe(); + CoreProxy.proxy.registerBlock(genericPipeBlock.setBlockName("pipeBlock"), ItemBlock.class); - pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", "plankWood", Block.glass, "plankWood"); - pipeItemsEmerald = buildPipe(DefaultProps.PIPE_ITEMS_EMERALD_ID, PipeItemsEmerald.class, "Emerald Transport Pipe", Item.emerald, Block.glass, Item.emerald); - pipeItemsCobblestone = buildPipe(DefaultProps.PIPE_ITEMS_COBBLESTONE_ID, PipeItemsCobblestone.class, "Cobblestone Transport Pipe", "cobblestone", Block.glass, "cobblestone"); - pipeItemsStone = buildPipe(DefaultProps.PIPE_ITEMS_STONE_ID, PipeItemsStone.class, "Stone Transport Pipe", "stone", Block.glass, "stone"); - pipeItemsQuartz = buildPipe(DefaultProps.PIPE_ITEMS_QUARTZ_ID, PipeItemsQuartz.class, "Quartz Transport Pipe", Block.blockNetherQuartz, Block.glass, Block.blockNetherQuartz); - pipeItemsIron = buildPipe(DefaultProps.PIPE_ITEMS_IRON_ID, PipeItemsIron.class, "Iron Transport Pipe", Item.ingotIron, Block.glass, Item.ingotIron); - pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", Item.ingotGold, Block.glass, Item.ingotGold); - pipeItemsDiamond = buildPipe(DefaultProps.PIPE_ITEMS_DIAMOND_ID, PipeItemsDiamond.class, "Diamond Transport Pipe", Item.diamond, Block.glass, Item.diamond); - pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", Block.obsidian, Block.glass, Block.obsidian); - pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", Block.blockLapis, Block.glass, Block.blockLapis); - pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", Block.blockLapis, Block.glass, Item.diamond); - pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", Block.sandStone, Block.glass, Block.sandStone); - pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Block.glass, Item.redstone); - pipeItemsEmzuli = buildPipe(DefaultProps.PIPE_ITEMS_EMZULI_ID, PipeItemsEmzuli.class, "Emzuli Transport Pipe", Block.blockLapis, Block.glass, Item.emerald); + pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", "plankWood", Blocks.glass, "plankWood"); + pipeItemsEmerald = buildPipe(DefaultProps.PIPE_ITEMS_EMERALD_ID, PipeItemsEmerald.class, "Emerald Transport Pipe", Items.emerald, Blocks.glass, Items.emerald); + pipeItemsCobblestone = buildPipe(DefaultProps.PIPE_ITEMS_COBBLESTONE_ID, PipeItemsCobblestone.class, "Cobblestone Transport Pipe", "cobblestone", Blocks.glass, "cobblestone"); + pipeItemsStone = buildPipe(DefaultProps.PIPE_ITEMS_STONE_ID, PipeItemsStone.class, "Stone Transport Pipe", "stone", Blocks.glass, "stone"); + pipeItemsQuartz = buildPipe(DefaultProps.PIPE_ITEMS_QUARTZ_ID, PipeItemsQuartz.class, "Quartz Transport Pipe", Blocks.quartz_block, Blocks.glass, Blocks.quartz_block); + pipeItemsIron = buildPipe(DefaultProps.PIPE_ITEMS_IRON_ID, PipeItemsIron.class, "Iron Transport Pipe", Items.iron_ingot, Blocks.glass, Items.iron_ingot); + pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", Items.gold_ingot, Blocks.glass, Items.gold_ingot); + pipeItemsDiamond = buildPipe(DefaultProps.PIPE_ITEMS_DIAMOND_ID, PipeItemsDiamond.class, "Diamond Transport Pipe", Items.diamond, Blocks.glass, Items.diamond); + pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", Blocks.obsidian, Blocks.glass, Blocks.obsidian); + pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", Blocks.lapis_block, Blocks.glass, Blocks.lapis_block); + pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", Blocks.lapis_block, Blocks.glass, Items.diamond); + pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", Blocks.sandstone, Blocks.glass, Blocks.sandstone); + pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Blocks.glass, Items.redstone); + pipeItemsEmzuli = buildPipe(DefaultProps.PIPE_ITEMS_EMZULI_ID, PipeItemsEmzuli.class, "Emzuli Transport Pipe", Blocks.lapis_block, Blocks.glass, Items.emerald); pipeFluidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeFluidsWood.class, "Wooden Waterproof Pipe", pipeWaterproof, pipeItemsWood); pipeFluidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", pipeWaterproof, pipeItemsCobblestone); @@ -301,13 +297,13 @@ public class BuildCraftTransport extends BuildCraftMod { pipeFluidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", pipeWaterproof, pipeItemsSandstone); pipeFluidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeFluidsVoid.class, "Void Waterproof Pipe", pipeWaterproof, pipeItemsVoid); - pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Kinesis Pipe", Item.redstone, pipeItemsWood); - pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", Item.redstone, pipeItemsCobblestone); - pipePowerStone = buildPipe(DefaultProps.PIPE_POWER_STONE_ID, PipePowerStone.class, "Stone Kinesis Pipe", Item.redstone, pipeItemsStone); - pipePowerQuartz = buildPipe(DefaultProps.PIPE_POWER_QUARTZ_ID, PipePowerQuartz.class, "Quartz Kinesis Pipe", Item.redstone, pipeItemsQuartz); - pipePowerIron = buildPipe(DefaultProps.PIPE_POWER_IRON_ID, PipePowerIron.class, "Iron Kinesis Pipe", Item.redstone, pipeItemsIron); - pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", Item.redstone, pipeItemsGold); - pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", Item.redstone, pipeItemsDiamond); + pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Kinesis Pipe", Items.redstone, pipeItemsWood); + pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Kinesis Pipe", Items.redstone, pipeItemsCobblestone); + pipePowerStone = buildPipe(DefaultProps.PIPE_POWER_STONE_ID, PipePowerStone.class, "Stone Kinesis Pipe", Items.redstone, pipeItemsStone); + pipePowerQuartz = buildPipe(DefaultProps.PIPE_POWER_QUARTZ_ID, PipePowerQuartz.class, "Quartz Kinesis Pipe", Items.redstone, pipeItemsQuartz); + pipePowerIron = buildPipe(DefaultProps.PIPE_POWER_IRON_ID, PipePowerIron.class, "Iron Kinesis Pipe", Items.redstone, pipeItemsIron); + pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", Items.redstone, pipeItemsGold); + pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", Items.redstone, pipeItemsDiamond); pipeStructureCobblestone = buildPipe(DefaultProps.PIPE_STRUCTURE_COBBLESTONE_ID, PipeStructureCobblestone.class, "Cobblestone Structure Pipe", Block.gravel, pipeItemsCobblestone); @@ -315,30 +311,25 @@ public class BuildCraftTransport extends BuildCraftMod { // pipeItemsStipes = createPipe(DefaultProps.PIPE_ITEMS_STRIPES_ID, PipeItemsStripes.class, "Stripes Transport Pipe", new ItemStack(Item.dyePowder, // 1, 0), Block.glass, new ItemStack(Item.dyePowder, 1, 11)); - int pipeWireId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeWire.id", DefaultProps.PIPE_WIRE).getInt(DefaultProps.PIPE_WIRE); - pipeWire = new ItemPipeWire(pipeWireId); + pipeWire = new ItemPipeWire(); LanguageRegistry.addName(pipeWire, "Pipe Wire"); CoreProxy.proxy.registerItem(pipeWire); PipeWire.item = pipeWire; - Property pipeGateId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeGate.id", DefaultProps.GATE_ID); - pipeGate = new ItemGate(pipeGateId.getInt()); + pipeGate = new ItemGate(); pipeGate.setUnlocalizedName("pipeGate"); CoreProxy.proxy.registerItem(pipeGate); - Property pipeFacadeId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipeFacade.id", DefaultProps.PIPE_FACADE_ID); - facadeItem = new ItemFacade(pipeFacadeId.getInt()); - facadeItem.setUnlocalizedName("pipeFacade"); + facadeItem = new ItemFacade(); + facadeItem.setBlockName("pipeFacade"); CoreProxy.proxy.registerItem(facadeItem); - Property pipePlugId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipePlug.id", DefaultProps.PIPE_PLUG_ID); - plugItem = new ItemPlug(pipePlugId.getInt()); + plugItem = new ItemPlug(); plugItem.setUnlocalizedName("pipePlug"); CoreProxy.proxy.registerItem(plugItem); - Property filteredBufferId = BuildCraftCore.mainConfiguration.getBlock("filteredBuffer.id", DefaultProps.FILTERED_BUFFER_ID); - filteredBufferBlock = new BlockFilteredBuffer(filteredBufferId.getInt()); - CoreProxy.proxy.registerBlock(filteredBufferBlock.setUnlocalizedName("filteredBufferBlock")); + filteredBufferBlock = new BlockFilteredBuffer(); + CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock")); CoreProxy.proxy.addName(filteredBufferBlock, "Filtered Buffer"); } finally { BuildCraftCore.mainConfiguration.save(); @@ -367,14 +358,14 @@ public class BuildCraftTransport extends BuildCraftMod { // ModLoader.RegisterTileEntity(TileDockingStation.class, // "net.minecraft.src.buildcraft.TileDockingStation"); - new BptBlockPipe(genericPipeBlock.blockID); + //new BptBlockPipe(genericPipeBlock.blockID); - BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden(); - BuildCraftCore.itemBptProps[pipeFluidsWood.itemID] = new BptItemPipeWooden(); - BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron(); - BuildCraftCore.itemBptProps[pipeFluidsIron.itemID] = new BptItemPipeIron(); - BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond(); - BuildCraftCore.itemBptProps[pipeItemsEmerald.itemID] = new BptItemPipeEmerald(); + //BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden(); + //BuildCraftCore.itemBptProps[pipeFluidsWood.itemID] = new BptItemPipeWooden(); + //BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron(); + //BuildCraftCore.itemBptProps[pipeFluidsIron.itemID] = new BptItemPipeIron(); + //BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond(); + //BuildCraftCore.itemBptProps[pipeItemsEmerald.itemID] = new BptItemPipeEmerald(); ActionManager.registerTriggerProvider(new PipeTriggerProvider()); @@ -425,7 +416,7 @@ public class BuildCraftTransport extends BuildCraftMod { public void loadRecipes() { // Add base recipe for pipe waterproof. - GameRegistry.addShapelessRecipe(new ItemStack(pipeWaterproof, 1), new ItemStack(Item.dyePowder, 1, 2)); + GameRegistry.addShapelessRecipe(new ItemStack(pipeWaterproof, 1), new ItemStack(Items.dye, 1, 2)); // Add pipe recipes for (PipeRecipe pipe : pipeRecipes) { @@ -438,8 +429,8 @@ public class BuildCraftTransport extends BuildCraftMod { CoreProxy.proxy.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1), new Object[]{"wdw", "wcw", "wpw", 'w', "plankWood", 'd', - BuildCraftTransport.pipeItemsDiamond, 'c', Block.chest, 'p', - Block.pistonBase}); + BuildCraftTransport.pipeItemsDiamond, 'c', Blocks.chest, 'p', + Blocks.piston}); //Facade turning helper GameRegistry.addRecipe(facadeItem.new FacadeRecipe()); @@ -459,7 +450,7 @@ public class BuildCraftTransport extends BuildCraftMod { int id = prop.getInt(defaultID); ItemPipe res = BlockGenericPipe.registerPipe(id, clas); - res.setUnlocalizedName(clas.getSimpleName()); + res.setBlockName(clas.getSimpleName()); LanguageRegistry.addName(res, descr); // Add appropriate recipe to temporary list diff --git a/common/buildcraft/api/blueprints/BlueprintManager.java b/common/buildcraft/api/blueprints/BlueprintManager.java index c71b710e..cb8ca974 100644 --- a/common/buildcraft/api/blueprints/BlueprintManager.java +++ b/common/buildcraft/api/blueprints/BlueprintManager.java @@ -8,14 +8,14 @@ import net.minecraft.item.ItemStack; @Deprecated public class BlueprintManager { - public static BptBlock[] blockBptProps = new BptBlock[Block.blocksList.length]; + //public static BptBlock[] blockBptProps = new BptBlock[Block.blocksList.length]; public static ItemSignature getItemSignature(Item item) { ItemSignature sig = new ItemSignature(); - if (item.itemID >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) { - sig.itemClassName = item.getClass().getSimpleName(); - } + //if (item.itemID >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) { + // sig.itemClassName = item.getClass().getSimpleName(); + //} sig.itemName = item.getUnlocalizedName(new ItemStack(item)); @@ -23,13 +23,14 @@ public class BlueprintManager { } public static BlockSignature getBlockSignature(Block block) { - return BlueprintManager.blockBptProps[0].getSignature(block); + //return BlueprintManager.blockBptProps[0].getSignature(block); + return null; } static { // Initialize defaults for block properties. - for (int i = 0; i < BlueprintManager.blockBptProps.length; ++i) { - new BptBlock(i); - } + //for (int i = 0; i < BlueprintManager.blockBptProps.length; ++i) { + // new BptBlock(i); + //} } } diff --git a/common/buildcraft/api/blueprints/BptBlock.java b/common/buildcraft/api/blueprints/BptBlock.java index 4f48d35e..40e8bc40 100644 --- a/common/buildcraft/api/blueprints/BptBlock.java +++ b/common/buildcraft/api/blueprints/BptBlock.java @@ -49,7 +49,7 @@ public class BptBlock { public BptBlock(int blockId) { this.blockId = blockId; - BlueprintManager.blockBptProps[blockId] = this; + //BlueprintManager.blockBptProps[blockId] = this; } /** @@ -61,7 +61,7 @@ public class BptBlock { if (slot.storedRequirements.size() != 0) { requirements.addAll(slot.storedRequirements); } else { - requirements.add(new ItemStack(slot.blockId, 1, slot.meta)); + // requirements.add(new ItemStack(slot.blockId, 1, slot.meta)); } } } @@ -103,7 +103,7 @@ public class BptBlock { if (stack.stackSize == 0 && stack.getItem().getContainerItem() != null) { Item container = stack.getItem().getContainerItem(); - stack.itemID = container.itemID; + //stack.itemID = container.itemID; stack.stackSize = 1; stack.setItemDamage(0); } @@ -117,7 +117,8 @@ public class BptBlock { * Added metadata sensitivity //Krapht */ public boolean isValid(BptSlotInfo slot, IBptContext context) { - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z) && slot.meta == context.world().getBlockMetadata(slot.x, slot.y, slot.z); + //return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z) && slot.meta == context.world().getBlockMetadata(slot.x, slot.y, slot.z); + return false; } /** @@ -132,11 +133,11 @@ public class BptBlock { */ public void buildBlock(BptSlotInfo slot, IBptContext context) { // Meta needs to be specified twice, depending on the block behavior - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,3); - context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,3); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,3); + //context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,3); - if (Block.blocksList[slot.blockId] instanceof BlockContainer) { - TileEntity tile = context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + /*if (Block.blocksList[slot.blockId] instanceof BlockContainer) { + TileEntity tile = context.world().getTileEntity(slot.x, slot.y, slot.z); slot.cpt.setInteger("x", slot.x); slot.cpt.setInteger("y", slot.y); @@ -145,7 +146,7 @@ public class BptBlock { if (tile != null) { tile.readFromNBT(slot.cpt); } - } + }*/ } /** @@ -162,8 +163,8 @@ public class BptBlock { * By default, if the block is a BlockContainer, tile information will be to save / load the block. */ public void initializeFromWorld(BptSlotInfo slot, IBptContext context, int x, int y, int z) { - if (Block.blocksList[slot.blockId] instanceof BlockContainer) { - TileEntity tile = context.world().getBlockTileEntity(x, y, z); + /*if (Block.blocksList[slot.blockId] instanceof BlockContainer) { + TileEntity tile = context.world().getTileEntity(x, y, z); if (tile != null) { tile.writeToNBT(slot.cpt); @@ -176,7 +177,7 @@ public class BptBlock { if (req != null) { slot.storedRequirements.addAll(req); } - } + }*/ } /** @@ -194,7 +195,7 @@ public class BptBlock { public BlockSignature getSignature(Block block) { BlockSignature sig = new BlockSignature(); - if (block.blockID > BuildCraftAPI.LAST_ORIGINAL_BLOCK) { + /*if (block.blockID > BuildCraftAPI.LAST_ORIGINAL_BLOCK) { sig.blockClassName = block.getClass().getSimpleName(); if (block instanceof BlockContainer) { @@ -205,7 +206,7 @@ public class BptBlock { sig.tileClassName = tile.getClass().getSimpleName(); } } - } + }*/ sig.blockName = block.getUnlocalizedName(); sig.replaceNullWithStar(); diff --git a/common/buildcraft/api/blueprints/BptBlockUtils.java b/common/buildcraft/api/blueprints/BptBlockUtils.java index a46d9b12..42d41749 100644 --- a/common/buildcraft/api/blueprints/BptBlockUtils.java +++ b/common/buildcraft/api/blueprints/BptBlockUtils.java @@ -55,11 +55,11 @@ public class BptBlockUtils { ItemStack stacks[] = new ItemStack[list.tagCount()]; for (int i = 0; i < list.tagCount(); ++i) { - ItemStack stack = ItemStack.loadItemStackFromNBT((NBTTagCompound) list.tagAt(i)); + //ItemStack stack = ItemStack.loadItemStackFromNBT((NBTTagCompound) list.tagAt(i)); - if (stack != null && stack.itemID != 0 && stack.stackSize > 0) { - stacks[i] = context.mapItemStack(stack); - } + //if (stack != null && stack.itemID != 0 && stack.stackSize > 0) { + // stacks[i] = context.mapItemStack(stack); + //} } return stacks; @@ -75,7 +75,7 @@ public class BptBlockUtils { if (stack != null && stack.stackSize != 0) { stack.writeToNBT(cpt); - context.storeId(stack.itemID); + //context.storeId(stack.itemID); } } diff --git a/common/buildcraft/api/blueprints/BptSlotInfo.java b/common/buildcraft/api/blueprints/BptSlotInfo.java index 799a3b4f..5c76c905 100644 --- a/common/buildcraft/api/blueprints/BptSlotInfo.java +++ b/common/buildcraft/api/blueprints/BptSlotInfo.java @@ -10,6 +10,8 @@ package buildcraft.api.blueprints; import java.util.LinkedList; + +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/common/buildcraft/api/bptblocks/BptBlockBed.java b/common/buildcraft/api/bptblocks/BptBlockBed.java index e2dae05c..3882abf8 100644 --- a/common/buildcraft/api/bptblocks/BptBlockBed.java +++ b/common/buildcraft/api/bptblocks/BptBlockBed.java @@ -12,7 +12,10 @@ package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.IBptContext; + import java.util.LinkedList; + +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -26,7 +29,7 @@ public class BptBlockBed extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { if ((slot.meta & 8) == 0) { - requirements.add(new ItemStack(Item.bed)); + requirements.add(new ItemStack(Items.bed)); } } @@ -56,7 +59,7 @@ public class BptBlockBed extends BptBlock { if ((slot.meta & 8) != 0) return; - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.block, slot.meta,1); int x2 = slot.x; int z2 = slot.z; @@ -76,7 +79,7 @@ public class BptBlockBed extends BptBlock { break; } - context.world().setBlock(x2, slot.y, z2, slot.blockId, slot.meta + 8,1); + //context.world().setBlock(x2, slot.y, z2, slot.block, slot.meta + 8,1); } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockDelegate.java b/common/buildcraft/api/bptblocks/BptBlockDelegate.java index 035dc556..bc7b9ccb 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDelegate.java +++ b/common/buildcraft/api/bptblocks/BptBlockDelegate.java @@ -32,11 +32,11 @@ public class BptBlockDelegate extends BptBlock { BptSlotInfo newSlot = slot.clone(); slot.blockId = delegateTo; - if (BlueprintManager.blockBptProps[delegateTo] != null) { - BlueprintManager.blockBptProps[delegateTo].addRequirements(newSlot, context, requirements); - } else { - super.addRequirements(newSlot, context, requirements); - } + //if (BlueprintManager.blockBptProps[delegateTo] != null) { + // BlueprintManager.blockBptProps[delegateTo].addRequirements(newSlot, context, requirements); + //} else { + // super.addRequirements(newSlot, context, requirements); + //} } @Override @@ -44,10 +44,12 @@ public class BptBlockDelegate extends BptBlock { BptSlotInfo newSlot = slot.clone(); slot.blockId = delegateTo; - if (BlueprintManager.blockBptProps[delegateTo] != null) - return BlueprintManager.blockBptProps[delegateTo].isValid(newSlot, context); - else - return super.isValid(newSlot, context); + //if (BlueprintManager.blockBptProps[delegateTo] != null) + // return BlueprintManager.blockBptProps[delegateTo].isValid(newSlot, context); + //else + // return super.isValid(newSlot, context); + + return false; } @Override @@ -55,11 +57,11 @@ public class BptBlockDelegate extends BptBlock { BptSlotInfo newSlot = slot.clone(); slot.blockId = delegateTo; - if (BlueprintManager.blockBptProps[delegateTo] != null) { - BlueprintManager.blockBptProps[delegateTo].rotateLeft(newSlot, context); - } else { - super.rotateLeft(newSlot, context); - } + //if (BlueprintManager.blockBptProps[delegateTo] != null) { + // BlueprintManager.blockBptProps[delegateTo].rotateLeft(newSlot, context); + //} else { + // super.rotateLeft(newSlot, context); + //} } } diff --git a/common/buildcraft/api/bptblocks/BptBlockDirt.java b/common/buildcraft/api/bptblocks/BptBlockDirt.java index 365cbc45..031acf8e 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDirt.java +++ b/common/buildcraft/api/bptblocks/BptBlockDirt.java @@ -25,18 +25,19 @@ public class BptBlockDirt extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(Block.dirt)); + //requirements.add(new ItemStack(Block.dirt)); } @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - context.world().setBlock(slot.x, slot.y, slot.z, Block.dirt.blockID, slot.meta,1); + //context.world().setBlock(slot.x, slot.y, slot.z, Block.dirt.blockID, slot.meta,1); } @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - int id = context.world().getBlockId(slot.x, slot.y, slot.z); + //int id = context.world().getBlockId(slot.x, slot.y, slot.z); - return id == Block.dirt.blockID || id == Block.grass.blockID || id == Block.tilledField.blockID; + //return id == Block.dirt.blockID || id == Block.grass.blockID || id == Block.tilledField.blockID; + return false; } } diff --git a/common/buildcraft/api/bptblocks/BptBlockDoor.java b/common/buildcraft/api/bptblocks/BptBlockDoor.java index 196e83b3..26453308 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDoor.java +++ b/common/buildcraft/api/bptblocks/BptBlockDoor.java @@ -61,8 +61,8 @@ public class BptBlockDoor extends BptBlock { @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); - context.world().setBlock(slot.x, slot.y + 1, slot.z, slot.blockId, slot.meta + 8,1); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); + //context.world().setBlock(slot.x, slot.y + 1, slot.z, slot.blockId, slot.meta + 8,1); context.world().setBlockMetadataWithNotify(slot.x, slot.y + 1, slot.z, slot.meta + 8,1); context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,1); diff --git a/common/buildcraft/api/bptblocks/BptBlockFluid.java b/common/buildcraft/api/bptblocks/BptBlockFluid.java index 1769c394..d360b7f6 100644 --- a/common/buildcraft/api/bptblocks/BptBlockFluid.java +++ b/common/buildcraft/api/bptblocks/BptBlockFluid.java @@ -35,9 +35,9 @@ public class BptBlockFluid extends BptBlock { @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - if (slot.meta == 0) - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z) && context.world().getBlockMetadata(slot.x, slot.y, slot.z) == 0; - else + //if (slot.meta == 0) + // return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z) && context.world().getBlockMetadata(slot.x, slot.y, slot.z) == 0; + //else return true; } @@ -53,9 +53,9 @@ public class BptBlockFluid extends BptBlock { @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - if (slot.meta == 0) { - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, 0,1); - } + //if (slot.meta == 0) { + // context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, 0,1); + //} } } diff --git a/common/buildcraft/api/bptblocks/BptBlockIgnore.java b/common/buildcraft/api/bptblocks/BptBlockIgnore.java index 12a058bc..ab3143c3 100644 --- a/common/buildcraft/api/bptblocks/BptBlockIgnore.java +++ b/common/buildcraft/api/bptblocks/BptBlockIgnore.java @@ -24,7 +24,7 @@ public class BptBlockIgnore extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 0, 0)); + //requirements.add(new ItemStack(slot.blockId, 0, 0)); } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java b/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java index 7f39f637..2d58e2f7 100644 --- a/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java +++ b/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java @@ -24,11 +24,12 @@ public class BptBlockIgnoreMeta extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + //return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + return false; } } diff --git a/common/buildcraft/api/bptblocks/BptBlockInventory.java b/common/buildcraft/api/bptblocks/BptBlockInventory.java index 0cebe58f..1fd6c05f 100644 --- a/common/buildcraft/api/bptblocks/BptBlockInventory.java +++ b/common/buildcraft/api/bptblocks/BptBlockInventory.java @@ -17,7 +17,7 @@ public class BptBlockInventory extends BptBlock { public void buildBlock(BptSlotInfo slot, IBptContext context) { super.buildBlock(slot, context); - IInventory inv = (IInventory) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + IInventory inv = (IInventory) context.world().getTileEntity(slot.x, slot.y, slot.z); for (int i = 0; i < inv.getSizeInventory(); ++i) { inv.setInventorySlotContents(i, null); diff --git a/common/buildcraft/api/bptblocks/BptBlockLever.java b/common/buildcraft/api/bptblocks/BptBlockLever.java index b9a8e1c4..4eda6cde 100644 --- a/common/buildcraft/api/bptblocks/BptBlockLever.java +++ b/common/buildcraft/api/bptblocks/BptBlockLever.java @@ -23,7 +23,7 @@ public class BptBlockLever extends BptBlockWallSide { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockPiston.java b/common/buildcraft/api/bptblocks/BptBlockPiston.java index b12693bd..61472b82 100644 --- a/common/buildcraft/api/bptblocks/BptBlockPiston.java +++ b/common/buildcraft/api/bptblocks/BptBlockPiston.java @@ -23,7 +23,7 @@ public class BptBlockPiston extends BptBlockRotateMeta { public void buildBlock(BptSlotInfo slot, IBptContext context) { int meta = slot.meta & 7; - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, meta,1); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, meta,1); } } diff --git a/common/buildcraft/api/bptblocks/BptBlockPumpkin.java b/common/buildcraft/api/bptblocks/BptBlockPumpkin.java index 16049346..a1f88fb0 100644 --- a/common/buildcraft/api/bptblocks/BptBlockPumpkin.java +++ b/common/buildcraft/api/bptblocks/BptBlockPumpkin.java @@ -24,12 +24,13 @@ public class BptBlockPumpkin extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + //return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + return false; } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java b/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java index 8ac4f023..edf5ed69 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java +++ b/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java @@ -25,7 +25,7 @@ public class BptBlockRedstoneRepeater extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(Item.redstoneRepeater)); + //requirements.add(new ItemStack(Item.redstoneRepeater)); } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java b/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java index 6fcc30a8..87662eee 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java +++ b/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java @@ -16,7 +16,7 @@ public class BptBlockRotateInventory extends BptBlockRotateMeta { public void buildBlock(BptSlotInfo slot, IBptContext context) { super.buildBlock(slot, context); - IInventory inv = (IInventory) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + IInventory inv = (IInventory) context.world().getTileEntity(slot.x, slot.y, slot.z); for (int i = 0; i < inv.getSizeInventory(); ++i) { inv.setInventorySlotContents(i, null); diff --git a/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java b/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java index 4352b660..1864df61 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java +++ b/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java @@ -43,12 +43,13 @@ public class BptBlockRotateMeta extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + //return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + return false; } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockSign.java b/common/buildcraft/api/bptblocks/BptBlockSign.java index f7bd1338..311e1c4b 100644 --- a/common/buildcraft/api/bptblocks/BptBlockSign.java +++ b/common/buildcraft/api/bptblocks/BptBlockSign.java @@ -31,7 +31,7 @@ public class BptBlockSign extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(Item.sign)); + //requirements.add(new ItemStack(Item.sign)); } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockStairs.java b/common/buildcraft/api/bptblocks/BptBlockStairs.java index 4dc061a4..20ff2b28 100644 --- a/common/buildcraft/api/bptblocks/BptBlockStairs.java +++ b/common/buildcraft/api/bptblocks/BptBlockStairs.java @@ -24,12 +24,13 @@ public class BptBlockStairs extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { - return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + //return slot.blockId == context.world().getBlockId(slot.x, slot.y, slot.z); + return false; } @Override diff --git a/common/buildcraft/api/bptblocks/BptBlockWallSide.java b/common/buildcraft/api/bptblocks/BptBlockWallSide.java index 74ff3f0f..f401d441 100644 --- a/common/buildcraft/api/bptblocks/BptBlockWallSide.java +++ b/common/buildcraft/api/bptblocks/BptBlockWallSide.java @@ -24,7 +24,7 @@ public class BptBlockWallSide extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - requirements.add(new ItemStack(slot.blockId, 1, 0)); + //requirements.add(new ItemStack(slot.blockId, 1, 0)); } @Override diff --git a/common/buildcraft/api/core/StackWrapper.java b/common/buildcraft/api/core/StackWrapper.java index f46652c4..040eff09 100644 --- a/common/buildcraft/api/core/StackWrapper.java +++ b/common/buildcraft/api/core/StackWrapper.java @@ -39,7 +39,7 @@ public class StackWrapper { if (getClass() != obj.getClass()) return false; final StackWrapper other = (StackWrapper) obj; - if (stack.itemID != other.stack.itemID) + if (stack.getItem() != other.stack.getItem()) return false; if (stack.getHasSubtypes() && stack.getItemDamage() != other.stack.getItemDamage()) return false; diff --git a/common/buildcraft/api/fuels/IronEngineCoolant.java b/common/buildcraft/api/fuels/IronEngineCoolant.java index 50c2097c..1ae04392 100644 --- a/common/buildcraft/api/fuels/IronEngineCoolant.java +++ b/common/buildcraft/api/fuels/IronEngineCoolant.java @@ -8,8 +8,11 @@ package buildcraft.api.fuels; import buildcraft.api.core.StackWrapper; + import java.util.HashMap; import java.util.Map; + +import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; @@ -60,7 +63,7 @@ public final class IronEngineCoolant { * @param coolant */ public static void addCoolant(final ItemStack stack, final FluidStack coolant) { - if (stack != null && Item.itemsList[stack.itemID] != null && coolant != null) { + if (stack != null && stack.getItem() != null && coolant != null) { solidCoolants.put(new StackWrapper(stack), coolant); } } @@ -73,8 +76,12 @@ public final class IronEngineCoolant { * @param stack * @param coolant */ - public static void addCoolant(final int itemId, final int metadata, final FluidStack coolant) { - addCoolant(new ItemStack(itemId, 1, metadata), coolant); + public static void addCoolant(final Item item, final int metadata, final FluidStack coolant) { + addCoolant(new ItemStack(item, 1, metadata), coolant); + } + + public static void addCoolant(final Block block, final int metadata, final FluidStack coolant) { + addCoolant(new ItemStack(block, 1, metadata), coolant); } public static boolean isCoolant(Fluid fluid) { diff --git a/common/buildcraft/api/gates/TriggerParameter.java b/common/buildcraft/api/gates/TriggerParameter.java index 6295d1cd..c0652962 100644 --- a/common/buildcraft/api/gates/TriggerParameter.java +++ b/common/buildcraft/api/gates/TriggerParameter.java @@ -49,7 +49,7 @@ public class TriggerParameter implements ITriggerParameter { if (stack != null) { NBTTagCompound tagCompound = new NBTTagCompound(); stack.writeToNBT(tagCompound); - compound.setCompoundTag("stack", tagCompound); + compound.setTag("stack", tagCompound); } } diff --git a/common/buildcraft/api/power/PowerHandler.java b/common/buildcraft/api/power/PowerHandler.java index 13da19f0..46a090ab 100644 --- a/common/buildcraft/api/power/PowerHandler.java +++ b/common/buildcraft/api/power/PowerHandler.java @@ -335,7 +335,7 @@ public final class PowerHandler { public void writeToNBT(NBTTagCompound data, String tag) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setDouble("energyStored", energyStored); - data.setCompoundTag(tag, nbt); + data.setTag(tag, nbt); } public final class PowerReceiver { diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index 766c7b7c..6bdc0df9 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -17,7 +17,10 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -39,14 +42,14 @@ public class BlockArchitect extends BlockContainer { IIcon blockTextureTopNeg; IIcon blockTextureTopArchitect; - public BlockArchitect(int i) { - super(i, Material.iron); + public BlockArchitect() { + super(Material.iron); setHardness(5F); //setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileArchitect(); } @@ -92,10 +95,10 @@ public class BlockArchitect extends BlockContainer { } @Override - public void breakBlock(World world, int i, int j, int k, int par5, int par6) { + public void breakBlock(World world, int i, int j, int k, Block block, int par6) { Utils.preDestroyBlock(world, i, j, k); - super.breakBlock(world, i, j, k, par5, par6); + super.breakBlock(world, i, j, k, block, par6); } @Override @@ -139,7 +142,7 @@ public class BlockArchitect extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { blockTextureSides = par1IconRegister.registerIcon("buildcraft:architect_sides"); blockTextureTopNeg = par1IconRegister.registerIcon("buildcraft:architect_top_neg"); diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 4cf71c99..89f97b47 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -30,8 +30,8 @@ public class BlockBlueprintLibrary extends BlockContainer { private IIcon textureTop; private IIcon textureSide; - public BlockBlueprintLibrary(int i) { - super(i, Material.wood); + public BlockBlueprintLibrary() { + super(Material.wood); //setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setHardness(5F); } @@ -44,7 +44,7 @@ public class BlockBlueprintLibrary extends BlockContainer { if (entityplayer.isSneaking()) return false; - TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getBlockTileEntity(i, j, k); + TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); if (!tile.locked || entityplayer.username.equals(tile.owner)) if (!CoreProxy.proxy.isRenderWorld(world)) { @@ -55,7 +55,7 @@ public class BlockBlueprintLibrary extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileBlueprintLibrary(); } @@ -73,7 +73,7 @@ public class BlockBlueprintLibrary extends BlockContainer { @Override public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) { if (CoreProxy.proxy.isSimulating(world) && entityliving instanceof EntityPlayer) { - TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getBlockTileEntity(i, j, k); + TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); tile.owner = ((EntityPlayer) entityliving).username; } } @@ -86,7 +86,7 @@ public class BlockBlueprintLibrary extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:library_topbottom"); textureSide = par1IconRegister.registerIcon("buildcraft:library_side"); diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index 748840b1..6d3940ae 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -15,7 +15,10 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -34,14 +37,14 @@ public class BlockBuilder extends BlockContainer { IIcon blockTextureSide; IIcon blockTextureFront; - public BlockBuilder(int i) { - super(i, Material.iron); + public BlockBuilder() { + super(Material.iron); setHardness(5F); setCreativeTab(null); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileBuilder(); } @@ -111,9 +114,9 @@ public class BlockBuilder extends BlockContainer { } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -124,7 +127,7 @@ public class BlockBuilder extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { blockTextureTop = par1IconRegister.registerIcon("buildcraft:builder_top"); blockTextureSide = par1IconRegister.registerIcon("buildcraft:builder_side"); blockTextureFront = par1IconRegister.registerIcon("buildcraft:builder_front"); diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index b9e4ae0d..82c3be42 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -17,7 +17,10 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -35,8 +38,8 @@ public class BlockFiller extends BlockContainer { IIcon textureTopOff; public IFillerPattern currentPattern; - public BlockFiller(int i) { - super(i, Material.iron); + public BlockFiller() { + super(Material.iron); setHardness(5F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); @@ -59,7 +62,7 @@ public class BlockFiller extends BlockContainer { @Override public IIcon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) { int m = world.getBlockMetadata(x, y, z); - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile != null && tile instanceof TileFiller) { TileFiller filler = (TileFiller) tile; @@ -86,14 +89,14 @@ public class BlockFiller extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileFiller(); } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -104,7 +107,7 @@ public class BlockFiller extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureTopOn = par1IconRegister.registerIcon("buildcraft:blockFillerTopOn"); textureTopOff = par1IconRegister.registerIcon("buildcraft:blockFillerTopOff"); textureSides = par1IconRegister.registerIcon("buildcraft:blockFillerSides"); diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index ba0fe56f..3076165c 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -13,7 +13,10 @@ import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -27,8 +30,8 @@ import net.minecraftforge.common.util.ForgeDirection; public class BlockMarker extends BlockContainer { - public BlockMarker(int i) { - super(i, Material.circuits); + public BlockMarker() { + super(Material.circuits); setLightValue(0.5F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); @@ -80,20 +83,20 @@ public class BlockMarker extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileMarker(); } @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - ((TileMarker) world.getBlockTileEntity(i, j, k)).tryConnection(); + ((TileMarker) world.getTileEntity(i, j, k)).tryConnection(); return true; } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override @@ -112,8 +115,8 @@ public class BlockMarker extends BlockContainer { } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, int blockId) { - ((TileMarker) world.getBlockTileEntity(x, y, z)).updateSignals(); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + ((TileMarker) world.getTileEntity(x, y, z)).updateSignals(); dropTorchIfCantStay(world, x, y, z); } @@ -138,7 +141,7 @@ public class BlockMarker extends BlockContainer { int meta = world.getBlockMetadata(x, y, z); if (!canPlaceBlockOnSide(world, x, y, z, meta)) { dropBlockAsItem(world, x, y, z, BuildCraftBuilders.markerBlock.blockID, 0); - world.setBlock(x, y, z, 0); + world.setBlock(x, y, z, null); } } @@ -150,7 +153,7 @@ public class BlockMarker extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("buildcraft:blockMarker"); } } diff --git a/common/buildcraft/builders/BlockPathMarker.java b/common/buildcraft/builders/BlockPathMarker.java index 60315d93..5c3a341b 100644 --- a/common/buildcraft/builders/BlockPathMarker.java +++ b/common/buildcraft/builders/BlockPathMarker.java @@ -12,7 +12,10 @@ package buildcraft.builders; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -24,25 +27,24 @@ public class BlockPathMarker extends BlockMarker { private IIcon activeMarker; - public BlockPathMarker(int i) { - super(i); + public BlockPathMarker() { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TilePathMarker(); } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @SuppressWarnings({ "all" }) // @Override (client only) public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { - TilePathMarker marker = (TilePathMarker) iblockaccess.getBlockTileEntity(i, j, k); + TilePathMarker marker = (TilePathMarker) iblockaccess.getTileEntity(i, j, k); if (l == 1 || (marker != null && marker.tryingToConnect)) return activeMarker; @@ -58,7 +60,7 @@ public class BlockPathMarker extends BlockMarker { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("buildcraft:blockPathMarker"); activeMarker = par1IconRegister.registerIcon("buildcraft:blockPathMarkerActive"); diff --git a/common/buildcraft/builders/BuildersProxy.java b/common/buildcraft/builders/BuildersProxy.java index 4d0166dd..66146e09 100644 --- a/common/buildcraft/builders/BuildersProxy.java +++ b/common/buildcraft/builders/BuildersProxy.java @@ -15,7 +15,7 @@ import net.minecraft.world.World; public class BuildersProxy { public static boolean canPlaceTorch(World world, int i, int j, int k) { - Block block = Block.blocksList[world.getBlockId(i, j, k)]; + Block block = world.getBlock(i, j, k); if (block == null || !block.renderAsNormalBlock()) return false; diff --git a/common/buildcraft/builders/GuiHandler.java b/common/buildcraft/builders/GuiHandler.java index 7bd4a078..b6727c14 100644 --- a/common/buildcraft/builders/GuiHandler.java +++ b/common/buildcraft/builders/GuiHandler.java @@ -22,7 +22,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { @@ -58,7 +58,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { diff --git a/common/buildcraft/builders/ItemBptBase.java b/common/buildcraft/builders/ItemBptBase.java index 8babfafd..f2069467 100644 --- a/common/buildcraft/builders/ItemBptBase.java +++ b/common/buildcraft/builders/ItemBptBase.java @@ -23,8 +23,8 @@ import net.minecraft.world.World; public abstract class ItemBptBase extends ItemBuildCraft { - public ItemBptBase(int i) { - super(i); + public ItemBptBase() { + super(); maxStackSize = 1; setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); diff --git a/common/buildcraft/builders/ItemBptBluePrint.java b/common/buildcraft/builders/ItemBptBluePrint.java index 46a9645d..2c5ea4e5 100644 --- a/common/buildcraft/builders/ItemBptBluePrint.java +++ b/common/buildcraft/builders/ItemBptBluePrint.java @@ -19,8 +19,8 @@ public class ItemBptBluePrint extends ItemBptBase { private IIcon cleanBlueprint; private IIcon usedBlueprint; - public ItemBptBluePrint(int i) { - super(i); + public ItemBptBluePrint() { + super(); setCreativeTab(null); } diff --git a/common/buildcraft/builders/ItemBptTemplate.java b/common/buildcraft/builders/ItemBptTemplate.java index dccb3c4e..0a655e4e 100644 --- a/common/buildcraft/builders/ItemBptTemplate.java +++ b/common/buildcraft/builders/ItemBptTemplate.java @@ -7,8 +7,8 @@ import net.minecraft.util.IIcon; public class ItemBptTemplate extends ItemBptBase { private IIcon usedTemplate; - public ItemBptTemplate(int i) { - super(i); + public ItemBptTemplate() { + super(); } @Override diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 1be244bc..67ed68ec 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -228,7 +228,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { } @Override - public String getInvName() { + public String getInventoryName() { return "Template"; } @@ -245,7 +245,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override @@ -360,10 +360,15 @@ public class TileArchitect extends TileBuildCraft implements IInventory { } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { + } + + @Override + public boolean hasCustomInventoryName() { + return false; } } diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index 01af4e23..222eae5c 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -219,7 +219,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { } @Override - public String getInvName() { + public String getInventoryName() { return ""; } @@ -236,15 +236,15 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override @@ -289,4 +289,9 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { setInventorySlotContents(2, null); } } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 51a48c9a..60e664c7 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -183,7 +183,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP for (int x = xCoord - 1; x <= xCoord + 1; ++x) { for (int y = yCoord - 1; y <= yCoord + 1; ++y) { for (int z = zCoord - 1; z <= zCoord + 1; ++z) { - TileEntity tile = worldObj.getBlockTileEntity(x, y, z); + TileEntity tile = worldObj.getTileEntity(x, y, z); if (tile instanceof TilePathMarker) { path = ((TilePathMarker) tile).getPath(); @@ -425,7 +425,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP } @Override - public String getInvName() { + public String getInventoryName() { return "Builder"; } @@ -441,7 +441,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override @@ -542,11 +542,11 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } // @Override @@ -624,4 +624,9 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP public boolean allowAction(IAction action) { return false; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index 24877e0c..2e0e7817 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -167,7 +167,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece } @Override - public String getInvName() { + public String getInventoryName() { return "Filler"; } @@ -214,7 +214,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - if (worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this) + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) return false; return entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64D; } @@ -296,11 +296,11 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override @@ -336,4 +336,9 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece public void readGuiData(DataInputStream data, EntityPlayer player) throws IOException { setPattern(FillerManager.registry.getPattern(data.readUTF())); } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index fe952079..7799575c 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -19,6 +19,7 @@ import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.TileNetworkData; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; +import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -54,7 +55,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { return null; if (marker == null) { - marker = (TileMarker) world.getBlockTileEntity(x, y, z); + marker = (TileMarker) world.getTileEntity(x, y, z); } return marker; @@ -145,7 +146,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { for (int i = 0; i < 3; ++i) { if (initVect[i] != null) { - linkTo((TileMarker) worldObj.getBlockTileEntity((int) initVect[i].x, (int) initVect[i].y, (int) initVect[i].z), i); + linkTo((TileMarker) worldObj.getTileEntity((int) initVect[i].x, (int) initVect[i].y, (int) initVect[i].z), i); } } } @@ -165,8 +166,6 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { } void setVect(int n) { - int markerId = BuildCraftBuilders.markerBlock.blockID; - int[] coords = new int[3]; coords[0] = xCoord; @@ -177,10 +176,10 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { for (int j = 1; j < maxSize; ++j) { coords[n] += j; - int blockId = worldObj.getBlockId(coords[0], coords[1], coords[2]); + Block block = worldObj.getBlock(coords[0], coords[1], coords[2]); - if (blockId == markerId) { - TileMarker marker = (TileMarker) worldObj.getBlockTileEntity(coords[0], coords[1], coords[2]); + if (block == BuildCraftBuilders.markerBlock) { + TileMarker marker = (TileMarker) worldObj.getTileEntity(coords[0], coords[1], coords[2]); if (linkTo(marker, n)) { break; @@ -190,10 +189,10 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { coords[n] -= j; coords[n] -= j; - blockId = worldObj.getBlockId(coords[0], coords[1], coords[2]); + block = worldObj.getBlock(coords[0], coords[1], coords[2]); - if (blockId == markerId) { - TileMarker marker = (TileMarker) worldObj.getBlockTileEntity(coords[0], coords[1], coords[2]); + if (block == BuildCraftBuilders.markerBlock) { + TileMarker marker = (TileMarker) worldObj.getTileEntity(coords[0], coords[1], coords[2]); if (linkTo(marker, n)) { break; @@ -405,13 +404,13 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { for (TileWrapper m : o.vect.clone()) { if (m.isSet()) { - worldObj.setBlock(m.x, m.y, m.z, 0); + worldObj.setBlock(m.x, m.y, m.z, null); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, m.x, m.y, m.z, BuildCraftBuilders.markerBlock.blockID, 0); } } - worldObj.setBlock(o.vectO.x, o.vectO.y, o.vectO.z, 0); + worldObj.setBlock(o.vectO.x, o.vectO.y, o.vectO.z, null); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, o.vectO.x, o.vectO.y, o.vectO.z, BuildCraftBuilders.markerBlock.blockID, 0); } diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index 7ebde01f..f891584e 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -72,7 +72,7 @@ public class TilePathMarker extends TileMarker { double nearestDistance = 0, distance; // The initialization of nearestDistance is only to make the compiler shut up for (TilePathMarker t : availableMarkers) { - if (t == this || t == this.links[0] || t == this.links[1] || t.worldObj.provider.dimensionId != this.worldObj.provider.dimensionId) { + if (t == this || t == this.links[0] || t == this.links[1] || t.getWorldObj().provider.dimensionId != this.getWorldObj().provider.dimensionId) { continue; } @@ -173,7 +173,7 @@ public class TilePathMarker extends TileMarker { } if (loadLink0) { - TileEntity e0 = worldObj.getBlockTileEntity(x0, y0, z0); + TileEntity e0 = worldObj.getTileEntity(x0, y0, z0); if (links[0] != e0 && links[1] != e0 && e0 instanceof TilePathMarker) { createLaserAndConnect((TilePathMarker) e0); @@ -183,7 +183,7 @@ public class TilePathMarker extends TileMarker { } if (loadLink1) { - TileEntity e1 = worldObj.getBlockTileEntity(x1, y1, z1); + TileEntity e1 = worldObj.getTileEntity(x1, y1, z1); if (links[0] != e1 && links[1] != e1 && e1 instanceof TilePathMarker) { createLaserAndConnect((TilePathMarker) e1); @@ -259,7 +259,7 @@ public class TilePathMarker extends TileMarker { public static void clearAvailableMarkersList(World w) { for (Iterator it = availableMarkers.iterator(); it.hasNext();) { TilePathMarker t = it.next(); - if (t.worldObj.provider.dimensionId != w.provider.dimensionId) { + if (t.getWorldObj().provider.dimensionId != w.provider.dimensionId) { it.remove(); } } diff --git a/common/buildcraft/builders/filler/pattern/FillerPattern.java b/common/buildcraft/builders/filler/pattern/FillerPattern.java index c436d0b6..a69a6da8 100644 --- a/common/buildcraft/builders/filler/pattern/FillerPattern.java +++ b/common/buildcraft/builders/filler/pattern/FillerPattern.java @@ -195,7 +195,7 @@ public abstract class FillerPattern implements IFillerPattern { } private static void breakBlock(World world, int x, int y, int z) { - Block block = Block.blocksList[world.getBlockId(x, y, z)]; + Block block = world.getBlock(x, y, z); if (block != null) world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); if (BuildCraftBuilders.fillerDestroy) { diff --git a/common/buildcraft/builders/filler/pattern/PatternBox.java b/common/buildcraft/builders/filler/pattern/PatternBox.java index 44849df8..615466fe 100644 --- a/common/buildcraft/builders/filler/pattern/PatternBox.java +++ b/common/buildcraft/builders/filler/pattern/PatternBox.java @@ -27,22 +27,22 @@ public class PatternBox extends FillerPattern { int yMax = (int) box.pMax().y; int zMax = (int) box.pMax().z; - if (fill(xMin, yMin, zMin, xMax, yMin, zMax, stackToPlace, tile.worldObj)) + if (fill(xMin, yMin, zMin, xMax, yMin, zMax, stackToPlace, tile.getWorldObj())) return false; - if (fill(xMin, yMin, zMin, xMin, yMax, zMax, stackToPlace, tile.worldObj)) + if (fill(xMin, yMin, zMin, xMin, yMax, zMax, stackToPlace, tile.getWorldObj())) return false; - if (fill(xMin, yMin, zMin, xMax, yMax, zMin, stackToPlace, tile.worldObj)) + if (fill(xMin, yMin, zMin, xMax, yMax, zMin, stackToPlace, tile.getWorldObj())) return false; - if (fill(xMax, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.worldObj)) + if (fill(xMax, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.getWorldObj())) return false; - if (fill(xMin, yMin, zMax, xMax, yMax, zMax, stackToPlace, tile.worldObj)) + if (fill(xMin, yMin, zMax, xMax, yMax, zMax, stackToPlace, tile.getWorldObj())) return false; - if (fill(xMin, yMax, zMin, xMax, yMax, zMax, stackToPlace, tile.worldObj)) + if (fill(xMin, yMax, zMin, xMax, yMax, zMax, stackToPlace, tile.getWorldObj())) return false; return true; diff --git a/common/buildcraft/builders/filler/pattern/PatternClear.java b/common/buildcraft/builders/filler/pattern/PatternClear.java index 08f8aa7d..03b33dad 100644 --- a/common/buildcraft/builders/filler/pattern/PatternClear.java +++ b/common/buildcraft/builders/filler/pattern/PatternClear.java @@ -27,6 +27,6 @@ public class PatternClear extends FillerPattern { int yMax = (int) box.pMax().y; int zMax = (int) box.pMax().z; - return !empty(xMin, yMin, zMin, xMax, yMax, zMax, tile.worldObj); + return !empty(xMin, yMin, zMin, xMax, yMax, zMax, tile.getWorldObj()); } } diff --git a/common/buildcraft/builders/filler/pattern/PatternCylinder.java b/common/buildcraft/builders/filler/pattern/PatternCylinder.java index 972e45b9..af6e3a12 100644 --- a/common/buildcraft/builders/filler/pattern/PatternCylinder.java +++ b/common/buildcraft/builders/filler/pattern/PatternCylinder.java @@ -39,7 +39,7 @@ public class PatternCylinder extends FillerPattern { int zRadius = (zMax-zMin)/2; if(xRadius == 0 || zRadius == 0) { - return !fill(xMin, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.worldObj); + return !fill(xMin, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.getWorldObj()); } int dx = xRadius, dz = 0; @@ -52,7 +52,7 @@ public class PatternCylinder extends FillerPattern { int stoppingZ = 0; while(stoppingX >= stoppingZ) { - if(!fillFourColumns(xCenter,zCenter,dx,dz,xFix,zFix,yMin,yMax,stackToPlace,tile.worldObj)) + if(!fillFourColumns(xCenter,zCenter,dx,dz,xFix,zFix,yMin,yMax,stackToPlace,tile.getWorldObj())) return false; ++dz; stoppingZ += twoASquare; @@ -75,7 +75,7 @@ public class PatternCylinder extends FillerPattern { stoppingZ = twoASquare*zRadius; while(stoppingX <= stoppingZ) { - if(!fillFourColumns(xCenter,zCenter,dx,dz,xFix,zFix,yMin,yMax,stackToPlace,tile.worldObj)) + if(!fillFourColumns(xCenter,zCenter,dx,dz,xFix,zFix,yMin,yMax,stackToPlace,tile.getWorldObj())) return false; ++dx; stoppingX += twoBSquare; diff --git a/common/buildcraft/builders/filler/pattern/PatternFill.java b/common/buildcraft/builders/filler/pattern/PatternFill.java index 1ffb51d0..ce27d1df 100644 --- a/common/buildcraft/builders/filler/pattern/PatternFill.java +++ b/common/buildcraft/builders/filler/pattern/PatternFill.java @@ -29,7 +29,7 @@ public class PatternFill extends FillerPattern { int yMax = (int) box.pMax().y; int zMax = (int) box.pMax().z; - return !fill(xMin, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.worldObj); + return !fill(xMin, yMin, zMin, xMax, yMax, zMax, stackToPlace, tile.getWorldObj()); } } diff --git a/common/buildcraft/builders/filler/pattern/PatternFlatten.java b/common/buildcraft/builders/filler/pattern/PatternFlatten.java index fcb662d5..34ab3aba 100644 --- a/common/buildcraft/builders/filler/pattern/PatternFlatten.java +++ b/common/buildcraft/builders/filler/pattern/PatternFlatten.java @@ -27,9 +27,9 @@ public class PatternFlatten extends FillerPattern { int yMax = (int) box.pMax().y; int zMax = (int) box.pMax().z; - if (flatten(xMin, 1, zMin, xMax, yMin - 1, zMax, tile.worldObj, stackToPlace)) { + if (flatten(xMin, 1, zMin, xMax, yMin - 1, zMax, tile.getWorldObj(), stackToPlace)) { return false; } - return !empty(xMin, yMin, zMin, xMax, yMax, zMax, tile.worldObj); + return !empty(xMin, yMin, zMin, xMax, yMax, zMax, tile.getWorldObj()); } } diff --git a/common/buildcraft/builders/filler/pattern/PatternHorizon.java b/common/buildcraft/builders/filler/pattern/PatternHorizon.java index a034e517..f35911ec 100644 --- a/common/buildcraft/builders/filler/pattern/PatternHorizon.java +++ b/common/buildcraft/builders/filler/pattern/PatternHorizon.java @@ -26,9 +26,9 @@ public class PatternHorizon extends FillerPattern { int xMax = (int) box.pMax().x; int zMax = (int) box.pMax().z; - if (stackToPlace != null && flatten(xMin, 1, zMin, xMax, yMin - 1, zMax, tile.worldObj, stackToPlace)) { + if (stackToPlace != null && flatten(xMin, 1, zMin, xMax, yMin - 1, zMax, tile.getWorldObj(), stackToPlace)) { return false; } - return !empty(xMin, yMin, zMin, xMax, tile.worldObj.getActualHeight(), zMax, tile.worldObj); + return !empty(xMin, yMin, zMin, xMax, tile.getWorldObj().getActualHeight(), zMax, tile.getWorldObj()); } } diff --git a/common/buildcraft/builders/filler/pattern/PatternPyramid.java b/common/buildcraft/builders/filler/pattern/PatternPyramid.java index a2a26271..352b93a2 100644 --- a/common/buildcraft/builders/filler/pattern/PatternPyramid.java +++ b/common/buildcraft/builders/filler/pattern/PatternPyramid.java @@ -48,7 +48,7 @@ public class PatternPyramid extends FillerPattern { } while (step <= xSize / 2 && step <= zSize / 2 && height >= yMin && height <= yMax) { - if (fill(xMin + step, height, zMin + step, xMax - step, height, zMax - step, stackToPlace, tile.worldObj)) + if (fill(xMin + step, height, zMin + step, xMax - step, height, zMax - step, stackToPlace, tile.getWorldObj())) return false; step++; diff --git a/common/buildcraft/builders/filler/pattern/PatternStairs.java b/common/buildcraft/builders/filler/pattern/PatternStairs.java index 2a620176..3a1e0c72 100644 --- a/common/buildcraft/builders/filler/pattern/PatternStairs.java +++ b/common/buildcraft/builders/filler/pattern/PatternStairs.java @@ -121,7 +121,7 @@ public class PatternStairs extends FillerPattern { if (kind == 0) { while (x2 - x1 + 1 > 0 && z2 - z1 + 1 > 0 && x2 - x1 < sizeX && z2 - z1 < sizeZ && height >= yMin && height <= yMax) { - if (fill(x1, height, z1, x2, height, z2, stackToPlace, tile.worldObj)) + if (fill(x1, height, z1, x2, height, z2, stackToPlace, tile.getWorldObj())) return false; if (heightStep == 1) { @@ -176,7 +176,7 @@ public class PatternStairs extends FillerPattern { } - if (fill(x1, height, z1, x2, height, z2, stackToPlace, tile.worldObj)) + if (fill(x1, height, z1, x2, height, z2, stackToPlace, tile.getWorldObj())) return false; dimX += stepDiagX; diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index 84eb18c3..f559ab1a 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -55,14 +55,14 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { } private void onArchitectName(EntityPlayer player, PacketUpdate packet) { - TileEntity te = player.worldObj.getBlockTileEntity(packet.posX, packet.posY, packet.posZ); + TileEntity te = player.worldObj.getTileEntity(packet.posX, packet.posY, packet.posZ); if (te instanceof TileArchitect) { ((TileArchitect) te).handleClientInput((char) ((PacketPayloadArrays)packet.payload).intPayload[0]); } } private void onLibraryAction(EntityPlayer player, PacketLibraryAction packet) { - TileEntity te = player.worldObj.getBlockTileEntity(packet.posX, packet.posY, packet.posZ); + TileEntity te = player.worldObj.getTileEntity(packet.posX, packet.posY, packet.posZ); if (te instanceof TileBlueprintLibrary) { TileBlueprintLibrary tbl = (TileBlueprintLibrary) te; switch (packet.actionId) { @@ -84,7 +84,7 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { } private void onLibrarySelect(EntityPlayer player, PacketLibraryAction packet) { - TileEntity te = player.worldObj.getBlockTileEntity(packet.posX, packet.posY, packet.posZ); + TileEntity te = player.worldObj.getTileEntity(packet.posX, packet.posY, packet.posZ); if (te instanceof TileBlueprintLibrary) { TileBlueprintLibrary tbl = (TileBlueprintLibrary) te; int ySlot = packet.actionId; diff --git a/common/buildcraft/core/BlockBuildCraft.java b/common/buildcraft/core/BlockBuildCraft.java index 7540131a..0d780e9e 100644 --- a/common/buildcraft/core/BlockBuildCraft.java +++ b/common/buildcraft/core/BlockBuildCraft.java @@ -1,7 +1,10 @@ package buildcraft.core; import buildcraft.core.utils.Utils; + import java.util.Random; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -15,8 +18,8 @@ public abstract class BlockBuildCraft extends BlockContainer { protected static boolean keepInventory = false; protected final Random rand = new Random(); - protected BlockBuildCraft(int id, Material material) { - super(id, material); + protected BlockBuildCraft(Material material) { + super(material); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); setHardness(5F); } @@ -24,21 +27,21 @@ public abstract class BlockBuildCraft extends BlockContainer { @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) { super.onBlockPlacedBy(world, x, y, z, entity, stack); - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileBuildCraft) { ((TileBuildCraft) tile).onBlockPlacedBy(entity, stack); } } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override public int getLightValue(IBlockAccess world, int x, int y, int z) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof IMachine && ((IMachine) tile).isActive()) return super.getLightValue(world, x, y, z) + 8; return super.getLightValue(world, x, y, z); diff --git a/common/buildcraft/core/BlockIndex.java b/common/buildcraft/core/BlockIndex.java index 551fa6fd..f9097b28 100644 --- a/common/buildcraft/core/BlockIndex.java +++ b/common/buildcraft/core/BlockIndex.java @@ -9,6 +9,7 @@ package buildcraft.core; +import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -67,8 +68,8 @@ public class BlockIndex implements Comparable { c.setInteger("k", z); } - public int getBlockId(World world) { - return world.getBlockId(x, y, z); + public Block getBlock(World world) { + return world.getBlock(x, y, z); } @Override diff --git a/common/buildcraft/core/BlockSpring.java b/common/buildcraft/core/BlockSpring.java index 06dcdc14..e5549834 100644 --- a/common/buildcraft/core/BlockSpring.java +++ b/common/buildcraft/core/BlockSpring.java @@ -2,12 +2,16 @@ package buildcraft.core; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -17,7 +21,7 @@ public class BlockSpring extends Block { public enum EnumSpring { - WATER(5, -1, Block.waterStill), + WATER(5, -1, Blocks.water), OIL(6000, 8, null); // Set in BuildCraftEnergy public static final EnumSpring[] VALUES = values(); public final int tickRate, chance; @@ -38,8 +42,8 @@ public class BlockSpring extends Block { } } - public BlockSpring(int id) { - super(id, Material.rock); + public BlockSpring() { + super(Material.rock); setBlockUnbreakable(); setResistance(6000000.0F); setStepSound(soundStoneFootstep); @@ -49,7 +53,7 @@ public class BlockSpring extends Block { } @Override - public void getSubBlocks(int id, CreativeTabs tab, List list) { + public void getSubBlocks(Item item, CreativeTabs tab, List list) { for (EnumSpring type : EnumSpring.VALUES) { list.add(new ItemStack(this, 1, type.ordinal())); } @@ -73,13 +77,13 @@ public class BlockSpring extends Block { public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); int meta = world.getBlockMetadata(x, y, z); - world.scheduleBlockUpdate(x, y, z, blockID, EnumSpring.fromMeta(meta).tickRate); + world.scheduleBlockUpdate(x, y, z, this, EnumSpring.fromMeta(meta).tickRate); } private void assertSpring(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); EnumSpring spring = EnumSpring.fromMeta(meta); - world.scheduleBlockUpdate(x, y, z, blockID, spring.tickRate); + world.scheduleBlockUpdate(x, y, z, this, spring.tickRate); if (!spring.canGen || spring.liquidBlock == null) { return; } @@ -89,7 +93,7 @@ public class BlockSpring extends Block { if (spring.chance != -1 && rand.nextInt(spring.chance) != 0) { return; } - world.setBlock(x, y + 1, z, spring.liquidBlock.blockID); + world.setBlock(x, y + 1, z, spring.liquidBlock); } // Prevents updates on chunk generation @@ -100,7 +104,7 @@ public class BlockSpring extends Block { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("bedrock"); } } diff --git a/common/buildcraft/core/CreativeTabBuildCraft.java b/common/buildcraft/core/CreativeTabBuildCraft.java index da3c6b07..6b49b115 100644 --- a/common/buildcraft/core/CreativeTabBuildCraft.java +++ b/common/buildcraft/core/CreativeTabBuildCraft.java @@ -3,9 +3,13 @@ package buildcraft.core; import buildcraft.BuildCraftCore; import buildcraft.core.utils.Localization; import buildcraft.transport.ItemFacade; + import java.util.Locale; + import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public enum CreativeTabBuildCraft { @@ -33,7 +37,7 @@ public enum CreativeTabBuildCraft { private ItemStack getItem() { switch (this) { case FACADES: - return ItemFacade.getStack(Block.stoneBrick, 0); + return ItemFacade.getStack(Blocks.brick_block, 0); default: return new ItemStack(BuildCraftCore.diamondGearItem); } @@ -55,5 +59,10 @@ public enum CreativeTabBuildCraft { public String getTranslatedTabLabel() { return translate(); } + + @Override + public Item getTabIconItem() { + return getItem().getItem(); + } } } diff --git a/common/buildcraft/core/ITileBufferHolder.java b/common/buildcraft/core/ITileBufferHolder.java index 7af1f4c8..4cc31d63 100644 --- a/common/buildcraft/core/ITileBufferHolder.java +++ b/common/buildcraft/core/ITileBufferHolder.java @@ -9,6 +9,7 @@ package buildcraft.core; +import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -16,9 +17,9 @@ public interface ITileBufferHolder { public void blockRemoved(ForgeDirection from); - public void blockCreated(ForgeDirection from, int blockID, TileEntity tile); + public void blockCreated(ForgeDirection from, Block block, TileEntity tile); - public int getBlockId(ForgeDirection to); + public Block getBlock(ForgeDirection to); public TileEntity getTile(ForgeDirection to); diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index cbf403f3..b8c3e8f0 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -20,8 +20,8 @@ public class ItemBuildCraft extends Item { private String iconName; private boolean passSneakClick = false; - public ItemBuildCraft(int i) { - super(i); + public ItemBuildCraft() { + super(); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); } @@ -31,9 +31,9 @@ public class ItemBuildCraft extends Item { } @Override - public Item setUnlocalizedName(String par1Str) { + public Item setBlockName(String par1Str) { iconName = par1Str; - return super.setUnlocalizedName(par1Str); + return super.setBlockName(par1Str); } @Override diff --git a/common/buildcraft/core/ItemWrench.java b/common/buildcraft/core/ItemWrench.java index 69356d42..07411372 100644 --- a/common/buildcraft/core/ItemWrench.java +++ b/common/buildcraft/core/ItemWrench.java @@ -16,8 +16,8 @@ public class ItemWrench extends ItemBuildCraft implements IToolWrench { private final Set> shiftRotations = new HashSet>(); - public ItemWrench(int i) { - super(i); + public ItemWrench() { + super(); setFull3D(); setMaxStackSize(1); shiftRotations.add(BlockLever.class); diff --git a/common/buildcraft/core/TileBuffer.java b/common/buildcraft/core/TileBuffer.java index 63e3bc9f..b937b39c 100644 --- a/common/buildcraft/core/TileBuffer.java +++ b/common/buildcraft/core/TileBuffer.java @@ -15,9 +15,9 @@ import net.minecraftforge.common.util.ForgeDirection; public final class TileBuffer { - private int blockID = 0; + private Block block = null; private TileEntity tile; - private final SafeTimeTracker tracker = new SafeTimeTracker(); + private final SafeTimeTracker tracker = new SafeTimeTracker(20); private final World world; final int x, y, z; private final boolean loadUnloaded; @@ -34,43 +34,42 @@ public final class TileBuffer { public final void refresh() { tile = null; - blockID = 0; + block = null; if (!loadUnloaded && !world.blockExists(x, y, z)) { return; } - blockID = world.getBlockId(this.x, this.y, this.z); + block = world.getBlock(this.x, this.y, this.z); - Block block = Block.blocksList[blockID]; if (block != null && block.hasTileEntity(world.getBlockMetadata(this.x, this.y, this.z))) { - tile = world.getBlockTileEntity(this.x, this.y, this.z); + tile = world.getTileEntity(this.x, this.y, this.z); } } - public void set(int blockID, TileEntity tile) { - this.blockID = blockID; + public void set(Block block, TileEntity tile) { + this.block = block; this.tile = tile; tracker.markTime(world); } - public int getBlockID() { + public Block getBlock() { if (tile != null && !tile.isInvalid()) - return blockID; + return block; - if (tracker.markTimeIfDelay(world, 20)) { + if (tracker.markTimeIfDelay(world)) { refresh(); if (tile != null && !tile.isInvalid()) - return blockID; + return block; } - return 0; + return null; } public TileEntity getTile() { if (tile != null && !tile.isInvalid()) return tile; - if (tracker.markTimeIfDelay(world, 20)) { + if (tracker.markTimeIfDelay(world)) { refresh(); if (tile != null && !tile.isInvalid()) diff --git a/common/buildcraft/core/blueprints/BptBlueprint.java b/common/buildcraft/core/blueprints/BptBlueprint.java index 16cb545c..6e00f75e 100644 --- a/common/buildcraft/core/blueprints/BptBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBlueprint.java @@ -57,11 +57,11 @@ public class BptBlueprint extends BptBase { slot.x = (int) (x - context.surroundingBox().pMin().x); slot.y = (int) (y - context.surroundingBox().pMin().y); slot.z = (int) (z - context.surroundingBox().pMin().z); - slot.blockId = anchorTile.worldObj.getBlockId(x, y, z); - slot.meta = anchorTile.worldObj.getBlockMetadata(x, y, z); + slot.blockId = anchorTile.getWorldObj().getBlockId(x, y, z); + slot.meta = anchorTile.getWorldObj().getBlockMetadata(x, y, z); if (Block.blocksList[slot.blockId] instanceof BlockContainer) { - TileEntity tile = anchorTile.worldObj.getBlockTileEntity(x, y, z); + TileEntity tile = anchorTile.getWorldObj().getTileEntity(x, y, z); if (tile != null && tile instanceof IBptContributor) { IBptContributor contributor = (IBptContributor) tile; diff --git a/common/buildcraft/core/inventory/InventoryConcatenator.java b/common/buildcraft/core/inventory/InventoryConcatenator.java index f2119dd9..9219f0d5 100644 --- a/common/buildcraft/core/inventory/InventoryConcatenator.java +++ b/common/buildcraft/core/inventory/InventoryConcatenator.java @@ -65,7 +65,7 @@ public class InventoryConcatenator implements IInventory { } @Override - public String getInvName() { + public String getInventoryName() { return ""; } @@ -89,11 +89,11 @@ public class InventoryConcatenator implements IInventory { } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override diff --git a/common/buildcraft/core/inventory/InventoryCopy.java b/common/buildcraft/core/inventory/InventoryCopy.java index 8acd85b9..767ceb65 100644 --- a/common/buildcraft/core/inventory/InventoryCopy.java +++ b/common/buildcraft/core/inventory/InventoryCopy.java @@ -68,8 +68,8 @@ public class InventoryCopy implements IInventory { } @Override - public String getInvName() { - return orignal.getInvName(); + public String getInventoryName() { + return orignal.getInventoryName(); } @Override @@ -87,11 +87,11 @@ public class InventoryCopy implements IInventory { } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override diff --git a/common/buildcraft/core/inventory/InventoryMapper.java b/common/buildcraft/core/inventory/InventoryMapper.java index f6107012..0c0e9f3d 100644 --- a/common/buildcraft/core/inventory/InventoryMapper.java +++ b/common/buildcraft/core/inventory/InventoryMapper.java @@ -63,8 +63,8 @@ public class InventoryMapper implements IInventory { } @Override - public String getInvName() { - return inv.getInvName(); + public String getInventoryName() { + return inv.getInventoryName(); } public void setStackSizeLimit(int limit) { @@ -87,13 +87,13 @@ public class InventoryMapper implements IInventory { } @Override - public void openChest() { - inv.openChest(); + public void openInventory() { + inv.openInventory(); } @Override - public void closeChest() { - inv.closeChest(); + public void closeInventory() { + inv.closeInventory(); } @Override diff --git a/common/buildcraft/core/inventory/InventoryWrapper.java b/common/buildcraft/core/inventory/InventoryWrapper.java index 179f6926..ada89d08 100644 --- a/common/buildcraft/core/inventory/InventoryWrapper.java +++ b/common/buildcraft/core/inventory/InventoryWrapper.java @@ -19,13 +19,13 @@ public abstract class InventoryWrapper implements ISidedInventory { @Override public ItemStack decrStackSize(int slotIndex, int amount) { return inventory.decrStackSize(slotIndex, amount); } @Override public ItemStack getStackInSlotOnClosing(int slotIndex) { return inventory.getStackInSlotOnClosing(slotIndex); } @Override public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { inventory.setInventorySlotContents(slotIndex, itemstack); } - @Override public String getInvName() { return inventory.getInvName(); } + @Override public String getInventoryName() { return inventory.getInventoryName(); } @Override public boolean isInvNameLocalized() { return inventory.isInvNameLocalized(); } @Override public int getInventoryStackLimit() { return inventory.getInventoryStackLimit(); } @Override public void onInventoryChanged() { inventory.onInventoryChanged(); } @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return inventory.isUseableByPlayer(entityplayer); } - @Override public void openChest() { inventory.openChest(); } - @Override public void closeChest() { inventory.closeChest(); } + @Override public void openInventory() { inventory.openInventory(); } + @Override public void closeInventory() { inventory.closeInventory(); } @Override public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) { return inventory.isItemValidForSlot(slotIndex, itemstack); } /* STATIC HELPER */ diff --git a/common/buildcraft/core/inventory/SimpleInventory.java b/common/buildcraft/core/inventory/SimpleInventory.java index e6976970..4349d717 100644 --- a/common/buildcraft/core/inventory/SimpleInventory.java +++ b/common/buildcraft/core/inventory/SimpleInventory.java @@ -68,7 +68,7 @@ public class SimpleInventory implements IInventory, INBTTagable { } @Override - public String getInvName() { + public String getInventoryName() { return _name; } @@ -90,11 +90,11 @@ public class SimpleInventory implements IInventory, INBTTagable { } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index ce4abd21..bf524cc8 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -66,7 +66,7 @@ public class PacketGuiReturn extends BuildCraftPacket { int y = data.readInt(); int z = data.readInt(); - TileEntity t = world.getBlockTileEntity(x, y, z); + TileEntity t = world.getTileEntity(x, y, z); if (t instanceof IGuiReturnHandler) ((IGuiReturnHandler) t).readGuiData(data, sender); diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index eaf2b61d..bd28c82d 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -54,7 +54,7 @@ public class PacketHandler extends BuildCraftChannelHandler { PacketTileState pkt = (PacketTileState) packet; pkt.readData(data); World world = player.worldObj; - TileEntity tile = world.getBlockTileEntity(pkt.posX, pkt.posY, pkt.posZ); + TileEntity tile = world.getTileEntity(pkt.posX, pkt.posY, pkt.posZ); if (tile instanceof ISyncedTile) { pkt.applyStates(data, (ISyncedTile) tile); } diff --git a/common/buildcraft/core/network/PacketTileUpdate.java b/common/buildcraft/core/network/PacketTileUpdate.java index fd611c5f..b9d178e3 100644 --- a/common/buildcraft/core/network/PacketTileUpdate.java +++ b/common/buildcraft/core/network/PacketTileUpdate.java @@ -28,7 +28,7 @@ public class PacketTileUpdate extends PacketUpdate { } public TileEntity getTarget(World world) { - return world.getBlockTileEntity(posX, posY, posZ); + return world.getTileEntity(posX, posY, posZ); } } diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 2b9d0de4..55241c45 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -73,7 +73,7 @@ public class CoreProxy { /* ENTITY HANDLING */ public void removeEntity(Entity entity) { - entity.worldObj.removeEntity(entity); + entity.getWorldObj().removeEntity(entity); } /* WRAPPER */ @@ -199,7 +199,7 @@ public class CoreProxy { if (CoreProxy.buildCraftPlayer == null) { CoreProxy.buildCraftPlayer = createNewPlayer(world); } else { - CoreProxy.buildCraftPlayer.worldObj = world; + CoreProxy.buildCraftPlayer.worldObj= world; } return CoreProxy.buildCraftPlayer; diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 222e9a36..93010f98 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -66,8 +66,8 @@ public class CoreProxyClient extends CoreProxy { public void removeEntity(Entity entity) { super.removeEntity(entity); - if (isRenderWorld(entity.worldObj)) { - ((WorldClient) entity.worldObj).removeEntityFromWorld(entity.entityId); + if (isRenderWorld(entity.getWorldObj())) { + ((WorldClient) entity.getWorldObj()).removeEntityFromWorld(entity.entityId); } } diff --git a/common/buildcraft/core/render/FluidRenderer.java b/common/buildcraft/core/render/FluidRenderer.java index e7a37d1a..6cbf2dd4 100644 --- a/common/buildcraft/core/render/FluidRenderer.java +++ b/common/buildcraft/core/render/FluidRenderer.java @@ -8,17 +8,21 @@ package buildcraft.core.render; import buildcraft.core.render.RenderEntityBlock.RenderInfo; + import java.util.HashMap; import java.util.Map; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; /** @@ -85,11 +89,11 @@ public class FluidRenderer { diplayLists = new int[DISPLAY_STAGES]; - if (fluid.getBlockID() > 0) { - liquidBlock.baseBlock = Block.blocksList[fluid.getBlockID()]; + if (fluid.getBlock() != null) { + liquidBlock.baseBlock = fluid.getBlock(); liquidBlock.texture = getFluidTexture(fluidStack, flowing); } else { - liquidBlock.baseBlock = Block.waterStill; + liquidBlock.baseBlock = Blocks.water; liquidBlock.texture = getFluidTexture(fluidStack, flowing); } diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index 4470aa1d..2aa15f27 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -8,16 +8,20 @@ package buildcraft.core.render; import buildcraft.core.EntityBlock; + import java.util.Arrays; + import net.minecraft.block.Block; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; + import org.lwjgl.opengl.GL11; public class RenderEntityBlock extends Render { @@ -37,7 +41,7 @@ public class RenderEntityBlock extends Render { public double maxX; public double maxY; public double maxZ; - public Block baseBlock = Block.sand; + public Block baseBlock = Blocks.sand; public IIcon texture = null; public IIcon[] textureArray = null; public boolean[] renderSide = new boolean[6]; @@ -48,7 +52,7 @@ public class RenderEntityBlock extends Render { setRenderAllSides(); } - public RenderInfo(Block template, Icon[] texture) { + public RenderInfo(Block template, IIcon[] texture) { this(); this.baseBlock = template; this.textureArray = texture; @@ -60,7 +64,7 @@ public class RenderEntityBlock extends Render { } public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k) { - return baseBlock.getBlockBrightness(iblockaccess, i, j, k); + return baseBlock.getMixedBrightnessForBlock(iblockaccess, i, j, k); } public final void setBounds(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { @@ -194,7 +198,7 @@ public class RenderEntityBlock extends Render { float light = 0; if (doLight) { if (info.light < 0) { - light = info.baseBlock.getBlockBrightness(blockAccess, (int) lightX, (int) lightY, (int) lightZ); + light = info.baseBlock.getMixedBrightnessForBlock(blockAccess, (int) lightX, (int) lightY, (int) lightZ); light = light + ((1.0f - light) * 0.4f); } else light = info.light; @@ -249,93 +253,4 @@ public class RenderEntityBlock extends Render { if (doTessellating && tessellator.isDrawing) tessellator.draw(); } -// -// public void renderBlock(RenderInfo block, IBlockAccess blockAccess, int i, int j, int k, boolean doLight, boolean doTessellating) { -// float f = 0.5F; -// float f1 = 1.0F; -// float f2 = 0.8F; -// float f3 = 0.6F; -// -// renderBlocks.renderMaxX = block.maxX; -// renderBlocks.renderMinX = block.minX; -// renderBlocks.renderMaxY = block.maxY; -// renderBlocks.renderMinY = block.minY; -// renderBlocks.renderMaxZ = block.maxZ; -// renderBlocks.renderMinZ = block.minZ; -// renderBlocks.enableAO = false; -// -// -// Tessellator tessellator = Tessellator.instance; -// -// if (doTessellating) { -// tessellator.startDrawingQuads(); -// } -// -// float f4 = 0, f5 = 0; -// -// if (doLight) { -// f4 = block.getBlockBrightness(blockAccess, i, j, k); -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f * f5, f * f5, f * f5); -// } -// -// renderBlocks.renderFaceYNeg(null, 0, 0, 0, block.getBlockTextureFromSide(0)); -// -// if (doLight) { -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f1 * f5, f1 * f5, f1 * f5); -// } -// -// renderBlocks.renderFaceYPos(null, 0, 0, 0, block.getBlockTextureFromSide(1)); -// -// if (doLight) { -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5); -// } -// -// renderBlocks.renderFaceZNeg(null, 0, 0, 0, block.getBlockTextureFromSide(2)); -// -// if (doLight) { -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5); -// } -// -// renderBlocks.renderFaceZPos(null, 0, 0, 0, block.getBlockTextureFromSide(3)); -// -// if (doLight) { -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5); -// } -// -// renderBlocks.renderFaceXNeg(null, 0, 0, 0, block.getBlockTextureFromSide(4)); -// -// if (doLight) { -// f5 = block.getBlockBrightness(blockAccess, i, j, k); -// if (f5 < f4) { -// f5 = f4; -// } -// tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5); -// } -// -// renderBlocks.renderFaceXPos(null, 0, 0, 0, block.getBlockTextureFromSide(5)); -// -// if (doTessellating) { -// tessellator.draw(); -// } -// } } diff --git a/common/buildcraft/core/render/RenderingEntityBlocks.java b/common/buildcraft/core/render/RenderingEntityBlocks.java index cc4a8bc2..b95ada34 100644 --- a/common/buildcraft/core/render/RenderingEntityBlocks.java +++ b/common/buildcraft/core/render/RenderingEntityBlocks.java @@ -106,7 +106,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler { } @Override - public boolean shouldRender3DInInventory() { + public boolean shouldRender3DInInventory(int modelId) { return true; } @@ -162,4 +162,6 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler { block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } + + } diff --git a/common/buildcraft/core/render/RenderingMarkers.java b/common/buildcraft/core/render/RenderingMarkers.java index 890dd90e..b77d54bb 100644 --- a/common/buildcraft/core/render/RenderingMarkers.java +++ b/common/buildcraft/core/render/RenderingMarkers.java @@ -22,7 +22,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { Tessellator tessellator = Tessellator.instance; - float f = block.getBlockBrightness(world, x, y, z); + float f = block.getMixedBrightnessForBlock(world, x, y, z); if (Block.lightValue[block.blockID] > 0) { f = 1.0F; } @@ -33,7 +33,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { } @Override - public boolean shouldRender3DInInventory() { + public boolean shouldRender3DInInventory(int modelId) { return false; } @@ -228,5 +228,4 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { face[j][3] = tmp; } } - } diff --git a/common/buildcraft/core/render/RenderingOil.java b/common/buildcraft/core/render/RenderingOil.java index 0d771be7..892f53d8 100644 --- a/common/buildcraft/core/render/RenderingOil.java +++ b/common/buildcraft/core/render/RenderingOil.java @@ -23,7 +23,7 @@ public class RenderingOil implements ISimpleBlockRenderingHandler { } @Override - public boolean shouldRender3DInInventory() { + public boolean shouldRender3DInInventory(int modelId) { return false; } @@ -31,5 +31,4 @@ public class RenderingOil implements ISimpleBlockRenderingHandler { public int getRenderId() { return BuildCraftCore.oilModel; } - } diff --git a/common/buildcraft/core/triggers/DefaultActionProvider.java b/common/buildcraft/core/triggers/DefaultActionProvider.java index 3eea5f3c..dd8617a2 100644 --- a/common/buildcraft/core/triggers/DefaultActionProvider.java +++ b/common/buildcraft/core/triggers/DefaultActionProvider.java @@ -28,7 +28,7 @@ public class DefaultActionProvider implements IActionProvider { if (machine.allowAction(BuildCraftCore.actionLoop)) res.add(BuildCraftCore.actionLoop); } - } catch (Throwable error) { + } catch (Throwable error) { FMLLog.log("Buildcraft", Level.SEVERE, "Outdated API detected, please update your mods!"); } diff --git a/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java b/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java index b92124cc..918be28c 100644 --- a/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java +++ b/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java @@ -13,7 +13,7 @@ import buildcraft.core.triggers.TriggerInventoryLevel.TriggerType; import buildcraft.core.utils.StringUtils; import java.util.Locale; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 37c1cffe..65e937c2 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -21,6 +21,7 @@ import net.minecraft.block.BlockFluid; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.network.Packet60Explosion; import net.minecraft.world.ChunkPosition; @@ -81,13 +82,11 @@ public class BlockUtil { } } - world.setBlock(x, y, z, 0); + world.setBlock(x, y, z, null); } - public static boolean isAnObstructingBlock(int blockID, World world, int x, int y, int z) { - Block block = Block.blocksList[blockID]; - - if (blockID == 0 || block == null || block.isAirBlock(world, x, y, z)) + public static boolean isAnObstructingBlock(Block block, World world, int x, int y, int z) { + if (block == null || block.isAirBlock(world, x, y, z)) return false; return true; } @@ -96,19 +95,17 @@ public class BlockUtil { return canChangeBlock(world.getBlockId(x, y, z), world, x, y, z); } - public static boolean canChangeBlock(int blockID, World world, int x, int y, int z) { - Block block = Block.blocksList[blockID]; - - if (blockID == 0 || block == null || block.isAirBlock(world, x, y, z)) + public static boolean canChangeBlock(Block block, World world, int x, int y, int z) { + if (block == null || block.isAirBlock(world, x, y, z)) return true; if (block.getBlockHardness(world, x, y, z) < 0) return false; - if (blockID == BuildCraftEnergy.blockOil.blockID) + if (block == BuildCraftEnergy.blockOil) return false; - if (blockID == Block.lavaStill.blockID || blockID == Block.lavaMoving.blockID) + if (block == Blocks.lava || block == Blocks.lava) return false; return true; @@ -118,10 +115,8 @@ public class BlockUtil { return isSoftBlock(world.getBlockId(x, y, z), world, x, y, z); } - public static boolean isSoftBlock(int blockID, World world, int x, int y, int z) { - Block block = Block.blocksList[blockID]; - - return blockID == 0 || block == null || BuildCraftAPI.softBlocks[blockID] || block.isAirBlock(world, x, y, z); + public static boolean isSoftBlock(Block block, World world, int x, int y, int z) { + return block == null || BuildCraftAPI.softBlocks[blockID] || block.isAirBlock(world, x, y, z); } /** @@ -142,35 +137,34 @@ public class BlockUtil { return false; } - public static Fluid getFluid(int blockId) { - Block block = Block.blocksList[blockId]; + public static Fluid getFluid(Block block) { if (block instanceof IFluidBlock) { return ((IFluidBlock) block).getFluid(); - } else if (blockId == Block.waterStill.blockID || blockId == Block.waterMoving.blockID) { + } else if (block == Blocks.water || block == Blocks.flowing_water) { return FluidRegistry.WATER; - } else if (blockId == Block.lavaStill.blockID || blockId == Block.lavaMoving.blockID) { + } else if (block == Blocks.lava || block == Blocks.flowing_lava) { return FluidRegistry.LAVA; } return null; } public static FluidStack drainBlock(World world, int x, int y, int z, boolean doDrain) { - return drainBlock(world.getBlockId(x, y, z), world, x, y, z, doDrain); + return drainBlock(world.getBlock(x, y, z), world, x, y, z, doDrain); } - public static FluidStack drainBlock(int blockId, World world, int x, int y, int z, boolean doDrain) { - if (Block.blocksList[blockId] instanceof IFluidBlock) { - IFluidBlock fluidBlock = (IFluidBlock) Block.blocksList[blockId]; + public static FluidStack drainBlock(Block block, World world, int x, int y, int z, boolean doDrain) { + if (block instanceof IFluidBlock) { + IFluidBlock fluidBlock = (IFluidBlock) block; if (fluidBlock.canDrain(world, x, y, z)) return fluidBlock.drain(world, x, y, z, doDrain); - } else if (blockId == Block.waterStill.blockID || blockId == Block.waterMoving.blockID) { + } else if (block == Blocks.water || block == Blocks.flowing_water) { int meta = world.getBlockMetadata(x, y, z); if (meta != 0) return null; if (doDrain) world.setBlockToAir(x, y, z); return new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME); - } else if (blockId == Block.lavaStill.blockID || blockId == Block.lavaMoving.blockID) { + } else if (block == Blocks.lava || block == Blocks.lava) { int meta = world.getBlockMetadata(x, y, z); if (meta != 0) return null; diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 154834ec..96b501c4 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -74,7 +74,7 @@ public class Utils { Position pos = new Position(x, y, z, orientation); pos.moveForwards(1.0); - TileEntity tileInventory = world.getBlockTileEntity((int) pos.x, (int) pos.y, (int) pos.z); + TileEntity tileInventory = world.getTileEntity((int) pos.x, (int) pos.y, (int) pos.z); ITransactor transactor = Transactor.getTransactorFor(tileInventory); if (transactor != null && !(tileInventory instanceof TileEngine) && transactor.add(stack, orientation.getOpposite(), false).stackSize > 0) { return transactor.add(stack, orientation.getOpposite(), true).stackSize; @@ -150,7 +150,7 @@ public class Utils { pos.moveForwards(1.0); - TileEntity tile = world.getBlockTileEntity((int) pos.x, (int) pos.y, (int) pos.z); + TileEntity tile = world.getTileEntity((int) pos.x, (int) pos.y, (int) pos.z); if (tile instanceof IPipeTile) { IPipeTile pipe = (IPipeTile) tile; @@ -179,16 +179,16 @@ public class Utils { tmp.orientation = step; tmp.moveForwards(1.0); - return world.getBlockTileEntity((int) tmp.x, (int) tmp.y, (int) tmp.z); + return world.getTileEntity((int) tmp.x, (int) tmp.y, (int) tmp.z); } public static IAreaProvider getNearbyAreaProvider(World world, int i, int j, int k) { - TileEntity a1 = world.getBlockTileEntity(i + 1, j, k); - TileEntity a2 = world.getBlockTileEntity(i - 1, j, k); - TileEntity a3 = world.getBlockTileEntity(i, j, k + 1); - TileEntity a4 = world.getBlockTileEntity(i, j, k - 1); - TileEntity a5 = world.getBlockTileEntity(i, j + 1, k); - TileEntity a6 = world.getBlockTileEntity(i, j - 1, k); + TileEntity a1 = world.getTileEntity(i + 1, j, k); + TileEntity a2 = world.getTileEntity(i - 1, j, k); + TileEntity a3 = world.getTileEntity(i, j, k + 1); + TileEntity a4 = world.getTileEntity(i, j, k - 1); + TileEntity a5 = world.getTileEntity(i, j + 1, k); + TileEntity a6 = world.getTileEntity(i, j - 1, k); if (a1 instanceof IAreaProvider) { return (IAreaProvider) a1; @@ -309,7 +309,7 @@ public class Utils { } public static void preDestroyBlock(World world, int i, int j, int k) { - TileEntity tile = world.getBlockTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof IInventory && !CoreProxy.proxy.isRenderWorld(world)) { if (!(tile instanceof IDropControlInventory) || ((IDropControlInventory) tile).doDrop()) { diff --git a/common/buildcraft/energy/BlockBuildcraftFluid.java b/common/buildcraft/energy/BlockBuildcraftFluid.java index ab4e28e3..c1cd6116 100644 --- a/common/buildcraft/energy/BlockBuildcraftFluid.java +++ b/common/buildcraft/energy/BlockBuildcraftFluid.java @@ -12,7 +12,10 @@ import buildcraft.energy.render.EntityDropParticleFX; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.Random; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.texture.IIconRegister; @@ -33,8 +36,8 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { protected float particleGreen; protected float particleBlue; - public BlockBuildcraftFluid(int id, Fluid fluid, Material material) { - super(id, fluid, material); + public BlockBuildcraftFluid(Fluid fluid, Material material) { + super(fluid, material); } @SideOnly(Side.CLIENT) protected IIcon[] theIcon; @@ -48,13 +51,13 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.theIcon = new Icon[] { iconRegister.registerIcon("buildcraft:" + fluidName + "_still"), iconRegister.registerIcon("buildcraft:" + fluidName + "_flow") }; + public void registerBlockIcons(IIconRegister iconRegister) { + this.theIcon = new IIcon[] { iconRegister.registerIcon("buildcraft:" + fluidName + "_still"), iconRegister.registerIcon("buildcraft:" + fluidName + "_flow") }; } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, int blockId) { - super.onNeighborBlockChange(world, x, y, z, blockId); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + super.onNeighborBlockChange(world, x, y, z, block); if (flammable && world.provider.dimensionId == -1) { world.newExplosion(null, x, y, z, 4F, true, true); world.setBlockToAir(x, y, z); @@ -103,7 +106,7 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { public void randomDisplayTick(World world, int x, int y, int z, Random rand) { super.randomDisplayTick(world, x, y, z, rand); - if (rand.nextInt(10) == 0 && world.doesBlockHaveSolidTopSurface(x, y - 1, z) && !world.getBlockMaterial(x, y - 2, z).blocksMovement()) { + if (rand.nextInt(10) == 0 && world.doesBlockHaveSolidTopSurface(x, y - 1, z) && !world.getBlock(x, y - 2, z).getMaterial().blocksMovement()) { double px = (double) ((float) x + rand.nextFloat()); double py = (double) y - 1.05D; double pz = (double) ((float) z + rand.nextFloat()); @@ -115,14 +118,14 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { @Override public boolean canDisplace(IBlockAccess world, int x, int y, int z) { - if (world.getBlockMaterial(x, y, z).isLiquid()) + if (world.getBlock(x, y, z).getMaterial().isLiquid()) return false; return super.canDisplace(world, x, y, z); } @Override public boolean displaceIfPossible(World world, int x, int y, int z) { - if (world.getBlockMaterial(x, y, z).isLiquid()) + if (world.getBlock(x, y, z).getMaterial().isLiquid()) return false; return super.displaceIfPossible(world, x, y, z); } diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index e5a711f3..72de0d4a 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -12,15 +12,20 @@ import buildcraft.core.BlockBuildCraft; import buildcraft.core.IItemPipe; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.Random; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -30,9 +35,9 @@ public class BlockEngine extends BlockBuildCraft { private static IIcon stoneTexture; private static IIcon ironTexture; - public BlockEngine(int i) { - super(i, Material.iron); - setUnlocalizedName("engineBlock"); + public BlockEngine() { + super(Material.iron); + setBlockName("engineBlock"); } @Override @@ -47,7 +52,7 @@ public class BlockEngine extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { woodTexture = par1IconRegister.registerIcon("buildcraft:engineWoodBottom"); stoneTexture = par1IconRegister.registerIcon("buildcraft:engineStoneBottom"); ironTexture = par1IconRegister.registerIcon("buildcraft:engineIronBottom"); @@ -69,8 +74,8 @@ public class BlockEngine extends BlockBuildCraft { } @Override - public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileEngine) { return ((TileEngine) tile).orientation.getOpposite() == side; } @@ -79,7 +84,7 @@ public class BlockEngine extends BlockBuildCraft { @Override public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileEngine) { return ((TileEngine) tile).switchOrientation(false); } @@ -89,7 +94,7 @@ public class BlockEngine extends BlockBuildCraft { @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int side, float par7, float par8, float par9) { - TileEngine tile = (TileEngine) world.getBlockTileEntity(i, j, k); + TileEngine tile = (TileEngine) world.getTileEntity(i, j, k); // Drop through if the player is sneaking if (player.isSneaking()) @@ -111,7 +116,7 @@ public class BlockEngine extends BlockBuildCraft { @Override public void onPostBlockPlaced(World world, int x, int y, int z, int par5) { - TileEngine tile = (TileEngine) world.getBlockTileEntity(x, y, z); + TileEngine tile = (TileEngine) world.getTileEntity(x, y, z); tile.orientation = ForgeDirection.UP; if (!tile.isOrientationValid()) tile.switchOrientation(true); @@ -125,7 +130,7 @@ public class BlockEngine extends BlockBuildCraft { @SuppressWarnings({"all"}) @Override public void randomDisplayTick(World world, int i, int j, int k, Random random) { - TileEngine tile = (TileEngine) world.getBlockTileEntity(i, j, k); + TileEngine tile = (TileEngine) world.getTileEntity(i, j, k); if (!tile.isBurning()) return; @@ -144,15 +149,15 @@ public class BlockEngine extends BlockBuildCraft { @SuppressWarnings({"unchecked", "rawtypes"}) @Override - public void getSubBlocks(int blockid, CreativeTabs par2CreativeTabs, List itemList) { + public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) { itemList.add(new ItemStack(this, 1, 0)); itemList.add(new ItemStack(this, 1, 1)); itemList.add(new ItemStack(this, 1, 2)); } @Override - public void onNeighborBlockChange(World world, int i, int j, int k, int l) { - TileEngine tile = (TileEngine) world.getBlockTileEntity(i, j, k); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + TileEngine tile = (TileEngine) world.getTileEntity(x, y, z); if (tile != null) { tile.checkRedstonePower(); @@ -175,7 +180,7 @@ public class BlockEngine extends BlockBuildCraft { } @Override - public TileEntity createNewTileEntity(World world) { + public TileEntity createNewTileEntity(World world, int metadata) { return null; } } diff --git a/common/buildcraft/energy/BlockPollution.java b/common/buildcraft/energy/BlockPollution.java deleted file mode 100644 index 0d9a9cdb..00000000 --- a/common/buildcraft/energy/BlockPollution.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) SpaceToad, 2011 - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ - -package buildcraft.energy; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class BlockPollution extends BlockContainer { - - public BlockPollution(int i) { - super(i, Material.air); - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(World var1) { - return new TilePollution(); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) - { - par1IconRegister.registerIcon("buildcraft:blockPollution"); - } -} diff --git a/common/buildcraft/energy/BptBlockEngine.java b/common/buildcraft/energy/BptBlockEngine.java index 973f8423..55e796f2 100644 --- a/common/buildcraft/energy/BptBlockEngine.java +++ b/common/buildcraft/energy/BptBlockEngine.java @@ -35,7 +35,7 @@ public class BptBlockEngine extends BptBlock { @Override public void initializeFromWorld(BptSlotInfo bptSlot, IBptContext context, int x, int y, int z) { - TileEngine engine = (TileEngine) context.world().getBlockTileEntity(x, y, z); + TileEngine engine = (TileEngine) context.world().getTileEntity(x, y, z); bptSlot.cpt.setInteger("orientation", engine.orientation.ordinal()); } @@ -44,7 +44,7 @@ public class BptBlockEngine extends BptBlock { public void buildBlock(BptSlotInfo slot, IBptContext context) { context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); - TileEngine engine = (TileEngine) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + TileEngine engine = (TileEngine) context.world().getTileEntity(slot.x, slot.y, slot.z); engine.orientation = ForgeDirection.getOrientation(slot.cpt.getInteger("orientation")); } diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index 969c081f..a65a14f7 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -41,11 +41,11 @@ public class BucketHandler { private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - int blockID = world.getBlockId(pos.blockX, pos.blockY, pos.blockZ); + Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); Item bucket = buckets.get(Block.blocksList[blockID]); if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { - world.setBlock(pos.blockX, pos.blockY, pos.blockZ, 0); + world.setBlock(pos.blockX, pos.blockY, pos.blockZ, null); return new ItemStack(bucket); } else return null; diff --git a/common/buildcraft/energy/GuiHandler.java b/common/buildcraft/energy/GuiHandler.java index 580a9867..363d3654 100644 --- a/common/buildcraft/energy/GuiHandler.java +++ b/common/buildcraft/energy/GuiHandler.java @@ -17,7 +17,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileEngineWithInventory)) return null; @@ -42,7 +42,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileEngineWithInventory)) return null; diff --git a/common/buildcraft/energy/ItemBucketBuildcraft.java b/common/buildcraft/energy/ItemBucketBuildcraft.java index 9f073d28..42a79b32 100644 --- a/common/buildcraft/energy/ItemBucketBuildcraft.java +++ b/common/buildcraft/energy/ItemBucketBuildcraft.java @@ -11,7 +11,9 @@ import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; @@ -20,10 +22,10 @@ public class ItemBucketBuildcraft extends ItemBucket { private String iconName; - public ItemBucketBuildcraft(int i, int blockId) { - super(i, blockId); + public ItemBucketBuildcraft(Block block) { + super(block); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); - setContainerItem(Item.bucketEmpty); + setContainerItem(Items.bucket); } @Override @@ -32,9 +34,9 @@ public class ItemBucketBuildcraft extends ItemBucket { } @Override - public Item setUnlocalizedName(String par1Str) { + public Item setBlockName(String par1Str) { iconName = par1Str; - return super.setUnlocalizedName(par1Str); + return super.setBlockName(par1Str); } @Override diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index f1389ac3..e204418d 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -431,4 +431,9 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan return triggers; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/energy/TileEngineLegacy.java b/common/buildcraft/energy/TileEngineLegacy.java index 0313800b..2121f3b6 100644 --- a/common/buildcraft/energy/TileEngineLegacy.java +++ b/common/buildcraft/energy/TileEngineLegacy.java @@ -24,8 +24,8 @@ public class TileEngineLegacy extends TileEngine { @Override public void updateEntity() { - worldObj.removeBlockTileEntity(xCoord, yCoord, zCoord); - TileEntity newTile = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord); + worldObj.removeTileEntity(xCoord, yCoord, zCoord); + TileEntity newTile = worldObj.getTileEntity(xCoord, yCoord, zCoord); if (newTile instanceof TileEngine) { newTile.readFromNBT(nbt); sendNetworkUpdate(); diff --git a/common/buildcraft/energy/TileEngineStone.java b/common/buildcraft/energy/TileEngineStone.java index 48ce2ed5..58303889 100644 --- a/common/buildcraft/energy/TileEngineStone.java +++ b/common/buildcraft/energy/TileEngineStone.java @@ -162,4 +162,9 @@ public class TileEngineStone extends TileEngineWithInventory { return triggers; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } \ No newline at end of file diff --git a/common/buildcraft/energy/TileEngineWithInventory.java b/common/buildcraft/energy/TileEngineWithInventory.java index 5469c1b2..7a6036ae 100644 --- a/common/buildcraft/energy/TileEngineWithInventory.java +++ b/common/buildcraft/energy/TileEngineWithInventory.java @@ -47,7 +47,7 @@ public abstract class TileEngineWithInventory extends TileEngine implements IInv } @Override - public String getInvName() { + public String getInventoryName() { return "Engine"; } @@ -58,15 +58,15 @@ public abstract class TileEngineWithInventory extends TileEngine implements IInv @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override diff --git a/common/buildcraft/energy/TilePollution.java b/common/buildcraft/energy/TilePollution.java deleted file mode 100644 index ac0f3dfe..00000000 --- a/common/buildcraft/energy/TilePollution.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) SpaceToad, 2011 - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ - -package buildcraft.energy; - -import buildcraft.BuildCraftEnergy; -import buildcraft.api.core.SafeTimeTracker; -import buildcraft.core.BlockIndex; -import net.minecraft.tileentity.TileEntity; - -public class TilePollution extends TileEntity { - - public boolean init = false; - public SafeTimeTracker timeTracker = new SafeTimeTracker(); - public int saturation = 0; /* from 0 to 100 */ - - @Override - public void updateEntity() { - if (!init) { - init = true; - timeTracker.markTime(worldObj); - BlockIndex index = new BlockIndex(xCoord, yCoord, zCoord); - - if (BuildCraftEnergy.saturationStored.containsKey(index)) { - saturation = BuildCraftEnergy.saturationStored.remove(index); - } else { - saturation = 1; - } - } else { - if (timeTracker.markTimeIfDelay(worldObj, 20)) { - // int remaining = BuildCraftEnergy.createPollution(worldObj, - // xCoord, yCoord, zCoord, saturation); - // - // saturation = remaining; - // - // if (remaining == 0) { - // worldObj.setBlockWithNotify(xCoord, yCoord, zCoord, 0); - // } else { - // worldObj.setBlockMetadata(xCoord, yCoord, zCoord, - // saturation * 16 / 100); - // worldObj.markBlockNeedsUpdate(zCoord, yCoord, zCoord); - // } - } - } - - } - -} diff --git a/common/buildcraft/energy/render/EntityDropParticleFX.java b/common/buildcraft/energy/render/EntityDropParticleFX.java index cf10bf93..bed14b69 100644 --- a/common/buildcraft/energy/render/EntityDropParticleFX.java +++ b/common/buildcraft/energy/render/EntityDropParticleFX.java @@ -80,7 +80,7 @@ public class EntityDropParticleFX extends EntityFX { this.motionZ *= 0.699999988079071D; } - Material material = this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)); + Material material = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)).getMaterial(); if (material.isLiquid() || material.isSolid()) { double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))); diff --git a/common/buildcraft/energy/render/RenderEngine.java b/common/buildcraft/energy/render/RenderEngine.java index 4c8b746f..6e791068 100644 --- a/common/buildcraft/energy/render/RenderEngine.java +++ b/common/buildcraft/energy/render/RenderEngine.java @@ -20,12 +20,12 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; -import static net.minecraftforge.common.ForgeDirection.DOWN; -import static net.minecraftforge.common.ForgeDirection.EAST; -import static net.minecraftforge.common.ForgeDirection.NORTH; -import static net.minecraftforge.common.ForgeDirection.SOUTH; -import static net.minecraftforge.common.ForgeDirection.UP; -import static net.minecraftforge.common.ForgeDirection.WEST; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.UP; +import static net.minecraftforge.common.util.ForgeDirection.WEST; import org.lwjgl.opengl.GL11; public class RenderEngine extends TileEntitySpecialRenderer implements IInventoryRenderer { diff --git a/common/buildcraft/factory/BlockAutoWorkbench.java b/common/buildcraft/factory/BlockAutoWorkbench.java index e7bd8bd9..adcdebea 100644 --- a/common/buildcraft/factory/BlockAutoWorkbench.java +++ b/common/buildcraft/factory/BlockAutoWorkbench.java @@ -30,8 +30,8 @@ public class BlockAutoWorkbench extends BlockBuildCraft { IIcon topTexture; IIcon sideTexture; - public BlockAutoWorkbench(int i) { - super(i, Material.wood); + public BlockAutoWorkbench() { + super(Material.wood); setHardness(3.0F); } @@ -64,7 +64,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileAutoWorkbench(); } @@ -75,7 +75,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft { } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { topTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_top"); sideTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_side"); diff --git a/common/buildcraft/factory/BlockFloodGate.java b/common/buildcraft/factory/BlockFloodGate.java index fcb39e9f..73034be4 100644 --- a/common/buildcraft/factory/BlockFloodGate.java +++ b/common/buildcraft/factory/BlockFloodGate.java @@ -13,7 +13,10 @@ import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -29,12 +32,12 @@ public class BlockFloodGate extends BlockBuildCraft { private IIcon textureBottom; private IIcon textureSide; - public BlockFloodGate(int i) { - super(i, Material.iron); + public BlockFloodGate() { + super(Material.iron); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileFloodGate(); } @@ -51,14 +54,14 @@ public class BlockFloodGate extends BlockBuildCraft { } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - TileEntity tile = world.getBlockTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof TileFloodGate) { TileFloodGate floodGate = (TileFloodGate) tile; @@ -81,11 +84,11 @@ public class BlockFloodGate extends BlockBuildCraft { } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, int id) { - super.onNeighborBlockChange(world, x, y, z, id); - TileEntity tile = world.getBlockTileEntity(x, y, z); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + super.onNeighborBlockChange(world, x, y, z, block); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileFloodGate) { - ((TileFloodGate) tile).onNeighborBlockChange(id); + ((TileFloodGate) tile).onNeighborBlockChange(block); } } @@ -97,7 +100,7 @@ public class BlockFloodGate extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:floodgate_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:floodgate_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:floodgate_side"); diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index 60273c5c..9ee0fd20 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -15,13 +15,16 @@ import buildcraft.core.IFramePipeConnection; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MovingObjectPosition; @@ -31,8 +34,8 @@ import net.minecraft.world.World; public class BlockFrame extends Block implements IFramePipeConnection { - public BlockFrame(int i) { - super(i, Material.glass); + public BlockFrame() { + super(Material.glass); setHardness(0.5F); setTickRandomly(true); } @@ -44,7 +47,7 @@ public class BlockFrame extends Block implements IFramePipeConnection { int meta = world.getBlockMetadata(i, j, k); if (meta == 1 && random.nextInt(10) > 5) { - world.setBlock(i, j, k, 0); + world.setBlock(i, j, k, null); } } @@ -59,8 +62,8 @@ public class BlockFrame extends Block implements IFramePipeConnection { } @Override - public int idDropped(int i, Random random, int j) { - return -1; + public Item getItemDropped(int i, Random random, int j) { + return null; } @Override @@ -183,18 +186,18 @@ public class BlockFrame extends Block implements IFramePipeConnection { @Override public boolean isPipeConnected(IBlockAccess blockAccess, int x1, int y1, int z1, int x2, int y2, int z2) { - return blockAccess.getBlockId(x2, y2, z2) == blockID; + return blockAccess.getBlock(x2, y2, z2) == this; } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override - public void getSubBlocks(int id, CreativeTabs tab, List list) { + public void getSubBlocks(Item item, CreativeTabs tab, List list) { list.add(new ItemStack(this)); } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { blockIcon = par1IconRegister.registerIcon("buildcraft:blockFrame"); } diff --git a/common/buildcraft/factory/BlockHopper.java b/common/buildcraft/factory/BlockHopper.java index 9bd19eb8..ee480e16 100644 --- a/common/buildcraft/factory/BlockHopper.java +++ b/common/buildcraft/factory/BlockHopper.java @@ -21,12 +21,12 @@ public class BlockHopper extends BlockBuildCraft { private static IIcon icon; - public BlockHopper(int blockId) { - super(blockId, Material.iron); + public BlockHopper() { + super(Material.iron); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileHopper(); } @@ -75,7 +75,7 @@ public class BlockHopper extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { icon = par1IconRegister.registerIcon("buildcraft:hopperBottom"); } diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index 60be5562..ff1cb8d5 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -15,7 +15,10 @@ import buildcraft.core.BlockBuildCraft; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; @@ -27,10 +30,10 @@ import net.minecraftforge.common.util.ForgeDirection; public class BlockMiningWell extends BlockBuildCraft { - Icon textureFront, textureSides, textureBack, textureTop; + IIcon textureFront, textureSides, textureBack, textureTop; - public BlockMiningWell(int i) { - super(i, Material.ground); + public BlockMiningWell() { + super(Material.ground); setHardness(5F); setResistance(10F); @@ -62,15 +65,15 @@ public class BlockMiningWell extends BlockBuildCraft { } @Override - public void breakBlock(World world, int x, int y, int z, int id, int meta) { - super.breakBlock(world, x, y, z, id, meta); + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + super.breakBlock(world, x, y, z, block, meta); removePipes(world, x, y, z); } public void removePipes(World world, int x, int y, int z) { for (int depth = y - 1; depth > 0; depth--) { - int pipeID = world.getBlockId(x, depth, z); - if (pipeID != BuildCraftFactory.plainPipeBlock.blockID) { + Block pipe = world.getBlock(x, depth, z); + if (pipe != BuildCraftFactory.plainPipeBlock) { break; } world.setBlockToAir(x, depth, z); @@ -78,7 +81,7 @@ public class BlockMiningWell extends BlockBuildCraft { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileMiningWell(); } @@ -90,7 +93,7 @@ public class BlockMiningWell extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) + public void registerBlockIcons(IIconRegister par1IconRegister) { textureFront = par1IconRegister.registerIcon("buildcraft:miningwell_front"); textureSides = par1IconRegister.registerIcon("buildcraft:miningwell_side"); diff --git a/common/buildcraft/factory/BlockPlainPipe.java b/common/buildcraft/factory/BlockPlainPipe.java index a6e8554f..22fb4968 100644 --- a/common/buildcraft/factory/BlockPlainPipe.java +++ b/common/buildcraft/factory/BlockPlainPipe.java @@ -11,19 +11,22 @@ import buildcraft.core.CoreConstants; import buildcraft.core.IFramePipeConnection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; public class BlockPlainPipe extends Block implements IFramePipeConnection { - public BlockPlainPipe(int i) { - super(i, Material.glass); + public BlockPlainPipe() { + super(Material.glass); minX = CoreConstants.PIPE_MIN_POS; minY = 0.0; @@ -64,13 +67,13 @@ public class BlockPlainPipe extends Block implements IFramePipeConnection { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override - public void getSubBlocks(int id, CreativeTabs tab, List list) { + public void getSubBlocks(Item item, CreativeTabs tab, List list) { list.add(new ItemStack(this)); } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("buildcraft:blockPlainPipe"); } } diff --git a/common/buildcraft/factory/BlockPump.java b/common/buildcraft/factory/BlockPump.java index b4f3fcbe..b5cb2a6a 100644 --- a/common/buildcraft/factory/BlockPump.java +++ b/common/buildcraft/factory/BlockPump.java @@ -13,7 +13,10 @@ import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -29,12 +32,12 @@ public class BlockPump extends BlockBuildCraft { private IIcon textureBottom; private IIcon textureSide; - public BlockPump(int i) { - super(i, Material.iron); + public BlockPump() { + super(Material.iron); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TilePump(); } @@ -51,14 +54,14 @@ public class BlockPump extends BlockBuildCraft { } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - TileEntity tile = world.getBlockTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof TilePump) { TilePump pump = (TilePump) tile; @@ -82,11 +85,11 @@ public class BlockPump extends BlockBuildCraft { } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, int id) { - super.onNeighborBlockChange(world, x, y, z, id); - TileEntity tile = world.getBlockTileEntity(x, y, z); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + super.onNeighborBlockChange(world, x, y, z, block); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TilePump) { - ((TilePump) tile).onNeighborBlockChange(id); + ((TilePump) tile).onNeighborBlockChange(block); } } @@ -98,7 +101,7 @@ public class BlockPump extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:pump_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:pump_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:pump_side"); diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index 755a5edb..2217e157 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -16,7 +16,10 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; @@ -35,8 +38,8 @@ public class BlockQuarry extends BlockBuildCraft { IIcon textureFront; IIcon textureSide; - public BlockQuarry(int i) { - super(i, Material.iron); + public BlockQuarry() { + super(Material.iron); setHardness(10F); setResistance(10F); @@ -51,7 +54,7 @@ public class BlockQuarry extends BlockBuildCraft { world.setBlockMetadataWithNotify(i, j, k, orientation.getOpposite().ordinal(), 1); if (entityliving instanceof EntityPlayer) { - TileQuarry tq = (TileQuarry) world.getBlockTileEntity(i, j, k); + TileQuarry tq = (TileQuarry) world.getTileEntity(i, j, k); tq.placedBy = (EntityPlayer) entityliving; } } @@ -74,7 +77,7 @@ public class BlockQuarry extends BlockBuildCraft { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileQuarry(); } @@ -83,9 +86,9 @@ public class BlockQuarry extends BlockBuildCraft { if (!world.checkChunksExist(i - width2, j - width2, k - width2, i + width2, j + width2, k + width2)) return; - int blockID = world.getBlockId(i, j, k); + Block block = world.getBlock(i, j, k); - if (blockID != BuildCraftFactory.frameBlock.blockID) + if (block != BuildCraftFactory.frameBlock) return; int meta = world.getBlockMetadata(i, j, k); @@ -116,7 +119,7 @@ public class BlockQuarry extends BlockBuildCraft { } private void markFrameForDecay(World world, int x, int y, int z) { - if (world.getBlockId(x, y, z) == BuildCraftFactory.frameBlock.blockID) { + if (world.getBlock(x, y, z) == BuildCraftFactory.frameBlock) { world.setBlockMetadataWithNotify(x, y, z, 1, 0); } } @@ -130,12 +133,12 @@ public class BlockQuarry extends BlockBuildCraft { } @Override - public void breakBlock(World world, int i, int j, int k, int par5, int par6) { + public void breakBlock(World world, int i, int j, int k, Block block, int par6) { if (!CoreProxy.proxy.isSimulating(world)) return; - TileEntity tile = world.getBlockTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof TileQuarry) { TileQuarry quarry = (TileQuarry) tile; Box box = quarry.box; @@ -170,40 +173,12 @@ public class BlockQuarry extends BlockBuildCraft { Utils.preDestroyBlock(world, i, j, k); - // byte width = 1; - // int width2 = width + 1; - // - // if (world.checkChunksExist(i - width2, j - width2, k - width2, i + width2, j + width2, k + width2)) { - // - // boolean frameFound = false; - // for (int z = -width; z <= width; ++z) { - // - // for (int y = -width; y <= width; ++y) { - // - // for (int x = -width; x <= width; ++x) { - // - // int blockID = world.getBlockId(i + z, j + y, k + x); - // - // if (blockID == BuildCraftFactory.frameBlock.blockID) { - // searchFrames(world, i + z, j + y, k + x); - // frameFound = true; - // break; - // } - // } - // if (frameFound) - // break; - // } - // if (frameFound) - // break; - // } - // } - - super.breakBlock(world, i, j, k, par5, par6); + super.breakBlock(world, i, j, k, block, par6); } @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - TileQuarry tile = (TileQuarry) world.getBlockTileEntity(i, j, k); + TileQuarry tile = (TileQuarry) world.getTileEntity(i, j, k); // Drop through if the player is sneaking if (entityplayer.isSneaking()) @@ -230,7 +205,7 @@ public class BlockQuarry extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureSide = par1IconRegister.registerIcon("buildcraft:quarry_side"); textureTop = par1IconRegister.registerIcon("buildcraft:quarry_top"); textureFront = par1IconRegister.registerIcon("buildcraft:quarry_front"); diff --git a/common/buildcraft/factory/BlockRefinery.java b/common/buildcraft/factory/BlockRefinery.java index f3c9454e..78c2bebf 100644 --- a/common/buildcraft/factory/BlockRefinery.java +++ b/common/buildcraft/factory/BlockRefinery.java @@ -17,30 +17,33 @@ import buildcraft.core.fluids.FluidUtils; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; + import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import static net.minecraftforge.common.ForgeDirection.EAST; -import static net.minecraftforge.common.ForgeDirection.NORTH; -import static net.minecraftforge.common.ForgeDirection.SOUTH; -import static net.minecraftforge.common.ForgeDirection.WEST; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.WEST; import net.minecraftforge.fluids.FluidContainerRegistry; public class BlockRefinery extends BlockContainer { private static IIcon icon; - public BlockRefinery(int i) { - super(i, Material.iron); + public BlockRefinery() { + super(Material.iron); setHardness(5F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); @@ -66,7 +69,7 @@ public class BlockRefinery extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileRefinery(); } @@ -104,7 +107,7 @@ public class BlockRefinery extends BlockContainer { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileRefinery)) return false; @@ -117,7 +120,7 @@ public class BlockRefinery extends BlockContainer { return true; } - if (current != null && current.itemID != Item.bucketEmpty.itemID) { + if (current != null && current.getItem() != Items.bucket) { if (!world.isRemote) { if (FluidUtils.handleRightClick((TileRefinery) tile, ForgeDirection.getOrientation(side), player, true, false)) return true; @@ -141,7 +144,7 @@ public class BlockRefinery extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { icon = par1IconRegister.registerIcon("buildcraft:refineryBack"); } diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index c615c612..64c1c888 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -34,8 +34,8 @@ public class BlockTank extends BlockContainer { private IIcon textureBottomSide; private IIcon textureTop; - public BlockTank(int i) { - super(i, Material.glass); + public BlockTank() { + super(Material.glass); setBlockBounds(0.125F, 0F, 0.125F, 0.875F, 1F, 0.875F); setHardness(0.5F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); @@ -56,7 +56,7 @@ public class BlockTank extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileTank(); } @@ -95,7 +95,7 @@ public class BlockTank extends BlockContainer { FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); - TileTank tank = (TileTank) world.getBlockTileEntity(i, j, k); + TileTank tank = (TileTank) world.getTileEntity(i, j, k); // Handle filled containers if (liquid != null) { @@ -142,7 +142,7 @@ public class BlockTank extends BlockContainer { @Override public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { if (side <= 1) - return world.getBlockId(x, y, z) != blockID; + return world.getBlock(x, y, z) != this; return super.shouldSideBeRendered(world, x, y, z, side); } @@ -154,7 +154,7 @@ public class BlockTank extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureStackedSide = par1IconRegister.registerIcon("buildcraft:tank_stacked_side"); textureBottomSide = par1IconRegister.registerIcon("buildcraft:tank_bottom_side"); textureTop = par1IconRegister.registerIcon("buildcraft:tank_top"); @@ -162,7 +162,7 @@ public class BlockTank extends BlockContainer { @Override public int getLightValue(IBlockAccess world, int x, int y, int z) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileTank) { TileTank tank = (TileTank) tile; return tank.getFluidLightLevel(); diff --git a/common/buildcraft/factory/BptBlockAutoWorkbench.java b/common/buildcraft/factory/BptBlockAutoWorkbench.java index 4d43674c..0a51817a 100644 --- a/common/buildcraft/factory/BptBlockAutoWorkbench.java +++ b/common/buildcraft/factory/BptBlockAutoWorkbench.java @@ -33,7 +33,7 @@ public class BptBlockAutoWorkbench extends BptBlock { @Override public void initializeFromWorld(BptSlotInfo bptSlot, IBptContext context, int x, int y, int z) { - IInventory inventory = (IInventory) context.world().getBlockTileEntity(x, y, z); + IInventory inventory = (IInventory) context.world().getTileEntity(x, y, z); BptBlockUtils.initializeInventoryContents(bptSlot, context, inventory); } @@ -42,7 +42,7 @@ public class BptBlockAutoWorkbench extends BptBlock { public void buildBlock(BptSlotInfo slot, IBptContext context) { super.buildBlock(slot, context); - IInventory inventory = (IInventory) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + IInventory inventory = (IInventory) context.world().getTileEntity(slot.x, slot.y, slot.z); BptBlockUtils.buildInventoryContents(slot, context, inventory); } diff --git a/common/buildcraft/factory/BptBlockRefinery.java b/common/buildcraft/factory/BptBlockRefinery.java index f68ff457..97d79fb9 100644 --- a/common/buildcraft/factory/BptBlockRefinery.java +++ b/common/buildcraft/factory/BptBlockRefinery.java @@ -27,7 +27,7 @@ public class BptBlockRefinery extends BptBlock { @Override public void initializeFromWorld(BptSlotInfo slot, IBptContext context, int x, int y, int z) { - TileRefinery refinery = (TileRefinery) context.world().getBlockTileEntity(x, y, z); + TileRefinery refinery = (TileRefinery) context.world().getTileEntity(x, y, z); // slot.cpt.setInteger("filter0", refinery.getFilter(0)); // slot.cpt.setInteger("filter1", refinery.getFilter(1)); @@ -37,7 +37,7 @@ public class BptBlockRefinery extends BptBlock { public void buildBlock(BptSlotInfo slot, IBptContext context) { super.buildBlock(slot, context); - TileRefinery refinery = (TileRefinery) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + TileRefinery refinery = (TileRefinery) context.world().getTileEntity(slot.x, slot.y, slot.z); int filter0 = slot.cpt.getInteger("filter0"); int filter1 = slot.cpt.getInteger("filter1"); diff --git a/common/buildcraft/factory/EntityMechanicalArm.java b/common/buildcraft/factory/EntityMechanicalArm.java index 682373cf..a18770e8 100644 --- a/common/buildcraft/factory/EntityMechanicalArm.java +++ b/common/buildcraft/factory/EntityMechanicalArm.java @@ -99,7 +99,7 @@ public class EntityMechanicalArm extends Entity { } private void findAndJoinQuarry() { - TileEntity te = worldObj.getBlockTileEntity((int) posX, (int) posY, (int) posZ); + TileEntity te = worldObj.getTileEntity((int) posX, (int) posY, (int) posZ); if (te != null && te instanceof TileQuarry) { parent = (TileQuarry) te; parent.setArm(this); diff --git a/common/buildcraft/factory/GuiHandler.java b/common/buildcraft/factory/GuiHandler.java index ae8be321..dedc56a3 100644 --- a/common/buildcraft/factory/GuiHandler.java +++ b/common/buildcraft/factory/GuiHandler.java @@ -20,7 +20,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { @@ -50,7 +50,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index ea04cdd2..4272ef19 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -109,7 +109,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory } @Override - public String getInvName() { + public String getInventoryName() { return ""; } @@ -120,7 +120,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D; } @Override @@ -269,11 +269,11 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override @@ -326,4 +326,9 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory } return minStackSize <= 1; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } \ No newline at end of file diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index 8dea9153..9f96a395 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -15,11 +15,14 @@ import buildcraft.core.fluids.Tank; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BlockUtil; import buildcraft.core.utils.Utils; + import java.util.Deque; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; import java.util.TreeMap; + +import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -95,8 +98,8 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler { } private boolean placeFluid(int x, int y, int z, Fluid fluid) { - int blockId = worldObj.getBlockId(x, y, z); - if (canPlaceFluidAt(blockId, x, y, z)) { + Block block = worldObj.getBlock(x, y, z); + if (canPlaceFluidAt(block, x, y, z)) { boolean placed = worldObj.setBlock(x, y, z, FluidUtils.getFluidBlockId(fluid, true)); if (placed) { queueAdjacent(x, y, z); @@ -178,21 +181,21 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler { if ((x - xCoord) * (x - xCoord) + (z - zCoord) * (z - zCoord) > 64 * 64) return; - int blockId = worldObj.getBlockId(x, y, z); - if (BlockUtil.getFluid(blockId) == tank.getFluidType()) { + Block block = worldObj.getBlock(x, y, z); + if (BlockUtil.getFluid(block) == tank.getFluidType()) { fluidsFound.add(index); } - if (canPlaceFluidAt(blockId, x, y, z)) { + if (canPlaceFluidAt(block, x, y, z)) { getLayerQueue(y).addLast(index); } } } - private boolean canPlaceFluidAt(int blockId, int x, int y, int z) { - return BlockUtil.isSoftBlock(blockId, worldObj, x, y, z) && !BlockUtil.isFullFluidBlock(blockId, worldObj, x, y, z); + private boolean canPlaceFluidAt(Block block, int x, int y, int z) { + return BlockUtil.isSoftBlock(block, worldObj, x, y, z) && !BlockUtil.isFullFluidBlock(blockId, worldObj, x, y, z); } - public void onNeighborBlockChange(int id) { + public void onNeighborBlockChange(Block block) { boolean p = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); if (powered != p) { powered = p; diff --git a/common/buildcraft/factory/TileHopper.java b/common/buildcraft/factory/TileHopper.java index caeabde1..2b3cd0f5 100644 --- a/common/buildcraft/factory/TileHopper.java +++ b/common/buildcraft/factory/TileHopper.java @@ -37,7 +37,7 @@ public class TileHopper extends TileBuildCraft implements IInventory { if (CoreProxy.proxy.isRenderWorld(worldObj) || worldObj.getTotalWorldTime() % 2 != 0) return; - TileEntity tile = this.worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord); + TileEntity tile = this.getWorldObj().getTileEntity(xCoord, yCoord - 1, zCoord); if (tile == null) return; @@ -89,8 +89,8 @@ public class TileHopper extends TileBuildCraft implements IInventory { } @Override - public String getInvName() { - return _inventory.getInvName(); + public String getInventoryName() { + return _inventory.getInventoryName(); } @Override @@ -100,19 +100,24 @@ public class TileHopper extends TileBuildCraft implements IInventory { @Override public boolean isUseableByPlayer(EntityPlayer entityPlayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this && entityPlayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && entityPlayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D; } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override public boolean isItemValidForSlot(int i, ItemStack itemstack) { return true; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/factory/TileMiningWell.java b/common/buildcraft/factory/TileMiningWell.java index 3e50ed4a..2ba5af0e 100644 --- a/common/buildcraft/factory/TileMiningWell.java +++ b/common/buildcraft/factory/TileMiningWell.java @@ -51,7 +51,7 @@ public class TileMiningWell extends TileBuildCraft implements IMachine, IPowerRe int depth = yCoord - 1; - while (world.getBlockId(xCoord, depth, zCoord) == BuildCraftFactory.plainPipeBlock.blockID) { + while (world.getBlock(xCoord, depth, zCoord) == BuildCraftFactory.plainPipeBlock) { depth = depth - 1; } @@ -64,7 +64,7 @@ public class TileMiningWell extends TileBuildCraft implements IMachine, IPowerRe List stacks = BlockUtil.getItemStackFromBlock(worldObj, xCoord, depth, zCoord); - world.setBlock(xCoord, depth, zCoord, BuildCraftFactory.plainPipeBlock.blockID); + world.setBlock(xCoord, depth, zCoord, BuildCraftFactory.plainPipeBlock); if (wasAir) return; diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index bf5b00a5..83035a3f 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -29,6 +29,7 @@ import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BlockUtil; import buildcraft.core.utils.Utils; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -37,6 +38,8 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.Set; import java.util.TreeMap; + +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -142,7 +145,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor } } - public void onNeighborBlockChange(int id) { + public void onNeighborBlockChange(Block block) { boolean p = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); if (powered != p) { powered = p; @@ -152,7 +155,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor } private boolean isBlocked(int x, int y, int z) { - Material mat = worldObj.getBlockMaterial(x, y, z); + Material mat = worldObj.getBlock(x, y, z).getMaterial(); return mat.blocksMovement(); } @@ -240,7 +243,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor int x = xCoord; int y = aimY; int z = zCoord; - Fluid pumpingFluid = BlockUtil.getFluid(worldObj.getBlockId(x, y, z)); + Fluid pumpingFluid = BlockUtil.getFluid(worldObj.getBlock(x, y, z)); if (pumpingFluid == null) return; @@ -280,11 +283,11 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if ((x - xCoord) * (x - xCoord) + (z - zCoord) * (z - zCoord) > 64 * 64) return; - int blockId = worldObj.getBlockId(x, y, z); - if (BlockUtil.getFluid(blockId) == pumpingFluid) { + Block block = worldObj.getBlock(x, y, z); + if (BlockUtil.getFluid(block) == pumpingFluid) { fluidsFound.add(index); } - if (canDrainBlock(blockId, x, y, z, pumpingFluid)) { + if (canDrainBlock(block, x, y, z, pumpingFluid)) { getLayerQueue(y).add(index); numFluidBlocksFound++; } @@ -302,11 +305,11 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor return true; } - private boolean canDrainBlock(int blockId, int x, int y, int z, Fluid fluid) { + private boolean canDrainBlock(Block block, int x, int y, int z, Fluid fluid) { if (!isFluidAllowed(fluid)) return false; - FluidStack fluidStack = BlockUtil.drainBlock(blockId, worldObj, x, y, z, false); + FluidStack fluidStack = BlockUtil.drainBlock(block, worldObj, x, y, z, false); if (fluidStack == null || fluidStack.amount <= 0) return false; diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index ed500438..c068ad06 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -11,6 +11,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; +import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -259,8 +260,8 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (!columnVisitListIsUpdated) { // nextTarget may not be accurate, at least search the target column for changes for (int y = nextTarget[1] + 1; y < yCoord + 3; y++) { - int blockID = worldObj.getBlockId(nextTarget[0], y, nextTarget[2]); - if (BlockUtil.isAnObstructingBlock(blockID, worldObj, nextTarget[0], y, nextTarget[2]) || !BlockUtil.isSoftBlock(blockID, worldObj, nextTarget[0], y, nextTarget[2])) { + Block block = worldObj.getBlock(nextTarget[0], y, nextTarget[2]); + if (BlockUtil.isAnObstructingBlock(block, worldObj, nextTarget[0], y, nextTarget[2]) || !BlockUtil.isSoftBlock(block, worldObj, nextTarget[0], y, nextTarget[2])) { createColumnVisitList(); columnVisitListIsUpdated = true; nextTarget = null; @@ -329,11 +330,11 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept continue; } - int blockID = worldObj.getBlockId(bx, by, bz); + Block block = worldObj.getBlock(bx, by, bz); - if (!BlockUtil.canChangeBlock(blockID, worldObj, bx, by, bz)) { + if (!BlockUtil.canChangeBlock(block, worldObj, bx, by, bz)) { blockedColumns[searchX][searchZ] = true; - } else if (!BlockUtil.isSoftBlock(blockID, worldObj, bx, by, bz)) { + } else if (!BlockUtil.isSoftBlock(block, worldObj, bx, by, bz)) { visitList.add(new int[]{bx, by, bz}); } if (height == 0 && !worldObj.isAirBlock(bx, by, bz)) @@ -417,7 +418,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept int j = targetY - 1; int k = targetZ; - int blockId = worldObj.getBlockId(i, j, k); + Block block = worldObj.getBlock(i, j, k); if (isQuarriableBlock(i, j, k)) { @@ -487,8 +488,8 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } private boolean isQuarriableBlock(int bx, int by, int bz) { - int blockID = worldObj.getBlockId(bx, by, bz); - return BlockUtil.canChangeBlock(blockID, worldObj, bx, by, bz) && !BlockUtil.isSoftBlock(blockID, worldObj, bx, by, bz); + Block block = worldObj.getBlock(bx, by, bz); + return BlockUtil.canChangeBlock(block, worldObj, bx, by, bz) && !BlockUtil.isSoftBlock(block, worldObj, bx, by, bz); } @Override @@ -667,7 +668,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept public void initialize() { super.initialize(); - if (CoreProxy.proxy.isSimulating(this.worldObj) && !box.initialized) { + if (CoreProxy.proxy.isSimulating(this.getWorldObj()) && !box.initialized) { setBoundaries(false); } @@ -722,7 +723,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } @Override - public String getInvName() { + public String getInventoryName() { return ""; } @@ -742,11 +743,11 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override @@ -856,4 +857,9 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } sendNetworkUpdate(); } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 476b5e1e..5e8e3702 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -85,7 +85,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe } @Override - public String getInvName() { + public String getInventoryName() { return null; } @@ -101,7 +101,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override @@ -279,11 +279,11 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } public void resetFilters() { @@ -383,4 +383,9 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe public boolean canDrain(ForgeDirection from, Fluid fluid) { return true; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 115552c8..0bfcbccd 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -129,7 +129,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { } public static TileTank getTankBelow(TileTank tile) { - TileEntity below = tile.worldObj.getBlockTileEntity(tile.xCoord, tile.yCoord - 1, tile.zCoord); + TileEntity below = tile.getWorldObj().getTileEntity(tile.xCoord, tile.yCoord - 1, tile.zCoord); if (below instanceof TileTank) { return (TileTank) below; } else { @@ -138,7 +138,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { } public static TileTank getTankAbove(TileTank tile) { - TileEntity above = tile.worldObj.getBlockTileEntity(tile.xCoord, tile.yCoord + 1, tile.zCoord); + TileEntity above = tile.getWorldObj().getTileEntity(tile.xCoord, tile.yCoord + 1, tile.zCoord); if (above instanceof TileTank) { return (TileTank) above; } else { diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index 27c407e3..c2e76d4f 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -39,7 +39,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { @Override public void setInventorySlotContents(int slot, ItemStack stack) { super.setInventorySlotContents(slot, stack); - if (stack != null && tile.isLast() && CoreProxy.proxy.isRenderWorld(tile.worldObj)) { + if (stack != null && tile.isLast() && CoreProxy.proxy.isRenderWorld(tile.getWorldObj())) { InvUtils.addItemToolTip(stack, "tip", EnumChatFormatting.YELLOW + StringUtils.localize("gui.clickcraft")); } } diff --git a/common/buildcraft/factory/gui/ContainerRefinery.java b/common/buildcraft/factory/gui/ContainerRefinery.java index bfdd3945..b03634a5 100644 --- a/common/buildcraft/factory/gui/ContainerRefinery.java +++ b/common/buildcraft/factory/gui/ContainerRefinery.java @@ -55,7 +55,7 @@ public class ContainerRefinery extends BuildCraftContainer { refinery.setFilter(slot, filter); - if (CoreProxy.proxy.isRenderWorld(refinery.worldObj)) { + if (CoreProxy.proxy.isRenderWorld(refinery.getWorldObj())) { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override public void writeData(ByteBuf data) { diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index 6a5b305f..7f598494 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -54,7 +54,7 @@ public class PacketHandlerFactory extends BuildCraftChannelHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileRefinery)) return null; @@ -63,7 +63,7 @@ public class PacketHandlerFactory extends BuildCraftChannelHandler { private void onRefinerySelect(EntityPlayer playerEntity, PacketUpdate packet) throws IOException { - TileRefinery tile = getRefinery(playerEntity.worldObj, packet.posX, packet.posY, packet.posZ); + TileRefinery tile = getRefinery(playerEntity.getWorldObj(), packet.posX, packet.posY, packet.posZ); if (tile == null || packet.payload == null) return; diff --git a/common/buildcraft/factory/render/RenderRefinery.java b/common/buildcraft/factory/render/RenderRefinery.java index b1bce960..f248df8b 100644 --- a/common/buildcraft/factory/render/RenderRefinery.java +++ b/common/buildcraft/factory/render/RenderRefinery.java @@ -95,7 +95,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent anim = tile.getAnimationStage(); angle = 0; - switch (tile.worldObj.getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord)) { + switch (tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord)) { case 2: angle = 90; break; @@ -184,7 +184,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent GL11.glScalef(0.5F, 1, 0.5F); if (liquid1 != null && liquid1.amount > 0) { - int[] list1 = FluidRenderer.getFluidDisplayLists(liquid1, tile.worldObj, false); + int[] list1 = FluidRenderer.getFluidDisplayLists(liquid1, tile.getWorldObj(), false); if (list1 != null) { bindTexture(FluidRenderer.getFluidSheet(liquid1)); @@ -194,7 +194,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent } if (liquid2 != null && liquid2.amount > 0) { - int[] list2 = FluidRenderer.getFluidDisplayLists(liquid2, tile.worldObj, false); + int[] list2 = FluidRenderer.getFluidDisplayLists(liquid2, tile.getWorldObj(), false); if (list2 != null) { GL11.glPushMatrix(); @@ -208,7 +208,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent if (liquidResult != null && liquidResult.amount > 0) { - int[] list3 = FluidRenderer.getFluidDisplayLists(liquidResult, tile.worldObj, false); + int[] list3 = FluidRenderer.getFluidDisplayLists(liquidResult, tile.getWorldObj(), false); if (list3 != null) { GL11.glPushMatrix(); diff --git a/common/buildcraft/factory/render/RenderTank.java b/common/buildcraft/factory/render/RenderTank.java index 896dadcf..75beb90a 100644 --- a/common/buildcraft/factory/render/RenderTank.java +++ b/common/buildcraft/factory/render/RenderTank.java @@ -28,7 +28,7 @@ public class RenderTank extends TileEntitySpecialRenderer { return; } - int[] displayList = FluidRenderer.getFluidDisplayLists(liquid, tileentity.worldObj, false); + int[] displayList = FluidRenderer.getFluidDisplayLists(liquid, tileentity.getWorldObj(), false); if (displayList == null) { return; } diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index 049ada17..04ab9b64 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -25,8 +25,8 @@ public class BlockLaser extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon textureTop, textureBottom, textureSide; - public BlockLaser(int i) { - super(i, Material.iron); + public BlockLaser() { + super(Material.iron); setHardness(10F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); } @@ -51,7 +51,7 @@ public class BlockLaser extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World world) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileLaser(); } @@ -85,7 +85,7 @@ public class BlockLaser extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { textureTop = par1IconRegister.registerIcon("buildcraft:laser_top"); textureBottom = par1IconRegister.registerIcon("buildcraft:laser_bottom"); textureSide = par1IconRegister.registerIcon("buildcraft:laser_side"); diff --git a/common/buildcraft/silicon/BlockLaserTable.java b/common/buildcraft/silicon/BlockLaserTable.java index e2ce8f34..447f868b 100644 --- a/common/buildcraft/silicon/BlockLaserTable.java +++ b/common/buildcraft/silicon/BlockLaserTable.java @@ -6,12 +6,16 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; + +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; @@ -22,8 +26,8 @@ public class BlockLaserTable extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon[][] icons; - public BlockLaserTable(int i) { - super(i, Material.iron); + public BlockLaserTable() { + super(Material.iron); setBlockBounds(0, 0, 0, 1, 9F / 16F, 1); setHardness(10F); @@ -58,9 +62,9 @@ public class BlockLaserTable extends BlockContainer { } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override @@ -83,7 +87,7 @@ public class BlockLaserTable extends BlockContainer { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return null; } @@ -95,7 +99,7 @@ public class BlockLaserTable extends BlockContainer { @SuppressWarnings({"rawtypes", "unchecked"}) @Override @SideOnly(Side.CLIENT) - public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { + public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List par3List) { par3List.add(new ItemStack(this, 1, 0)); par3List.add(new ItemStack(this, 1, 1)); par3List.add(new ItemStack(this, 1, 2)); @@ -103,11 +107,11 @@ public class BlockLaserTable extends BlockContainer { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - icons = new Icon[3][]; - icons[0] = new Icon[3]; - icons[1] = new Icon[3]; - icons[2] = new Icon[3]; + public void registerBlockIcons(IIconRegister par1IconRegister) { + icons = new IIcon[3][]; + icons[0] = new IIcon[3]; + icons[1] = new IIcon[3]; + icons[2] = new IIcon[3]; icons[0][0] = par1IconRegister.registerIcon("buildcraft:assemblytable_bottom"); icons[0][1] = par1IconRegister.registerIcon("buildcraft:assemblytable_top"); diff --git a/common/buildcraft/silicon/GuiHandler.java b/common/buildcraft/silicon/GuiHandler.java index 618f81e4..7d7cbf06 100644 --- a/common/buildcraft/silicon/GuiHandler.java +++ b/common/buildcraft/silicon/GuiHandler.java @@ -19,7 +19,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { @@ -48,7 +48,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); switch (ID) { diff --git a/common/buildcraft/silicon/ItemRedstoneChipset.java b/common/buildcraft/silicon/ItemRedstoneChipset.java index b70c7227..8acbad34 100644 --- a/common/buildcraft/silicon/ItemRedstoneChipset.java +++ b/common/buildcraft/silicon/ItemRedstoneChipset.java @@ -5,10 +5,13 @@ import buildcraft.core.ItemBuildCraft; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.Locale; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; @@ -45,8 +48,8 @@ public class ItemRedstoneChipset extends ItemBuildCraft { } } - public ItemRedstoneChipset(int i) { - super(i); + public ItemRedstoneChipset() { + super(); setHasSubtypes(true); setMaxDamage(0); } @@ -64,7 +67,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft { @SuppressWarnings({"rawtypes", "unchecked"}) @Override @SideOnly(Side.CLIENT) - public void getSubItems(int id, CreativeTabs tab, List itemList) { + public void getSubItems(Item item, CreativeTabs tab, List itemList) { for (Chipset chipset : Chipset.VALUES) { itemList.add(chipset.getStack()); } diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 18f814c6..ac8519ab 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -44,11 +44,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; import net.minecraftforge.common.util.ForgeDirection; -import static net.minecraftforge.common.ForgeDirection.DOWN; -import static net.minecraftforge.common.ForgeDirection.EAST; -import static net.minecraftforge.common.ForgeDirection.NORTH; -import static net.minecraftforge.common.ForgeDirection.SOUTH; -import static net.minecraftforge.common.ForgeDirection.WEST; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.WEST; import net.minecraftforge.oredict.OreDictionary; import org.bouncycastle.util.Arrays; @@ -75,7 +75,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn @Override public void setInventorySlotContents(int slotId, ItemStack itemstack) { super.setInventorySlotContents(slotId, itemstack); - if (TileAdvancedCraftingTable.this.worldObj == null || !TileAdvancedCraftingTable.this.worldObj.isRemote) + if (TileAdvancedCraftingTable.this.getWorldObj() == null || !TileAdvancedCraftingTable.this.getWorldObj().isRemote) oreIDs[slotId] = itemstack == null ? -1 : OreDictionary.getOreID(itemstack); } } @@ -141,7 +141,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn private final class InternalPlayer extends EntityPlayer { public InternalPlayer() { - super(TileAdvancedCraftingTable.this.worldObj, "[BuildCraft]"); + super(TileAdvancedCraftingTable.this.getWorldObj(), "[BuildCraft]"); posX = TileAdvancedCraftingTable.this.xCoord; posY = TileAdvancedCraftingTable.this.yCoord + 1; posZ = TileAdvancedCraftingTable.this.zCoord; @@ -209,7 +209,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn } @Override - public String getInvName() { + public String getInventoryName() { return StringUtils.localize("tile.assemblyWorkbenchBlock"); } @@ -476,4 +476,9 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn lastMode = ActionMachineControl.Mode.Off; } } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 5f9fb26b..27fdc772 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -41,7 +41,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I nbt.setBoolean("s", select); NBTTagCompound itemNBT = new NBTTagCompound(); stack.writeToNBT(itemNBT); - nbt.setCompoundTag("i", itemNBT); + nbt.setTag("i", itemNBT); return nbt; } @@ -121,7 +121,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I } @Override - public String getInvName() { + public String getInventoryName() { return StringUtils.localize("tile.assemblyTableBlock"); } @@ -307,7 +307,6 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I @Override public boolean isInvNameLocalized() { - // TODO Auto-generated method stub return false; } @@ -315,4 +314,9 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/silicon/TileIntegrationTable.java b/common/buildcraft/silicon/TileIntegrationTable.java index 5e96d069..97821dd4 100644 --- a/common/buildcraft/silicon/TileIntegrationTable.java +++ b/common/buildcraft/silicon/TileIntegrationTable.java @@ -167,7 +167,12 @@ public class TileIntegrationTable extends TileLaserTableBase implements ISidedIn } @Override - public String getInvName() { + public String getInventoryName() { return StringUtils.localize("tile.integrationTableBlock"); } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 161d56cd..e3824921 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -166,7 +166,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction for (int y = minY; y <= maxY; ++y) { for (int z = minZ; z <= maxZ; ++z) { - TileEntity tile = worldObj.getBlockTileEntity(x, y, z); + TileEntity tile = worldObj.getTileEntity(x, y, z); if (tile instanceof ILaserTarget) { ILaserTarget table = (ILaserTarget) tile; diff --git a/common/buildcraft/silicon/TileLaserTableBase.java b/common/buildcraft/silicon/TileLaserTableBase.java index 8266cca3..ca659c8e 100644 --- a/common/buildcraft/silicon/TileLaserTableBase.java +++ b/common/buildcraft/silicon/TileLaserTableBase.java @@ -128,15 +128,15 @@ public abstract class TileLaserTableBase extends TileBuildCraft implements ILase @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this && !isInvalid(); + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && !isInvalid(); } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index 8a961c6a..25e3a87d 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -115,7 +115,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { updateRecipes(); // Request current selection from server - if (CoreProxy.proxy.isRenderWorld(assemblyTable.worldObj)) { + if (CoreProxy.proxy.isRenderWorld(assemblyTable.getWorldObj())) { BuildCraftSilicon.instance.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord, assemblyTable.yCoord, assemblyTable.zCoord)); } @@ -197,7 +197,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { message.stack = slot.recipe.output; - if (CoreProxy.proxy.isRenderWorld(table.worldObj)) { + if (CoreProxy.proxy.isRenderWorld(table.getWorldObj())) { PacketNBT packet = new PacketNBT(PacketIds.SELECTION_ASSEMBLY, message.getNBT(), table.xCoord, table.yCoord, table.zCoord); diff --git a/common/buildcraft/silicon/gui/GuiLaserTable.java b/common/buildcraft/silicon/gui/GuiLaserTable.java index 4eb18d89..7cf2553c 100644 --- a/common/buildcraft/silicon/gui/GuiLaserTable.java +++ b/common/buildcraft/silicon/gui/GuiLaserTable.java @@ -64,7 +64,7 @@ public abstract class GuiLaserTable extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); - String title = table.getInvName(); + String title = table.getInventoryName(); fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); } diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index 6dbd3c23..f1b14249 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -75,7 +75,7 @@ public class PacketHandlerSilicon extends BuildCraftChannelHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileAssemblyTable)) return null; @@ -87,7 +87,7 @@ public class PacketHandlerSilicon extends BuildCraftChannelHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileAdvancedCraftingTable)) return null; diff --git a/common/buildcraft/transport/BlockFilteredBuffer.java b/common/buildcraft/transport/BlockFilteredBuffer.java index ef7988e1..81bf97eb 100644 --- a/common/buildcraft/transport/BlockFilteredBuffer.java +++ b/common/buildcraft/transport/BlockFilteredBuffer.java @@ -31,13 +31,13 @@ public class BlockFilteredBuffer extends BlockBuildCraft { private static IIcon blockTexture; - public BlockFilteredBuffer(int blockId) { - super(blockId, Material.iron); + public BlockFilteredBuffer() { + super(Material.iron); setHardness(5F); } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileFilteredBuffer(); } @@ -72,7 +72,7 @@ public class BlockFilteredBuffer extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister par1IconRegister) { blockTexture = par1IconRegister.registerIcon("buildcraft:filteredBuffer_all"); } diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 224b411c..e9f7ba80 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -9,6 +9,7 @@ package buildcraft.transport; import buildcraft.api.transport.PipeWire; import buildcraft.transport.gates.ItemGate; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -25,6 +26,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -51,7 +53,9 @@ import buildcraft.transport.gates.GateFactory; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.Arrays; + import net.minecraft.client.Minecraft; public class BlockGenericPipe extends BlockBuildCraft { @@ -87,8 +91,8 @@ public class BlockGenericPipe extends BlockBuildCraft { private int renderMask = 0; /* Defined subprograms ************************************************* */ - public BlockGenericPipe(int i) { - super(i, Material.glass); + public BlockGenericPipe() { + super(Material.glass); setRenderAllSides(); setCreativeTab(null); } @@ -141,8 +145,8 @@ public class BlockGenericPipe extends BlockBuildCraft { } @Override - public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof ISolidSideTile) { return ((ISolidSideTile) tile).isSolidOnSide(side); } @@ -159,7 +163,7 @@ public class BlockGenericPipe extends BlockBuildCraft { setBlockBounds(CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MAX_POS, CoreConstants.PIPE_MAX_POS, CoreConstants.PIPE_MAX_POS); super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity); - TileEntity tile1 = world.getBlockTileEntity(i, j, k); + TileEntity tile1 = world.getTileEntity(i, j, k); if (tile1 instanceof TileGenericPipe) { TileGenericPipe tileG = (TileGenericPipe) tile1; @@ -280,7 +284,7 @@ public class BlockGenericPipe extends BlockBuildCraft { } private RaytraceResult doRayTrace(World world, int x, int y, int z, Vec3 origin, Vec3 direction) { - TileEntity pipeTileEntity = world.getBlockTileEntity(x, y, z); + TileEntity pipeTileEntity = world.getTileEntity(x, y, z); TileGenericPipe tileG = null; if (pipeTileEntity instanceof TileGenericPipe) @@ -480,7 +484,7 @@ public class BlockGenericPipe extends BlockBuildCraft { pipe.onBlockRemoval(); } - World world = pipe.container.worldObj; + World world = pipe.container.getWorldObj(); if (world == null) return; @@ -495,14 +499,14 @@ public class BlockGenericPipe extends BlockBuildCraft { } pipeRemoved.put(new BlockIndex(x, y, z), pipe); - world.removeBlockTileEntity(x, y, z); + world.removeTileEntity(x, y, z); } @Override - public void breakBlock(World world, int x, int y, int z, int par5, int par6) { + public void breakBlock(World world, int x, int y, int z, Block block, int par6) { Utils.preDestroyBlock(world, x, y, z); removePipe(getPipe(world, x, y, z)); - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, x, y, z, block, par6); } @Override @@ -532,7 +536,7 @@ public class BlockGenericPipe extends BlockBuildCraft { } @Override - public TileEntity createNewTileEntity(World var1) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileGenericPipe(); } @@ -601,8 +605,8 @@ public class BlockGenericPipe extends BlockBuildCraft { /* Wrappers ************************************************************ */ @Override - public void onNeighborBlockChange(World world, int x, int y, int z, int id) { - super.onNeighborBlockChange(world, x, y, z, id); + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + super.onNeighborBlockChange(world, x, y, z, block); Pipe pipe = getPipe(world, x, y, z); @@ -652,7 +656,7 @@ public class BlockGenericPipe extends BlockBuildCraft { return true; } else if (currentItem == null) { // Fall through the end of the test - } else if (currentItem.itemID == Item.sign.itemID) + } else if (currentItem.getItem() == Items.sign) // Sign will be placed anyway, so lets show the sign gui return false; else if (currentItem.getItem() instanceof ItemPipe) @@ -737,7 +741,7 @@ public class BlockGenericPipe extends BlockBuildCraft { private boolean stripGate(Pipe pipe) { if (pipe.hasGate()) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { pipe.gate.dropGate(); } pipe.resetGate(); @@ -768,7 +772,7 @@ public class BlockGenericPipe extends BlockBuildCraft { private boolean stripWire(Pipe pipe, PipeWire color) { if (pipe.wireSet[color.ordinal()]) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { dropWire(color, pipe); } pipe.wireSet[color.ordinal()] = false; @@ -868,7 +872,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @SideOnly(Side.CLIENT) @Override public IIcon getBlockTexture(IBlockAccess iblockaccess, int x, int y, int z, int side) { - TileEntity tile = iblockaccess.getBlockTileEntity(x, y, z); + TileEntity tile = iblockaccess.getTileEntity(x, y, z); if (!(tile instanceof TileGenericPipe)) return null; if (((TileGenericPipe) tile).renderState.textureArray != null) @@ -939,7 +943,7 @@ public class BlockGenericPipe extends BlockBuildCraft { public static ItemPipe registerPipe(int key, Class clas) { ItemPipe item = new ItemPipe(key); - item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); + item.setBlockName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); GameRegistry.registerItem(item, item.getUnlocalizedName()); pipes.put(item.itemID, clas); @@ -973,14 +977,14 @@ public class BlockGenericPipe extends BlockBuildCraft { return null; } - public static boolean placePipe(Pipe pipe, World world, int i, int j, int k, int blockId, int meta) { + public static boolean placePipe(Pipe pipe, World world, int i, int j, int k, Block block, int meta) { if (world.isRemote) return true; - boolean placed = world.setBlock(i, j, k, blockId, meta, 3); + boolean placed = world.setBlock(i, j, k, block, meta, 3); if (placed) { - TileGenericPipe tile = (TileGenericPipe) world.getBlockTileEntity(i, j, k); + TileGenericPipe tile = (TileGenericPipe) world.getTileEntity(i, j, k); tile.initialize(pipe); tile.sendUpdateToClient(); } @@ -990,7 +994,7 @@ public class BlockGenericPipe extends BlockBuildCraft { public static Pipe getPipe(IBlockAccess blockAccess, int i, int j, int k) { - TileEntity tile = blockAccess.getBlockTileEntity(i, j, k); + TileEntity tile = blockAccess.getTileEntity(i, j, k); if (!(tile instanceof TileGenericPipe) || tile.isInvalid()) return null; @@ -1008,7 +1012,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { if (!skippedFirstIconRegister) { skippedFirstIconRegister = true; return; diff --git a/common/buildcraft/transport/Gate.java b/common/buildcraft/transport/Gate.java index 393f83f5..f6eaf3fc 100644 --- a/common/buildcraft/transport/Gate.java +++ b/common/buildcraft/transport/Gate.java @@ -148,7 +148,7 @@ public final class Gate { // GUI public void openGui(EntityPlayer player) { if (!CoreProxy.proxy.isRenderWorld(player.worldObj)) { - player.openGui(BuildCraftTransport.instance, GuiIds.GATES, pipe.container.worldObj, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); + player.openGui(BuildCraftTransport.instance, GuiIds.GATES, pipe.container.getWorldObj(), pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); } } diff --git a/common/buildcraft/transport/GuiHandler.java b/common/buildcraft/transport/GuiHandler.java index fd9158a0..74e5473e 100644 --- a/common/buildcraft/transport/GuiHandler.java +++ b/common/buildcraft/transport/GuiHandler.java @@ -29,7 +29,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileFilteredBuffer) { TileFilteredBuffer filteredBuffer = (TileFilteredBuffer) tile; @@ -73,7 +73,7 @@ public class GuiHandler implements IGuiHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileFilteredBuffer) { TileFilteredBuffer filteredBuffer = (TileFilteredBuffer) tile; diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 9d099dca..ca587002 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -32,8 +32,8 @@ public class ItemFacade extends ItemBuildCraft { public final static LinkedList allFacades = new LinkedList(); - public ItemFacade(int i) { - super(i); + public ItemFacade() { + super(); setHasSubtypes(true); setMaxDamage(0); @@ -79,7 +79,7 @@ public class ItemFacade extends ItemBuildCraft { Position pos = new Position(x, y, z, ForgeDirection.getOrientation(side)); pos.moveForwards(1.0); - TileEntity tile = worldObj.getBlockTileEntity((int) pos.x, (int) pos.y, (int) pos.z); + TileEntity tile = worldObj.getTileEntity((int) pos.x, (int) pos.y, (int) pos.z); if (!(tile instanceof TileGenericPipe)) return false; TileGenericPipe pipeTile = (TileGenericPipe) tile; diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index 290f5296..5e48d025 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -14,11 +14,14 @@ import buildcraft.core.ItemBuildCraft; import buildcraft.core.utils.BCLog; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; import java.util.logging.Level; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; @@ -29,21 +32,20 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { private IIconProvider iconProvider; private int pipeIconIndex; - protected ItemPipe(int i) { - super(i); + protected ItemPipe() { + super(); } @Override public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int side, float par8, float par9, float par10) { - int blockID = BuildCraftTransport.genericPipeBlock.blockID; Block block = BuildCraftTransport.genericPipeBlock; - int id = world.getBlockId(i, j, k); + Block worldBlock = world.getBlock(i, j, k); - if (id == Block.snow.blockID) { + if (worldBlock == Blocks.snow) { side = 1; - } else if (id != Block.vine.blockID && id != Block.tallGrass.blockID && id != Block.deadBush.blockID - && (Block.blocksList[id] == null || !Block.blocksList[id].isBlockReplaceable(world, i, j, k))) { + } else if (worldBlock != Blocks.vine && worldBlock != Blocks.tallgrass && worldBlock != Blocks.deadbush + && (worldBlock == null || !worldBlock.isBlockReplaceable(world, i, j, k))) { if (side == 0) { j--; } diff --git a/common/buildcraft/transport/ItemPipeWire.java b/common/buildcraft/transport/ItemPipeWire.java index 1394070f..52fb9f2b 100644 --- a/common/buildcraft/transport/ItemPipeWire.java +++ b/common/buildcraft/transport/ItemPipeWire.java @@ -16,12 +16,12 @@ public class ItemPipeWire extends ItemBuildCraft { private Icon[] icons; - public ItemPipeWire(int i) { - super(i); + public ItemPipeWire() { + super(); setHasSubtypes(true); setMaxDamage(0); setPassSneakClick(true); - setUnlocalizedName("pipeWire"); + setBlockName("pipeWire"); } @Override diff --git a/common/buildcraft/transport/ItemPlug.java b/common/buildcraft/transport/ItemPlug.java index d8d15a49..4557417e 100644 --- a/common/buildcraft/transport/ItemPlug.java +++ b/common/buildcraft/transport/ItemPlug.java @@ -9,8 +9,8 @@ import net.minecraft.world.World; public class ItemPlug extends ItemBuildCraft { - public ItemPlug(int i) { - super(i); + public ItemPlug() { + super(); } @Override @@ -22,7 +22,7 @@ public class ItemPlug extends ItemBuildCraft { // public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { // if (worldObj.isRemote) // return false; -// TileEntity tile = worldObj.getBlockTileEntity(x, y, z); +// TileEntity tile = worldObj.getTileEntity(x, y, z); // if (!(tile instanceof TileGenericPipe)) // return false; // TileGenericPipe pipeTile = (TileGenericPipe) tile; diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 9b244595..5630bffe 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -183,7 +183,7 @@ public abstract class Pipe implements IDropControlInven // Update the gate if we have any if (gate != null) { - if (container.worldObj.isRemote) { + if (container.getWorldObj().isRemote) { // on client, only update the graphical pulse if needed gate.updatePulse(); } else { @@ -310,7 +310,7 @@ public abstract class Pipe implements IDropControlInven } private boolean receiveSignal(int signal, PipeWire color) { - if (container.worldObj == null) + if (container.getWorldObj() == null) return false; int oldSignal = signalStrength[color.ordinal()]; @@ -409,12 +409,12 @@ public abstract class Pipe implements IDropControlInven } protected void notifyBlocksOfNeighborChange(ForgeDirection side) { - container.worldObj.notifyBlocksOfNeighborChange(container.xCoord + side.offsetX, container.yCoord + side.offsetY, container.zCoord + side.offsetZ, BuildCraftTransport.genericPipeBlock.blockID); + container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord + side.offsetX, container.yCoord + side.offsetY, container.zCoord + side.offsetZ, BuildCraftTransport.genericPipeBlock.blockID); } protected void updateNeighbors(boolean needSelf) { if (needSelf) { - container.worldObj.notifyBlocksOfNeighborChange(container.xCoord, container.yCoord, container.zCoord, BuildCraftTransport.genericPipeBlock.blockID); + container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord, container.yCoord, container.zCoord, BuildCraftTransport.genericPipeBlock.blockID); } for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { notifyBlocksOfNeighborChange(side); @@ -422,7 +422,7 @@ public abstract class Pipe implements IDropControlInven } public void dropItem(ItemStack stack) { - InvUtils.dropItems(container.worldObj, stack, container.xCoord, container.yCoord, container.zCoord); + InvUtils.dropItems(container.getWorldObj(), stack, container.xCoord, container.yCoord, container.zCoord); } public void onBlockRemoval() { @@ -541,6 +541,6 @@ public abstract class Pipe implements IDropControlInven } public World getWorld() { - return container.worldObj; + return container.getWorldObj(); } } diff --git a/common/buildcraft/transport/PipeTransport.java b/common/buildcraft/transport/PipeTransport.java index bd5982e3..f741e4ba 100644 --- a/common/buildcraft/transport/PipeTransport.java +++ b/common/buildcraft/transport/PipeTransport.java @@ -20,7 +20,7 @@ public abstract class PipeTransport { public abstract PipeType getPipeType(); public World getWorld() { - return container.worldObj; + return container.getWorldObj(); } public void readFromNBT(NBTTagCompound nbttagcompound) { diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index 575f65ce..c2154cfd 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -188,12 +188,12 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(container.worldObj)) + if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) return; moveFluids(); - if (tracker.markTimeIfDelay(container.worldObj, BuildCraftCore.updateFactor)) { + if (tracker.markTimeIfDelay(container.getWorldObj(), BuildCraftCore.updateFactor)) { boolean init = false; if (++clientSyncCounter > BuildCraftCore.longUpdateFactor) { @@ -202,7 +202,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler } PacketFluidUpdate packet = computeFluidUpdate(init, true); if (packet != null) { - BuildCraftTransport.instance.sendToPlayers(packet, container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); + BuildCraftTransport.instance.sendToPlayers(packet, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); } } } @@ -333,7 +333,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler } private void moveFluids() { - short newTimeSlot = (short) (container.worldObj.getTotalWorldTime() % travelDelay); + short newTimeSlot = (short) (container.getWorldObj().getTotalWorldTime() % travelDelay); short outputCount = computeCurrentConnectionStatesAndTickFlows(newTimeSlot); moveFromPipe(outputCount); @@ -358,7 +358,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler if (filled <= 0) { outputTTL[o.ordinal()]--; } -// else FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.worldObj, container.xCoord, container.yCoord, container.zCoord)); +// else FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord)); } } } @@ -388,7 +388,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler int filled = internalTanks[direction.ordinal()].fill(liquidToPush, true); internalTanks[ForgeDirection.UNKNOWN.ordinal()].drain(filled, true); // if (filled > 0) -// FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.worldObj, container.xCoord, container.yCoord, container.zCoord)); +// FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord)); } } } @@ -433,7 +433,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler int filled = internalTanks[ForgeDirection.UNKNOWN.ordinal()].fill(liquidToPush, true); internalTanks[dir.ordinal()].drain(filled, true); // if (filled > 0) -// FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.worldObj, container.xCoord, container.yCoord, container.zCoord)); +// FluidEvent.fireEvent(new FluidMotionEvent(liquidToPush, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord)); } } } diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index da593099..ceb08c18 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -100,7 +100,7 @@ public class PipeTransportItems extends PipeTransport { readjustPosition(item); - if (!container.worldObj.isRemote) { + if (!container.getWorldObj().isRemote) { item.output = resolveDestination(item); } @@ -115,7 +115,7 @@ public class PipeTransportItems extends PipeTransport { items.add(item); - if (!container.worldObj.isRemote) { + if (!container.getWorldObj().isRemote) { sendTravelerPacket(item, false); if (items.size() > BuildCraftTransport.groupItemsTrigger) @@ -142,8 +142,8 @@ public class PipeTransportItems extends PipeTransport { } private void destroyPipe() { - BlockUtil.explodeBlock(container.worldObj, container.xCoord, container.yCoord, container.zCoord); - container.worldObj.setBlockToAir(container.xCoord, container.yCoord, container.zCoord); + BlockUtil.explodeBlock(container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); + container.getWorldObj().setBlockToAir(container.xCoord, container.yCoord, container.zCoord); } /** @@ -163,7 +163,7 @@ public class PipeTransportItems extends PipeTransport { readjustSpeed(item); readjustPosition(item); - if (!container.worldObj.isRemote) { + if (!container.getWorldObj().isRemote) { item.output = resolveDestination(item); } @@ -177,7 +177,7 @@ public class PipeTransportItems extends PipeTransport { items.unscheduleRemoval(item); - if (!container.worldObj.isRemote) + if (!container.getWorldObj().isRemote) sendTravelerPacket(item, true); } @@ -250,7 +250,7 @@ public class PipeTransportItems extends PipeTransport { private void moveSolids() { items.flush(); - if (!container.worldObj.isRemote) + if (!container.getWorldObj().isRemote) items.purgeCorruptedItems(); items.iterating = true; @@ -319,7 +319,7 @@ public class PipeTransportItems extends PipeTransport { if (passToNextPipe(item, tile)) { // NOOP } else if (tile instanceof IInventory) { - if (!container.worldObj.isRemote) { + if (!container.getWorldObj().isRemote) { if (item.getInsertionHandler().canInsertItem(item, (IInventory) tile)) { ItemStack added = Transactor.getTransactorFor(tile).add(item.getItemStack(), item.output.getOpposite(), true); item.getItemStack().stackSize -= added.stackSize; @@ -334,7 +334,7 @@ public class PipeTransportItems extends PipeTransport { } private void dropItem(TravelingItem item) { - if (container.worldObj.isRemote) + if (container.getWorldObj().isRemote) return; if (travelHook != null) { @@ -345,7 +345,7 @@ public class PipeTransportItems extends PipeTransport { container.pipe.handlePipeEvent(event); if (event.entity == null) return; - container.worldObj.spawnEntityInWorld(event.entity); + container.getWorldObj().spawnEntityInWorld(event.entity); } protected boolean middleReached(TravelingItem item) { @@ -438,7 +438,7 @@ public class PipeTransportItems extends PipeTransport { private void sendTravelerPacket(TravelingItem data, boolean forceStackRefresh) { PacketPipeTransportTraveler packet = new PacketPipeTransportTraveler(data, forceStackRefresh); - int dimension = container.worldObj.provider.dimensionId; + int dimension = container.getWorldObj().provider.dimensionId; PacketDispatcher.sendPacketToAllAround(container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST, dimension, packet.getPacket()); } diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 25714679..e91cf4d7 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -134,7 +134,7 @@ public class PipeTransportPower extends PipeTransport { @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(container.worldObj)) + if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) return; step(); @@ -249,7 +249,7 @@ public class PipeTransportPower extends PipeTransport { } } - if (tracker.markTimeIfDelay(container.worldObj, 2 * BuildCraftCore.updateFactor)) { + if (tracker.markTimeIfDelay(container.getWorldObj(), 2 * BuildCraftCore.updateFactor)) { PacketPowerUpdate packet = new PacketPowerUpdate(container.xCoord, container.yCoord, container.zCoord); double displayFactor = MAX_DISPLAY / 1024.0; @@ -259,7 +259,7 @@ public class PipeTransportPower extends PipeTransport { packet.displayPower = clientDisplayPower; packet.overload = isOverloaded(); - BuildCraftTransport.instance.sendToPlayers(packet, container.worldObj, container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); + BuildCraftTransport.instance.sendToPlayers(packet, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); } } @@ -282,8 +282,8 @@ public class PipeTransportPower extends PipeTransport { } private void step() { - if (currentDate != container.worldObj.getTotalWorldTime()) { - currentDate = container.worldObj.getTotalWorldTime(); + if (currentDate != container.getWorldObj().getTotalWorldTime()) { + currentDate = container.getWorldObj().getTotalWorldTime(); powerQuery = nextPowerQuery; nextPowerQuery = new int[6]; @@ -343,7 +343,7 @@ public class PipeTransportPower extends PipeTransport { @Override public void initialize() { - currentDate = container.worldObj.getTotalWorldTime(); + currentDate = container.getWorldObj().getTotalWorldTime(); } @Override diff --git a/common/buildcraft/transport/TileFilteredBuffer.java b/common/buildcraft/transport/TileFilteredBuffer.java index 3101a9a4..d588eed4 100644 --- a/common/buildcraft/transport/TileFilteredBuffer.java +++ b/common/buildcraft/transport/TileFilteredBuffer.java @@ -50,8 +50,8 @@ public class TileFilteredBuffer extends TileBuildCraft implements IInventory { } @Override - public String getInvName() { - return inventoryStorage.getInvName(); + public String getInventoryName() { + return inventoryStorage.getInventoryName(); } @Override @@ -61,15 +61,15 @@ public class TileFilteredBuffer extends TileBuildCraft implements IInventory { @Override public boolean isUseableByPlayer(EntityPlayer entityPlayer) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override - public void openChest() { + public void openInventory() { } @Override - public void closeChest() { + public void closeInventory() { } @Override @@ -77,10 +77,10 @@ public class TileFilteredBuffer extends TileBuildCraft implements IInventory { ItemStack filterItemStack = inventoryFilters.getStackInSlot(i); - if ( filterItemStack == null || filterItemStack.itemID != itemstack.itemID) + if ( filterItemStack == null || filterItemStack.getItem() != itemstack.getItem()) return false; - if (Item.itemsList[itemstack.itemID].isDamageable()) + if (itemstack.getItem().isDamageable()) return true; if (filterItemStack.getItemDamage() == itemstack.getItemDamage()) @@ -111,4 +111,9 @@ public class TileFilteredBuffer extends TileBuildCraft implements IInventory { inventoryFilters.writeToNBT(inventoryFiltersTag); nbtTagCompound.setTag("inventoryFilters", inventoryFiltersTag); } + + @Override + public boolean hasCustomInventoryName() { + return false; + } } diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 51fa6cb7..80129394 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -305,7 +305,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui TileEntity tile = getTile(o); if (tile instanceof ITileBufferHolder) - ((ITileBufferHolder) tile).blockCreated(o, BuildCraftTransport.genericPipeBlock.blockID, this); + ((ITileBufferHolder) tile).blockCreated(o, BuildCraftTransport.genericPipeBlock, this); if (tile instanceof TileGenericPipe) ((TileGenericPipe) tile).scheduleNeighborChange(); } @@ -433,19 +433,19 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } @Override - public void blockCreated(ForgeDirection from, int blockID, TileEntity tile) { + public void blockCreated(ForgeDirection from, Block block, TileEntity tile) { TileBuffer[] cache = getTileCache(); if (cache != null) - cache[from.getOpposite().ordinal()].set(blockID, tile); + cache[from.getOpposite().ordinal()].set(block, tile); } @Override - public int getBlockId(ForgeDirection to) { + public Block getBlock(ForgeDirection to) { TileBuffer[] cache = getTileCache(); if (cache != null) - return cache[to.ordinal()].getBlockID(); + return cache[to.ordinal()].getBlock(); else - return 0; + return null; } @Override @@ -590,7 +590,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } public boolean addFacade(ForgeDirection direction, int blockid, int meta) { - if (this.worldObj.isRemote) + if (this.getWorldObj().isRemote) return false; if (this.facadeBlocks[direction.ordinal()] == blockid) return false; @@ -600,7 +600,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui this.facadeBlocks[direction.ordinal()] = blockid; this.facadeMeta[direction.ordinal()] = meta; - worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlockId()); + worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleRenderUpdate(); return true; } @@ -608,7 +608,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui public boolean hasFacade(ForgeDirection direction) { if (direction == null || direction == ForgeDirection.UNKNOWN) return false; - if (this.worldObj.isRemote) + if (this.getWorldObj().isRemote) return renderState.facadeMatrix.getFacadeBlockId(direction) != 0; return (this.facadeBlocks[direction.ordinal()] != 0); } @@ -624,7 +624,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui dropFacadeItem(direction); this.facadeBlocks[direction.ordinal()] = 0; this.facadeMeta[direction.ordinal()] = 0; - worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlockId()); + worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleRenderUpdate(); } return true; @@ -722,7 +722,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui public boolean hasPlug(ForgeDirection side) { if (side == null || side == ForgeDirection.UNKNOWN) return false; - if (this.worldObj.isRemote) + if (this.getWorldObj().isRemote) return renderState.plugMatrix.isConnected(side); return plugs[side.ordinal()]; } @@ -733,7 +733,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui if (!worldObj.isRemote) { plugs[side.ordinal()] = false; InvUtils.dropItems(worldObj, new ItemStack(BuildCraftTransport.plugItem), this.xCoord, this.yCoord, this.zCoord); - worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlockId()); + worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleNeighborChange(); //To force recalculation of connections scheduleRenderUpdate(); } @@ -745,17 +745,14 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui return false; plugs[forgeDirection.ordinal()] = true; - worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlockId()); + worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleNeighborChange(); //To force recalculation of connections scheduleRenderUpdate(); return true; } - public int getBlockId() { - Block block = getBlockType(); - if (block != null) - return block.blockID; - return 0; + public Block getBlock() { + return getBlockType(); } @Override @@ -764,7 +761,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this; } @Override diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index 087e8fc7..74eadf2e 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -192,7 +192,7 @@ public final class TravelingItem { } public EntityItem toEntityItem() { - if (container != null && !CoreProxy.proxy.isRenderWorld(container.worldObj)) { + if (container != null && !CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { if (getItemStack().stackSize <= 0) return null; @@ -200,9 +200,9 @@ public final class TravelingItem { motion.moveForwards(0.1 + getSpeed() * 2F); ItemStack stack = getItemStack(); - EntityItem entity = new EntityItem(container.worldObj, xCoord, yCoord, zCoord, getItemStack()); + EntityItem entity = new EntityItem(container.getWorldObj(), xCoord, yCoord, zCoord, getItemStack()); if (stack.getItem().hasCustomEntity(stack)) { - Entity e = stack.getItem().createEntity(container.worldObj, entity, stack); + Entity e = stack.getItem().createEntity(container.getWorldObj(), entity, stack); if (e instanceof EntityItem) entity = (EntityItem) e; } @@ -210,10 +210,10 @@ public final class TravelingItem { entity.lifespan = BuildCraftCore.itemLifespan; entity.delayBeforeCanPickup = 10; - float f3 = 0.00F + container.worldObj.rand.nextFloat() * 0.04F - 0.02F; - entity.motionX = (float) container.worldObj.rand.nextGaussian() * f3 + motion.x; - entity.motionY = (float) container.worldObj.rand.nextGaussian() * f3 + motion.y; - entity.motionZ = (float) container.worldObj.rand.nextGaussian() * f3 + +motion.z; + float f3 = 0.00F + container.getWorldObj().rand.nextFloat() * 0.04F - 0.02F; + entity.motionX = (float) container.getWorldObj().rand.nextGaussian() * f3 + motion.x; + entity.motionY = (float) container.getWorldObj().rand.nextGaussian() * f3 + motion.y; + entity.motionZ = (float) container.getWorldObj().rand.nextGaussian() * f3 + +motion.z; return entity; } return null; @@ -222,10 +222,10 @@ public final class TravelingItem { public float getEntityBrightness(float f) { int i = MathHelper.floor_double(xCoord); int j = MathHelper.floor_double(zCoord); - if (container != null && container.worldObj.blockExists(i, 128 / 2, j)) { + if (container != null && container.getWorldObj().blockExists(i, 128 / 2, j)) { double d = 0.66000000000000003D; int k = MathHelper.floor_double(yCoord + d); - return container.worldObj.getLightBrightness(i, k, j); + return container.getWorldObj().getLightBrightness(i, k, j); } else return 0.0F; } diff --git a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java index 80432134..0f5abbf4 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java @@ -52,14 +52,14 @@ public class BptItemPipeDiamond extends BptItem { @Override public void initializeFromWorld(BptSlotInfo bptSlot, IBptContext context, int x, int y, int z) { - IInventory inventory = (IInventory) context.world().getBlockTileEntity(x, y, z); + IInventory inventory = (IInventory) context.world().getTileEntity(x, y, z); BptBlockUtils.initializeInventoryContents(bptSlot, context, inventory); } @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - IInventory inventory = (IInventory) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + IInventory inventory = (IInventory) context.world().getTileEntity(slot.x, slot.y, slot.z); BptBlockUtils.buildInventoryContents(slot, context, inventory); } diff --git a/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java b/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java index f1d4cd6e..a6badf4c 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java @@ -29,14 +29,14 @@ public class BptItemPipeEmerald extends BptItem { @Override public void initializeFromWorld(BptSlotInfo bptSlot, IBptContext context, int x, int y, int z) { - IInventory inventory = (IInventory) context.world().getBlockTileEntity(x, y, z); + IInventory inventory = (IInventory) context.world().getTileEntity(x, y, z); BptBlockUtils.initializeInventoryContents(bptSlot, context, inventory); } @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - IInventory inventory = (IInventory) context.world().getBlockTileEntity(slot.x, slot.y, slot.z); + IInventory inventory = (IInventory) context.world().getTileEntity(slot.x, slot.y, slot.z); BptBlockUtils.buildInventoryContents(slot, context, inventory); } diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index f020b57a..507ad67b 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -34,8 +34,8 @@ public class ItemGate extends ItemBuildCraft { private static final String NBT_TAG_LOGIC = "logic"; private static final String NBT_TAG_EX = "ex"; - public ItemGate(int id) { - super(id); + public ItemGate() { + super(); setHasSubtypes(false); setMaxDamage(0); setPassSneakClick(true); diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index e0a1a2cf..c6361c22 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -83,7 +83,7 @@ public class ContainerGateInterface extends BuildCraftContainer { // Do not attempt to create a list of potential actions and triggers on // the client. - if (!CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { _potentialActions.addAll(pipe.getActions()); _potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe.container)); @@ -93,8 +93,7 @@ public class ContainerGateInterface extends BuildCraftContainer { for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) { TileEntity tile = pipe.container.getTile(o); - int blockID = pipe.container.getBlockId(o); - Block block = Block.blocksList[blockID]; + Block block = pipe.container.getBlock(o); _potentialTriggers.addAll(ActionManager.getNeighborTriggers(block, tile)); _potentialActions.addAll(ActionManager.getNeighborActions(block, tile)); } @@ -225,12 +224,12 @@ public class ContainerGateInterface extends BuildCraftContainer { */ public void synchronize() { - if (!isNetInitialized && CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!isNetInitialized && CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { isNetInitialized = true; BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } - if (!isSynchronized && CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!isSynchronized && CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { isSynchronized = true; BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } @@ -376,7 +375,7 @@ public class ContainerGateInterface extends BuildCraftContainer { if (pipe.gate == null) return; pipe.gate.setTrigger(position, trigger); - if (CoreProxy.proxy.isRenderWorld(pipe.container.worldObj) && notify) { + if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { sendSelectionChange(position); } } @@ -385,7 +384,7 @@ public class ContainerGateInterface extends BuildCraftContainer { if (pipe.gate == null) return; pipe.gate.setTriggerParameter(position, parameter); - if (CoreProxy.proxy.isRenderWorld(pipe.container.worldObj) && notify) { + if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { sendSelectionChange(position); } } @@ -415,7 +414,7 @@ public class ContainerGateInterface extends BuildCraftContainer { public void setAction(int position, IAction action, boolean notify) { pipe.gate.setAction(position, action); - if (CoreProxy.proxy.isRenderWorld(pipe.container.worldObj) && notify) { + if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { sendSelectionChange(position); } } diff --git a/common/buildcraft/transport/gui/GuiDiamondPipe.java b/common/buildcraft/transport/gui/GuiDiamondPipe.java index 85e9a1ad..f52926dc 100644 --- a/common/buildcraft/transport/gui/GuiDiamondPipe.java +++ b/common/buildcraft/transport/gui/GuiDiamondPipe.java @@ -42,7 +42,7 @@ public class GuiDiamondPipe extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRenderer.drawString(filterInventory.getInvName(), getCenteredOffset(filterInventory.getInvName()), 6, 0x404040); + fontRenderer.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); } diff --git a/common/buildcraft/transport/gui/GuiEmeraldPipe.java b/common/buildcraft/transport/gui/GuiEmeraldPipe.java index 8c5e2f59..bbd8b34d 100644 --- a/common/buildcraft/transport/gui/GuiEmeraldPipe.java +++ b/common/buildcraft/transport/gui/GuiEmeraldPipe.java @@ -62,7 +62,7 @@ public class GuiEmeraldPipe extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRenderer.drawString(filterInventory.getInvName(), getCenteredOffset(filterInventory.getInvName()), 6, 0x404040); + fontRenderer.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 93, 0x404040); } diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index e90f6d0a..e84833fa 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -47,7 +47,7 @@ public class PacketFluidUpdate extends PacketCoordinates { if (!world.blockExists(posX, posY, posZ)) return; - TileEntity entity = world.getBlockTileEntity(posX, posY, posZ); + TileEntity entity = world.getTileEntity(posX, posY, posZ); if (!(entity instanceof TileGenericPipe)) return; diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index dd50c5cb..ca566373 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -167,7 +167,7 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { if (!world.blockExists(packet.posX, packet.posY, packet.posZ)) return; - TileEntity entity = world.getBlockTileEntity(packet.posX, packet.posY, packet.posZ); + TileEntity entity = world.getTileEntity(packet.posX, packet.posY, packet.posZ); if (!(entity instanceof TileGenericPipe)) return; @@ -191,7 +191,7 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { if (!world.blockExists(packetPower.posX, packetPower.posY, packetPower.posZ)) return; - TileEntity entity = world.getBlockTileEntity(packetPower.posX, packetPower.posY, packetPower.posZ); + TileEntity entity = world.getTileEntity(packetPower.posX, packetPower.posY, packetPower.posZ); if (!(entity instanceof TileGenericPipe)) return; @@ -261,7 +261,7 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { if (!world.blockExists(x, y, z)) return null; - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TileGenericPipe)) return null; diff --git a/common/buildcraft/transport/pipes/PipeFluidsWood.java b/common/buildcraft/transport/pipes/PipeFluidsWood.java index 3aa52449..69e020be 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsWood.java +++ b/common/buildcraft/transport/pipes/PipeFluidsWood.java @@ -45,7 +45,7 @@ public class PipeFluidsWood extends Pipe implements IPowerR return false; if (!(tile instanceof IFluidHandler)) return false; - if (!PipeManager.canExtractFluids(pipe, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord)) + if (!PipeManager.canExtractFluids(pipe, tile.getWorldObj (), tile.xCoord, tile.yCoord, tile.zCoord)) return false; return true; } @@ -84,7 +84,7 @@ public class PipeFluidsWood extends Pipe implements IPowerR if (powerHandler.getEnergyStored() <= 0) return; - World w = container.worldObj; + World w = container.getWorld(); int meta = container.getBlockMetadata(); @@ -94,7 +94,7 @@ public class PipeFluidsWood extends Pipe implements IPowerR TileEntity tile = container.getTile(ForgeDirection.getOrientation(meta)); if (tile instanceof IFluidHandler) { - if (!PipeManager.canExtractFluids(this, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord)) + if (!PipeManager.canExtractFluids(this, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord)) return; if (liquidToExtract <= FluidContainerRegistry.BUCKET_VOLUME) { diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index 8d6b0b2e..aec3d1ed 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -85,8 +85,8 @@ public class PipeItemsDiamond extends Pipe implements IClien if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe) return false; - if (!CoreProxy.proxy.isRenderWorld(container.worldObj)) { - entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_DIAMOND, container.worldObj, container.xCoord, container.yCoord, container.zCoord); + if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_DIAMOND, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } return true; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 59156263..1233256a 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -93,8 +93,8 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu return true; } - if (!CoreProxy.proxy.isRenderWorld(container.worldObj)) { - entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_EMERALD_ITEM, container.worldObj, container.xCoord, container.yCoord, container.zCoord); + if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_EMERALD_ITEM, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } return true; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index c10ba616..b1fd7e8c 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -67,8 +67,8 @@ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler return true; } - if (!CoreProxy.proxy.isRenderWorld(container.worldObj)) { - entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_LOGEMERALD_ITEM, container.worldObj, container.xCoord, container.yCoord, container.zCoord); + if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_LOGEMERALD_ITEM, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } return true; diff --git a/common/buildcraft/transport/pipes/PipeItemsLapis.java b/common/buildcraft/transport/pipes/PipeItemsLapis.java index 949a0444..4e3f6c21 100644 --- a/common/buildcraft/transport/pipes/PipeItemsLapis.java +++ b/common/buildcraft/transport/pipes/PipeItemsLapis.java @@ -71,7 +71,7 @@ public class PipeItemsLapis extends Pipe { public void setColor(EnumColor color) { if (color.ordinal() != container.getBlockMetadata()) { - container.worldObj.setBlockMetadataWithNotify(container.xCoord, container.yCoord, container.zCoord, color.ordinal(), 3); + container.getWorldObj().setBlockMetadataWithNotify(container.xCoord, container.yCoord, container.zCoord, color.ordinal(), 3); container.scheduleRenderUpdate(); } } diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index d2293b8f..09490ea1 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -159,7 +159,7 @@ public class PipeItemsObsidian extends Pipe implements IPowe return false; @SuppressWarnings("rawtypes") - List discoveredEntities = (List) container.worldObj.getEntitiesWithinAABB(Entity.class, box); + List discoveredEntities = (List) container.getWorldObj().getEntitiesWithinAABB(Entity.class, box); for (Entity entity : discoveredEntities) { if (canSuck(entity, distance)) { @@ -175,9 +175,9 @@ public class PipeItemsObsidian extends Pipe implements IPowe ItemStack stack = trans.remove(StackFilter.ALL, openOrientation, false); if (stack != null && powerHandler.useEnergy(1, 1, true) == 1) { trans.remove(StackFilter.ALL, openOrientation, true); - EntityItem entityitem = new EntityItem(container.worldObj, cart.posX, cart.posY + 0.3F, cart.posZ, stack); + EntityItem entityitem = new EntityItem(container.getWorldObj(), cart.posX, cart.posY + 0.3F, cart.posZ, stack); entityitem.delayBeforeCanPickup = 10; - container.worldObj.spawnEntityInWorld(entityitem); + container.getWorldObj().spawnEntityInWorld(entityitem); pullItemIntoPipe(entityitem, 1); return true; } @@ -189,13 +189,13 @@ public class PipeItemsObsidian extends Pipe implements IPowe } public void pullItemIntoPipe(Entity entity, int distance) { - if (CoreProxy.proxy.isRenderWorld(container.worldObj)) + if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) return; ForgeDirection orientation = getOpenOrientation().getOpposite(); if (orientation != ForgeDirection.UNKNOWN) { - container.worldObj.playSoundAtEntity(entity, "random.pop", 0.2F, ((container.worldObj.rand.nextFloat() - container.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); + container.getWorldObj().playSoundAtEntity(entity, "random.pop", 0.2F, ((container.getWorldObj().rand.nextFloat() - container.getWorldObj().rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); ItemStack stack = null; @@ -205,7 +205,7 @@ public class PipeItemsObsidian extends Pipe implements IPowe EntityItem item = (EntityItem) entity; ItemStack contained = item.getEntityItem(); - CoreProxy.proxy.obsidianPipePickup(container.worldObj, item, this.container); + CoreProxy.proxy.obsidianPipePickup(container.getWorldObj(), item, this.container); double energyUsed = powerHandler.useEnergy(distance, contained.stackSize * distance, true); diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index ec990c96..325130d5 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -44,7 +44,7 @@ public class PipeItemsWood extends Pipe implements IPowerRec return false; if (!(tile instanceof IInventory)) return false; - if (!PipeManager.canExtractItems(pipe, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord)) + if (!PipeManager.canExtractItems(pipe, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord)) return false; return true; } @@ -102,7 +102,7 @@ public class PipeItemsWood extends Pipe implements IPowerRec @Override public void doWork(PowerHandler workProvider) { - if(container.worldObj.isRemote) + if(container.getWorldObj().isRemote) return; if (powerHandler.getEnergyStored() <= 0) @@ -123,7 +123,7 @@ public class PipeItemsWood extends Pipe implements IPowerRec TileEntity tile = container.getTile(side); if (tile instanceof IInventory) { - if (!PipeManager.canExtractItems(this, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord)) + if (!PipeManager.canExtractItems(this, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord)) return; IInventory inventory = (IInventory) tile; diff --git a/common/buildcraft/transport/pipes/PipeLogicIron.java b/common/buildcraft/transport/pipes/PipeLogicIron.java index 71d62f93..708a92d7 100644 --- a/common/buildcraft/transport/pipes/PipeLogicIron.java +++ b/common/buildcraft/transport/pipes/PipeLogicIron.java @@ -25,7 +25,7 @@ public abstract class PipeLogicIron { } public void switchOnRedstone() { - boolean currentPower = pipe.container.worldObj.isBlockIndirectlyGettingPowered(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); + boolean currentPower = pipe.container.getWorldObj().isBlockIndirectlyGettingPowered(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); if (currentPower != lastPower) { switchPosition(); @@ -63,17 +63,17 @@ public abstract class PipeLogicIron { protected abstract boolean isValidConnectingTile(TileEntity tile); public void initialize() { - lastPower = pipe.container.worldObj.isBlockIndirectlyGettingPowered(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); + lastPower = pipe.container.getWorldObj().isBlockIndirectlyGettingPowered(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); } public void onBlockPlaced() { - pipe.container.worldObj.setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, 1, 3); + pipe.container.getWorldObj().setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, 1, 3); switchPosition(); } public boolean setFacing(ForgeDirection facing) { if (facing.ordinal() != pipe.container.getBlockMetadata() && isValidFacing(facing)) { - pipe.container.worldObj.setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, facing.ordinal(), 3); + pipe.container.getWorldObj().setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, facing.ordinal(), 3); pipe.container.scheduleRenderUpdate(); return true; } diff --git a/common/buildcraft/transport/pipes/PipeLogicWood.java b/common/buildcraft/transport/pipes/PipeLogicWood.java index f05ea2cc..192f5c54 100644 --- a/common/buildcraft/transport/pipes/PipeLogicWood.java +++ b/common/buildcraft/transport/pipes/PipeLogicWood.java @@ -37,7 +37,7 @@ public abstract class PipeLogicWood { } if (newFacing != null && newFacing.ordinal() != meta) { - pipe.container.worldObj.setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, newFacing.ordinal(), 3); + pipe.container.getWorldObj().setBlockMetadataWithNotify(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, newFacing.ordinal(), 3); pipe.container.scheduleRenderUpdate(); } } @@ -70,7 +70,7 @@ public abstract class PipeLogicWood { protected abstract boolean isValidConnectingTile(TileEntity tile); public void initialize() { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { switchSourceIfNeeded(); } } @@ -87,7 +87,7 @@ public abstract class PipeLogicWood { } public void onNeighborBlockChange(int blockId) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.worldObj)) { + if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { switchSourceIfNeeded(); } } diff --git a/common/buildcraft/transport/pipes/PipePowerIron.java b/common/buildcraft/transport/pipes/PipePowerIron.java index 20237e3c..5fff4ca2 100644 --- a/common/buildcraft/transport/pipes/PipePowerIron.java +++ b/common/buildcraft/transport/pipes/PipePowerIron.java @@ -97,7 +97,7 @@ public class PipePowerIron extends Pipe { public void setMode(PowerMode mode) { if (mode.ordinal() != container.getBlockMetadata()) { - container.worldObj.setBlockMetadataWithNotify(container.xCoord, container.yCoord, container.zCoord, mode.ordinal(), 3); + container.getWorldObj().setBlockMetadataWithNotify(container.xCoord, container.yCoord, container.zCoord, mode.ordinal(), 3); container.scheduleRenderUpdate(); } } diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index 31196ea1..7cea5426 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -67,7 +67,7 @@ public class PipePowerWood extends Pipe implements IPowerRec @Override public void updateEntity() { super.updateEntity(); - if (container.worldObj.isRemote) + if (container.getWorldObj().isRemote) return; if (powerHandler.getEnergyStored() <= 0) diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index 2e7e297e..f3b2b849 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -20,17 +20,16 @@ public class FacadeItemRenderer implements IItemRenderer { private void renderFacadeItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { int decodedMeta = ItemFacade.getMetaData(item); - int decodedBlockId = ItemFacade.getBlockId(item); + Block block = Block.getBlockFromItem(item.getItem()); try { - int color = Item.itemsList[decodedBlockId].getColorFromItemStack(new ItemStack(decodedBlockId, 1, decodedMeta), 0); + int color = item.getItem().getColorFromItemStack(new ItemStack(block, 1, decodedMeta), 0); RenderUtils.setGLColorFromInt(color); } catch (Throwable error) { } Tessellator tessellator = Tessellator.instance; - Block block = Block.blocksList[decodedBlockId]; if (block == null) return; @@ -69,7 +68,7 @@ public class FacadeItemRenderer implements IItemRenderer { // Render StructurePipe block = BuildCraftTransport.genericPipeBlock; - Icon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe + IIcon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe block.setBlockBounds(CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MIN_POS, CoreConstants.PIPE_MAX_POS, CoreConstants.PIPE_MAX_POS, CoreConstants.PIPE_MAX_POS - 1F / 16F); block.setBlockBoundsForItemRender(); diff --git a/common/buildcraft/transport/render/FacadeRenderHelper.java b/common/buildcraft/transport/render/FacadeRenderHelper.java index 600c21df..f46a43a2 100644 --- a/common/buildcraft/transport/render/FacadeRenderHelper.java +++ b/common/buildcraft/transport/render/FacadeRenderHelper.java @@ -90,12 +90,11 @@ public class FacadeRenderHelper { } public static void pipeFacadeRenderer(RenderBlocks renderblocks, BlockGenericPipe block, PipeRenderState state, int x, int y, int z) { - state.textureArray = new Icon[6]; + state.textureArray = new IIcon[6]; for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { - int facadeId = state.facadeMatrix.getFacadeBlockId(direction); - if (facadeId != 0) { - Block renderBlock = Block.blocksList[facadeId]; + Block renderBlock = state.facadeMatrix.getFacadeBlock(direction); + if (renderBlock != null) { int renderMeta = state.facadeMatrix.getFacadeMetaId(direction); for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { @@ -103,11 +102,11 @@ public class FacadeRenderHelper { if (side == direction || side == direction.getOpposite()) block.setRenderSide(side, true); else - block.setRenderSide(side, state.facadeMatrix.getFacadeBlockId(side) == 0); + block.setRenderSide(side, state.facadeMatrix.getFacadeBlock(side) == null); } try { - BlockGenericPipe.facadeRenderColor = Item.itemsList[state.facadeMatrix.getFacadeBlockId(direction)].getColorFromItemStack(new ItemStack(facadeId, 1, renderMeta), 0); + BlockGenericPipe.facadeRenderColor = Item.getItemFromBlock(state.facadeMatrix.getFacadeBlock(direction)).getColorFromItemStack(new ItemStack(renderBlock, 1, renderMeta), 0); } catch (Throwable error) { } @@ -181,7 +180,7 @@ public class FacadeRenderHelper { state.currentTexture = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure Pipe for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { - if (state.facadeMatrix.getFacadeBlockId(direction) != 0 && !state.pipeConnectionMatrix.isConnected(direction)) { + if (state.facadeMatrix.getFacadeBlock(direction) != null && !state.pipeConnectionMatrix.isConnected(direction)) { float[][] rotated = MatrixTranformations.deepClone(zeroStateSupport); MatrixTranformations.transform(rotated, direction); diff --git a/common/buildcraft/transport/render/GateItemRenderer.java b/common/buildcraft/transport/render/GateItemRenderer.java index e0155983..56315dfd 100644 --- a/common/buildcraft/transport/render/GateItemRenderer.java +++ b/common/buildcraft/transport/render/GateItemRenderer.java @@ -65,7 +65,7 @@ public class GateItemRenderer implements IItemRenderer { GL11.glPopMatrix(); } - private void renderLayerIn3D(Icon icon) { + private void renderLayerIn3D(IIcon icon) { if (icon == null) return; GL11.glPushMatrix(); @@ -148,7 +148,7 @@ public class GateItemRenderer implements IItemRenderer { private void render(ItemRenderType type, ItemStack stack) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); - Icon icon = ItemGate.getLogic(stack).getIconItem(); + IIcon icon = ItemGate.getLogic(stack).getIconItem(); renderItem.renderIcon(0, 0, icon, 16, 16); if (type == ItemRenderType.ENTITY) diff --git a/common/buildcraft/transport/render/PipeItemRenderer.java b/common/buildcraft/transport/render/PipeItemRenderer.java index ef0aabce..eb3a0336 100644 --- a/common/buildcraft/transport/render/PipeItemRenderer.java +++ b/common/buildcraft/transport/render/PipeItemRenderer.java @@ -20,7 +20,7 @@ public class PipeItemRenderer implements IItemRenderer { Tessellator tessellator = Tessellator.instance; Block block = BuildCraftTransport.genericPipeBlock; - Icon icon = item.getItem().getIconFromDamage(0); + IIcon icon = item.getItem().getIconFromDamage(0); if (icon == null) icon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index 784b1349..e5213c61 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -41,6 +41,7 @@ import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; @@ -100,10 +101,10 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { RenderInfo block = new RenderInfo(); Fluid fluid = FluidRegistry.getFluid(liquidId); - if (fluid.getBlockID() > 0) { - block.baseBlock = Block.blocksList[fluid.getBlockID()]; + if (fluid.getBlock() != null) { + block.baseBlock = fluid.getBlock(); } else { - block.baseBlock = Block.waterStill; + block.baseBlock = Blocks.water; } block.texture = fluid.getStillIcon(); @@ -421,7 +422,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { if (minZ != CoreConstants.PIPE_MIN_POS || maxZ != CoreConstants.PIPE_MAX_POS || !found) { box.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, minZ, cx == CoreConstants.PIPE_MIN_POS ? cx : cx + 0.05F, cy == CoreConstants.PIPE_MIN_POS ? cy : cy + 0.05F, maxZ); - RenderEntityBlock.INSTANCE.renderBlock(box, pipe.worldObj, 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); + RenderEntityBlock.INSTANCE.renderBlock(box, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); } // X render @@ -429,7 +430,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { if (minX != CoreConstants.PIPE_MIN_POS || maxX != CoreConstants.PIPE_MAX_POS || !found) { box.setBounds(minX, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz, maxX, cy == CoreConstants.PIPE_MIN_POS ? cy : cy + 0.05F, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F); - RenderEntityBlock.INSTANCE.renderBlock(box, pipe.worldObj, 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); + RenderEntityBlock.INSTANCE.renderBlock(box, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); } // Y render @@ -437,13 +438,13 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { if (minY != CoreConstants.PIPE_MIN_POS || maxY != CoreConstants.PIPE_MAX_POS || !found) { box.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, minY, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz, cx == CoreConstants.PIPE_MIN_POS ? cx : cx + 0.05F, maxY, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F); - RenderEntityBlock.INSTANCE.renderBlock(box, pipe.worldObj, 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); + RenderEntityBlock.INSTANCE.renderBlock(box, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); } if (center || !found) { box.setBounds(cx == CoreConstants.PIPE_MIN_POS ? cx - 0.05F : cx, cy == CoreConstants.PIPE_MIN_POS ? cy - 0.05F : cy, cz == CoreConstants.PIPE_MIN_POS ? cz - 0.05F : cz, cx == CoreConstants.PIPE_MIN_POS ? cx : cx + 0.05F, cy == CoreConstants.PIPE_MIN_POS ? cy : cy + 0.05F, cz == CoreConstants.PIPE_MIN_POS ? cz : cz + 0.05F); - RenderEntityBlock.INSTANCE.renderBlock(box, pipe.worldObj, 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); + RenderEntityBlock.INSTANCE.renderBlock(box, pipe.getWorldObj(), 0, 0, 0, pipe.xCoord, pipe.yCoord, pipe.zCoord, true, true); } RenderHelper.enableStandardItemLighting(); @@ -466,7 +467,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { bindTexture(TextureMap.locationBlocksTexture); - Icon iconLogic; + IIcon iconLogic; if (pipe.renderState.isGateLit()) iconLogic = pipe.pipe.gate.logic.getIconLit(); else @@ -493,7 +494,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { renderGate(pipe, iconLogic, 0, 0.13F, translateCenter, translateCenter); } - Icon materialIcon = pipe.pipe.gate.material.getIconBlock(); + IIcon materialIcon = pipe.pipe.gate.material.getIconBlock(); if (materialIcon != null) renderGate(pipe, materialIcon, 1, 0.13F, translateCenter, translateCenter); @@ -543,7 +544,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { if (layer != 0) box.setRenderSingleSide(direction.ordinal()); box.setBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - RenderEntityBlock.INSTANCE.renderBlock(box, tile.worldObj, 0, 0, 0, tile.xCoord, tile.yCoord, tile.zCoord, true, true); + RenderEntityBlock.INSTANCE.renderBlock(box, tile.getWorldObj(), 0, 0, 0, tile.xCoord, tile.yCoord, tile.zCoord, true, true); GL11.glPopMatrix(); } @@ -551,7 +552,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { } private boolean shouldRenderNormalPipeSide(PipeRenderState state, ForgeDirection direction) { - return !state.pipeConnectionMatrix.isConnected(direction) && state.facadeMatrix.getFacadeBlockId(direction) == 0 && !state.plugMatrix.isConnected(direction) && !isOpenOrientation(state, direction); + return !state.pipeConnectionMatrix.isConnected(direction) && state.facadeMatrix.getFacadeBlock(direction) == null && !state.plugMatrix.isConnected(direction) && !isOpenOrientation(state, direction); } public boolean isOpenOrientation(PipeRenderState state, ForgeDirection direction) { @@ -576,7 +577,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { } private void renderPower(Pipe pipe, double x, double y, double z) { - initializeDisplayPowerList(pipe.container.worldObj); + initializeDisplayPowerList(pipe.container.getWorldObj()); PipeTransportPower pow = pipe.transport; @@ -656,7 +657,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { if (!pipe.container.isPipeConnected(side)) continue; - DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.worldObj); + DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.getWorldObj()); if (d == null) continue; @@ -698,7 +699,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { FluidStack fluidStack = trans.renderCache[ForgeDirection.UNKNOWN.ordinal()]; if (fluidStack != null && fluidStack.amount > 0) { - DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.worldObj); + DisplayFluidList d = getListFromBuffer(fluidStack, pipe.container.getWorldObj()); if (d != null) { int stage = (int) ((float) fluidStack.amount / (float) (trans.getCapacity()) * (LIQUID_STAGES - 1)); @@ -735,7 +736,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glDisable(2896 /* GL_LIGHTING */); - float light = pipe.container.worldObj.getLightBrightness(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); + float light = pipe.container.getWorldObj().getLightBrightness(pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); int count = 0; for (TravelingItem item : pipe.transport.items) { @@ -763,7 +764,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glTranslatef(0, 0.25F, 0); GL11.glScalef(renderScale, renderScale, renderScale); dummyEntityItem.setEntityItemStack(itemstack); - customRenderItem.doRenderItem(dummyEntityItem, 0, 0, 0, 0, 0); + customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0); if (color != null) { bindTexture(TextureMap.locationBlocksTexture); RenderInfo block = new RenderInfo(); diff --git a/common/buildcraft/transport/render/PipeRendererWorld.java b/common/buildcraft/transport/render/PipeRendererWorld.java index d6bf7098..820f2e85 100644 --- a/common/buildcraft/transport/render/PipeRendererWorld.java +++ b/common/buildcraft/transport/render/PipeRendererWorld.java @@ -154,7 +154,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TileGenericPipe) { TileGenericPipe pipeTile = (TileGenericPipe) tile; @@ -164,8 +164,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { } @Override - public boolean shouldRender3DInInventory() { - // TODO Auto-generated method stub + public boolean shouldRender3DInInventory(int modelId) { return false; } @@ -173,4 +172,6 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { public int getRenderId() { return TransportProxy.pipeModel; } + + } diff --git a/common/buildcraft/transport/render/PlugItemRenderer.java b/common/buildcraft/transport/render/PlugItemRenderer.java index b4a37bb9..6514e5aa 100644 --- a/common/buildcraft/transport/render/PlugItemRenderer.java +++ b/common/buildcraft/transport/render/PlugItemRenderer.java @@ -19,7 +19,7 @@ public class PlugItemRenderer implements IItemRenderer { Tessellator tessellator = Tessellator.instance; block = BuildCraftTransport.genericPipeBlock; - Icon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe + IIcon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe block.setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.375F, 0.75F); block.setBlockBoundsForItemRender(); diff --git a/common/buildcraft/transport/triggers/TriggerPipeContents.java b/common/buildcraft/transport/triggers/TriggerPipeContents.java index d0300ee6..93ce2926 100644 --- a/common/buildcraft/transport/triggers/TriggerPipeContents.java +++ b/common/buildcraft/transport/triggers/TriggerPipeContents.java @@ -74,7 +74,7 @@ public class TriggerPipeContents extends BCTrigger implements IPipeTrigger { else if (kind == PipeContents.containsItems) if (parameter != null && parameter.getItemStack() != null) { for (TravelingItem item : transportItems.items) { - if (item.getItemStack().itemID == parameter.getItemStack().itemID + if (item.getItemStack().getItem() == parameter.getItemStack().getItem() && item.getItemStack().getItemDamage() == parameter.getItemStack().getItemDamage()) return true; } diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index b7fc5c45..e001b411 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -3,27 +3,29 @@ package buildcraft.transport.utils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + +import net.minecraft.block.Block; import net.minecraftforge.common.util.ForgeDirection; public class FacadeMatrix { - private final int[] _blockIds = new int[ForgeDirection.VALID_DIRECTIONS.length]; + private final Block[] _blocks = new Block[ForgeDirection.VALID_DIRECTIONS.length]; private final int[] _blockMetas = new int[ForgeDirection.VALID_DIRECTIONS.length]; private boolean dirty = false; public FacadeMatrix() { } - public void setFacade(ForgeDirection direction, int blockId, int blockMeta) { - if (_blockIds[direction.ordinal()] != blockId || _blockMetas[direction.ordinal()] != blockMeta) { - _blockIds[direction.ordinal()] = blockId; + public void setFacade(ForgeDirection direction, Block block, int blockMeta) { + if (_blocks[direction.ordinal()] != block || _blockMetas[direction.ordinal()] != blockMeta) { + _blocks[direction.ordinal()] = block; _blockMetas[direction.ordinal()] = blockMeta; dirty = true; } } - public int getFacadeBlockId(ForgeDirection direction) { - return _blockIds[direction.ordinal()]; + public Block getFacadeBlock(ForgeDirection direction) { + return _blocks[direction.ordinal()]; } public int getFacadeMetaId(ForgeDirection direction) { @@ -40,7 +42,7 @@ public class FacadeMatrix { public void writeData(DataOutputStream data) throws IOException { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - data.writeShort(_blockIds[i]); + data.writeShort(_blocks[i]); data.writeByte(_blockMetas[i]); } } @@ -48,8 +50,8 @@ public class FacadeMatrix { public void readData(DataInputStream data) throws IOException { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { short id = data.readShort(); - if (_blockIds[i] != id) { - _blockIds[i] = id; + if (_blocks[i] != id) { + _blocks[i] = id; dirty = true; } byte meta = data.readByte(); From 20d08f393ae87c899b5bea23df66972ea4bebae6 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 8 Feb 2014 16:04:03 +0100 Subject: [PATCH 06/31] progress with 1.7.2 port --- common/buildcraft/BuildCraftBuilders.java | 13 ++- common/buildcraft/BuildCraftCore.java | 12 +-- common/buildcraft/BuildCraftEnergy.java | 6 +- common/buildcraft/BuildCraftFactory.java | 11 ++- common/buildcraft/BuildCraftMod.java | 2 +- common/buildcraft/BuildCraftTransport.java | 8 +- .../builders/EventHandlerBuilders.java | 6 +- common/buildcraft/builders/ItemBptBase.java | 2 +- common/buildcraft/builders/TileArchitect.java | 8 +- .../builders/TileBlueprintLibrary.java | 6 +- common/buildcraft/builders/TileBuilder.java | 6 +- common/buildcraft/builders/TileFiller.java | 9 +- common/buildcraft/builders/TileMarker.java | 6 +- .../buildcraft/builders/TilePathMarker.java | 7 +- .../builders/gui/GuiBlueprintLibrary.java | 4 +- .../buildcraft/builders/gui/GuiBuilder.java | 8 +- common/buildcraft/builders/gui/GuiFiller.java | 8 +- .../buildcraft/builders/gui/GuiTemplate.java | 8 +- .../network/PacketHandlerBuilders.java | 5 +- common/buildcraft/core/ItemWrench.java | 3 +- common/buildcraft/core/SpringPopulate.java | 27 +++--- .../core/blueprints/BptBlueprint.java | 38 +++++---- .../core/blueprints/BptBuilderBlueprint.java | 39 ++++----- .../core/blueprints/BptBuilderTemplate.java | 4 +- .../buildcraft/core/blueprints/BptSlot.java | 19 +++-- common/buildcraft/core/fluids/FluidUtils.java | 9 +- .../core/gui/GuiAdvancedInterface.java | 4 +- common/buildcraft/core/gui/GuiBuildCraft.java | 14 ++-- .../core/inventory/StackHelper.java | 6 +- common/buildcraft/core/proxy/CoreProxy.java | 2 +- .../core/proxy/CoreProxyClient.java | 14 ++-- .../core/render/RenderingMarkers.java | 4 +- common/buildcraft/core/utils/BlockUtil.java | 14 ++-- .../buildcraft/core/utils/CraftingHelper.java | 6 +- common/buildcraft/core/utils/Utils.java | 4 +- common/buildcraft/energy/BucketHandler.java | 8 +- common/buildcraft/energy/TileEngine.java | 5 +- .../buildcraft/energy/TileEngineLegacy.java | 3 +- .../energy/gui/GuiCombustionEngine.java | 4 +- common/buildcraft/energy/gui/GuiEngine.java | 14 ++-- .../buildcraft/energy/gui/GuiStoneEngine.java | 4 +- .../energy/render/EntityDropParticleFX.java | 4 +- .../energy/worldgen/BiomeInitializer.java | 4 +- .../energy/worldgen/OilPopulate.java | 82 +++++++++++-------- common/buildcraft/factory/TileFloodGate.java | 2 +- common/buildcraft/factory/TilePump.java | 7 +- common/buildcraft/factory/TileQuarry.java | 8 +- common/buildcraft/factory/TileRefinery.java | 5 +- common/buildcraft/factory/TileTank.java | 5 +- .../factory/gui/GuiAutoCrafting.java | 4 +- .../buildcraft/factory/gui/GuiRefinery.java | 8 +- .../buildcraft/silicon/TileAssemblyTable.java | 4 +- common/buildcraft/silicon/TileLaser.java | 11 ++- .../silicon/gui/GuiAssemblyTable.java | 18 ++-- .../buildcraft/silicon/gui/GuiLaserTable.java | 18 ++-- .../transport/BlockGenericPipe.java | 4 +- common/buildcraft/transport/ItemFacade.java | 62 +++++++------- common/buildcraft/transport/ItemPipeWire.java | 9 +- .../transport/TransportProxyClient.java | 66 +++++++-------- .../buildcraft/transport/TravelingItem.java | 2 +- .../transport/blueprints/BptBlockPipe.java | 34 ++++---- .../transport/gui/GuiDiamondPipe.java | 4 +- .../transport/gui/GuiEmeraldPipe.java | 4 +- .../transport/gui/GuiEmzuliPipe.java | 4 +- .../transport/gui/GuiFilteredBuffer.java | 4 +- .../transport/gui/GuiGateInterface.java | 4 +- .../transport/pipes/PipeItemsDiamond.java | 4 +- .../transport/pipes/PipeItemsEmerald.java | 4 +- .../transport/pipes/PipeItemsEmzuli.java | 4 +- 69 files changed, 408 insertions(+), 361 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 5053ec95..8baba1f3 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -74,7 +74,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStoppingEvent; -import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -95,7 +95,6 @@ import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Property; -import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE) public class BuildCraftBuilders extends BuildCraftMod { @@ -377,15 +376,15 @@ public class BuildCraftBuilders extends BuildCraftMod { return rootBptIndex; } - /*public static ItemStack getBptItemStack(int id, int damage, String name) { - ItemStack stack = new ItemStack(id, 1, damage); + public static ItemStack getBptItemStack(Item item, int damage, String name) { + ItemStack stack = new ItemStack(item, 1, damage); NBTTagCompound nbt = new NBTTagCompound(); if (name != null && !"".equals(name)) { nbt.setString("BptName", name); stack.setTagCompound(nbt); } return stack; - }*/ + } public static void addHook(IBuilderHook hook) { if (!hooks.contains(hook)) { @@ -398,10 +397,10 @@ public class BuildCraftBuilders extends BuildCraftMod { TilePathMarker.clearAvailableMarkersList(); } - @ForgeSubscribe + @SubscribeEvent @SideOnly(Side.CLIENT) public void loadTextures(TextureStitchEvent.Pre evt) { - if (evt.map.textureType == 0) { + if (evt.map.getTextureType() == 0) { for (FillerPattern pattern : FillerPattern.patterns) { pattern.registerIcon(evt.map); } diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 5e6a13fc..cee456cd 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -14,7 +14,6 @@ import java.util.EnumMap; import java.util.TreeMap; import net.minecraft.block.Block; -import net.minecraft.block.BlockFluid; import net.minecraft.entity.EntityList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -30,8 +29,8 @@ import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Property; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.IFluidBlock; import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.IIconProvider; @@ -86,6 +85,7 @@ import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.FMLEmbeddedChannel; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; @@ -299,7 +299,7 @@ public class BuildCraftCore extends BuildCraftMod { @EventHandler public void postInit(FMLPostInitializationEvent event) { for (Block block : Block.blocksList) { - if (block instanceof BlockFluid || block instanceof IFluidBlock || block instanceof IPlantable) { + if (block instanceof BlockFluidBase || block instanceof IFluidBlock || block instanceof IPlantable) { BuildCraftAPI.softBlocks[block.blockID] = true; } } @@ -316,14 +316,14 @@ public class BuildCraftCore extends BuildCraftMod { event.registerServerCommand(new CommandBuildCraft()); } - @ForgeSubscribe + @SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Pre event) { - if (event.map.textureType == 1) { + if (event.map.getTextureType() == 1) { iconProvider = new CoreIconProvider(); iconProvider.registerIcons(event.map); ActionTriggerIconProvider.INSTANCE.registerIcons(event.map); - } else if (event.map.textureType == 0) { + } else if (event.map.getTextureType() == 0) { BuildCraftCore.redLaserTexture = event.map.registerIcon("buildcraft:blockRedLaser"); BuildCraftCore.blueLaserTexture = event.map.registerIcon("buildcraft:blockBlueLaser"); BuildCraftCore.stripesLaserTexture = event.map.registerIcon("buildcraft:blockStripesLaser"); diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 752dd9c5..009ccfca 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -40,6 +40,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; @@ -58,7 +59,6 @@ import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Property; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -233,10 +233,10 @@ public class BuildCraftEnergy extends BuildCraftMod { } } - @ForgeSubscribe + @SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Post event) { - if (event.map.textureType == 0) { + if (event.map.getTextureType() == 0) { buildcraftFluidOil.setIcons(blockOil.getBlockTextureFromSide(1), blockOil.getBlockTextureFromSide(2)); buildcraftFluidFuel.setIcons(blockFuel.getBlockTextureFromSide(1), blockFuel.getBlockTextureFromSide(2)); } diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index b513ed8b..861eded9 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -50,7 +50,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.network.NetworkMod; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -70,7 +70,6 @@ import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Property; -import net.minecraftforge.event.ForgeSubscribe; @Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE) public class BuildCraftFactory extends BuildCraftMod { @@ -122,8 +121,8 @@ public class BuildCraftFactory extends BuildCraftMod { int quarryY = ticket.getModData().getInteger("quarryY"); int quarryZ = ticket.getModData().getInteger("quarryZ"); - int blId = world.getBlockId(quarryX, quarryY, quarryZ); - if (blId == quarryBlock.blockID) { + Block block = world.getBlock(quarryX, quarryY, quarryZ); + if (block == quarryBlock) { validTickets.add(ticket); } } @@ -326,10 +325,10 @@ public class BuildCraftFactory extends BuildCraftMod { InterModComms.processIMC(event); } - @ForgeSubscribe + @SubscribeEvent @SideOnly(Side.CLIENT) public void loadTextures(TextureStitchEvent.Pre evt) { - if (evt.map.textureType == 0) { + if (evt.map.getTextureType() == 0) { TextureMap terrainTextures = evt.map; FactoryProxyClient.pumpTexture = terrainTextures.registerIcon("buildcraft:pump_tube"); FactoryProxyClient.drillTexture = terrainTextures.registerIcon("buildcraft:blockDrillTexture"); diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java index 2064175a..091810a4 100755 --- a/common/buildcraft/BuildCraftMod.java +++ b/common/buildcraft/BuildCraftMod.java @@ -15,7 +15,7 @@ import buildcraft.core.network.BuildCraftPacket; public class BuildCraftMod { public EnumMap channels; - public void sendToPlayers(BuildCraftPacket packet, World world, int x, int y, int z, int maxDistance) { + public void sendToPlayers(Packet packet, World world, int x, int y, int z, int maxDistance) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); channels.get(Side.SERVER).writeOutbound(packet); } diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 21589b6f..3a390121 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -116,7 +116,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.config.Property; @Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE) -@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerTransport.class, connectionHandler = TransportConnectionHandler.class) public class BuildCraftTransport extends BuildCraftMod { public static BlockGenericPipe genericPipeBlock; @@ -207,9 +206,8 @@ public class BuildCraftTransport extends BuildCraftMod { return testStrings(liquids, world, i, j, k); } - private boolean testStrings(String[] excludedBlocks, World world, int i, int j, int k) { - int id = world.getBlockId(i, j, k); - Block block = Block.blocksList[id]; + private boolean testStrings(String[] excludedBlocks, World world, int i, int j, int k) { + Block block = world.getBlock(i, j, k); if (block == null) return false; @@ -305,7 +303,7 @@ public class BuildCraftTransport extends BuildCraftMod { pipePowerGold = buildPipe(DefaultProps.PIPE_POWER_GOLD_ID, PipePowerGold.class, "Golden Kinesis Pipe", Items.redstone, pipeItemsGold); pipePowerDiamond = buildPipe(DefaultProps.PIPE_POWER_DIAMOND_ID, PipePowerDiamond.class, "Diamond Kinesis Pipe", Items.redstone, pipeItemsDiamond); - pipeStructureCobblestone = buildPipe(DefaultProps.PIPE_STRUCTURE_COBBLESTONE_ID, PipeStructureCobblestone.class, "Cobblestone Structure Pipe", Block.gravel, pipeItemsCobblestone); + pipeStructureCobblestone = buildPipe(DefaultProps.PIPE_STRUCTURE_COBBLESTONE_ID, PipeStructureCobblestone.class, "Cobblestone Structure Pipe", Blocks.gravel, pipeItemsCobblestone); // Fix the recipe // pipeItemsStipes = createPipe(DefaultProps.PIPE_ITEMS_STRIPES_ID, PipeItemsStripes.class, "Stripes Transport Pipe", new ItemStack(Item.dyePowder, diff --git a/common/buildcraft/builders/EventHandlerBuilders.java b/common/buildcraft/builders/EventHandlerBuilders.java index be4ac781..7f6f384f 100644 --- a/common/buildcraft/builders/EventHandlerBuilders.java +++ b/common/buildcraft/builders/EventHandlerBuilders.java @@ -9,13 +9,13 @@ package buildcraft.builders; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.world.WorldEvent; public class EventHandlerBuilders { - @ForgeSubscribe + @SubscribeEvent public void handleWorldLoad(WorldEvent.Load event) { // Temporary solution // Please remove the world Load event when world Unload event gets implimented @@ -24,7 +24,7 @@ public class EventHandlerBuilders { } } - @ForgeSubscribe + @SubscribeEvent public void handleWorldUnload(WorldEvent.Unload event) { // When a world unloads clean from the list of available markers the ones // that were on the unloaded world diff --git a/common/buildcraft/builders/ItemBptBase.java b/common/buildcraft/builders/ItemBptBase.java index f2069467..8d81ea6a 100644 --- a/common/buildcraft/builders/ItemBptBase.java +++ b/common/buildcraft/builders/ItemBptBase.java @@ -47,7 +47,7 @@ public abstract class ItemBptBase extends ItemBuildCraft { if (CoreProxy.proxy.isSimulating(world)) { BptBase bpt = BuildCraftBuilders.getBptRootIndex().getBluePrint(itemStack.getItemDamage()); if (bpt != null) - return BuildCraftBuilders.getBptItemStack(itemStack.itemID, itemStack.getItemDamage(), bpt.getName()); + return BuildCraftBuilders.getBptItemStack(itemStack.getItem(), itemStack.getItemDamage(), bpt.getName()); } return itemStack; } diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 67ed68ec..2411d250 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -72,7 +72,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { box.createLasers(worldObj, LaserKind.Stripes); } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } public void createBpt() { @@ -116,10 +116,10 @@ public class TileArchitect extends TileBuildCraft implements IInventory { ItemStack stack; if (result.equals(BuildCraftBuilders.getBptRootIndex().getBluePrint(lastBptId))) { result = BuildCraftBuilders.getBptRootIndex().getBluePrint(lastBptId); - stack = BuildCraftBuilders.getBptItemStack(items[0].itemID, lastBptId, result.getName()); + stack = BuildCraftBuilders.getBptItemStack(items[0].getItem(), lastBptId, result.getName()); } else { int bptId = BuildCraftBuilders.getBptRootIndex().storeBluePrint(result); - stack = BuildCraftBuilders.getBptItemStack(items[0].itemID, bptId, result.getName()); + stack = BuildCraftBuilders.getBptItemStack(items[0].getItem(), bptId, result.getName()); lastBptId = bptId; } @@ -179,7 +179,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { name += c; } } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } @Override diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index 222eae5c..f1239550 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -105,7 +105,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { for (int i = currentPage.size(); i < currentNames.length; i++) { currentNames[i] = ""; } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } public ArrayList getCurrentPage() { @@ -282,9 +282,9 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { if (progressOut == 100 && stack[3] == null) { if (selected > -1 && selected < currentPage.size()) { BptBase bpt = currentPage.get(selected); - setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(stack[2].itemID, bpt.position, bpt.getName())); + setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(stack[2].getItem(), bpt.position, bpt.getName())); } else { - setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(stack[2].itemID, 0, null)); + setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(stack[2].getItem(), 0, null)); } setInventorySlotContents(2, null); } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 60e664c7..9829f4ad 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -189,9 +189,9 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP path = ((TilePathMarker) tile).getPath(); for (BlockIndex b : path) { - worldObj.setBlock(b.x, b.y, b.z, 0); + worldObj.setBlock(b.x, b.y, b.z, null); - BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, BuildCraftBuilders.pathMarkerBlock.blockID, 0); + BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, BuildCraftBuilders.pathMarkerBlock, 0); } break; @@ -567,7 +567,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP box.reset(); if (CoreProxy.proxy.isSimulating(worldObj)) { - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } return; diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index 2e0e7817..f2041fc4 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -7,6 +7,7 @@ */ package buildcraft.builders; +import buildcraft.BuildCraftBuilders; import buildcraft.BuildCraftCore; import buildcraft.api.core.IAreaProvider; import buildcraft.api.core.LaserKind; @@ -35,9 +36,11 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.triggers.ActionMachineControl; import buildcraft.core.triggers.ActionMachineControl.Mode; import buildcraft.core.utils.Utils; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -83,7 +86,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece if (!CoreProxy.proxy.isRenderWorld(worldObj) && box.isInitialized()) { box.createLasers(worldObj, LaserKind.Stripes); } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } } } @@ -135,7 +138,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece if (done) { patternIterator = null; - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } else if (powerHandler.getEnergyStored() >= POWER_USAGE) { doWork(workProvider); } @@ -235,7 +238,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece currentPattern = pattern; patternIterator = null; done = false; - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } } diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 7799575c..3f337ef8 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -93,7 +93,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { public void updateSignals() { if (CoreProxy.proxy.isSimulating(worldObj)) { showSignals = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } } @@ -162,7 +162,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { } } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } void setVect(int n) { @@ -391,7 +391,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { signals = null; if (CoreProxy.proxy.isSimulating(worldObj) && markerOrigin != null && markerOrigin != this) { - markerOrigin.sendNetworkUpdate(); + markerOrigin.sendNetworkUpdate(BuildCraftBuilders.instance); } } diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index f891584e..dcf2e8bc 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -1,5 +1,6 @@ package buildcraft.builders; +import buildcraft.BuildCraftBuilders; import buildcraft.api.core.Position; import buildcraft.core.BlockIndex; import buildcraft.core.EntityLaser; @@ -7,10 +8,12 @@ import buildcraft.core.EntityPowerLaser; import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.TileNetworkData; import buildcraft.core.proxy.CoreProxy; + import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; import java.util.TreeSet; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -98,7 +101,7 @@ public class TilePathMarker extends TileMarker { return; tryingToConnect = !tryingToConnect; // Allow the user to stop the path marker from searching for new path markers to connect - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } @Override @@ -114,7 +117,7 @@ public class TilePathMarker extends TileMarker { if (nearestPathMarker != null) { createLaserAndConnect(nearestPathMarker); tryingToConnect = false; - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftBuilders.instance); } } } diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 822e25ae..67902413 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -79,7 +79,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { // fontRenderer.drawString(library.owner + "'s Library", 6, 6, // 0x404040); String title = StringUtils.localize("tile.libraryBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); int c = 0; String[] currentNames = library.currentNames; @@ -98,7 +98,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { drawGradientRect(l1, i2 + 9 * c, l1 + 88, i2 + 9 * (c + 1), 0x80ffffff, 0x80ffffff); } - fontRenderer.drawString(name, 9, 25 + 9 * c, 0x404040); + fontRendererObj.drawString(name, 9, 25 + 9 * c, 0x404040); c++; } } diff --git a/common/buildcraft/builders/gui/GuiBuilder.java b/common/buildcraft/builders/gui/GuiBuilder.java index 4d86191f..26bdc4c8 100644 --- a/common/buildcraft/builders/gui/GuiBuilder.java +++ b/common/buildcraft/builders/gui/GuiBuilder.java @@ -45,12 +45,12 @@ public class GuiBuilder extends GuiAdvancedInterface { super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtils.localize("tile.builderBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 12, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.building.resources"), 8, 60, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 12, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.building.resources"), 8, 60, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); if (builder.isBuildingBlueprint()) { - fontRenderer.drawString(StringUtils.localize("gui.needed"), 185, 7, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.needed"), 185, 7, 0x404040); } drawForegroundSelection(par1, par2); diff --git a/common/buildcraft/builders/gui/GuiFiller.java b/common/buildcraft/builders/gui/GuiFiller.java index 1a26330a..95a82e61 100644 --- a/common/buildcraft/builders/gui/GuiFiller.java +++ b/common/buildcraft/builders/gui/GuiFiller.java @@ -61,9 +61,9 @@ public class GuiFiller extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("tile.fillerBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.filling.resources"), 8, 74, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, 142, 0x404040); - GuiTools.drawCenteredString(fontRenderer, filler.currentPattern.getDisplayName(), 56); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.filling.resources"), 8, 74, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, 142, 0x404040); + GuiTools.drawCenteredString(fontRendererObj, filler.currentPattern.getDisplayName(), 56); } } diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index d105b0c0..cee150c1 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -43,13 +43,13 @@ public class GuiTemplate extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("tile.architectBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 152, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 152, 0x404040); if (editMode && ((new Date()).getTime() / 100) % 8 >= 4) { - fontRenderer.drawString(template.name + "|", 51, 62, 0x404040); + fontRendererObj.drawString(template.name + "|", 51, 62, 0x404040); } else { - fontRenderer.drawString(template.name, 51, 62, 0x404040); + fontRendererObj.drawString(template.name, 51, 62, 0x404040); } } diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index f559ab1a..f5813ab1 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -1,5 +1,6 @@ package buildcraft.builders.network; +import buildcraft.BuildCraftBuilders; import buildcraft.builders.TileArchitect; import buildcraft.builders.TileBlueprintLibrary; import buildcraft.core.network.BuildCraftChannelHandler; @@ -71,7 +72,7 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { break; case TileBlueprintLibrary.COMMAND_LOCK_UPDATE: tbl.locked = !tbl.locked; - tbl.sendNetworkUpdate(); + tbl.sendNetworkUpdate(BuildCraftBuilders.instance); break; case TileBlueprintLibrary.COMMAND_NEXT: tbl.setCurrentPage(true); @@ -91,7 +92,7 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { if (ySlot < tbl.getCurrentPage().size()) { tbl.selected = ySlot; } - tbl.sendNetworkUpdate(); + tbl.sendNetworkUpdate(BuildCraftBuilders.instance); } } diff --git a/common/buildcraft/core/ItemWrench.java b/common/buildcraft/core/ItemWrench.java index 07411372..7a74d039 100644 --- a/common/buildcraft/core/ItemWrench.java +++ b/common/buildcraft/core/ItemWrench.java @@ -35,8 +35,7 @@ public class ItemWrench extends ItemBuildCraft implements IToolWrench { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - int blockId = world.getBlockId(x, y, z); - Block block = Block.blocksList[blockId]; + Block block = world.getBlock(x, y, z); if(block == null) return false; diff --git a/common/buildcraft/core/SpringPopulate.java b/common/buildcraft/core/SpringPopulate.java index b536409b..73e0fc8c 100644 --- a/common/buildcraft/core/SpringPopulate.java +++ b/common/buildcraft/core/SpringPopulate.java @@ -8,17 +8,20 @@ package buildcraft.core; import buildcraft.BuildCraftCore; + import java.util.Random; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.TerrainGen; public class SpringPopulate { - @ForgeSubscribe + @SubscribeEvent public void populate(PopulateChunkEvent.Post event) { boolean doGen = TerrainGen.populate(event.chunkProvider, event.world, event.rand, event.chunkX, event.chunkX, event.hasVillageGenerated, PopulateChunkEvent.Populate.EventType.CUSTOM); @@ -49,15 +52,15 @@ public class SpringPopulate { int posZ = z + random.nextInt(16); for(int i = 0; i < 5; i++) { - int candidate = world.getBlockId(posX, i, posZ); - if(candidate != Block.bedrock.blockID) + Block candidate = world.getBlock(posX, i, posZ); + if(candidate != Blocks.bedrock) continue; - world.setBlock(posX, i + 1, posZ, BuildCraftCore.springBlock.blockID); + world.setBlock(posX, i + 1, posZ, BuildCraftCore.springBlock); for(int j = i + 2; j < world.getActualHeight() - 10; j++) { if(!boreToSurface(world, posX, j, posZ)) { if(world.isAirBlock(posX, j, posZ)) - world.setBlock(posX, j, posZ, Block.waterStill.blockID); + world.setBlock(posX, j, posZ, Blocks.water); break; } } @@ -69,14 +72,14 @@ public class SpringPopulate { if(world.isAirBlock(x, y, z)) return false; - int existing = world.getBlockId(x, y, z); - if(existing != Block.stone.blockID - && existing != Block.dirt.blockID - && existing != Block.gravel.blockID - && existing != Block.grass.blockID) + Block existing = world.getBlock(x, y, z); + if(existing != Blocks.stone + && existing != Blocks.dirt + && existing != Blocks.gravel + && existing != Blocks.grass) return false; - world.setBlock(x, y, z, Block.waterStill.blockID); + world.setBlock(x, y, z, Blocks.water); return true; } } diff --git a/common/buildcraft/core/blueprints/BptBlueprint.java b/common/buildcraft/core/blueprints/BptBlueprint.java index 6e00f75e..e69ee97b 100644 --- a/common/buildcraft/core/blueprints/BptBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBlueprint.java @@ -33,26 +33,26 @@ import net.minecraft.tileentity.TileEntity; public class BptBlueprint extends BptBase { - private int[] idMapping = new int[Item.itemsList.length]; + //private int[] idMapping = new int[Item.itemsList.length]; TreeSet idsToMap = new TreeSet(); public BptBlueprint() { - for (int i = 0; i < idMapping.length; ++i) { - idMapping[i] = i; - } + //for (int i = 0; i < idMapping.length; ++i) { + // idMapping[i] = i; + //} } public BptBlueprint(int sizeX, int sizeY, int sizeZ) { super(sizeX, sizeY, sizeZ); - for (int i = 0; i < idMapping.length; ++i) { - idMapping[i] = i; - } + //for (int i = 0; i < idMapping.length; ++i) { + // idMapping[i] = i; + //} } public void readFromWorld(IBptContext context, TileEntity anchorTile, int x, int y, int z) { - BptSlot slot = new BptSlot(); + /*BptSlot slot = new BptSlot(); slot.x = (int) (x - context.surroundingBox().pMin().x); slot.y = (int) (y - context.surroundingBox().pMin().y); @@ -78,12 +78,12 @@ public class BptBlueprint extends BptBase { t.printStackTrace(); BCLog.logger.throwing("BptBlueprint", "readFromWorld", t); - } + }*/ } @Override public void saveAttributes(BufferedWriter writer) throws IOException { - writer.write("sizeX:" + sizeX); + /*writer.write("sizeX:" + sizeX); writer.newLine(); writer.write("sizeY:" + sizeY); writer.newLine(); @@ -188,12 +188,12 @@ public class BptBlueprint extends BptBase { } writer.write(":requirements"); - writer.newLine(); + writer.newLine();*/ } @Override public void loadAttribute(BufferedReader reader, String attr, String val) throws IOException, BptError { - if ("3.1.0".equals(version)) + /*if ("3.1.0".equals(version)) throw new BptError("Blueprint format 3.1.0 is not supported anymore, can't load " + file); // blockMap is still tested for being able to load pre 3.1.2 bpts @@ -321,7 +321,7 @@ public class BptBlueprint extends BptBase { } } } - } + }*/ } @Override @@ -333,15 +333,17 @@ public class BptBlueprint extends BptBase { } public ItemStack mapItemStack(ItemStack bptItemStack) { - ItemStack newStack = bptItemStack.copy(); + //ItemStack newStack = bptItemStack.copy(); - newStack.itemID = idMapping[newStack.itemID]; + //newStack.itemID = idMapping[newStack.itemID]; - return newStack; + //return newStack; + return null; } public int mapWorldId(int bptWorldId) { - return idMapping[bptWorldId]; + //return idMapping[bptWorldId]; + return 0; } public void storeId(int worldId) { @@ -370,6 +372,6 @@ public class BptBlueprint extends BptBase { @Override protected void copyTo(BptBase bpt) { - ((BptBlueprint) bpt).idMapping = idMapping.clone(); + //((BptBlueprint) bpt).idMapping = idMapping.clone(); } } diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index 7ba5c0e3..3fbde9cb 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -21,7 +21,6 @@ import java.util.TreeSet; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.world.EnumGameType; import net.minecraft.world.World; public class BptBuilderBlueprint extends BptBuilderBase { @@ -40,10 +39,10 @@ public class BptBuilderBlueprint extends BptBuilderBase { return -1; else if (o1.stackSize < o2.stackSize) return 1; - else if (o1.itemID > o2.itemID) - return -1; - else if (o1.itemID < o2.itemID) - return 1; + //else if (o1.itemID > o2.itemID) + // return -1; + //else if (o1.itemID < o2.itemID) + // return 1; else if (o1.getItemDamage() > o2.getItemDamage()) return -1; else if (o1.getItemDamage() < o2.getItemDamage()) @@ -108,11 +107,11 @@ public class BptBuilderBlueprint extends BptBuilderBase { slot.mode = Mode.Build; - if (slot.blockId != 0 && Block.blocksList[slot.blockId].isOpaqueCube()) { + /*if (slot.blockId != 0 && Block.blocksList[slot.blockId].isOpaqueCube()) { primaryList.add(slot); } else { secondaryList.add(slot); - } + }*/ if (slot.blockId != 0) { postProcessingList.add(slot.clone()); @@ -190,7 +189,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { getNext = false; } - if (getNext) + /*if (getNext) if (slot.mode == Mode.ClearIfInvalid) { if (!BlockUtil.isSoftBlock(world, slot.x, slot.y, slot.z)) { result = slot; @@ -210,6 +209,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { } else { failSlots.add(slot); } + */ } list.addAll(failSlots); @@ -246,7 +246,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { } } - for (ItemStack reqStk : tmpReq) { + /*for (ItemStack reqStk : tmpReq) { for (ItemStack invStk : tmpInv) { if (invStk != null && reqStk.itemID == invStk.itemID && invStk.stackSize > 0) { @@ -271,7 +271,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { if (reqStk.stackSize != 0) return false; - } + }*/ return true; } @@ -308,7 +308,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { ItemStack invStk = inv.getStackInSlot(i); - if (invStk != null && reqStk.itemID == invStk.itemID && invStk.stackSize > 0) { + /*if (invStk != null && reqStk.itemID == invStk.itemID && invStk.stackSize > 0) { if (!invStk.isItemStackDamageable() && (reqStk.getItemDamage() != invStk.getItemDamage())) { continue; @@ -331,7 +331,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { if (reqStk.stackSize == 0) { break; } - } + }*/ } if (reqStk.stackSize != 0) @@ -347,7 +347,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { public void recomputeNeededItems() { neededItems.clear(); - TreeMap computeStacks = new TreeMap(new Comparator() { + /*TreeMap computeStacks = new TreeMap(new Comparator() { @Override public int compare(ItemStack o1, ItemStack o2) { @@ -362,7 +362,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { return 0; } - }); + });*/ for (BptSlot slot : primaryList) { @@ -376,7 +376,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { BCLog.logger.throwing("BptBuilderBlueprint", "recomputeIfNeeded", t); } - for (ItemStack stack : stacks) { + /*for (ItemStack stack : stacks) { if (stack == null || stack.itemID == 0) { continue; } @@ -390,13 +390,13 @@ public class BptBuilderBlueprint extends BptBuilderBase { computeStacks.put(stack, num); } - } + }*/ } for (BptSlot slot : secondaryList) { LinkedList stacks = slot.getRequirements(context); - for (ItemStack stack : stacks) { + /*for (ItemStack stack : stacks) { if (stack == null || stack.itemID <= 0 || stack.itemID >= Item.itemsList.length || stack.stackSize == 0 || stack.getItem() == null) { continue; } @@ -410,15 +410,16 @@ public class BptBuilderBlueprint extends BptBuilderBase { computeStacks.put(stack, num); } - } + }*/ } - for (ItemStack stack : computeStacks.keySet()) + /*for (ItemStack stack : computeStacks.keySet()) if (stack.isItemStackDamageable()) { neededItems.add(new ItemStack(stack.getItem())); } else { neededItems.add(new ItemStack(stack.itemID, computeStacks.get(stack), stack.getItemDamage())); } + */ } @Override diff --git a/common/buildcraft/core/blueprints/BptBuilderTemplate.java b/common/buildcraft/core/blueprints/BptBuilderTemplate.java index c1ba8cde..a8104797 100644 --- a/common/buildcraft/core/blueprints/BptBuilderTemplate.java +++ b/common/buildcraft/core/blueprints/BptBuilderTemplate.java @@ -121,7 +121,7 @@ public class BptBuilderTemplate extends BptBuilderBase { BptSlot slot = list.getFirst(); // Note from CJ: I have no idea what this code is supposed to do, so I'm not touching it. - if (slot.blockId == world.getBlockId(slot.x, slot.y, slot.z)) { + /*if (slot.blockId == world.getBlockId(slot.x, slot.y, slot.z)) { list.removeFirst(); } else if (slot.mode == Mode.ClearIfInvalid) { result = slot; @@ -145,7 +145,7 @@ public class BptBuilderTemplate extends BptBuilderBase { } break; - } + }*/ } return result; diff --git a/common/buildcraft/core/blueprints/BptSlot.java b/common/buildcraft/core/blueprints/BptSlot.java index f34f1a8a..afbc9991 100644 --- a/common/buildcraft/core/blueprints/BptSlot.java +++ b/common/buildcraft/core/blueprints/BptSlot.java @@ -17,40 +17,43 @@ public class BptSlot extends BptSlotInfo { public ItemStack stackToUse; public boolean isValid(IBptContext context) { - return BlueprintManager.blockBptProps[blockId].isValid(this, context); + //return BlueprintManager.blockBptProps[blockId].isValid(this, context); + return false; } public void rotateLeft(IBptContext context) { - BlueprintManager.blockBptProps[blockId].rotateLeft(this, context); + //BlueprintManager.blockBptProps[blockId].rotateLeft(this, context); } public boolean ignoreBuilding() { - return BlueprintManager.blockBptProps[blockId].ignoreBuilding(this); + //return BlueprintManager.blockBptProps[blockId].ignoreBuilding(this); + return false; } public void initializeFromWorld(IBptContext context, int xs, int ys, int zs) { - BlueprintManager.blockBptProps[blockId].initializeFromWorld(this, context, xs, ys, zs); + //BlueprintManager.blockBptProps[blockId].initializeFromWorld(this, context, xs, ys, zs); } public void postProcessing(IBptContext context) { - BlueprintManager.blockBptProps[blockId].postProcessing(this, context); + //BlueprintManager.blockBptProps[blockId].postProcessing(this, context); } public LinkedList getRequirements(IBptContext context) { LinkedList res = new LinkedList(); - BlueprintManager.blockBptProps[blockId].addRequirements(this, context, res); + //BlueprintManager.blockBptProps[blockId].addRequirements(this, context, res); return res; } public final void buildBlock(IBptContext context) { - BlueprintManager.blockBptProps[blockId].buildBlock(this, context); + //BlueprintManager.blockBptProps[blockId].buildBlock(this, context); } // returns what was used public ItemStack useItem(IBptContext context, ItemStack req, ItemStack stack) { - return BlueprintManager.blockBptProps[blockId].useItem(this, context, req, stack); + //return BlueprintManager.blockBptProps[blockId].useItem(this, context, req, stack); + return null; } @SuppressWarnings("unchecked") diff --git a/common/buildcraft/core/fluids/FluidUtils.java b/common/buildcraft/core/fluids/FluidUtils.java index 0ae28fa3..68ec94a0 100644 --- a/common/buildcraft/core/fluids/FluidUtils.java +++ b/common/buildcraft/core/fluids/FluidUtils.java @@ -5,6 +5,7 @@ import buildcraft.core.inventory.InvUtils; import buildcraft.core.utils.Utils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -70,12 +71,12 @@ public class FluidUtils { return false; } - public static int getFluidBlockId(Fluid fluid, boolean moving) { + public static Block getFluidBlock(Fluid fluid, boolean moving) { if (fluid == FluidRegistry.WATER) - return moving ? Block.waterMoving.blockID : Block.waterStill.blockID; + return moving ? Blocks.flowing_lava : Blocks.water; if (fluid == FluidRegistry.LAVA) - return moving ? Block.lavaMoving.blockID : Block.lavaStill.blockID; - return fluid.getBlockID(); + return moving ? Blocks.flowing_lava : Blocks.lava; + return fluid.getBlock(); } public static void pushFluidToConsumers(IFluidTank tank, int flowCap, TileBuffer[] tileBuffer) { diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 5aaccf1c..7ab555e8 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -68,8 +68,8 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { int cornerY = (height - ySize) / 2; itemRenderer.zLevel = 200F; - itemRenderer.renderItemAndEffectIntoGUI(fontRenderer, mc.renderEngine, item, cornerX + x, cornerY + y); - itemRenderer.renderItemOverlayIntoGUI(fontRenderer, mc.renderEngine, item, cornerX + x, cornerY + y); + itemRenderer.renderItemAndEffectIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); + itemRenderer.renderItemOverlayIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); itemRenderer.zLevel = 0.0F; } } diff --git a/common/buildcraft/core/gui/GuiBuildCraft.java b/common/buildcraft/core/gui/GuiBuildCraft.java index 6f652d44..65164482 100644 --- a/common/buildcraft/core/gui/GuiBuildCraft.java +++ b/common/buildcraft/core/gui/GuiBuildCraft.java @@ -46,7 +46,7 @@ public abstract class GuiBuildCraft extends GuiContainer { } public FontRenderer getFontRenderer() { - return fontRenderer; + return fontRendererObj; } protected void initLedgers(IInventory inventory) { @@ -129,7 +129,7 @@ public abstract class GuiBuildCraft extends GuiContainer { } protected int getCenteredOffset(String string, int xWidth) { - return (xWidth - fontRenderer.getStringWidth(string)) / 2; + return (xWidth - fontRendererObj.getStringWidth(string)) / 2; } /** @@ -214,7 +214,7 @@ public abstract class GuiBuildCraft extends GuiContainer { int y; for (ToolTipLine tip : toolTips) { - y = this.fontRenderer.getStringWidth(tip.text); + y = this.fontRendererObj.getStringWidth(tip.text); if (y > lenght) { lenght = y; @@ -230,7 +230,7 @@ public abstract class GuiBuildCraft extends GuiContainer { } this.zLevel = 300.0F; - itemRenderer.zLevel = 300.0F; + itemRendererObj.zLevel = 300.0F; int var15 = -267386864; this.drawGradientRect(x - 3, y - 4, x + lenght + 3, y - 3, var15, var15); this.drawGradientRect(x - 3, y + var14 + 3, x + lenght + 3, y + var14 + 4, var15, var15); @@ -253,7 +253,7 @@ public abstract class GuiBuildCraft extends GuiContainer { line = "\u00a7" + Integer.toHexString(tip.color) + line; } - this.fontRenderer.drawStringWithShadow(line, x, y, -1); + this.fontRendererObj.drawStringWithShadow(line, x, y, -1); y += 10 + tip.getSpacing(); } @@ -331,9 +331,9 @@ public abstract class GuiBuildCraft extends GuiContainer { int startY = mouseY - ((gui.height - gui.ySize) / 2) - 12; String tooltip = ledger.getTooltip(); - int textWidth = fontRenderer.getStringWidth(tooltip); + int textWidth = fontRendererObj.getStringWidth(tooltip); drawGradientRect(startX - 3, startY - 3, startX + textWidth + 3, startY + 8 + 3, 0xc0000000, 0xc0000000); - fontRenderer.drawStringWithShadow(tooltip, startX, startY, -1); + fontRendererObj.drawStringWithShadow(tooltip, startX, startY, -1); } } diff --git a/common/buildcraft/core/inventory/StackHelper.java b/common/buildcraft/core/inventory/StackHelper.java index 49a935a4..49437123 100644 --- a/common/buildcraft/core/inventory/StackHelper.java +++ b/common/buildcraft/core/inventory/StackHelper.java @@ -88,7 +88,7 @@ public class StackHelper { int idBase = OreDictionary.getOreID(base); if (idBase >= 0) { for (ItemStack itemstack : OreDictionary.getOres(idBase)) { - if (comparison.itemID == itemstack.itemID && (itemstack.getItemDamage() == OreDictionary.WILDCARD_VALUE || comparison.getItemDamage() == itemstack.getItemDamage())) + if (comparison.getItem() == itemstack.getItem() && (itemstack.getItemDamage() == OreDictionary.WILDCARD_VALUE || comparison.getItemDamage() == itemstack.getItemDamage())) return true; } } @@ -100,7 +100,7 @@ public class StackHelper { public boolean isCraftingEquivalent(int oreID, ItemStack comparison) { if (oreID >= 0) { for (ItemStack itemstack : OreDictionary.getOres(oreID)) { - if (comparison.itemID == itemstack.itemID && (itemstack.getItemDamage() == OreDictionary.WILDCARD_VALUE || comparison.getItemDamage() == itemstack.getItemDamage())) + if (comparison.getItem() == itemstack.getItem() && (itemstack.getItemDamage() == OreDictionary.WILDCARD_VALUE || comparison.getItemDamage() == itemstack.getItemDamage())) return true; } } @@ -134,7 +134,7 @@ public class StackHelper { if (a == null || b == null) { return false; } - if (a.itemID != b.itemID) { + if (a.getItem() != b.getItem()) { return false; } if (matchDamage && a.getHasSubtypes()) { diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 55241c45..ac5b82b2 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -78,7 +78,7 @@ public class CoreProxy { /* WRAPPER */ @SuppressWarnings("rawtypes") - public void feedSubBlocks(int id, CreativeTabs tab, List itemList) { + public void feedSubBlocks(Block block, CreativeTabs tab, List itemList) { } /* LOCALIZATION */ diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 93010f98..1e77ee35 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -66,19 +66,19 @@ public class CoreProxyClient extends CoreProxy { public void removeEntity(Entity entity) { super.removeEntity(entity); - if (isRenderWorld(entity.getWorldObj())) { - ((WorldClient) entity.getWorldObj()).removeEntityFromWorld(entity.entityId); + if (isRenderWorld(entity.worldObj)) { + ((WorldClient) entity.worldObj).removeEntityFromWorld(entity.getEntityId()); } } /* WRAPPER */ @SuppressWarnings("rawtypes") @Override - public void feedSubBlocks(int id, CreativeTabs tab, List itemList) { - if (Block.blocksList[id] == null) + public void feedSubBlocks(Block block, CreativeTabs tab, List itemList) { + if (block == null) return; - Block.blocksList[id].getSubBlocks(id, tab, itemList); + block.getSubBlocks(Item.getItemFromBlock(block), tab, itemList); } /* LOCALIZATION */ @@ -99,10 +99,10 @@ public class CoreProxyClient extends CoreProxy { @Override public String getItemDisplayName(ItemStack stack) { - if (Item.itemsList[stack.itemID] == null) + if (stack.getItem() == null) return ""; - return Item.itemsList[stack.itemID].getItemDisplayName(stack); + return stack.getDisplayName(); } /* GFX */ diff --git a/common/buildcraft/core/render/RenderingMarkers.java b/common/buildcraft/core/render/RenderingMarkers.java index b77d54bb..9222cb3d 100644 --- a/common/buildcraft/core/render/RenderingMarkers.java +++ b/common/buildcraft/core/render/RenderingMarkers.java @@ -23,7 +23,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { Tessellator tessellator = Tessellator.instance; float f = block.getMixedBrightnessForBlock(world, x, y, z); - if (Block.lightValue[block.blockID] > 0) { + if (block.getLightValue() > 0) { f = 1.0F; } tessellator.setColorOpaque_F(f, f, f); @@ -174,8 +174,6 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { } i = block.getBlockTexture(iblockaccess, xCoord, yCoord, zCoord, 0); - - minU = i.getMinU(); maxU = i.getMaxU(); diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 65e937c2..7640586c 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -28,6 +28,7 @@ import net.minecraft.world.ChunkPosition; import net.minecraft.world.Explosion; import net.minecraft.world.World; import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -37,7 +38,7 @@ import net.minecraftforge.fluids.IFluidBlock; public class BlockUtil { public static List getItemStackFromBlock(World world, int i, int j, int k) { - Block block = Block.blocksList[world.getBlockId(i, j, k)]; + Block block = world.getBlock(i, j, k); if (block == null) return null; @@ -112,7 +113,7 @@ public class BlockUtil { } public static boolean isSoftBlock(World world, int x, int y, int z) { - return isSoftBlock(world.getBlockId(x, y, z), world, x, y, z); + return isSoftBlock(world.getBlock(x, y, z), world, x, y, z); } public static boolean isSoftBlock(Block block, World world, int x, int y, int z) { @@ -123,16 +124,15 @@ public class BlockUtil { * Returns true if a block cannot be harvested without a tool. */ public static boolean isToughBlock(World world, int x, int y, int z) { - return !world.getBlockMaterial(x, y, z).isToolNotRequired(); + return !world.getBlock(x, y, z).getMaterial().isToolNotRequired(); } public static boolean isFullFluidBlock(World world, int x, int y, int z) { - return isFullFluidBlock(world.getBlockId(x, y, z), world, x, y, z); + return isFullFluidBlock(world.getBlock(x, y, z), world, x, y, z); } - public static boolean isFullFluidBlock(int blockId, World world, int x, int y, int z) { - Block block = Block.blocksList[blockId]; - if (block instanceof BlockFluid || block instanceof IFluidBlock) + public static boolean isFullFluidBlock(Block block, World world, int x, int y, int z) { + if (block instanceof BlockFluidBase || block instanceof IFluidBlock) return world.getBlockMetadata(x, y, z) == 0; return false; } diff --git a/common/buildcraft/core/utils/CraftingHelper.java b/common/buildcraft/core/utils/CraftingHelper.java index cfa9f706..ddc8156c 100644 --- a/common/buildcraft/core/utils/CraftingHelper.java +++ b/common/buildcraft/core/utils/CraftingHelper.java @@ -40,9 +40,9 @@ public class CraftingHelper { } } - if (itemNum == 2 && item1.itemID == item2.itemID && item1.stackSize == 1 && item2.stackSize == 1 && Item.itemsList[item1.itemID].isRepairable()) + if (itemNum == 2 && item1.getItem() == item2.getItem() && item1.stackSize == 1 && item2.stackSize == 1 && item1.getItem().isRepairable()) { - Item itemBase = Item.itemsList[item1.itemID]; + Item itemBase = item1.getItem(); int item1Durability = itemBase.getMaxDamage() - item1.getItemDamageForDisplay(); int item2Durability = itemBase.getMaxDamage() - item2.getItemDamageForDisplay(); int repairAmt = item1Durability + item2Durability + itemBase.getMaxDamage() * 5 / 100; @@ -56,7 +56,7 @@ public class CraftingHelper { ArrayList ingredients = new ArrayList(2); ingredients.add(item1); ingredients.add(item2); - return new ShapelessRecipes(new ItemStack(item1.itemID, 1, newDamage),ingredients); + return new ShapelessRecipes(new ItemStack(item1.getItem(), 1, newDamage),ingredients); } // End repair recipe handler else diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 96b501c4..4e9647c4 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -356,8 +356,8 @@ public class Utils { public static boolean checkLegacyPipesConnections(IBlockAccess blockAccess, int x1, int y1, int z1, int x2, int y2, int z2) { - Block b1 = Block.blocksList[blockAccess.getBlockId(x1, y1, z1)]; - Block b2 = Block.blocksList[blockAccess.getBlockId(x2, y2, z2)]; + Block b1 = blockAccess.getBlock(x1, y1, z1); + Block b2 = blockAccess.getBlock(x2, y2, z2); if (!(b1 instanceof IFramePipeConnection) && !(b2 instanceof IFramePipeConnection)) { return false; diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index a65a14f7..2a348656 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -8,15 +8,17 @@ package buildcraft.energy; import buildcraft.BuildCraftEnergy; + import java.util.HashMap; import java.util.Map; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.Event.Result; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.player.FillBucketEvent; public class BucketHandler { @@ -27,7 +29,7 @@ public class BucketHandler { private BucketHandler() { } - @ForgeSubscribe + @SubscribeEvent public void onBucketFill(FillBucketEvent event) { ItemStack result = fillCustomBucket(event.world, event.target); @@ -43,7 +45,7 @@ public class BucketHandler { Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); - Item bucket = buckets.get(Block.blocksList[blockID]); + Item bucket = Item.getItemFromBlock(block); if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { world.setBlock(pos.blockX, pos.blockY, pos.blockZ, null); return new ItemStack(bucket); diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 5c5086ba..89786e29 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; +import buildcraft.BuildCraftBuilders; import buildcraft.BuildCraftEnergy; import buildcraft.api.gates.IOverrideDefaultTriggers; import buildcraft.api.gates.ITrigger; @@ -110,7 +111,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto if (energyStage != newStage) { energyStage = newStage; - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftEnergy.instance); } } @@ -260,7 +261,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto return; this.isPumping = isActive; - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftEnergy.instance); } public boolean isOrientationValid() { diff --git a/common/buildcraft/energy/TileEngineLegacy.java b/common/buildcraft/energy/TileEngineLegacy.java index 2121f3b6..3e4ac358 100644 --- a/common/buildcraft/energy/TileEngineLegacy.java +++ b/common/buildcraft/energy/TileEngineLegacy.java @@ -7,6 +7,7 @@ */ package buildcraft.energy; +import buildcraft.BuildCraftEnergy; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; @@ -28,7 +29,7 @@ public class TileEngineLegacy extends TileEngine { TileEntity newTile = worldObj.getTileEntity(xCoord, yCoord, zCoord); if (newTile instanceof TileEngine) { newTile.readFromNBT(nbt); - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftEnergy.instance); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } diff --git a/common/buildcraft/energy/gui/GuiCombustionEngine.java b/common/buildcraft/energy/gui/GuiCombustionEngine.java index e29923e7..edf1e31a 100644 --- a/common/buildcraft/energy/gui/GuiCombustionEngine.java +++ b/common/buildcraft/energy/gui/GuiCombustionEngine.java @@ -35,8 +35,8 @@ public class GuiCombustionEngine extends GuiEngine { protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtils.localize("tile.engineIron"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } @Override diff --git a/common/buildcraft/energy/gui/GuiEngine.java b/common/buildcraft/energy/gui/GuiEngine.java index 1733d5ea..a9c78253 100644 --- a/common/buildcraft/energy/gui/GuiEngine.java +++ b/common/buildcraft/energy/gui/GuiEngine.java @@ -41,13 +41,13 @@ public abstract class GuiEngine extends GuiBuildCraft { if (!isFullyOpened()) return; - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.currentOutput") + ":", x + 22, y + 20, subheaderColour); - fontRenderer.drawString(String.format("%.1f MJ/t", engine.currentOutput), x + 22, y + 32, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); - fontRenderer.drawString(String.format("%.1f MJ", engine.getEnergyStored()), x + 22, y + 56, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.heat") + ":", x + 22, y + 68, subheaderColour); - fontRenderer.drawString(String.format("%.2f \u00B0C", engine.getHeat()), x + 22, y + 80, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.currentOutput") + ":", x + 22, y + 20, subheaderColour); + fontRendererObj.drawString(String.format("%.1f MJ/t", engine.currentOutput), x + 22, y + 32, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); + fontRendererObj.drawString(String.format("%.1f MJ", engine.getEnergyStored()), x + 22, y + 56, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.heat") + ":", x + 22, y + 68, subheaderColour); + fontRendererObj.drawString(String.format("%.2f \u00B0C", engine.getHeat()), x + 22, y + 80, textColour); } diff --git a/common/buildcraft/energy/gui/GuiStoneEngine.java b/common/buildcraft/energy/gui/GuiStoneEngine.java index fa590286..f1754921 100644 --- a/common/buildcraft/energy/gui/GuiStoneEngine.java +++ b/common/buildcraft/energy/gui/GuiStoneEngine.java @@ -29,8 +29,8 @@ public class GuiStoneEngine extends GuiEngine { protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtils.localize("tile.engineStone"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } @Override diff --git a/common/buildcraft/energy/render/EntityDropParticleFX.java b/common/buildcraft/energy/render/EntityDropParticleFX.java index bed14b69..ed0b16b0 100644 --- a/common/buildcraft/energy/render/EntityDropParticleFX.java +++ b/common/buildcraft/energy/render/EntityDropParticleFX.java @@ -3,10 +3,10 @@ package buildcraft.energy.render; import net.minecraft.client.particle.*; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.BlockFluid; import net.minecraft.block.material.Material; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.fluids.BlockFluidBase; @SideOnly(Side.CLIENT) public class EntityDropParticleFX extends EntityFX { @@ -83,7 +83,7 @@ public class EntityDropParticleFX extends EntityFX { Material material = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)).getMaterial(); if (material.isLiquid() || material.isSolid()) { - double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))); + double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - BlockFluidBase.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))); if (this.posY < d0) { this.setDead(); diff --git a/common/buildcraft/energy/worldgen/BiomeInitializer.java b/common/buildcraft/energy/worldgen/BiomeInitializer.java index bd6e630b..1bebaf47 100644 --- a/common/buildcraft/energy/worldgen/BiomeInitializer.java +++ b/common/buildcraft/energy/worldgen/BiomeInitializer.java @@ -1,7 +1,7 @@ package buildcraft.energy.worldgen; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import buildcraft.BuildCraftEnergy; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.terraingen.WorldTypeEvent; /** @@ -13,7 +13,7 @@ public class BiomeInitializer { public BiomeInitializer() { } - @ForgeSubscribe + @SubscribeEvent public void initBiomes(WorldTypeEvent.InitBiomeGens event) { if (BuildCraftEnergy.biomeOilDesert != null) { event.newBiomeGens[0] = new GenLayerAddOilDesert(event.seed, 1500L, event.newBiomeGens[0]); diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 05070fd6..461b14dd 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -13,10 +13,12 @@ import buildcraft.BuildCraftEnergy; import java.util.HashSet; import java.util.Random; import java.util.Set; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; -import net.minecraft.block.BlockFluid; import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; @@ -27,10 +29,10 @@ import static net.minecraftforge.common.BiomeDictionary.Type.FROZEN; import static net.minecraftforge.common.BiomeDictionary.Type.WASTELAND; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType; import net.minecraftforge.event.terraingen.TerrainGen; +import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.IFluidBlock; public class OilPopulate { @@ -57,7 +59,7 @@ public class OilPopulate { excludedBiomes.add(BiomeGenBase.hell.biomeID); } - @ForgeSubscribe + @SubscribeEvent public void populate(PopulateChunkEvent.Pre event) { boolean doGen = TerrainGen.populate(event.chunkProvider, event.world, event.rand, event.chunkX, event.chunkX, event.hasVillageGenerated, EVENT_TYPE); @@ -150,7 +152,7 @@ public class OilPopulate { int distance = poolX * poolX + poolY * poolY + poolZ * poolZ; if (distance <= radiusSq) { - world.setBlock(poolX + wellX, poolY + wellY, poolZ + wellZ, BuildCraftEnergy.blockOil.blockID, 0, distance == radiusSq ? 3 : 2); + world.setBlock(poolX + wellX, poolY + wellY, poolZ + wellZ, BuildCraftEnergy.blockOil, 0, distance == radiusSq ? 3 : 2); } } } @@ -178,19 +180,19 @@ public class OilPopulate { baseY = wellY; } - if (makeSpring && world.getBlockId(wellX, baseY, wellZ) == Block.bedrock.blockID) { - world.setBlock(wellX, baseY, wellZ, BuildCraftCore.springBlock.blockID, 1, 3); + if (makeSpring && world.getBlock(wellX, baseY, wellZ) == Blocks.bedrock) { + world.setBlock(wellX, baseY, wellZ, BuildCraftCore.springBlock, 1, 3); } for (int y = baseY + 1; y <= maxHeight; ++y) { - world.setBlock(wellX, y, wellZ, BuildCraftEnergy.blockOil.blockID); + world.setBlock(wellX, y, wellZ, BuildCraftEnergy.blockOil); } if (type == GenType.LARGE) { for (int y = wellY; y <= maxHeight - wellHeight / 2; ++y) { - world.setBlock(wellX + 1, y, wellZ, BuildCraftEnergy.blockOil.blockID); - world.setBlock(wellX - 1, y, wellZ, BuildCraftEnergy.blockOil.blockID); - world.setBlock(wellX, y, wellZ + 1, BuildCraftEnergy.blockOil.blockID); - world.setBlock(wellX, y, wellZ - 1, BuildCraftEnergy.blockOil.blockID); + world.setBlock(wellX + 1, y, wellZ, BuildCraftEnergy.blockOil); + world.setBlock(wellX - 1, y, wellZ, BuildCraftEnergy.blockOil); + world.setBlock(wellX, y, wellZ + 1, BuildCraftEnergy.blockOil); + world.setBlock(wellX, y, wellZ - 1, BuildCraftEnergy.blockOil); } } @@ -200,8 +202,8 @@ public class OilPopulate { int lakeZ = z; int lakeY = groundLevel; - int blockId = world.getBlockId(lakeX, lakeY, lakeZ); - if (blockId == biome.topBlock) { + Block block = world.getBlock(lakeX, lakeY, lakeZ); + if (block == biome.topBlock) { generateSurfaceDeposit(world, rand, biome, lakeX, lakeY, lakeZ, 5 + rand.nextInt(10)); } } @@ -253,38 +255,43 @@ public class OilPopulate { } } - private boolean isReplaceableFluid(World world, int x, int y, int z) { - int blockId = world.getBlockId(x, y, z); - Block block = Block.blocksList[blockId]; - return (block instanceof BlockFluid || block instanceof IFluidBlock) && block.blockMaterial != Material.lava; + private boolean isReplaceableFluid(World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + return (block instanceof BlockFluidBase || block instanceof IFluidBlock) && block.getMaterial() != Material.lava; } private boolean isOil(World world, int x, int y, int z) { - int blockId = world.getBlockId(x, y, z); - return (blockId == BuildCraftEnergy.blockOil.blockID); + Block block = world.getBlock(x, y, z); + return (block == BuildCraftEnergy.blockOil); } private boolean isReplaceableForLake(World world, BiomeGenBase biome, int x, int y, int z) { - int blockId = world.getBlockId(x, y, z); - if (blockId == 0) { + Block block = world.getBlock(x, y, z); + + if (block == null) { return true; } - if (blockId == biome.fillerBlock || blockId == biome.topBlock) { + + if (block == biome.fillerBlock || block == biome.topBlock) { return true; } - Block block = Block.blocksList[blockId]; - if (!block.blockMaterial.blocksMovement()) { + + if (!block.getMaterial().blocksMovement()) { return true; } + if (block.isGenMineableReplaceable(world, x, y, z, Block.stone.blockID)) { return true; } + if (block instanceof BlockFlower) { return true; } + if (!world.isBlockOpaqueCube(x, y, z)) { return true; } + return false; } @@ -303,7 +310,7 @@ public class OilPopulate { } private void setOilWithProba(World world, BiomeGenBase biome, Random rand, float proba, int x, int y, int z, int depth) { - if (rand.nextFloat() <= proba && world.getBlockId(x, y - depth - 1, z) != 0) { + if (rand.nextFloat() <= proba && world.getBlock(x, y - depth - 1, z) != null) { if (isOilAdjacent(world, x, y, z)) { setOilColumnForLake(world, biome, x, y, z, depth, 3); } @@ -315,20 +322,20 @@ public class OilPopulate { if (!world.isAirBlock(x, y + 2, z)) { return; } - if (isReplaceableFluid(world, x, y, z) || world.isBlockSolidOnSide(x, y - 1, z, ForgeDirection.UP)) { - world.setBlock(x, y, z, BuildCraftEnergy.blockOil.blockID, 0, update); + if (isReplaceableFluid(world, x, y, z) || world.isSideSolid(x, y - 1, z, ForgeDirection.UP)) { + world.setBlock(x, y, z, BuildCraftEnergy.blockOil, 0, update); } else { return; } if (!world.isAirBlock(x, y + 1, z)) { - world.setBlock(x, y + 1, z, 0, 0, update); + world.setBlock(x, y + 1, z, null, 0, update); } for (int d = 1; d <= depth - 1; d++) { - if (isReplaceableFluid(world, x, y - d, z) || !world.isBlockSolidOnSide(x, y - d - 1, z, ForgeDirection.UP)) { + if (isReplaceableFluid(world, x, y - d, z) || !world.isSideSolid(x, y - d - 1, z, ForgeDirection.UP)) { return; } - world.setBlock(x, y - d, z, BuildCraftEnergy.blockOil.blockID, 0, 2); + world.setBlock(x, y - d, z, BuildCraftEnergy.blockOil, 0, 2); } } } @@ -341,23 +348,28 @@ public class OilPopulate { int trimmedZ = z & 15; for (; y > 0; --y) { - int blockId = chunk.getBlockID(trimmedX, y, trimmedZ); - Block block = Block.blocksList[blockId]; - if (blockId == 0) { + Block block = chunk.getBlock(trimmedX, y, trimmedZ); + + if (block == null) { continue; } - if (block instanceof BlockFluid) { + + if (block instanceof BlockFluidBase) { return y; } + if (block instanceof IFluidBlock) { return y; } - if (!block.blockMaterial.blocksMovement()) { + + if (!block.getMaterial().blocksMovement()) { continue; } + if (block instanceof BlockFlower) { continue; } + return y - 1; } diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index 9f96a395..092f2df9 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -192,7 +192,7 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler { } private boolean canPlaceFluidAt(Block block, int x, int y, int z) { - return BlockUtil.isSoftBlock(block, worldObj, x, y, z) && !BlockUtil.isFullFluidBlock(blockId, worldObj, x, y, z); + return BlockUtil.isSoftBlock(block, worldObj, x, y, z) && !BlockUtil.isFullFluidBlock(block, worldObj, x, y, z); } public void onNeighborBlockChange(Block block) { diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index 83035a3f..b0419f19 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -8,6 +8,7 @@ package buildcraft.factory; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftEnergy; import buildcraft.BuildCraftFactory; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.IAction; @@ -101,7 +102,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (tube.posY - aimY > 0.01) { tubeY = tube.posY - 0.01; setTubePosition(); - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); return; } @@ -150,7 +151,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (powered != p) { powered = p; if(!worldObj.isRemote) - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); } } @@ -192,7 +193,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor worldObj.spawnEntityInWorld(tube); if (!worldObj.isRemote) - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); } } diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index c068ad06..f88d5172 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -161,7 +161,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } if (CoreProxy.proxy.isSimulating(worldObj) && inProcess) { - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); } if (inProcess || !isDigging) return; @@ -536,7 +536,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept new Packet3Chat(ChatMessageComponent.createFromText(String.format("[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", xCoord, yCoord, zCoord))), (Player) placedBy); } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); return; } chunkTicket.getModData().setInteger("quarryX", xCoord); @@ -674,7 +674,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept createUtilsIfNeeded(); - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); } public void reinitalize() { @@ -855,7 +855,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept new Packet3Chat(ChatMessageComponent.createFromText(String.format("[BUILDCRAFT] The quarry at %d %d %d will keep %d chunks loaded", xCoord, yCoord, zCoord, chunks.size()))), (Player) placedBy); } - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); } @Override diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 5e8e3702..2cefce30 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -8,6 +8,7 @@ package buildcraft.factory; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftFactory; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.IAction; import buildcraft.api.power.IPowerReceptor; @@ -24,9 +25,11 @@ import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; @@ -126,7 +129,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe } if (updateNetworkTime.markTimeIfDelay(worldObj, BuildCraftCore.updateFactor)) - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); isActive = false; diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 0bfcbccd..4d14055b 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -8,6 +8,7 @@ package buildcraft.factory; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftFactory; import buildcraft.api.core.SafeTimeTracker; import buildcraft.core.TileBuildCraft; import buildcraft.core.fluids.Tank; @@ -16,9 +17,11 @@ import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.EnumSkyBlock; @@ -56,7 +59,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { } if (hasUpdate && tracker.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) { - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftFactory.instance); hasUpdate = false; } } diff --git a/common/buildcraft/factory/gui/GuiAutoCrafting.java b/common/buildcraft/factory/gui/GuiAutoCrafting.java index e45a52f3..9c0053cf 100644 --- a/common/buildcraft/factory/gui/GuiAutoCrafting.java +++ b/common/buildcraft/factory/gui/GuiAutoCrafting.java @@ -37,8 +37,8 @@ public class GuiAutoCrafting extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("tile.autoWorkbenchBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); } @Override diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index 59d84529..7807dabb 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -43,10 +43,10 @@ public class GuiRefinery extends GuiAdvancedInterface { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("tile.refineryBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString("->", 63, 59, 0x404040); - fontRenderer.drawString("<-", 106, 59, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString("->", 63, 59, 0x404040); + fontRendererObj.drawString("<-", 106, 59, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040); drawForegroundSelection(par1, par2); } diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 27fdc772..311101f1 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -137,7 +137,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I ItemStack stack = ItemStack.loadItemStackFromNBT(cpt); for (AssemblyRecipe r : AssemblyRecipeManager.INSTANCE.getRecipes()) { - if (r.output.itemID == stack.itemID && r.output.getItemDamage() == stack.getItemDamage()) { + if (r.output.getItem() == stack.getItem() && r.output.getItemDamage() == stack.getItemDamage()) { plannedOutput.add(r); break; } @@ -148,7 +148,7 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I ItemStack stack = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("recipe")); for (AssemblyRecipe r : plannedOutput) { - if (r.output.itemID == stack.itemID && r.output.getItemDamage() == stack.getItemDamage()) { + if (r.output.getItem() == stack.getItem() && r.output.getItemDamage() == stack.getItemDamage()) { setCurrentRecipe(r); break; } diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index e3824921..636388a5 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -9,6 +9,9 @@ package buildcraft.silicon; import buildcraft.api.power.ILaserTarget; import buildcraft.BuildCraftCore; +import buildcraft.BuildCraftFactory; +import buildcraft.BuildCraftMod; +import buildcraft.BuildCraftSilicon; import buildcraft.api.core.Position; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.IAction; @@ -22,8 +25,10 @@ import buildcraft.core.IMachine; import buildcraft.core.TileBuildCraft; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.triggers.ActionMachineControl; + import java.util.LinkedList; import java.util.List; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -102,7 +107,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction onPowerSent(power); - sendNetworkUpdate(); + sendNetworkUpdate(BuildCraftSilicon.instance); } protected float getMaxPowerSent() { @@ -247,9 +252,9 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction } @Override - public void sendNetworkUpdate() { + public void sendNetworkUpdate(BuildCraftMod mod) { if (networkTracker.markTimeIfDelay(worldObj)) { - super.sendNetworkUpdate(); + super.sendNetworkUpdate(mod); } } diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index 25e3a87d..578f1d44 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -60,13 +60,13 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { if (!isFullyOpened()) return; - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.assemblyCurrentRequired") + ":", x + 22, y + 20, subheaderColour); - fontRenderer.drawString(String.format("%2.1f MJ", table.clientRequiredEnergy), x + 22, y + 32, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); - fontRenderer.drawString(String.format("%2.1f MJ", table.getEnergy()), x + 22, y + 56, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.assemblyRate") + ":", x + 22, y + 68, subheaderColour); - fontRenderer.drawString(String.format("%3.2f MJ/t", table.getRecentEnergyAverage() / 100.0f), x + 22, y + 80, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.assemblyCurrentRequired") + ":", x + 22, y + 20, subheaderColour); + fontRendererObj.drawString(String.format("%2.1f MJ", table.clientRequiredEnergy), x + 22, y + 32, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); + fontRendererObj.drawString(String.format("%2.1f MJ", table.getEnergy()), x + 22, y + 56, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.assemblyRate") + ":", x + 22, y + 68, subheaderColour); + fontRendererObj.drawString(String.format("%3.2f MJ/t", table.getRecentEnergyAverage() / 100.0f), x + 22, y + 80, textColour); } @@ -138,8 +138,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); String title = StringUtils.localize("tile.assemblyTableBlock"); - fontRenderer.drawString(title, getCenteredOffset(title), 15, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 15, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); drawForegroundSelection(par1, par2); } diff --git a/common/buildcraft/silicon/gui/GuiLaserTable.java b/common/buildcraft/silicon/gui/GuiLaserTable.java index 7cf2553c..ffe5eea8 100644 --- a/common/buildcraft/silicon/gui/GuiLaserTable.java +++ b/common/buildcraft/silicon/gui/GuiLaserTable.java @@ -39,13 +39,13 @@ public abstract class GuiLaserTable extends GuiBuildCraft { if (!isFullyOpened()) return; - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.assemblyCurrentRequired") + ":", x + 22, y + 20, subheaderColour); - fontRenderer.drawString(String.format("%2.1f MJ", table.clientRequiredEnergy), x + 22, y + 32, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); - fontRenderer.drawString(String.format("%2.1f MJ", table.getEnergy()), x + 22, y + 56, textColour); - fontRenderer.drawStringWithShadow(StringUtils.localize("gui.assemblyRate") + ":", x + 22, y + 68, subheaderColour); - fontRenderer.drawString(String.format("%3.2f MJ/t", table.getRecentEnergyAverage() / 100.0f), x + 22, y + 80, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.energy"), x + 22, y + 8, headerColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.assemblyCurrentRequired") + ":", x + 22, y + 20, subheaderColour); + fontRendererObj.drawString(String.format("%2.1f MJ", table.clientRequiredEnergy), x + 22, y + 32, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.stored") + ":", x + 22, y + 44, subheaderColour); + fontRendererObj.drawString(String.format("%2.1f MJ", table.getEnergy()), x + 22, y + 56, textColour); + fontRendererObj.drawStringWithShadow(StringUtils.localize("gui.assemblyRate") + ":", x + 22, y + 68, subheaderColour); + fontRendererObj.drawString(String.format("%3.2f MJ/t", table.getRecentEnergyAverage() / 100.0f), x + 22, y + 80, textColour); } @@ -65,8 +65,8 @@ public abstract class GuiLaserTable extends GuiBuildCraft { protected void drawGuiContainerForegroundLayer(int par1, int par2) { super.drawGuiContainerForegroundLayer(par1, par2); String title = table.getInventoryName(); - fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); + fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); } @Override diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index e9f7ba80..b1d58269 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -1067,7 +1067,7 @@ public class BlockGenericPipe extends BlockBuildCraft { if (pipe == null) return false; - Icon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem()); + IIcon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem()); int sideHit = target.sideHit; @@ -1128,7 +1128,7 @@ public class BlockGenericPipe extends BlockBuildCraft { if (pipe == null) return false; - Icon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem()); + IIcon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem()); byte its = 4; for (int i = 0; i < its; ++i) { diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index ca587002..c2e1d33a 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -6,19 +6,24 @@ import buildcraft.api.recipes.BuildcraftRecipes; import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.ItemBuildCraft; import buildcraft.core.proxy.CoreProxy; + import com.google.common.base.Strings; import com.google.common.collect.Sets; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.LinkedList; import java.util.List; import java.util.Set; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -65,7 +70,7 @@ public class ItemFacade extends ItemBuildCraft { @SuppressWarnings({"unchecked", "rawtypes"}) @Override @SideOnly(Side.CLIENT) - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List itemList) { + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { // Do not call super, that would add a 0:0 facade for (ItemStack stack : allFacades) { itemList.add(stack.copy()); @@ -103,15 +108,15 @@ public class ItemFacade extends ItemBuildCraft { continue; } - if (!(b.blockID == 20)) { //Explicitly allow glass - if (b.blockID == 7 //Bedrock - || b.blockID == 2 //Grass block - || b.blockID == 18 //Oak leaves - || b.blockID == 19 //Sponge - || b.blockID == 95 //Locked chest - || b.blockID == Block.redstoneLampIdle.blockID - || b.blockID == Block.redstoneLampActive.blockID - || b.blockID == Block.pumpkinLantern.blockID) { + if (!(b == Blocks.glass)) { + if (b == Blocks.bedrock + || b == Blocks.grass + || b == Blocks.leaves + || b == Blocks.sponge + || b == Blocks.chest + || b == Blocks.redstone_lamp + || b == Blocks.lit_redstone_lamp + || b == Blocks.lit_pumpkin) { continue; } if (!b.isOpaqueCube() || b.hasTileEntity(0) || !b.renderAsNormalBlock()) { @@ -153,7 +158,7 @@ public class ItemFacade extends ItemBuildCraft { } public static void addFacade(ItemStack itemStack) { - ItemStack facade = getStack(itemStack.itemID, itemStack.getItemDamage()); + ItemStack facade = getStack(Block.getBlockFromItem(itemStack.getItem()), itemStack.getItemDamage()); allFacades.add(facade); ItemStack facade6 = facade.copy(); @@ -161,19 +166,24 @@ public class ItemFacade extends ItemBuildCraft { // 3 Structurepipes + this block makes 6 facades BuildcraftRecipes.assemblyTable.addRecipe(8000, facade6, new ItemStack(BuildCraftTransport.pipeStructureCobblestone, 3), itemStack); - if (itemStack.itemID < Block.blocksList.length && Block.blocksList[itemStack.itemID] != null) { - Block bl = Block.blocksList[itemStack.itemID]; + + Block bl = Block.getBlockFromItem(itemStack.getItem()); - // Special handling for logs - if (bl.getRenderType() == 31) { - ItemStack rotLog1 = getStack(itemStack.itemID, itemStack.getItemDamage() | 4); - ItemStack rotLog2 = getStack(itemStack.itemID, itemStack.getItemDamage() | 8); - allFacades.add(rotLog1); - allFacades.add(rotLog2); - } - } + // Special handling for logs + if (bl != null && bl.getRenderType() == 31) { + ItemStack rotLog1 = getStack( + Block.getBlockFromItem(itemStack.getItem()), + itemStack.getItemDamage() | 4); + ItemStack rotLog2 = getStack( + Block.getBlockFromItem(itemStack.getItem()), + itemStack.getItemDamage() | 8); + allFacades.add(rotLog1); + allFacades.add(rotLog2); + } } - private static final ItemStack NO_MATCH = new ItemStack(0, 0, 0); + + private static final Block NULL_BLOCK = null; + private static final ItemStack NO_MATCH = new ItemStack(NULL_BLOCK, 0, 0); public class FacadeRecipe implements IRecipe { @@ -182,7 +192,7 @@ public class ItemFacade extends ItemBuildCraft { ItemStack slotmatch = null; for (int i = 0; i < inventorycrafting.getSizeInventory(); i++) { ItemStack slot = inventorycrafting.getStackInSlot(i); - if (slot != null && slot.itemID == ItemFacade.this.itemID && slotmatch == null) { + if (slot != null && slot.getItem() == ItemFacade.this.itemID && slotmatch == null) { slotmatch = slot; } else if (slot != null) { slotmatch = NO_MATCH; @@ -201,7 +211,7 @@ public class ItemFacade extends ItemBuildCraft { ItemStack slotmatch = null; for (int i = 0; i < inventorycrafting.getSizeInventory(); i++) { ItemStack slot = inventorycrafting.getStackInSlot(i); - if (slot != null && slot.itemID == ItemFacade.this.itemID && slotmatch == null) { + if (slot != null && slot.getItem() == ItemFacade.this.itemID && slotmatch == null) { slotmatch = slot; } else if (slot != null) { slotmatch = NO_MATCH; @@ -250,10 +260,6 @@ public class ItemFacade extends ItemBuildCraft { } public static ItemStack getStack(Block block, int metadata) { - return getStack(block.blockID, metadata); - } - - public static ItemStack getStack(int blockID, int metadata) { ItemStack stack = new ItemStack(BuildCraftTransport.facadeItem, 1, 0); NBTTagCompound nbt = new NBTTagCompound("tag"); nbt.setInteger("meta", metadata); diff --git a/common/buildcraft/transport/ItemPipeWire.java b/common/buildcraft/transport/ItemPipeWire.java index 52fb9f2b..c6164997 100644 --- a/common/buildcraft/transport/ItemPipeWire.java +++ b/common/buildcraft/transport/ItemPipeWire.java @@ -6,15 +6,18 @@ import buildcraft.silicon.ItemRedstoneChipset.Chipset; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; public class ItemPipeWire extends ItemBuildCraft { - private Icon[] icons; + private IIcon[] icons; public ItemPipeWire() { super(); @@ -37,7 +40,7 @@ public class ItemPipeWire extends ItemBuildCraft { @SuppressWarnings({"rawtypes", "unchecked"}) @Override @SideOnly(Side.CLIENT) - public void getSubItems(int id, CreativeTabs tab, List itemList) { + public void getSubItems(Item item, CreativeTabs tab, List itemList) { for (PipeWire pipeWire : PipeWire.VALUES) { itemList.add(pipeWire.getStack()); } @@ -46,7 +49,7 @@ public class ItemPipeWire extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister par1IconRegister) { - icons = new Icon[PipeWire.VALUES.length]; + icons = new IIcon[PipeWire.VALUES.length]; for (PipeWire pipeWire : PipeWire.VALUES) { icons[pipeWire.ordinal()] = par1IconRegister.registerIcon("buildcraft:" + pipeWire.getTag()); } diff --git a/common/buildcraft/transport/TransportProxyClient.java b/common/buildcraft/transport/TransportProxyClient.java index deacb153..c3c3b1e1 100644 --- a/common/buildcraft/transport/TransportProxyClient.java +++ b/common/buildcraft/transport/TransportProxyClient.java @@ -31,43 +31,43 @@ public class TransportProxyClient extends TransportProxy { @Override public void registerRenderers() { - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsQuartz.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmerald.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsLapis.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDaizuli.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmzuli.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsQuartz, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmerald, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsLapis, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDaizuli, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmzuli, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsWood.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsCobblestone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsStone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsIron.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsGold.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsEmerald.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsWood, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsCobblestone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsStone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsIron, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsGold, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsEmerald, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerCobblestone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerQuartz.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerIron.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerDiamond.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerCobblestone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerQuartz, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerIron, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerDiamond, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone, pipeItemRenderer); // MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsVoid.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsSandstone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsVoid, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsSandstone, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.itemID, facadeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.plugItem.itemID, plugItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeGate.itemID, gateItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem, facadeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.plugItem, plugItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeGate, gateItemRenderer); TransportProxy.pipeModel = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(pipeWorldRenderer); diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index 74eadf2e..6cd0e640 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -231,7 +231,7 @@ public final class TravelingItem { } public boolean isCorrupted() { - return itemStack == null || itemStack.stackSize <= 0 || Item.itemsList[itemStack.itemID] == null; + return itemStack == null || itemStack.stackSize <= 0 || itemStack.getItem() == null; } public boolean canBeGroupedWith(TravelingItem otherItem) { diff --git a/common/buildcraft/transport/blueprints/BptBlockPipe.java b/common/buildcraft/transport/blueprints/BptBlockPipe.java index 04d315ed..59c4811e 100644 --- a/common/buildcraft/transport/blueprints/BptBlockPipe.java +++ b/common/buildcraft/transport/blueprints/BptBlockPipe.java @@ -32,7 +32,7 @@ public class BptBlockPipe extends BptBlock { public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { int pipeId = slot.cpt.getInteger("pipeId"); - requirements.add(new ItemStack(pipeId, 1, 0)); + //requirements.add(new ItemStack(pipeId, 1, 0)); // if (slot.cpt.hasKey("wire0")) { // requirements.add(new ItemStack(BuildCraftTransport.pipeWire)); @@ -59,9 +59,9 @@ public class BptBlockPipe extends BptBlock { // } // } - if (BuildCraftCore.itemBptProps[pipeId] != null) { - BuildCraftCore.itemBptProps[pipeId].addRequirements(slot, requirements); - } + //if (BuildCraftCore.itemBptProps[pipeId] != null) { + // BuildCraftCore.itemBptProps[pipeId].addRequirements(slot, requirements); + //} } @Override @@ -78,9 +78,9 @@ public class BptBlockPipe extends BptBlock { public void rotateLeft(BptSlotInfo slot, IBptContext context) { int pipeId = slot.cpt.getInteger("pipeId"); - if (BuildCraftCore.itemBptProps[pipeId] != null) { - BuildCraftCore.itemBptProps[pipeId].rotateLeft(slot, context); - } + //if (BuildCraftCore.itemBptProps[pipeId] != null) { + // BuildCraftCore.itemBptProps[pipeId].rotateLeft(slot, context); + //} } @Override @@ -125,11 +125,11 @@ public class BptBlockPipe extends BptBlock { // } // } - BlockGenericPipe.placePipe(pipe, context.world(), slot.x, slot.y, slot.z, slot.blockId, slot.meta); + //BlockGenericPipe.placePipe(pipe, context.world(), slot.x, slot.y, slot.z, slot.blockId, slot.meta); - if (BuildCraftCore.itemBptProps[pipeId] != null) { - BuildCraftCore.itemBptProps[pipeId].buildBlock(slot, context); - } + //if (BuildCraftCore.itemBptProps[pipeId] != null) { + // BuildCraftCore.itemBptProps[pipeId].buildBlock(slot, context); + //} } @Override @@ -169,9 +169,9 @@ public class BptBlockPipe extends BptBlock { // } // } - if (BuildCraftCore.itemBptProps[pipe.itemID] != null) { - BuildCraftCore.itemBptProps[pipe.itemID].initializeFromWorld(bptSlot, context, x, y, z); - } + //if (BuildCraftCore.itemBptProps[pipe.itemID] != null) { + // BuildCraftCore.itemBptProps[pipe.itemID].initializeFromWorld(bptSlot, context, x, y, z); + //} } } @@ -179,9 +179,9 @@ public class BptBlockPipe extends BptBlock { public void postProcessing(BptSlotInfo slot, IBptContext context) { int pipeId = slot.cpt.getInteger("pipeId"); - if (BuildCraftCore.itemBptProps[pipeId] != null) { - BuildCraftCore.itemBptProps[pipeId].postProcessing(slot, context); - } + //if (BuildCraftCore.itemBptProps[pipeId] != null) { + // BuildCraftCore.itemBptProps[pipeId].postProcessing(slot, context); + //} } @Override diff --git a/common/buildcraft/transport/gui/GuiDiamondPipe.java b/common/buildcraft/transport/gui/GuiDiamondPipe.java index f52926dc..dbb17071 100644 --- a/common/buildcraft/transport/gui/GuiDiamondPipe.java +++ b/common/buildcraft/transport/gui/GuiDiamondPipe.java @@ -42,8 +42,8 @@ public class GuiDiamondPipe extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRenderer.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); + fontRendererObj.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); } @Override diff --git a/common/buildcraft/transport/gui/GuiEmeraldPipe.java b/common/buildcraft/transport/gui/GuiEmeraldPipe.java index bbd8b34d..fb788657 100644 --- a/common/buildcraft/transport/gui/GuiEmeraldPipe.java +++ b/common/buildcraft/transport/gui/GuiEmeraldPipe.java @@ -62,8 +62,8 @@ public class GuiEmeraldPipe extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRenderer.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 93, 0x404040); + fontRendererObj.drawString(filterInventory.getInventoryName(), getCenteredOffset(filterInventory.getInventoryName()), 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 93, 0x404040); } @Override diff --git a/common/buildcraft/transport/gui/GuiEmzuliPipe.java b/common/buildcraft/transport/gui/GuiEmzuliPipe.java index 5336186e..dd845a31 100644 --- a/common/buildcraft/transport/gui/GuiEmzuliPipe.java +++ b/common/buildcraft/transport/gui/GuiEmzuliPipe.java @@ -39,7 +39,7 @@ public class GuiEmzuliPipe extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("gui.pipes.emzuli.title"); - fontRenderer.drawString(title, (xSize - fontRenderer.getStringWidth(title)) / 2, 6, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 93, 0x404040); + fontRendererObj.drawString(title, (xSize - fontRendererObj.getStringWidth(title)) / 2, 6, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 93, 0x404040); } } diff --git a/common/buildcraft/transport/gui/GuiFilteredBuffer.java b/common/buildcraft/transport/gui/GuiFilteredBuffer.java index ec2356f4..b423e2d9 100644 --- a/common/buildcraft/transport/gui/GuiFilteredBuffer.java +++ b/common/buildcraft/transport/gui/GuiFilteredBuffer.java @@ -57,7 +57,7 @@ public class GuiFilteredBuffer extends GuiContainer { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { String title = StringUtils.localize("tile.filteredBufferBlock"); - int xPos = (xSize - fontRenderer.getStringWidth(title)) / 2; - fontRenderer.drawString(title, xPos, 10, 0x404040); + int xPos = (xSize - fontRendererObj.getStringWidth(title)) / 2; + fontRendererObj.drawString(title, xPos, 10, 0x404040); } } diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index 53495075..fb8595b5 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -228,8 +228,8 @@ public class GuiGateInterface extends GuiAdvancedInterface { protected void drawGuiContainerForegroundLayer(int par1, int par2) { String name = _container.getGateName(); - fontRenderer.drawString(name, getCenteredOffset(name), 10, 0x404040); - fontRenderer.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); + fontRendererObj.drawString(name, getCenteredOffset(name), 10, 0x404040); + fontRendererObj.drawString(StringUtils.localize("gui.inventory"), 8, ySize - 97, 0x404040); drawForegroundSelection(par1, par2); } diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index aec3d1ed..0efcf76a 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -81,8 +81,8 @@ public class PipeItemsDiamond extends Pipe implements IClien @Override public boolean blockActivated(EntityPlayer entityplayer) { - if (entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID < Block.blocksList.length) - if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe) + if (entityplayer.getCurrentEquippedItem() != null) + if (Block.getBlockFromItem(entityplayer.getCurrentEquippedItem().getItem()) instanceof BlockGenericPipe) return false; if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 1233256a..df03b3bc 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -83,8 +83,8 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu @Override public boolean blockActivated(EntityPlayer entityplayer) { - if (entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID < Block.blocksList.length) { - if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe) { + if (entityplayer.getCurrentEquippedItem() != null) { + if (Block.getBlockFromItem(entityplayer.getCurrentEquippedItem().getItem()) instanceof BlockGenericPipe) { return false; } } diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index b1fd7e8c..4a3ea4da 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -57,8 +57,8 @@ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler @Override public boolean blockActivated(EntityPlayer entityplayer) { - if (entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID < Block.blocksList.length) { - if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe) { + if (entityplayer.getCurrentEquippedItem() != null) { + if (Block.getBlockFromItem(entityplayer.getCurrentEquippedItem().getItem()) instanceof BlockGenericPipe) { return false; } } From 6b36051353cde17c1d1d6b00fb444277c4e4522e Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 8 Feb 2014 20:39:39 +0100 Subject: [PATCH 07/31] progress with 1.7.2 port --- common/buildcraft/BuildCraftCore.java | 20 +++--- common/buildcraft/BuildCraftEnergy.java | 13 +--- common/buildcraft/BuildCraftTransport.java | 9 +-- common/buildcraft/api/core/BuildCraftAPI.java | 5 +- .../api/gates/TriggerParameter.java | 3 +- .../buildcraft/builders/BlockArchitect.java | 6 -- .../builders/BlockBlueprintLibrary.java | 6 -- common/buildcraft/builders/BlockBuilder.java | 6 -- common/buildcraft/builders/BlockFiller.java | 6 -- common/buildcraft/builders/BlockMarker.java | 8 +-- .../buildcraft/builders/BlockPathMarker.java | 6 -- common/buildcraft/builders/TileMarker.java | 4 +- common/buildcraft/core/InterModComms.java | 13 ++-- .../buildcraft/core/ItemBlockBuildCraft.java | 4 +- .../core/TickHandlerCoreClient.java | 36 +++++------ common/buildcraft/core/TileBuildCraft.java | 2 +- .../buildcraft/core/blueprints/BptBase.java | 9 ++- .../core/blueprints/BptBlueprint.java | 4 +- common/buildcraft/core/fluids/FluidUtils.java | 2 +- .../buildcraft/core/fluids/TankManager.java | 8 ++- .../core/gui/buttons/GuiBetterButton.java | 5 +- .../core/gui/buttons/GuiMultiButton.java | 3 +- .../buildcraft/core/inventory/InvUtils.java | 4 +- .../core/network/PacketGuiReturn.java | 2 +- common/buildcraft/core/proxy/CoreProxy.java | 2 +- .../core/render/RenderEntityBlock.java | 3 + common/buildcraft/core/utils/BlockUtil.java | 10 +-- common/buildcraft/energy/BptBlockEngine.java | 2 +- common/buildcraft/energy/BucketHandler.java | 2 +- common/buildcraft/energy/TileEngine.java | 2 +- .../factory/BlockAutoWorkbench.java | 5 -- common/buildcraft/factory/BlockFloodGate.java | 6 -- common/buildcraft/factory/BlockHopper.java | 6 -- .../buildcraft/factory/BlockMiningWell.java | 6 -- common/buildcraft/factory/BlockPump.java | 6 -- common/buildcraft/factory/BlockQuarry.java | 4 +- common/buildcraft/factory/BlockRefinery.java | 8 +-- common/buildcraft/factory/BlockTank.java | 8 +-- common/buildcraft/factory/BptBlockTank.java | 2 +- common/buildcraft/factory/TileFloodGate.java | 2 +- common/buildcraft/factory/TilePump.java | 13 ++-- common/buildcraft/factory/TileQuarry.java | 18 +++--- common/buildcraft/factory/TileRefinery.java | 5 +- common/buildcraft/factory/TileTank.java | 5 +- .../factory/network/PacketHandlerFactory.java | 4 +- common/buildcraft/silicon/BlockLaser.java | 6 -- .../silicon/TileAdvancedCraftingTable.java | 3 +- .../transport/BlockFilteredBuffer.java | 6 -- .../transport/BlockGenericPipe.java | 48 +++++++------- common/buildcraft/transport/ItemFacade.java | 62 ++++++++++--------- common/buildcraft/transport/ItemPipe.java | 20 +++--- common/buildcraft/transport/Pipe.java | 13 ++-- .../buildcraft/transport/TileGenericPipe.java | 16 ++--- .../transport/blueprints/BptBlockPipe.java | 22 ++++--- .../transport/network/PacketFluidUpdate.java | 4 +- .../pipes/PipeFluidsCobblestone.java | 5 +- .../transport/pipes/PipeFluidsGold.java | 5 +- .../transport/pipes/PipeFluidsIron.java | 5 +- .../transport/pipes/PipeFluidsSandstone.java | 5 +- .../transport/pipes/PipeFluidsStone.java | 5 +- .../transport/pipes/PipeFluidsVoid.java | 5 +- .../transport/pipes/PipeFluidsWood.java | 5 +- .../transport/pipes/PipeItemsCobblestone.java | 5 +- .../transport/pipes/PipeItemsDaizuli.java | 4 +- .../transport/pipes/PipeItemsDiamond.java | 5 +- .../transport/pipes/PipeItemsGold.java | 5 +- .../transport/pipes/PipeItemsIron.java | 7 ++- .../transport/pipes/PipeItemsLapis.java | 4 +- .../transport/pipes/PipeItemsObsidian.java | 13 ++-- .../transport/pipes/PipeItemsQuartz.java | 5 +- .../transport/pipes/PipeItemsSandstone.java | 5 +- .../transport/pipes/PipeItemsStone.java | 5 +- .../transport/pipes/PipeItemsVoid.java | 5 +- .../transport/pipes/PipeItemsWood.java | 5 +- .../transport/pipes/PipePowerCobblestone.java | 5 +- .../transport/pipes/PipePowerDiamond.java | 5 +- .../transport/pipes/PipePowerGold.java | 5 +- .../transport/pipes/PipePowerIron.java | 4 +- .../transport/pipes/PipePowerQuartz.java | 5 +- .../transport/pipes/PipePowerStone.java | 5 +- .../transport/pipes/PipePowerWood.java | 5 +- .../pipes/PipeStructureCobblestone.java | 5 +- .../transport/utils/FacadeMatrix.java | 9 ++- 83 files changed, 307 insertions(+), 347 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index cee456cd..8c39d72e 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -77,6 +77,7 @@ import buildcraft.core.utils.Localization; import buildcraft.core.recipes.AssemblyRecipeManager; import buildcraft.core.recipes.IntegrationRecipeManager; import buildcraft.core.triggers.TriggerRedstoneInput; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -90,7 +91,6 @@ import cpw.mods.fml.common.network.FMLEmbeddedChannel; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -298,17 +298,19 @@ public class BuildCraftCore extends BuildCraftMod { @EventHandler public void postInit(FMLPostInitializationEvent event) { - for (Block block : Block.blocksList) { + for (Object o : Block.blockRegistry) { + Block block = (Block) o; + if (block instanceof BlockFluidBase || block instanceof IFluidBlock || block instanceof IPlantable) { - BuildCraftAPI.softBlocks[block.blockID] = true; + BuildCraftAPI.softBlocks.add(block); } } - - BuildCraftAPI.softBlocks[Blocks.snow.blockID] = true; - BuildCraftAPI.softBlocks[Block.vine.blockID] = true; - BuildCraftAPI.softBlocks[Block.fire.blockID] = true; - TickRegistry.registerTickHandler(new TickHandlerCoreClient(), Side.CLIENT); - + + BuildCraftAPI.softBlocks.add(Blocks.snow); + BuildCraftAPI.softBlocks.add(Blocks.vine); + BuildCraftAPI.softBlocks.add(Blocks.fire); + + FMLCommonHandler.instance().bus().register(new TickHandlerCoreClient()); } @EventHandler diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 009ccfca..738ef46c 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -93,14 +93,7 @@ public class BuildCraftEnergy extends BuildCraftMod { public static BuildCraftEnergy instance; @EventHandler - public void preInit(FMLPreInitializationEvent evt) { - // Update oil tag - int defaultOilId = DefaultProps.OIL_ID; - if (BuildCraftCore.mainConfiguration.hasKey(Configuration.CATEGORY_BLOCK, "oilStill.id")) { - defaultOilId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "oilStill.id", defaultOilId).getInt(defaultOilId); - BuildCraftCore.mainConfiguration.getCategory(Configuration.CATEGORY_BLOCK).remove("oilStill.id"); - } - + public void preInit(FMLPreInitializationEvent evt) { int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT); int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN); canOilBurn = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "burnOil", true, "Can oil burn?").getBoolean(true); @@ -118,14 +111,14 @@ public class BuildCraftEnergy extends BuildCraftMod { } if (oilDesertBiomeId > 0) { - if (BiomeGenBase.biomeList[oilDesertBiomeId] != null) { + if (BiomeGenBase.getBiomeGenArray () [oilDesertBiomeId] != null) { throw new BiomeIdException("oilDesert", oilDesertBiomeId); } biomeOilDesert = BiomeGenOilDesert.makeBiome(oilDesertBiomeId); } if (oilOceanBiomeId > 0) { - if (BiomeGenBase.biomeList[oilOceanBiomeId] != null) { + if (BiomeGenBase.getBiomeGenArray () [oilOceanBiomeId] != null) { throw new BiomeIdException("oilOcean", oilOceanBiomeId); } biomeOilOcean = BiomeGenOilOcean.makeBiome(oilOceanBiomeId); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 3a390121..4d2600a0 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -233,7 +233,7 @@ public class BuildCraftTransport extends BuildCraftMod { durability.comment = "How long a pipe will take to break"; pipeDurability = (float) durability.getDouble(DefaultProps.PIPES_DURABILITY); - Property exclusionItemList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "woodenPipe.item.exclusion", new String[0]); + Property exclusionItemList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "woodenPipe.item.exclusion", new String[0]); String[] excludedItemBlocks = exclusionItemList.getStringList(); if (excludedItemBlocks != null) { @@ -243,7 +243,7 @@ public class BuildCraftTransport extends BuildCraftMod { } else excludedItemBlocks = new String[0]; - Property exclusionFluidList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "woodenPipe.liquid.exclusion", new String[0]); + Property exclusionFluidList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "woodenPipe.liquid.exclusion", new String[0]); String[] excludedFluidBlocks = exclusionFluidList.getStringList(); if (excludedFluidBlocks != null) { @@ -444,10 +444,7 @@ public class BuildCraftTransport extends BuildCraftMod { public static Item buildPipe(int defaultID, Class clas, String descr, Object... ingredients) { String name = Character.toLowerCase(clas.getSimpleName().charAt(0)) + clas.getSimpleName().substring(1); - Property prop = BuildCraftCore.mainConfiguration.getItem(name + ".id", defaultID); - - int id = prop.getInt(defaultID); - ItemPipe res = BlockGenericPipe.registerPipe(id, clas); + ItemPipe res = BlockGenericPipe.registerPipe(clas); res.setBlockName(clas.getSimpleName()); LanguageRegistry.addName(res, descr); diff --git a/common/buildcraft/api/core/BuildCraftAPI.java b/common/buildcraft/api/core/BuildCraftAPI.java index 87c45fdf..f25e176c 100644 --- a/common/buildcraft/api/core/BuildCraftAPI.java +++ b/common/buildcraft/api/core/BuildCraftAPI.java @@ -9,6 +9,9 @@ package buildcraft.api.core; +import java.util.HashSet; +import java.util.Set; + import net.minecraft.block.Block; public class BuildCraftAPI { @@ -16,5 +19,5 @@ public class BuildCraftAPI { public static final int LAST_ORIGINAL_BLOCK = 122; public static final int LAST_ORIGINAL_ITEM = 126; - public static final boolean[] softBlocks = new boolean[Block.blocksList.length]; + public static final Set softBlocks = new HashSet(); } diff --git a/common/buildcraft/api/gates/TriggerParameter.java b/common/buildcraft/api/gates/TriggerParameter.java index c0652962..9c6647f5 100644 --- a/common/buildcraft/api/gates/TriggerParameter.java +++ b/common/buildcraft/api/gates/TriggerParameter.java @@ -9,6 +9,7 @@ package buildcraft.api.gates; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -63,7 +64,7 @@ public class TriggerParameter implements ITriggerParameter { // Legacy code to prevent existing gates from losing their contents int itemID = compound.getInteger("itemID"); if (itemID != 0) { - stack = new ItemStack(itemID, 1, compound.getInteger("itemDMG")); + stack = new ItemStack((Item) Item.itemRegistry.getObject(itemID), 1, compound.getInteger("itemDMG")); return; } diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index 6bdc0df9..6ee9a30d 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -134,12 +134,6 @@ public class BlockArchitect extends BlockContainer { return blockTextureSides; } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 89f97b47..3dc3d50c 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -78,12 +78,6 @@ public class BlockBlueprintLibrary extends BlockContainer { } } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index 6d3940ae..41dd7365 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -119,12 +119,6 @@ public class BlockBuilder extends BlockContainer { super.breakBlock(world, x, y, z, block, par6); } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index 82c3be42..b3219c37 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -99,12 +99,6 @@ public class BlockFiller extends BlockContainer { super.breakBlock(world, x, y, z, block, par6); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 3076165c..81ead8d7 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -140,17 +140,11 @@ public class BlockMarker extends BlockContainer { private void dropTorchIfCantStay(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); if (!canPlaceBlockOnSide(world, x, y, z, meta)) { - dropBlockAsItem(world, x, y, z, BuildCraftBuilders.markerBlock.blockID, 0); + dropBlockAsItem(world, x, y, z, 0, 0); world.setBlock(x, y, z, null); } } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { diff --git a/common/buildcraft/builders/BlockPathMarker.java b/common/buildcraft/builders/BlockPathMarker.java index 5c3a341b..0c486143 100644 --- a/common/buildcraft/builders/BlockPathMarker.java +++ b/common/buildcraft/builders/BlockPathMarker.java @@ -52,12 +52,6 @@ public class BlockPathMarker extends BlockMarker { return super.getBlockTexture(iblockaccess, i, j, k, l); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 3f337ef8..71df892a 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -406,13 +406,13 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { if (m.isSet()) { worldObj.setBlock(m.x, m.y, m.z, null); - BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, m.x, m.y, m.z, BuildCraftBuilders.markerBlock.blockID, 0); + BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, m.x, m.y, m.z, 0, 0); } } worldObj.setBlock(o.vectO.x, o.vectO.y, o.vectO.z, null); - BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, o.vectO.x, o.vectO.y, o.vectO.z, BuildCraftBuilders.markerBlock.blockID, 0); + BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, o.vectO.x, o.vectO.y, o.vectO.z, 0, 0); } @Override diff --git a/common/buildcraft/core/InterModComms.java b/common/buildcraft/core/InterModComms.java index 854b0bd4..dfcc2c64 100644 --- a/common/buildcraft/core/InterModComms.java +++ b/common/buildcraft/core/InterModComms.java @@ -10,6 +10,7 @@ package buildcraft.core; import java.util.logging.Level; import java.util.logging.Logger; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.world.biome.BiomeGenBase; import buildcraft.energy.worldgen.OilPopulate; @@ -47,10 +48,12 @@ public class InterModComms { } else { Integer blId = Ints.tryParse(array[0]); Integer metaId = Ints.tryParse(array[1]); + if (blId == null || metaId == null) { Logger.getLogger("Buildcraft").log(Level.INFO, String.format("Received an invalid add-facade request %s from mod %s", m.getStringValue(), m.getSender())); } else { - ItemFacade.addFacade(new ItemStack(blId, 1, metaId)); + Block block = (Block) Block.blockRegistry.getObjectById(blId); + ItemFacade.addFacade(new ItemStack(block, 1, metaId)); } } } else if (m.isItemStackMessage()) { @@ -65,8 +68,8 @@ public class InterModComms { try { String biomeID = m.getStringValue().trim(); int id = Integer.valueOf(biomeID); - if (id >= BiomeGenBase.biomeList.length) { - throw new IllegalArgumentException("Biome ID must be less than " + BiomeGenBase.biomeList.length); + if (id >= BiomeGenBase.getBiomeGenArray().length) { + throw new IllegalArgumentException("Biome ID must be less than " + BiomeGenBase.getBiomeGenArray().length); } OilPopulate.INSTANCE.surfaceDepositBiomes.add(id); } catch (Exception ex) { @@ -79,8 +82,8 @@ public class InterModComms { try { String biomeID = m.getStringValue().trim(); int id = Integer.valueOf(biomeID); - if (id >= BiomeGenBase.biomeList.length) { - throw new IllegalArgumentException("Biome ID must be less than " + BiomeGenBase.biomeList.length); + if (id >= BiomeGenBase.getBiomeGenArray().length) { + throw new IllegalArgumentException("Biome ID must be less than " + BiomeGenBase.getBiomeGenArray().length); } OilPopulate.INSTANCE.excludedBiomes.add(id); } catch (Exception ex) { diff --git a/common/buildcraft/core/ItemBlockBuildCraft.java b/common/buildcraft/core/ItemBlockBuildCraft.java index 31f5df78..6ca0622e 100644 --- a/common/buildcraft/core/ItemBlockBuildCraft.java +++ b/common/buildcraft/core/ItemBlockBuildCraft.java @@ -6,8 +6,8 @@ import net.minecraft.item.ItemStack; public class ItemBlockBuildCraft extends ItemBlock { - public ItemBlockBuildCraft(int id) { - super(id); + public ItemBlockBuildCraft() { + super(); } @Override diff --git a/common/buildcraft/core/TickHandlerCoreClient.java b/common/buildcraft/core/TickHandlerCoreClient.java index 30dfc977..b405ebfa 100644 --- a/common/buildcraft/core/TickHandlerCoreClient.java +++ b/common/buildcraft/core/TickHandlerCoreClient.java @@ -1,26 +1,29 @@ package buildcraft.core; import buildcraft.core.proxy.CoreProxy; -import cpw.mods.fml.common.ITickHandler; -import cpw.mods.fml.common.TickType; + import java.util.EnumSet; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; -public class TickHandlerCoreClient implements ITickHandler { +public class TickHandlerCoreClient { private boolean nagged; - @Override - public void tickStart(EnumSet type, Object... tickData) { - } + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void tickEnd(PlayerTickEvent evt) { - @Override - public void tickEnd(EnumSet type, Object... tickData) { - - if (nagged) + if (nagged) { return; + } - EntityPlayer player = (EntityPlayer) tickData[0]; + EntityPlayer player = evt.player; // if(!Config.disableVersionCheck) { @@ -37,15 +40,4 @@ public class TickHandlerCoreClient implements ITickHandler { nagged = true; } - - @Override - public EnumSet ticks() { - return EnumSet.of(TickType.PLAYER); - } - - @Override - public String getLabel() { - return "BuildCraft - Player update tick"; - } - } diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 5fc46dd7..60bea7fb 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -84,7 +84,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized public void onBlockPlacedBy(EntityLivingBase entity, ItemStack stack) { if (entity instanceof EntityPlayer) - owner = ((EntityPlayer) entity).username; + owner = ((EntityPlayer) entity).getDisplayName(); } public void destroy() { diff --git a/common/buildcraft/core/blueprints/BptBase.java b/common/buildcraft/core/blueprints/BptBase.java index 819419d8..4eec73ce 100644 --- a/common/buildcraft/core/blueprints/BptBase.java +++ b/common/buildcraft/core/blueprints/BptBase.java @@ -14,6 +14,7 @@ import buildcraft.core.Box; import buildcraft.core.Version; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BCLog; + import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -25,6 +26,8 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; +import net.minecraft.block.Block; + public abstract class BptBase { BptSlot contents[][][]; @@ -57,15 +60,15 @@ public abstract class BptBase { anchorZ = 0; } - public void setBlockId(int x, int y, int z, int blockId) { - if (contents[x][y][z] == null) { + public void setBlock(int x, int y, int z, Block block) { + /*if (contents[x][y][z] == null) { contents[x][y][z] = new BptSlot(); contents[x][y][z].x = x; contents[x][y][z].y = y; contents[x][y][z].z = z; } - contents[x][y][z].blockId = blockId; + contents[x][y][z].blockId = blockId;*/ } public void rotateLeft(BptContext context) { diff --git a/common/buildcraft/core/blueprints/BptBlueprint.java b/common/buildcraft/core/blueprints/BptBlueprint.java index e69ee97b..41df5223 100644 --- a/common/buildcraft/core/blueprints/BptBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBlueprint.java @@ -366,8 +366,8 @@ public class BptBlueprint extends BptBase { } @Override - public void setBlockId(int x, int y, int z, int blockId) { - super.setBlockId(x, y, z, blockId); + public void setBlock(int x, int y, int z, Block block) { + super.setBlock(x, y, z, block); } @Override diff --git a/common/buildcraft/core/fluids/FluidUtils.java b/common/buildcraft/core/fluids/FluidUtils.java index 68ec94a0..4f3f62c1 100644 --- a/common/buildcraft/core/fluids/FluidUtils.java +++ b/common/buildcraft/core/fluids/FluidUtils.java @@ -73,7 +73,7 @@ public class FluidUtils { public static Block getFluidBlock(Fluid fluid, boolean moving) { if (fluid == FluidRegistry.WATER) - return moving ? Blocks.flowing_lava : Blocks.water; + return moving ? Blocks.flowing_water : Blocks.water; if (fluid == FluidRegistry.LAVA) return moving ? Blocks.flowing_lava : Blocks.lava; return fluid.getBlock(); diff --git a/common/buildcraft/core/fluids/TankManager.java b/common/buildcraft/core/fluids/TankManager.java index 3de658cc..0bc36878 100644 --- a/common/buildcraft/core/fluids/TankManager.java +++ b/common/buildcraft/core/fluids/TankManager.java @@ -9,14 +9,18 @@ package buildcraft.core.fluids; import com.google.common.collect.ForwardingList; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -109,7 +113,7 @@ public class TankManager extends ForwardingList implements IF } } - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { for (Tank tank : tanks) { FluidStack fluidStack = tank.getFluid(); if (fluidStack != null && fluidStack.getFluid() != null) { @@ -123,7 +127,7 @@ public class TankManager extends ForwardingList implements IF } @SideOnly(Side.CLIENT) - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { for (Tank tank : tanks) { int fluidId = data.readShort(); if (fluidId > 0) { diff --git a/common/buildcraft/core/gui/buttons/GuiBetterButton.java b/common/buildcraft/core/gui/buttons/GuiBetterButton.java index 790243db..95ab5803 100644 --- a/common/buildcraft/core/gui/buttons/GuiBetterButton.java +++ b/common/buildcraft/core/gui/buttons/GuiBetterButton.java @@ -63,9 +63,10 @@ public class GuiBetterButton extends GuiButton implements IToolTipProvider { @Override public void drawButton(Minecraft minecraft, int mouseX, int mouseY) { - if (!drawButton) { + if (!visible) { return; } + FontRenderer fontrenderer = minecraft.fontRenderer; bindButtonTextures(minecraft); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); @@ -92,7 +93,7 @@ public class GuiBetterButton extends GuiButton implements IToolTipProvider { @Override public boolean isToolTipVisible() { - return drawButton; + return visible; } @Override diff --git a/common/buildcraft/core/gui/buttons/GuiMultiButton.java b/common/buildcraft/core/gui/buttons/GuiMultiButton.java index 3bc4ea36..03cca2e4 100644 --- a/common/buildcraft/core/gui/buttons/GuiMultiButton.java +++ b/common/buildcraft/core/gui/buttons/GuiMultiButton.java @@ -30,9 +30,10 @@ public class GuiMultiButton extends GuiBetterButton { @Override public void drawButton(Minecraft minecraft, int x, int y) { - if (!drawButton) { + if (!visible) { return; } + FontRenderer fontrenderer = minecraft.fontRenderer; bindButtonTextures(minecraft); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index 8d3daef0..b9b42bd9 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -233,8 +233,8 @@ public class InvUtils { adjacent = chest.adjacentChestZNeg; } - if (chest.adjacentChestZPosition != null) { - adjacent = chest.adjacentChestZPosition; + if (chest.adjacentChestZPos != null) { + adjacent = chest.adjacentChestZPos; } if (adjacent != null) { diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index bf524cc8..8c90e7e3 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -48,7 +48,7 @@ public class PacketGuiReturn extends BuildCraftPacket { } else if (obj instanceof Entity) { Entity entity = (Entity) obj; data.writeBoolean(false); - data.writeInt(entity.entityId); + data.writeInt(entity.getEntityId()); } else return; obj.writeGuiData(data); diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index ac5b82b2..4d0e5d61 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -230,6 +230,6 @@ public class CoreProxy { * server channels instead. */ public EntityPlayer getPlayerFromNetHandler (INetHandler hander) { - return ((NetHandlerPlayServer) hander).field_147369_b; + return ((NetHandlerPlayServer) hander).playerEntity; } } diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index 2aa15f27..e46459d1 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -12,6 +12,7 @@ import buildcraft.core.EntityBlock; import java.util.Arrays; import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; @@ -27,6 +28,7 @@ import org.lwjgl.opengl.GL11; public class RenderEntityBlock extends Render { public static RenderEntityBlock INSTANCE = new RenderEntityBlock(); + protected RenderBlocks renderBlocks; @Override protected ResourceLocation getEntityTexture(Entity entity) { @@ -121,6 +123,7 @@ public class RenderEntityBlock extends Render { } private RenderEntityBlock() { + renderBlocks = field_147909_c; } @Override diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 7640586c..93a23239 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -43,12 +43,12 @@ public class BlockUtil { if (block == null) return null; - if (block.isAirBlock(world, i, j, k)) + if (block.isAir(world, i, j, k)) return null; int meta = world.getBlockMetadata(i, j, k); - ArrayList dropsList = block.getBlockDropped(world, i, j, k, meta, 0); + ArrayList dropsList = block.getDrops(world, i, j, k, meta, 0); float dropChance = ForgeEventFactory.fireBlockHarvesting(dropsList, world, block, i, j, k, meta, 0, 1.0F, false, CoreProxy.proxy.getBuildCraftPlayer(world)); ArrayList returnList = new ArrayList(); @@ -87,7 +87,7 @@ public class BlockUtil { } public static boolean isAnObstructingBlock(Block block, World world, int x, int y, int z) { - if (block == null || block.isAirBlock(world, x, y, z)) + if (block == null || block.isAir(world, x, y, z)) return false; return true; } @@ -97,7 +97,7 @@ public class BlockUtil { } public static boolean canChangeBlock(Block block, World world, int x, int y, int z) { - if (block == null || block.isAirBlock(world, x, y, z)) + if (block == null || block.isAir(world, x, y, z)) return true; if (block.getBlockHardness(world, x, y, z) < 0) @@ -117,7 +117,7 @@ public class BlockUtil { } public static boolean isSoftBlock(Block block, World world, int x, int y, int z) { - return block == null || BuildCraftAPI.softBlocks[blockID] || block.isAirBlock(world, x, y, z); + return block == null || BuildCraftAPI.softBlocks.contains(block) || block.isAir(world, x, y, z); } /** diff --git a/common/buildcraft/energy/BptBlockEngine.java b/common/buildcraft/energy/BptBlockEngine.java index 55e796f2..2c8ba58b 100644 --- a/common/buildcraft/energy/BptBlockEngine.java +++ b/common/buildcraft/energy/BptBlockEngine.java @@ -42,7 +42,7 @@ public class BptBlockEngine extends BptBlock { @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); TileEngine engine = (TileEngine) context.world().getTileEntity(slot.x, slot.y, slot.z); diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index 2a348656..9938428b 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -18,7 +18,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.event.Event.Result; +import cpw.mods.fml.common.eventhandler.Event.Result; import net.minecraftforge.event.entity.player.FillBucketEvent; public class BucketHandler { diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 89786e29..9436ee16 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -284,7 +284,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto if ((!pipesOnly || tile instanceof IPipeTile) && isPoweredTile(tile, o)) { orientation = o; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord)); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord)); return true; } diff --git a/common/buildcraft/factory/BlockAutoWorkbench.java b/common/buildcraft/factory/BlockAutoWorkbench.java index adcdebea..19ff1746 100644 --- a/common/buildcraft/factory/BlockAutoWorkbench.java +++ b/common/buildcraft/factory/BlockAutoWorkbench.java @@ -68,11 +68,6 @@ public class BlockAutoWorkbench extends BlockBuildCraft { return new TileAutoWorkbench(); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) diff --git a/common/buildcraft/factory/BlockFloodGate.java b/common/buildcraft/factory/BlockFloodGate.java index 73034be4..a39b5798 100644 --- a/common/buildcraft/factory/BlockFloodGate.java +++ b/common/buildcraft/factory/BlockFloodGate.java @@ -92,12 +92,6 @@ public class BlockFloodGate extends BlockBuildCraft { } } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/BlockHopper.java b/common/buildcraft/factory/BlockHopper.java index ee480e16..a7b6cfda 100644 --- a/common/buildcraft/factory/BlockHopper.java +++ b/common/buildcraft/factory/BlockHopper.java @@ -67,12 +67,6 @@ public class BlockHopper extends BlockBuildCraft { return true; } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index ff1cb8d5..cd66d308 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -85,12 +85,6 @@ public class BlockMiningWell extends BlockBuildCraft { return new TileMiningWell(); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) diff --git a/common/buildcraft/factory/BlockPump.java b/common/buildcraft/factory/BlockPump.java index b5cb2a6a..683a04ab 100644 --- a/common/buildcraft/factory/BlockPump.java +++ b/common/buildcraft/factory/BlockPump.java @@ -93,12 +93,6 @@ public class BlockPump extends BlockBuildCraft { } } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index 2217e157..cc260ba3 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -125,11 +125,11 @@ public class BlockQuarry extends BlockBuildCraft { } @Override - public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { if (BuildCraftFactory.quarryOneTimeUse) { return new ArrayList(); } - return super.getBlockDropped(world, x, y, z, metadata, fortune); + return super.getDrops(world, x, y, z, metadata, fortune); } @Override diff --git a/common/buildcraft/factory/BlockRefinery.java b/common/buildcraft/factory/BlockRefinery.java index 78c2bebf..6dad53cf 100644 --- a/common/buildcraft/factory/BlockRefinery.java +++ b/common/buildcraft/factory/BlockRefinery.java @@ -135,13 +135,7 @@ public class BlockRefinery extends BlockContainer { return true; } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - + @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index 64c1c888..ce2747a0 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -80,7 +80,7 @@ public class BlockTank extends BlockContainer { case 1: return textureTop; default: - if (iblockaccess.getBlockId(i, j - 1, k) == blockID) + if (iblockaccess.getBlock(i, j - 1, k) == this) return textureStackedSide; else return textureBottomSide; @@ -146,12 +146,6 @@ public class BlockTank extends BlockContainer { return super.shouldSideBeRendered(world, x, y, z, side); } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/BptBlockTank.java b/common/buildcraft/factory/BptBlockTank.java index 4ba90ca4..682476ae 100644 --- a/common/buildcraft/factory/BptBlockTank.java +++ b/common/buildcraft/factory/BptBlockTank.java @@ -18,7 +18,7 @@ public class BptBlockTank extends BptBlock { @Override public void buildBlock(BptSlotInfo slot, IBptContext context) { - context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); + //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1); } } diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index 092f2df9..fc29e601 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -100,7 +100,7 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler { private boolean placeFluid(int x, int y, int z, Fluid fluid) { Block block = worldObj.getBlock(x, y, z); if (canPlaceFluidAt(block, x, y, z)) { - boolean placed = worldObj.setBlock(x, y, z, FluidUtils.getFluidBlockId(fluid, true)); + boolean placed = worldObj.setBlock(x, y, z, FluidUtils.getFluidBlock(fluid, true)); if (placed) { queueAdjacent(x, y, z); expandQueue(); diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index b0419f19..ae59027c 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -30,6 +30,7 @@ import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.BlockUtil; import buildcraft.core.utils.Utils; +import io.netty.buffer.ByteBuf; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -296,7 +297,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor } private boolean isPumpableFluid(int x, int y, int z) { - Fluid fluid = BlockUtil.getFluid(worldObj.getBlockId(x, y, z)); + Fluid fluid = BlockUtil.getFluid(worldObj.getBlock(x, y, z)); if (fluid == null) return false; if (!isFluidAllowed(fluid)) @@ -378,10 +379,10 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor public PacketPayload getPacketPayload() { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { - data.writeInt(aimY); - data.writeFloat((float) tubeY); - data.writeBoolean(powered); + public void writeData(ByteBuf buf) { + buf.writeInt(aimY); + buf.writeFloat((float) tubeY); + buf.writeBoolean(powered); } }); @@ -391,7 +392,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor @Override public void handleUpdatePacket(PacketUpdate packet) throws IOException { PacketPayloadStream payload = (PacketPayloadStream) packet.payload; - DataInputStream data = payload.stream; + ByteBuf data = payload.stream; aimY = data.readInt(); tubeY = data.readFloat(); powered = data.readBoolean(); diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index f88d5172..f32142d3 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -619,29 +619,29 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept for (int i = 0; i < bluePrint.sizeX; ++i) { for (int j = 0; j < bluePrint.sizeY; ++j) { for (int k = 0; k < bluePrint.sizeZ; ++k) { - bluePrint.setBlockId(i, j, k, 0); + bluePrint.setBlock(i, j, k, null); } } } for (int it = 0; it < 2; it++) { for (int i = 0; i < bluePrint.sizeX; ++i) { - bluePrint.setBlockId(i, it * (box.sizeY() - 1), 0, BuildCraftFactory.frameBlock.blockID); - bluePrint.setBlockId(i, it * (box.sizeY() - 1), bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock.blockID); + bluePrint.setBlock(i, it * (box.sizeY() - 1), 0, BuildCraftFactory.frameBlock); + bluePrint.setBlock(i, it * (box.sizeY() - 1), bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock); } for (int k = 0; k < bluePrint.sizeZ; ++k) { - bluePrint.setBlockId(0, it * (box.sizeY() - 1), k, BuildCraftFactory.frameBlock.blockID); - bluePrint.setBlockId(bluePrint.sizeX - 1, it * (box.sizeY() - 1), k, BuildCraftFactory.frameBlock.blockID); + bluePrint.setBlock(0, it * (box.sizeY() - 1), k, BuildCraftFactory.frameBlock); + bluePrint.setBlock(bluePrint.sizeX - 1, it * (box.sizeY() - 1), k, BuildCraftFactory.frameBlock); } } for (int h = 1; h < box.sizeY(); ++h) { - bluePrint.setBlockId(0, h, 0, BuildCraftFactory.frameBlock.blockID); - bluePrint.setBlockId(0, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock.blockID); - bluePrint.setBlockId(bluePrint.sizeX - 1, h, 0, BuildCraftFactory.frameBlock.blockID); - bluePrint.setBlockId(bluePrint.sizeX - 1, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock.blockID); + bluePrint.setBlock(0, h, 0, BuildCraftFactory.frameBlock); + bluePrint.setBlock(0, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock); + bluePrint.setBlock(bluePrint.sizeX - 1, h, 0, BuildCraftFactory.frameBlock); + bluePrint.setBlock(bluePrint.sizeX - 1, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock); } bluePrintBuilder = new BptBuilderBlueprint(bluePrint, worldObj, box.xMin, yCoord, box.zMin); diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 2cefce30..deced7de 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -25,6 +25,7 @@ import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import io.netty.buffer.ByteBuf; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -362,7 +363,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe public PacketPayload getPacketPayload() { PacketPayload payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeFloat(animationSpeed); tankManager.writeData(data); } @@ -372,7 +373,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe @Override public void handleUpdatePacket(PacketUpdate packet) throws IOException { - DataInputStream stream = ((PacketPayloadStream) packet.payload).stream; + ByteBuf stream = ((PacketPayloadStream) packet.payload).stream; animationSpeed = stream.readFloat(); tankManager.readData(stream); } diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 4d14055b..4a004f2f 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -17,6 +17,7 @@ import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import io.netty.buffer.ByteBuf; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -69,7 +70,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { public PacketPayload getPacketPayload() { PacketPayload payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { tankManager.writeData(data); } }); @@ -78,7 +79,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { @Override public void handleUpdatePacket(PacketUpdate packet) throws IOException { - DataInputStream stream = ((PacketPayloadStream) packet.payload).stream; + ByteBuf stream = ((PacketPayloadStream) packet.payload).stream; tankManager.readData(stream); } diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index 7f598494..eba22fc0 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -63,11 +63,11 @@ public class PacketHandlerFactory extends BuildCraftChannelHandler { private void onRefinerySelect(EntityPlayer playerEntity, PacketUpdate packet) throws IOException { - TileRefinery tile = getRefinery(playerEntity.getWorldObj(), packet.posX, packet.posY, packet.posZ); + TileRefinery tile = getRefinery(playerEntity.worldObj, packet.posX, packet.posY, packet.posZ); if (tile == null || packet.payload == null) return; - DataInputStream stream = ((PacketPayloadStream)packet.payload).stream; + ByteBuf stream = ((PacketPayloadStream)packet.payload).stream; tile.setFilter(stream.readByte(), FluidRegistry.getFluid(stream.readShort())); } diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index 04ab9b64..8cfdbe9c 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -77,12 +77,6 @@ public class BlockLaser extends BlockContainer { return meta; } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index ac8519ab..e4de8905 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -27,6 +27,7 @@ import buildcraft.core.utils.Utils; import com.google.common.collect.Lists; +import java.util.Arrays; import java.util.EnumSet; import java.util.List; @@ -67,7 +68,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn public int[] oreIDs = new int[9]; - public CraftingGrid() { + public CraftingGrid() { super(9, "CraftingSlots", 1); Arrays.fill(oreIDs, -1); } diff --git a/common/buildcraft/transport/BlockFilteredBuffer.java b/common/buildcraft/transport/BlockFilteredBuffer.java index 81bf97eb..c8424961 100644 --- a/common/buildcraft/transport/BlockFilteredBuffer.java +++ b/common/buildcraft/transport/BlockFilteredBuffer.java @@ -64,12 +64,6 @@ public class BlockFilteredBuffer extends BlockBuildCraft { return true; } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index b1d58269..ce303d4e 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -113,7 +113,7 @@ public class BlockGenericPipe extends BlockBuildCraft { } @Override - public boolean canBeReplacedByLeaves(World world, int x, int y, int z) { + public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { return false; } @@ -510,7 +510,7 @@ public class BlockGenericPipe extends BlockBuildCraft { } @Override - public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { if (CoreProxy.proxy.isRenderWorld(world)) return null; @@ -526,9 +526,9 @@ public class BlockGenericPipe extends BlockBuildCraft { } if (pipe != null) { - if (pipe.itemID > 0) { + if (pipe.item != null) { pipe.dropContents(); - list.add(new ItemStack(pipe.itemID, 1, damageDropped(metadata))); + list.add(new ItemStack(pipe.item, 1, damageDropped(metadata))); } } } @@ -559,23 +559,23 @@ public class BlockGenericPipe extends BlockBuildCraft { } if (pipe != null) { - int k1 = pipe.itemID; + Item k1 = pipe.item; - if (k1 > 0) { + if (k1 != null) { pipe.dropContents(); - dropBlockAsItem_do(world, i, j, k, new ItemStack(k1, 1, damageDropped(l))); + dropBlockAsItem(world, i, j, k, new ItemStack(k1, 1, damageDropped(l))); } } } } @Override - public int idDropped(int meta, Random rand, int dmg) { - // Returns 0 to be safe - the id does not depend on the meta - return 0; + public Item getItemDropped(int meta, Random rand, int dmg) { + // Returns null to be safe - the id does not depend on the meta + return null; } - @SideOnly(Side.CLIENT) + /*@SideOnly(Side.CLIENT) @Override public int idPicked(World world, int i, int j, int k) { Pipe pipe = getPipe(world, i, j, k); @@ -584,7 +584,7 @@ public class BlockGenericPipe extends BlockBuildCraft { return 0; else return pipe.itemID; - } + }*/ @SideOnly(Side.CLIENT) @Override @@ -642,7 +642,7 @@ public class BlockGenericPipe extends BlockBuildCraft { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset) { super.onBlockActivated(world, x, y, z, player, side, xOffset, yOffset, zOffset); - world.notifyBlocksOfNeighborChange(x, y, z, BuildCraftTransport.genericPipeBlock.blockID); + world.notifyBlocksOfNeighborChange(x, y, z, BuildCraftTransport.genericPipeBlock); Pipe pipe = getPipe(world, x, y, z); @@ -799,7 +799,7 @@ public class BlockGenericPipe extends BlockBuildCraft { private boolean addFacade(EntityPlayer player, Pipe pipe, ForgeDirection side) { ItemStack stack = player.getCurrentEquippedItem(); - if (pipe.container.addFacade(side, ItemFacade.getBlockId(stack), ItemFacade.getMetaData(stack))) { + if (pipe.container.addFacade(side, ItemFacade.getBlock(stack), ItemFacade.getMetaData(stack))) { if (!player.capabilities.isCreativeMode) { stack.stackSize--; } @@ -871,7 +871,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @SuppressWarnings({"all"}) @SideOnly(Side.CLIENT) @Override - public IIcon getBlockTexture(IBlockAccess iblockaccess, int x, int y, int z, int side) { + public IIcon getIcon(IBlockAccess iblockaccess, int x, int y, int z, int side) { TileEntity tile = iblockaccess.getTileEntity(x, y, z); if (!(tile instanceof TileGenericPipe)) return null; @@ -937,18 +937,18 @@ public class BlockGenericPipe extends BlockBuildCraft { } /* Registration ******************************************************** */ - public static Map> pipes = new HashMap>(); + public static Map> pipes = new HashMap>(); static long lastRemovedDate = -1; public static Map pipeRemoved = new HashMap(); - public static ItemPipe registerPipe(int key, Class clas) { - ItemPipe item = new ItemPipe(key); + public static ItemPipe registerPipe(Class clas) { + ItemPipe item = new ItemPipe(); item.setBlockName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); GameRegistry.registerItem(item, item.getUnlocalizedName()); - pipes.put(item.itemID, clas); + pipes.put(item, clas); - Pipe dummyPipe = createPipe(item.itemID); + Pipe dummyPipe = createPipe(item); if (dummyPipe != null) { item.setPipeIconIndex(dummyPipe.getIconIndexForItem()); TransportProxy.proxy.setIconProviderFromPipe(item, dummyPipe); @@ -960,7 +960,7 @@ public class BlockGenericPipe extends BlockBuildCraft { return pipes.containsKey(key); } - public static Pipe createPipe(int key) { + public static Pipe createPipe(Item key) { try { Class pipe = pipes.get(key); @@ -1018,7 +1018,7 @@ public class BlockGenericPipe extends BlockBuildCraft { return; } BuildCraftTransport.instance.wireIconProvider.registerIcons(iconRegister); - for (int i : pipes.keySet()) { + for (Item i : pipes.keySet()) { Pipe dummyPipe = createPipe(i); if (dummyPipe != null) { dummyPipe.getIconProvider().registerIcons(iconRegister); @@ -1058,7 +1058,7 @@ public class BlockGenericPipe extends BlockBuildCraft { */ @SideOnly(Side.CLIENT) @Override - public boolean addBlockHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { + public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { int x = target.blockX; int y = target.blockY; int z = target.blockZ; @@ -1123,7 +1123,7 @@ public class BlockGenericPipe extends BlockBuildCraft { */ @SideOnly(Side.CLIENT) @Override - public boolean addBlockDestroyEffects(World worldObj, int x, int y, int z, int meta, EffectRenderer effectRenderer) { + public boolean addDestroyEffects(World worldObj, int x, int y, int z, int meta, EffectRenderer effectRenderer) { Pipe pipe = getPipe(worldObj, x, y, z); if (pipe == null) return false; diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index c2e1d33a..12099a01 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -48,16 +48,16 @@ public class ItemFacade extends ItemBuildCraft { @Override public String getItemDisplayName(ItemStack itemstack) { String name = super.getItemDisplayName(itemstack); - int decodedBlockId = ItemFacade.getBlockId(itemstack); + Block decodedBlock = ItemFacade.getBlock(itemstack); int decodedMeta = ItemFacade.getMetaData(itemstack); - if (decodedBlockId < Block.blocksList.length && Block.blocksList[decodedBlockId] != null && Block.blocksList[decodedBlockId].getRenderType() == 31) { + if (decodedBlock != null && decodedBlock.getRenderType() == 31) { decodedMeta &= 0x3; } - ItemStack newStack = new ItemStack(decodedBlockId, 1, decodedMeta); - if (Item.itemsList[decodedBlockId] != null) { + ItemStack newStack = new ItemStack(decodedBlock, 1, decodedMeta); + if (Item.getItemFromBlock(decodedBlock) != null) { name += ": " + CoreProxy.proxy.getItemDisplayName(newStack); } else { - name += " < BROKEN (" + decodedBlockId + ":" + decodedMeta + " )>"; + name += " < BROKEN (" + decodedBlock.getLocalizedName() + ":" + decodedMeta + " )>"; } return name; } @@ -89,7 +89,7 @@ public class ItemFacade extends ItemBuildCraft { return false; TileGenericPipe pipeTile = (TileGenericPipe) tile; - if (pipeTile.addFacade(ForgeDirection.getOrientation(side).getOpposite(), ItemFacade.getBlockId(stack), ItemFacade.getMetaData(stack))) { + if (pipeTile.addFacade(ForgeDirection.getOrientation(side).getOpposite(), ItemFacade.getBlock(stack), ItemFacade.getMetaData(stack))) { if (!player.capabilities.isCreativeMode) { stack.stackSize--; } @@ -140,15 +140,19 @@ public class ItemFacade extends ItemBuildCraft { } public static int getMetaData(ItemStack stack) { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey("meta")) + if (stack.hasTagCompound() && stack.getTagCompound().hasKey("meta")) { return stack.getTagCompound().getInteger("meta"); - return stack.getItemDamage() & 0x0000F; + } else { + return stack.getItemDamage() & 0x0000F; + } } - public static int getBlockId(ItemStack stack) { - if (stack.hasTagCompound() && stack.getTagCompound().hasKey("id")) - return stack.getTagCompound().getInteger("id"); - return ((stack.getItemDamage() & 0xFFF0) >>> 4); + public static Block getBlock(ItemStack stack) { + if (stack.hasTagCompound() && stack.getTagCompound().hasKey("id")) { + return (Block) Block.blockRegistry.getObjectById(stack.getTagCompound().getInteger("id")); + } else { + return (Block) Block.blockRegistry.getObjectById((stack.getItemDamage() & 0xFFF0) >>> 4); + } } @Override @@ -192,15 +196,15 @@ public class ItemFacade extends ItemBuildCraft { ItemStack slotmatch = null; for (int i = 0; i < inventorycrafting.getSizeInventory(); i++) { ItemStack slot = inventorycrafting.getStackInSlot(i); - if (slot != null && slot.getItem() == ItemFacade.this.itemID && slotmatch == null) { + if (slot != null && slot.getItem() == ItemFacade.this && slotmatch == null) { slotmatch = slot; } else if (slot != null) { slotmatch = NO_MATCH; } } if (slotmatch != null && slotmatch != NO_MATCH) { - int blockId = ItemFacade.getBlockId(slotmatch); - return blockId < Block.blocksList.length && Block.blocksList[blockId] != null && Block.blocksList[blockId].getRenderType() == 31; + Block block = ItemFacade.getBlock(slotmatch); + return block != null && block.getRenderType() == 31; } return false; @@ -211,27 +215,25 @@ public class ItemFacade extends ItemBuildCraft { ItemStack slotmatch = null; for (int i = 0; i < inventorycrafting.getSizeInventory(); i++) { ItemStack slot = inventorycrafting.getStackInSlot(i); - if (slot != null && slot.getItem() == ItemFacade.this.itemID && slotmatch == null) { + if (slot != null && slot.getItem() == ItemFacade.this && slotmatch == null) { slotmatch = slot; } else if (slot != null) { slotmatch = NO_MATCH; } } if (slotmatch != null && slotmatch != NO_MATCH) { - int blockId = ItemFacade.getBlockId(slotmatch); + Block block = ItemFacade.getBlock(slotmatch); int blockMeta = ItemFacade.getMetaData(slotmatch); - if (blockId >= Block.blocksList.length) - return null; - Block bl = Block.blocksList[blockId]; - // No Meta - if (bl != null && bl.getRenderType() == 31 && (blockMeta & 0xC) == 0) - return getStack(bl, (blockMeta & 0x3) | 4); + + + if (block != null && block.getRenderType() == 31 && (blockMeta & 0xC) == 0) + return getStack(block, (blockMeta & 0x3) | 4); // Meta | 4 = true - if (bl != null && bl.getRenderType() == 31 && (blockMeta & 0x8) == 0) - return getStack(bl, (blockMeta & 0x3) | 8); + if (block != null && block.getRenderType() == 31 && (blockMeta & 0x8) == 0) + return getStack(block, (blockMeta & 0x3) | 8); // Meta | 8 = true - if (bl != null && bl.getRenderType() == 31 && (blockMeta & 0x4) == 0) - return getStack(bl, (blockMeta & 0x3)); + if (block != null && block.getRenderType() == 31 && (blockMeta & 0x4) == 0) + return getStack(block, (blockMeta & 0x3)); } return null; } @@ -261,9 +263,9 @@ public class ItemFacade extends ItemBuildCraft { public static ItemStack getStack(Block block, int metadata) { ItemStack stack = new ItemStack(BuildCraftTransport.facadeItem, 1, 0); - NBTTagCompound nbt = new NBTTagCompound("tag"); - nbt.setInteger("meta", metadata); - nbt.setInteger("id", blockID); + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setInteger("meta", metadata); + nbt.setInteger("id", Block.blockRegistry.getIDForObject(block)); stack.setTagCompound(nbt); return stack; } diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index 5e48d025..e091f1d7 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -45,7 +45,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { if (worldBlock == Blocks.snow) { side = 1; } else if (worldBlock != Blocks.vine && worldBlock != Blocks.tallgrass && worldBlock != Blocks.deadbush - && (worldBlock == null || !worldBlock.isBlockReplaceable(world, i, j, k))) { + && (worldBlock == null || !worldBlock.isReplaceable(world, i, j, k))) { if (side == 0) { j--; } @@ -66,27 +66,31 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { } } - if (itemstack.stackSize == 0) + if (itemstack.stackSize == 0) { return false; - if (world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer, itemstack)) { - + } + + if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack)) { Pipe pipe = BlockGenericPipe.createPipe(itemID); + if (pipe == null) { BCLog.logger.log(Level.WARNING, "Pipe failed to create during placement at {0},{1},{2}", new Object[]{i, j, k}); return true; } - if (BlockGenericPipe.placePipe(pipe, world, i, j, k, blockID, 0)) { - - Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer, itemstack); + + if (BlockGenericPipe.placePipe(pipe, world, i, j, k, block, 0)) { + block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack); world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); itemstack.stackSize--; } + return true; - } else + } else { return false; + } } @SideOnly(Side.CLIENT) diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 5630bffe..2066c0b8 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -21,14 +21,17 @@ import buildcraft.transport.gates.GateFactory; import buildcraft.transport.pipes.events.PipeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.lang.reflect.Method; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Random; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -40,7 +43,7 @@ public abstract class Pipe implements IDropControlInven public int[] signalStrength = new int[]{0, 0, 0, 0}; public TileGenericPipe container; public final T transport; - public final int itemID; + public final Item item; private boolean internalUpdateScheduled = false; public boolean[] wireSet = new boolean[]{false, false, false, false}; public Gate gate; @@ -49,9 +52,9 @@ public abstract class Pipe implements IDropControlInven public SafeTimeTracker actionTracker = new SafeTimeTracker(); private static Map, Map, EventHandler>> eventHandlers = new HashMap, Map, EventHandler>>(); - public Pipe(T transport, int itemID) { + public Pipe(T transport, Item item) { this.transport = transport; - this.itemID = itemID; + this.item = item; if (!networkWrappers.containsKey(this.getClass())) { networkWrappers @@ -409,12 +412,12 @@ public abstract class Pipe implements IDropControlInven } protected void notifyBlocksOfNeighborChange(ForgeDirection side) { - container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord + side.offsetX, container.yCoord + side.offsetY, container.zCoord + side.offsetZ, BuildCraftTransport.genericPipeBlock.blockID); + container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord + side.offsetX, container.yCoord + side.offsetY, container.zCoord + side.offsetZ, BuildCraftTransport.genericPipeBlock); } protected void updateNeighbors(boolean needSelf) { if (needSelf) { - container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord, container.yCoord, container.zCoord, BuildCraftTransport.genericPipeBlock.blockID); + container.getWorldObj().notifyBlocksOfNeighborChange(container.xCoord, container.yCoord, container.zCoord, BuildCraftTransport.genericPipeBlock); } for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { notifyBlocksOfNeighborChange(side); diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 80129394..6d9c4ef6 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -106,7 +106,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui private boolean pipeBound = false; private boolean resyncGateExpansions = false; public int redstoneInput = 0; - private int[] facadeBlocks = new int[ForgeDirection.VALID_DIRECTIONS.length]; + private Block[] facadeBlocks = new int[ForgeDirection.VALID_DIRECTIONS.length]; private int[] facadeMeta = new int[ForgeDirection.VALID_DIRECTIONS.length]; private boolean[] plugs = new boolean[ForgeDirection.VALID_DIRECTIONS.length]; @@ -274,8 +274,8 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui // Facades for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { - int blockId = this.facadeBlocks[direction.ordinal()]; - renderState.facadeMatrix.setFacade(direction, blockId, this.facadeMeta[direction.ordinal()]); + Block block = this.facadeBlocks[direction.ordinal()]; + renderState.facadeMatrix.setFacade(direction, block, this.facadeMeta[direction.ordinal()]); } //Plugs @@ -589,16 +589,16 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui refreshRenderState = true; } - public boolean addFacade(ForgeDirection direction, int blockid, int meta) { + public boolean addFacade(ForgeDirection direction, Block block, int meta) { if (this.getWorldObj().isRemote) return false; - if (this.facadeBlocks[direction.ordinal()] == blockid) + if (this.facadeBlocks[direction.ordinal()] == block) return false; if (hasFacade(direction)) dropFacadeItem(direction); - this.facadeBlocks[direction.ordinal()] = blockid; + this.facadeBlocks[direction.ordinal()] = block; this.facadeMeta[direction.ordinal()] = meta; worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleRenderUpdate(); @@ -610,7 +610,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui return false; if (this.getWorldObj().isRemote) return renderState.facadeMatrix.getFacadeBlockId(direction) != 0; - return (this.facadeBlocks[direction.ordinal()] != 0); + return (this.facadeBlocks[direction.ordinal()] != null); } private void dropFacadeItem(ForgeDirection direction) { @@ -622,7 +622,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui return false; if (!worldObj.isRemote) { dropFacadeItem(direction); - this.facadeBlocks[direction.ordinal()] = 0; + this.facadeBlocks[direction.ordinal()] = null; this.facadeMeta[direction.ordinal()] = 0; worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleRenderUpdate(); diff --git a/common/buildcraft/transport/blueprints/BptBlockPipe.java b/common/buildcraft/transport/blueprints/BptBlockPipe.java index 59c4811e..f615e907 100644 --- a/common/buildcraft/transport/blueprints/BptBlockPipe.java +++ b/common/buildcraft/transport/blueprints/BptBlockPipe.java @@ -68,10 +68,12 @@ public class BptBlockPipe extends BptBlock { public boolean isValid(BptSlotInfo slot, IBptContext context) { Pipe pipe = BlockGenericPipe.getPipe(context.world(), slot.x, slot.y, slot.z); - if (BlockGenericPipe.isValid(pipe)) - return pipe.itemID == slot.cpt.getInteger("pipeId"); - else - return false; + //if (BlockGenericPipe.isValid(pipe)) + // return pipe.itemID == slot.cpt.getInteger("pipeId"); + //else + // return false; + + return false; } @Override @@ -87,12 +89,12 @@ public class BptBlockPipe extends BptBlock { public void buildBlock(BptSlotInfo slot, IBptContext context) { int pipeId = slot.cpt.getInteger("pipeId"); - Pipe pipe = BlockGenericPipe.createPipe(pipeId); + //Pipe pipe = BlockGenericPipe.createPipe(pipeId); - for (int i = 0; i < pipe.wireSet.length; ++i) - if (slot.cpt.hasKey("wire" + i)) { - pipe.wireSet[i] = true; - } + //for (int i = 0; i < pipe.wireSet.length; ++i) + // if (slot.cpt.hasKey("wire" + i)) { + // pipe.wireSet[i] = true; + // } // if (slot.cpt.hasKey("gate")) { // // / TODO: Does not save/load custom gates @@ -137,7 +139,7 @@ public class BptBlockPipe extends BptBlock { Pipe pipe = BlockGenericPipe.getPipe(context.world(), x, y, z); if (BlockGenericPipe.isValid(pipe)) { - bptSlot.cpt.setInteger("pipeId", pipe.itemID); + //bptSlot.cpt.setInteger("pipeId", pipe.itemID); for (int i = 0; i < pipe.wireSet.length; ++i) if (pipe.wireSet[i]) { diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index e84833fa..4bba54ca 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -64,7 +64,7 @@ public class PacketFluidUpdate extends PacketCoordinates { colorRenderCache = transLiq.colorRenderCache; byte[] dBytes = new byte[2]; - data.read(dBytes); + data.readBytes(dBytes); delta = fromByteArray(dBytes); // System.out.printf("read %d, %d, %d = %s, %s%n", posX, posY, posZ, Arrays.toString(dBytes), delta); @@ -90,7 +90,7 @@ public class PacketFluidUpdate extends PacketCoordinates { byte[] dBytes = toByteArray(delta); // System.out.printf("write %d, %d, %d = %s, %s%n", posX, posY, posZ, Arrays.toString(dBytes), delta); - data.write(dBytes); + data.writeBytes(dBytes); for (ForgeDirection dir : ForgeDirection.values()) { FluidStack liquid = renderCache[dir.ordinal()]; diff --git a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java index 20206c9b..d0110d7f 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsCobblestone extends Pipe { - public PipeFluidsCobblestone(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsCobblestone(Item item) { + super(new PipeTransportFluids(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeFluidsGold.java b/common/buildcraft/transport/pipes/PipeFluidsGold.java index 8354f0b0..c17e1602 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsGold.java +++ b/common/buildcraft/transport/pipes/PipeFluidsGold.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsGold extends Pipe { - public PipeFluidsGold(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsGold(Item item) { + super(new PipeTransportFluids(), item); transport.flowRate = 40; transport.travelDelay = 4; diff --git a/common/buildcraft/transport/pipes/PipeFluidsIron.java b/common/buildcraft/transport/pipes/PipeFluidsIron.java index 33de7d99..9cd56977 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsIron.java +++ b/common/buildcraft/transport/pipes/PipeFluidsIron.java @@ -21,6 +21,7 @@ import buildcraft.transport.triggers.ActionPipeDirection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; @@ -46,8 +47,8 @@ public class PipeFluidsIron extends Pipe { } }; - public PipeFluidsIron(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsIron(Item item) { + super(new PipeTransportFluids(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java index a8f992e0..246baebb 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java @@ -7,6 +7,7 @@ */ package buildcraft.transport.pipes; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -23,8 +24,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class PipeFluidsSandstone extends Pipe implements IPipeTransportFluidsHook, IPipeConnectionForced { - public PipeFluidsSandstone(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsSandstone(Item item) { + super(new PipeTransportFluids(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeFluidsStone.java b/common/buildcraft/transport/pipes/PipeFluidsStone.java index 7ffed323..7a8d6e4c 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsStone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsStone.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeFluidsStone extends Pipe { - public PipeFluidsStone(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsStone(Item item) { + super(new PipeTransportFluids(), item); // ((PipeTransportFluids) transport).flowRate = 40; } diff --git a/common/buildcraft/transport/pipes/PipeFluidsVoid.java b/common/buildcraft/transport/pipes/PipeFluidsVoid.java index 24206dff..24b6e8d5 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsVoid.java +++ b/common/buildcraft/transport/pipes/PipeFluidsVoid.java @@ -15,13 +15,14 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class PipeFluidsVoid extends Pipe implements IPipeTransportFluidsHook { - public PipeFluidsVoid(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsVoid(Item item) { + super(new PipeTransportFluids(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeFluidsWood.java b/common/buildcraft/transport/pipes/PipeFluidsWood.java index 69e020be..59ce439b 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsWood.java +++ b/common/buildcraft/transport/pipes/PipeFluidsWood.java @@ -22,6 +22,7 @@ import buildcraft.transport.PipeTransportFluids; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -51,8 +52,8 @@ public class PipeFluidsWood extends Pipe implements IPowerR } }; - public PipeFluidsWood(int itemID) { - super(new PipeTransportFluids(), itemID); + public PipeFluidsWood(Item item) { + super(new PipeTransportFluids(), item); powerHandler = new PowerHandler(this, Type.MACHINE); powerHandler.configure(1, 100, 1, 250); diff --git a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java index dac45cb7..e27843f1 100644 --- a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsCobblestone extends Pipe { - public PipeItemsCobblestone(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsCobblestone(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java index 7f9fa24e..0047d4ac 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java @@ -57,8 +57,8 @@ public class PipeItemsDaizuli extends Pipe { } }; - public PipeItemsDaizuli(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsDaizuli(Item item) { + super(new PipeTransportItems(), item); transport.allowBouncing = true; } diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index 0efcf76a..ec237ca7 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -15,6 +15,7 @@ import java.util.LinkedList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; @@ -38,8 +39,8 @@ public class PipeItemsDiamond extends Pipe implements IClien private SimpleInventory filters = new SimpleInventory(54, "Filters", 1); - public PipeItemsDiamond(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsDiamond(Item item) { + super(new PipeTransportItems(), item); } public IInventory getFilters() { diff --git a/common/buildcraft/transport/pipes/PipeItemsGold.java b/common/buildcraft/transport/pipes/PipeItemsGold.java index 7f201b9e..738def06 100644 --- a/common/buildcraft/transport/pipes/PipeItemsGold.java +++ b/common/buildcraft/transport/pipes/PipeItemsGold.java @@ -18,12 +18,13 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsGold extends Pipe { - public PipeItemsGold(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsGold(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsIron.java b/common/buildcraft/transport/pipes/PipeItemsIron.java index 716abf28..8c147182 100644 --- a/common/buildcraft/transport/pipes/PipeItemsIron.java +++ b/common/buildcraft/transport/pipes/PipeItemsIron.java @@ -17,10 +17,13 @@ import buildcraft.transport.TileGenericPipe; import buildcraft.transport.triggers.ActionPipeDirection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.LinkedList; import java.util.Map; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -45,8 +48,8 @@ public class PipeItemsIron extends Pipe { } }; - public PipeItemsIron(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsIron(Item item) { + super(new PipeTransportItems(), item); transport.allowBouncing = true; } diff --git a/common/buildcraft/transport/pipes/PipeItemsLapis.java b/common/buildcraft/transport/pipes/PipeItemsLapis.java index 4e3f6c21..2c53747d 100644 --- a/common/buildcraft/transport/pipes/PipeItemsLapis.java +++ b/common/buildcraft/transport/pipes/PipeItemsLapis.java @@ -31,8 +31,8 @@ import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsLapis extends Pipe { - public PipeItemsLapis(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsLapis(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index 09490ea1..b8cea000 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -27,12 +27,15 @@ import buildcraft.transport.pipes.events.PipeEventItem; import buildcraft.transport.utils.TransportUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.Arrays; import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityMinecartChest; import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; @@ -45,8 +48,8 @@ public class PipeItemsObsidian extends Pipe implements IPowe private int[] entitiesDropped; private int entitiesDroppedIndex = 0; - public PipeItemsObsidian(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsObsidian(Item item) { + super(new PipeTransportItems(), item); entitiesDropped = new int[32]; Arrays.fill(entitiesDropped, -1); @@ -224,7 +227,7 @@ public class PipeItemsObsidian extends Pipe implements IPowe } } else if (entity instanceof EntityArrow) { powerHandler.useEnergy(distance, distance, true); - stack = new ItemStack(Item.arrow, 1); + stack = new ItemStack(Items.arrow, 1); CoreProxy.proxy.removeEntity(entity); } @@ -241,7 +244,7 @@ public class PipeItemsObsidian extends Pipe implements IPowe entitiesDroppedIndex = 0; else entitiesDroppedIndex++; - entitiesDropped[entitiesDroppedIndex] = event.entity.entityId; + entitiesDropped[entitiesDroppedIndex] = event.entity.getEntityId(); } public boolean canSuck(Entity entity, int distance) { @@ -254,7 +257,7 @@ public class PipeItemsObsidian extends Pipe implements IPowe return false; for (int i = 0; i < entitiesDropped.length; ++i) { - if (item.entityId == entitiesDropped[i]) + if (item.getEntityId() == entitiesDropped[i]) return false; } diff --git a/common/buildcraft/transport/pipes/PipeItemsQuartz.java b/common/buildcraft/transport/pipes/PipeItemsQuartz.java index 64a781ef..f0e97ba9 100644 --- a/common/buildcraft/transport/pipes/PipeItemsQuartz.java +++ b/common/buildcraft/transport/pipes/PipeItemsQuartz.java @@ -17,12 +17,13 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsQuartz extends Pipe { - public PipeItemsQuartz(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsQuartz(Item item) { + super(new PipeTransportItems(), item); } diff --git a/common/buildcraft/transport/pipes/PipeItemsSandstone.java b/common/buildcraft/transport/pipes/PipeItemsSandstone.java index 3d947e9c..bfcd991d 100644 --- a/common/buildcraft/transport/pipes/PipeItemsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeItemsSandstone.java @@ -7,6 +7,7 @@ */ package buildcraft.transport.pipes; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; @@ -21,8 +22,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class PipeItemsSandstone extends Pipe implements IPipeConnectionForced { - public PipeItemsSandstone(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsSandstone(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsStone.java b/common/buildcraft/transport/pipes/PipeItemsStone.java index 0a720fed..063aa2db 100644 --- a/common/buildcraft/transport/pipes/PipeItemsStone.java +++ b/common/buildcraft/transport/pipes/PipeItemsStone.java @@ -17,12 +17,13 @@ import buildcraft.transport.TravelingItem; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsStone extends Pipe { - public PipeItemsStone(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsStone(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsVoid.java b/common/buildcraft/transport/pipes/PipeItemsVoid.java index e90a8599..229f3faa 100644 --- a/common/buildcraft/transport/pipes/PipeItemsVoid.java +++ b/common/buildcraft/transport/pipes/PipeItemsVoid.java @@ -15,12 +15,13 @@ import buildcraft.transport.PipeTransportItems; import buildcraft.transport.pipes.events.PipeEventItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeItemsVoid extends Pipe { - public PipeItemsVoid(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsVoid(Item item) { + super(new PipeTransportItems(), item); } @Override diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 325130d5..2366bf9e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -28,6 +28,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -50,8 +51,8 @@ public class PipeItemsWood extends Pipe implements IPowerRec } }; - public PipeItemsWood(int itemID) { - super(new PipeTransportItems(), itemID); + public PipeItemsWood(Item item) { + super(new PipeTransportItems(), item); powerHandler = new PowerHandler(this, Type.MACHINE); powerHandler.configure(1, 64.1f, 1, 64.1f); diff --git a/common/buildcraft/transport/pipes/PipePowerCobblestone.java b/common/buildcraft/transport/pipes/PipePowerCobblestone.java index 156ffa9c..2cc726b5 100644 --- a/common/buildcraft/transport/pipes/PipePowerCobblestone.java +++ b/common/buildcraft/transport/pipes/PipePowerCobblestone.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerCobblestone extends Pipe { - public PipePowerCobblestone(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerCobblestone(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerDiamond.java b/common/buildcraft/transport/pipes/PipePowerDiamond.java index 92df3f5b..8afc0001 100644 --- a/common/buildcraft/transport/pipes/PipePowerDiamond.java +++ b/common/buildcraft/transport/pipes/PipePowerDiamond.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerDiamond extends Pipe { - public PipePowerDiamond(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerDiamond(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerGold.java b/common/buildcraft/transport/pipes/PipePowerGold.java index 60a082ba..28d8626e 100644 --- a/common/buildcraft/transport/pipes/PipePowerGold.java +++ b/common/buildcraft/transport/pipes/PipePowerGold.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerGold extends Pipe { - public PipePowerGold(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerGold(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerIron.java b/common/buildcraft/transport/pipes/PipePowerIron.java index 5fff4ca2..c1913451 100644 --- a/common/buildcraft/transport/pipes/PipePowerIron.java +++ b/common/buildcraft/transport/pipes/PipePowerIron.java @@ -54,8 +54,8 @@ public class PipePowerIron extends Pipe { } } - public PipePowerIron(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerIron(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerQuartz.java b/common/buildcraft/transport/pipes/PipePowerQuartz.java index 49b2ad87..0ea4e62b 100644 --- a/common/buildcraft/transport/pipes/PipePowerQuartz.java +++ b/common/buildcraft/transport/pipes/PipePowerQuartz.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerQuartz extends Pipe { - public PipePowerQuartz(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerQuartz(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerStone.java b/common/buildcraft/transport/pipes/PipePowerStone.java index 810bc4c7..a830f64b 100644 --- a/common/buildcraft/transport/pipes/PipePowerStone.java +++ b/common/buildcraft/transport/pipes/PipePowerStone.java @@ -14,12 +14,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerStone extends Pipe { - public PipePowerStone(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerStone(Item item) { + super(new PipeTransportPower(), item); transport.initFromPipe(getClass()); } diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index 7cea5426..09888b58 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -20,6 +20,7 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportPower; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; @@ -31,8 +32,8 @@ public class PipePowerWood extends Pipe implements IPowerRec private boolean[] powerSources = new boolean[6]; private boolean full; - public PipePowerWood(int itemID) { - super(new PipeTransportPower(), itemID); + public PipePowerWood(Item item) { + super(new PipeTransportPower(), item); powerHandler = new PowerHandler(this, Type.PIPE); initPowerProvider(); diff --git a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java index c04b84e6..72ea650d 100644 --- a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java @@ -7,12 +7,13 @@ import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportStructure; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.Item; import net.minecraftforge.common.util.ForgeDirection; public class PipeStructureCobblestone extends Pipe { - public PipeStructureCobblestone(int itemID) { - super(new PipeTransportStructure(), itemID); + public PipeStructureCobblestone(Item item) { + super(new PipeTransportStructure(), item); } @Override diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index e001b411..ed2941fa 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -42,7 +42,7 @@ public class FacadeMatrix { public void writeData(DataOutputStream data) throws IOException { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - data.writeShort(_blocks[i]); + data.writeShort(Block.blockRegistry.getIDForObject(_blocks[i])); data.writeByte(_blockMetas[i]); } } @@ -50,8 +50,11 @@ public class FacadeMatrix { public void readData(DataInputStream data) throws IOException { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { short id = data.readShort(); - if (_blocks[i] != id) { - _blocks[i] = id; + + Block block = (Block) Block.blockRegistry.getObjectById(id); + + if (_blocks[i] != block) { + _blocks[i] = block; dirty = true; } byte meta = data.readByte(); From 36a9ef91e5397fc8a0b662ea33988e55928e6157 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 12:29:21 +0100 Subject: [PATCH 08/31] more compilation fixes for 1.7.2 --- common/buildcraft/BuildCraftBuilders.java | 4 +- common/buildcraft/BuildCraftCore.java | 12 ++-- common/buildcraft/BuildCraftSilicon.java | 2 +- common/buildcraft/BuildCraftTransport.java | 5 +- .../buildcraft/builders/BlockArchitect.java | 3 +- .../builders/BlockBlueprintLibrary.java | 4 +- common/buildcraft/builders/BlockFiller.java | 2 +- .../buildcraft/builders/BlockPathMarker.java | 4 +- common/buildcraft/builders/TileArchitect.java | 8 +-- common/buildcraft/builders/TileBuilder.java | 4 +- common/buildcraft/builders/TileFiller.java | 17 +++--- .../builders/gui/GuiBlueprintLibrary.java | 2 +- .../network/PacketHandlerBuilders.java | 4 -- common/buildcraft/core/Box.java | 7 ++- common/buildcraft/core/CommandBuildCraft.java | 14 +++-- .../buildcraft/core/ItemBlockBuildCraft.java | 7 ++- common/buildcraft/core/ItemBuildCraft.java | 6 +- common/buildcraft/core/ItemSpring.java | 7 ++- common/buildcraft/core/fluids/FluidUtils.java | 6 +- common/buildcraft/core/fluids/Tank.java | 2 +- .../core/gui/BuildCraftContainer.java | 2 - .../core/gui/GuiAdvancedInterface.java | 2 +- .../buildcraft/core/inventory/InvUtils.java | 19 +++--- .../core/inventory/InventoryConcatenator.java | 18 +++--- .../core/inventory/InventoryCopy.java | 22 +++---- .../core/inventory/InventoryMapper.java | 20 +++--- .../core/inventory/InventoryWrapper.java | 2 +- .../inventory/InventoryWrapperSimple.java | 9 +++ .../core/inventory/SimpleInventory.java | 31 +++++----- .../core/inventory/TransactorSimple.java | 2 +- .../buildcraft/core/network/IClientState.java | 6 +- .../core/network/IGuiReturnHandler.java | 6 +- .../core/network/PacketGuiReturn.java | 20 +++--- common/buildcraft/core/network/PacketNBT.java | 21 +++++-- .../core/network/PacketSlotChange.java | 6 +- .../core/network/PacketTileState.java | 2 +- .../buildcraft/core/network/PacketUpdate.java | 1 - common/buildcraft/core/proxy/CoreProxy.java | 3 +- .../core/proxy/CoreProxyClient.java | 3 +- .../core/render/RenderingMarkers.java | 4 +- .../core/triggers/DefaultActionProvider.java | 4 +- common/buildcraft/core/utils/BlockUtil.java | 4 +- common/buildcraft/core/utils/Utils.java | 61 +++++++++++++++++++ .../energy/ItemBucketBuildcraft.java | 6 +- common/buildcraft/energy/ItemEngine.java | 5 +- .../energy/render/RenderEngine.java | 5 +- .../energy/worldgen/OilPopulate.java | 3 +- common/buildcraft/factory/BlockTank.java | 2 +- .../buildcraft/factory/TileAutoWorkbench.java | 8 ++- common/buildcraft/factory/TileQuarry.java | 5 -- .../factory/gui/ContainerAutoWorkbench.java | 2 +- .../factory/render/RenderHopper.java | 4 +- .../factory/render/RenderRefinery.java | 5 +- common/buildcraft/silicon/ItemLaserTable.java | 6 +- .../silicon/SiliconRenderBlock.java | 21 +------ .../silicon/TileAdvancedCraftingTable.java | 14 ++--- .../buildcraft/silicon/TileAssemblyTable.java | 4 +- .../transport/BlockGenericPipe.java | 2 +- common/buildcraft/transport/ItemPipe.java | 4 +- common/buildcraft/transport/ItemPipeWire.java | 2 +- .../buildcraft/transport/PipeRenderState.java | 7 ++- .../transport/PipeTransportItems.java | 8 ++- .../buildcraft/transport/TileGenericPipe.java | 47 ++++++++------ .../buildcraft/transport/TravelingItem.java | 2 +- .../transport/gates/GateFactory.java | 5 +- .../buildcraft/transport/gates/ItemGate.java | 22 ++++--- .../transport/gui/ContainerGateInterface.java | 46 +++++++------- .../network/PacketPipeTransportItemStack.java | 5 +- .../PacketPipeTransportItemStackRequest.java | 2 - .../transport/pipes/PipeFluidsEmerald.java | 5 +- .../transport/pipes/PipeItemsDiamond.java | 15 ++--- .../transport/pipes/PipeItemsEmerald.java | 23 +++---- .../transport/pipes/PipeItemsEmzuli.java | 12 ++-- .../transport/pipes/PipeItemsWood.java | 2 +- .../transport/utils/ConnectionMatrix.java | 7 ++- .../transport/utils/FacadeMatrix.java | 6 +- .../transport/utils/TextureMatrix.java | 7 ++- .../transport/utils/WireMatrix.java | 7 ++- 78 files changed, 412 insertions(+), 302 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 8baba1f3..226099e2 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -239,12 +239,12 @@ public class BuildCraftBuilders extends BuildCraftMod { fillerLifespanNormal = fillerLifespanNormalProp.getInt(DefaultProps.FILLER_LIFESPAN_NORMAL); templateItem = new ItemBptTemplate(); - templateItem.setBlockName("templateItem"); + templateItem.setUnlocalizedName("templateItem"); LanguageRegistry.addName(templateItem, "Template"); CoreProxy.proxy.registerItem(templateItem); blueprintItem = new ItemBptBluePrint(); - blueprintItem.setBlockName("blueprintItem"); + blueprintItem.setUnlocalizedName("blueprintItem"); LanguageRegistry.addName(blueprintItem, "Blueprint"); CoreProxy.proxy.registerItem(blueprintItem); diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 8c39d72e..354d96eb 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -208,7 +208,7 @@ public class BuildCraftCore extends BuildCraftMod { longFactor.comment = "delay between full client sync packets, increasing it saves bandwidth, decreasing makes for better client syncronization."; longUpdateFactor = longFactor.getInt(40); - wrenchItem = (new ItemWrench()).setBlockName("wrenchItem"); + wrenchItem = (new ItemWrench()).setUnlocalizedName("wrenchItem"); LanguageRegistry.addName(wrenchItem, "Wrench"); CoreProxy.proxy.registerItem(wrenchItem); @@ -226,27 +226,27 @@ public class BuildCraftCore extends BuildCraftMod { consumeWaterSources = consumeWater.getBoolean(consumeWaterSources); consumeWater.comment = "set to true if the Pump should consume water"; - woodenGearItem = (new ItemBuildCraft()).setBlockName("woodenGearItem"); + woodenGearItem = (new ItemBuildCraft()).setUnlocalizedName("woodenGearItem"); LanguageRegistry.addName(woodenGearItem, "Wooden Gear"); CoreProxy.proxy.registerItem(woodenGearItem); OreDictionary.registerOre("gearWood", new ItemStack(woodenGearItem)); - stoneGearItem = (new ItemBuildCraft()).setBlockName("stoneGearItem"); + stoneGearItem = (new ItemBuildCraft()).setUnlocalizedName("stoneGearItem"); LanguageRegistry.addName(stoneGearItem, "Stone Gear"); CoreProxy.proxy.registerItem(stoneGearItem); OreDictionary.registerOre("gearStone", new ItemStack(stoneGearItem)); - ironGearItem = (new ItemBuildCraft()).setBlockName("ironGearItem"); + ironGearItem = (new ItemBuildCraft()).setUnlocalizedName("ironGearItem"); LanguageRegistry.addName(ironGearItem, "Iron Gear"); CoreProxy.proxy.registerItem(ironGearItem); OreDictionary.registerOre("gearIron", new ItemStack(ironGearItem)); - goldGearItem = (new ItemBuildCraft()).setBlockName("goldGearItem"); + goldGearItem = (new ItemBuildCraft()).setUnlocalizedName("goldGearItem"); LanguageRegistry.addName(goldGearItem, "Gold Gear"); CoreProxy.proxy.registerItem(goldGearItem); OreDictionary.registerOre("gearGold", new ItemStack(goldGearItem)); - diamondGearItem = (new ItemBuildCraft()).setBlockName("diamondGearItem"); + diamondGearItem = (new ItemBuildCraft()).setUnlocalizedName("diamondGearItem"); LanguageRegistry.addName(diamondGearItem, "Diamond Gear"); CoreProxy.proxy.registerItem(diamondGearItem); OreDictionary.registerOre("gearDiamond", new ItemStack(diamondGearItem)); diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index cd64e438..2b757138 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -81,7 +81,7 @@ public class BuildCraftSilicon extends BuildCraftMod { LanguageRegistry.addName(new ItemStack(assemblyTableBlock, 0, 2), "Integration Table"); redstoneChipset = new ItemRedstoneChipset(); - redstoneChipset.setBlockName("redstoneChipset"); + redstoneChipset.setUnlocalizedName("redstoneChipset"); CoreProxy.proxy.registerItem(redstoneChipset); redstoneChipset.registerItemStacks(); } diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 4d2600a0..012955eb 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -45,7 +45,6 @@ import buildcraft.transport.ItemPipeWire; import buildcraft.transport.gates.GateExpansionRedstoneFader; import buildcraft.transport.gates.GateExpansionTimer; import buildcraft.transport.network.PacketHandlerTransport; -import buildcraft.transport.network.TransportConnectionHandler; import buildcraft.transport.pipes.PipeFluidsCobblestone; import buildcraft.transport.pipes.PipeFluidsEmerald; import buildcraft.transport.pipes.PipeFluidsGold; @@ -319,7 +318,7 @@ public class BuildCraftTransport extends BuildCraftMod { CoreProxy.proxy.registerItem(pipeGate); facadeItem = new ItemFacade(); - facadeItem.setBlockName("pipeFacade"); + facadeItem.setUnlocalizedName("pipeFacade"); CoreProxy.proxy.registerItem(facadeItem); plugItem = new ItemPlug(); @@ -445,7 +444,7 @@ public class BuildCraftTransport extends BuildCraftMod { String name = Character.toLowerCase(clas.getSimpleName().charAt(0)) + clas.getSimpleName().substring(1); ItemPipe res = BlockGenericPipe.registerPipe(clas); - res.setBlockName(clas.getSimpleName()); + res.setUnlocalizedName(clas.getSimpleName()); LanguageRegistry.addName(res, descr); // Add appropriate recipe to temporary list diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index 6ee9a30d..0cfa5775 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -111,7 +111,8 @@ public class BlockArchitect extends BlockContainer { } @SuppressWarnings({ "all" }) - public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + @Override + public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) { int m = iblockaccess.getBlockMetadata(i, j, k); if (l == 1) diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 3dc3d50c..03f2eee8 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -46,7 +46,7 @@ public class BlockBlueprintLibrary extends BlockContainer { TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); - if (!tile.locked || entityplayer.username.equals(tile.owner)) + if (!tile.locked || entityplayer.getDisplayName().equals(tile.owner)) if (!CoreProxy.proxy.isRenderWorld(world)) { entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.BLUEPRINT_LIBRARY, world, i, j, k); } @@ -74,7 +74,7 @@ public class BlockBlueprintLibrary extends BlockContainer { public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) { if (CoreProxy.proxy.isSimulating(world) && entityliving instanceof EntityPlayer) { TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); - tile.owner = ((EntityPlayer) entityliving).username; + tile.owner = ((EntityPlayer) entityliving).getDisplayName(); } } diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index b3219c37..63ad1ea6 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -60,7 +60,7 @@ public class BlockFiller extends BlockContainer { } @Override - public IIcon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) { + public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { int m = world.getBlockMetadata(x, y, z); TileEntity tile = world.getTileEntity(x, y, z); diff --git a/common/buildcraft/builders/BlockPathMarker.java b/common/buildcraft/builders/BlockPathMarker.java index 0c486143..197f62ad 100644 --- a/common/buildcraft/builders/BlockPathMarker.java +++ b/common/buildcraft/builders/BlockPathMarker.java @@ -43,13 +43,13 @@ public class BlockPathMarker extends BlockMarker { @SuppressWarnings({ "all" }) // @Override (client only) - public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) { TilePathMarker marker = (TilePathMarker) iblockaccess.getTileEntity(i, j, k); if (l == 1 || (marker != null && marker.tryingToConnect)) return activeMarker; else - return super.getBlockTexture(iblockaccess, i, j, k, l); + return super.getIcon(iblockaccess, i, j, k, l); } @Override diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 2411d250..5c8e2566 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -138,7 +138,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { BptBase result = new BptTemplate(box.sizeX(), box.sizeY(), box.sizeZ()); - for (int x = box.xMin; x <= box.xMax; ++x) { + /*for (int x = box.xMin; x <= box.xMax; ++x) { for (int y = box.yMin; y <= box.yMax; ++y) { for (int z = box.zMin; z <= box.zMax; ++z) { if (!worldObj.isAirBlock(x, y, z)) { @@ -148,7 +148,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { } } } - } + }*/ return result; } @@ -260,10 +260,10 @@ public class TileArchitect extends TileBuildCraft implements IInventory { box.initialize(nbttagcompound.getCompoundTag("box")); } - NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); + NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Utils.NBTTag_Types.NBTTagCompound.ordinal()); items = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { - NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i); + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); int j = nbttagcompound1.getByte("Slot") & 0xff; if (j >= 0 && j < items.length) { items[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 9829f4ad..c9b04a09 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -456,10 +456,10 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP if (nbttagcompound.hasKey("path")) { path = new LinkedList(); - NBTTagList list = nbttagcompound.getTagList("path"); + NBTTagList list = nbttagcompound.getTagList("path", Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int i = 0; i < list.tagCount(); ++i) { - path.add(new BlockIndex((NBTTagCompound) list.tagAt(i))); + path.add(new BlockIndex(list.getCompoundTagAt(i))); } } diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index f2041fc4..833bbd86 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -36,6 +36,7 @@ import buildcraft.core.proxy.CoreProxy; import buildcraft.core.triggers.ActionMachineControl; import buildcraft.core.triggers.ActionMachineControl.Mode; import buildcraft.core.utils.Utils; +import io.netty.buffer.ByteBuf; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -246,21 +247,21 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece public PacketPayload getPacketPayload() { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { box.writeToStream(data); data.writeBoolean(done); - data.writeUTF(currentPattern.getUniqueTag()); + Utils.writeUTF(data, currentPattern.getUniqueTag()); } }); return payload; } - public void handlePacketPayload(DataInputStream data) throws IOException { + public void handlePacketPayload(ByteBuf data) { boolean initialized = box.isInitialized(); box.readFromStream(data); done = data.readBoolean(); - setPattern(FillerManager.registry.getPattern(data.readUTF())); + setPattern(FillerManager.registry.getPattern(Utils.readUTF(data))); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); if (!initialized && box.isInitialized()) { @@ -331,13 +332,13 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece } @Override - public void writeGuiData(DataOutputStream data) throws IOException { - data.writeUTF(currentPattern.getUniqueTag()); + public void writeGuiData(ByteBuf data) { + Utils.writeUTF(data, currentPattern.getUniqueTag()); } @Override - public void readGuiData(DataInputStream data, EntityPlayer player) throws IOException { - setPattern(FillerManager.registry.getPattern(data.readUTF())); + public void readGuiData(ByteBuf data, EntityPlayer player) { + setPattern(FillerManager.registry.getPattern(Utils.readUTF(data))); } @Override diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 67902413..6e1aee5f 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -41,7 +41,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft { this.library = library; container = (ContainerBlueprintLibrary) inventorySlots; - index = BuildCraftBuilders.getPlayerIndex(player.username); + index = BuildCraftBuilders.getPlayerIndex(player.getDisplayName()); } private GuiButton nextPageButton; private GuiButton prevPageButton; diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index f5813ab1..aa1d0cd4 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -9,9 +9,7 @@ import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPayloadArrays; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; -import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.Player; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; @@ -20,8 +18,6 @@ import java.io.DataInputStream; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.INetHandler; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.Packet250CustomPayload; import net.minecraft.tileentity.TileEntity; public class PacketHandlerBuilders extends BuildCraftChannelHandler { diff --git a/common/buildcraft/core/Box.java b/common/buildcraft/core/Box.java index 3e9593b6..d33eb7ba 100644 --- a/common/buildcraft/core/Box.java +++ b/common/buildcraft/core/Box.java @@ -14,11 +14,14 @@ import buildcraft.api.core.Position; import buildcraft.core.network.TileNetworkData; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -225,7 +228,7 @@ public class Box implements IBox { } } - public void writeToStream(DataOutputStream stream) throws IOException { + public void writeToStream(ByteBuf stream) { stream.writeBoolean(initialized); stream.writeInt(xMin); @@ -237,7 +240,7 @@ public class Box implements IBox { stream.writeInt(zMax); } - public void readFromStream(DataInputStream stream) throws IOException { + public void readFromStream(ByteBuf stream) { initialized = stream.readBoolean(); xMin = stream.readInt(); diff --git a/common/buildcraft/core/CommandBuildCraft.java b/common/buildcraft/core/CommandBuildCraft.java index 6aa5b796..8306be4d 100644 --- a/common/buildcraft/core/CommandBuildCraft.java +++ b/common/buildcraft/core/CommandBuildCraft.java @@ -1,12 +1,14 @@ package buildcraft.core; import buildcraft.core.proxy.CoreProxy; + import java.util.List; + import net.minecraft.command.CommandBase; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; -import net.minecraft.util.ChatMessageComponent; +import net.minecraft.util.ChatComponentText; public class CommandBuildCraft extends CommandBase { @@ -46,9 +48,9 @@ public class CommandBuildCraft extends CommandBase { commandVersion(sender, arguments); return; } else if (arguments[0].matches("help")) { - sender.sendChatToPlayer(ChatMessageComponent.createFromText("Format: '" + this.getCommandName() + " '")); - sender.sendChatToPlayer(ChatMessageComponent.createFromText("Available commands:")); - sender.sendChatToPlayer(ChatMessageComponent.createFromText("- version : Version information.")); + sender.addChatMessage(new ChatComponentText("Format: '" + this.getCommandName() + " '")); + sender.addChatMessage(new ChatComponentText("Available commands:")); + sender.addChatMessage(new ChatComponentText("- version : Version information.")); return; } @@ -58,11 +60,11 @@ public class CommandBuildCraft extends CommandBase { private void commandVersion(ICommandSender sender, String[] arguments) { String colour = Version.isOutdated() ? "\u00A7c" : "\u00A7a"; - sender.sendChatToPlayer(ChatMessageComponent.createFromText(String.format(colour + "BuildCraft %s for Minecraft %s (Latest: %s).", Version.getVersion(), + sender.addChatMessage(new ChatComponentText(String.format(colour + "BuildCraft %s for Minecraft %s (Latest: %s).", Version.getVersion(), CoreProxy.proxy.getMinecraftVersion(), Version.getRecommendedVersion()))); if (Version.isOutdated()) { for (String updateLine : Version.getChangelog()) { - sender.sendChatToPlayer(ChatMessageComponent.createFromText("\u00A79" + updateLine)); + sender.addChatMessage(new ChatComponentText("\u00A79" + updateLine)); } } } diff --git a/common/buildcraft/core/ItemBlockBuildCraft.java b/common/buildcraft/core/ItemBlockBuildCraft.java index 6ca0622e..01d76262 100644 --- a/common/buildcraft/core/ItemBlockBuildCraft.java +++ b/common/buildcraft/core/ItemBlockBuildCraft.java @@ -1,13 +1,14 @@ package buildcraft.core; import buildcraft.core.utils.StringUtils; +import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemBlockBuildCraft extends ItemBlock { - public ItemBlockBuildCraft() { - super(); + public ItemBlockBuildCraft(Block b) { + super(b); } @Override @@ -16,7 +17,7 @@ public class ItemBlockBuildCraft extends ItemBlock { } @Override - public String getItemDisplayName(ItemStack itemstack) { + public String getItemStackDisplayName(ItemStack itemstack) { return StringUtils.localize(getUnlocalizedName(itemstack)); } } diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index b8c3e8f0..13874083 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -26,14 +26,14 @@ public class ItemBuildCraft extends Item { } @Override - public String getItemDisplayName(ItemStack itemstack) { + public String getItemStackDisplayName(ItemStack itemstack) { return StringUtils.localize(getUnlocalizedName(itemstack)); } @Override - public Item setBlockName(String par1Str) { + public Item setUnlocalizedName(String par1Str) { iconName = par1Str; - return super.setBlockName(par1Str); + return super.setUnlocalizedName(par1Str); } @Override diff --git a/common/buildcraft/core/ItemSpring.java b/common/buildcraft/core/ItemSpring.java index 53317134..bc145921 100644 --- a/common/buildcraft/core/ItemSpring.java +++ b/common/buildcraft/core/ItemSpring.java @@ -10,12 +10,15 @@ package buildcraft.core; import java.util.Locale; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ItemSpring extends ItemBlockBuildCraft { - public ItemSpring(int i) { - super(i); + public ItemSpring(Block block) { + super(block); setMaxDamage(0); setHasSubtypes(true); } diff --git a/common/buildcraft/core/fluids/FluidUtils.java b/common/buildcraft/core/fluids/FluidUtils.java index 4f3f62c1..100eeb4b 100644 --- a/common/buildcraft/core/fluids/FluidUtils.java +++ b/common/buildcraft/core/fluids/FluidUtils.java @@ -37,7 +37,7 @@ public class FluidUtils { if (used > 0) { if (!player.capabilities.isCreativeMode) { player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); - player.inventory.onInventoryChanged(); + player.inventory.markDirty(); } return true; } @@ -55,11 +55,11 @@ public class FluidUtils { if (!player.inventory.addItemStackToInventory(filled)) return false; player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); - player.inventory.onInventoryChanged(); + player.inventory.markDirty(); } else { player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); player.inventory.setInventorySlotContents(player.inventory.currentItem, filled); - player.inventory.onInventoryChanged(); + player.inventory.markDirty(); } tank.drain(side, liquid.amount, true); diff --git a/common/buildcraft/core/fluids/Tank.java b/common/buildcraft/core/fluids/Tank.java index e13e5014..f165616e 100644 --- a/common/buildcraft/core/fluids/Tank.java +++ b/common/buildcraft/core/fluids/Tank.java @@ -48,7 +48,7 @@ public class Tank extends FluidTank { NBTTagCompound tankData = new NBTTagCompound(); super.writeToNBT(tankData); writeTankToNBT(tankData); - nbt.setCompoundTag(name, tankData); + nbt.setTag(name, tankData); return nbt; } diff --git a/common/buildcraft/core/gui/BuildCraftContainer.java b/common/buildcraft/core/gui/BuildCraftContainer.java index 838486a4..161e04ec 100644 --- a/common/buildcraft/core/gui/BuildCraftContainer.java +++ b/common/buildcraft/core/gui/BuildCraftContainer.java @@ -12,8 +12,6 @@ import buildcraft.core.gui.slots.SlotBase; import buildcraft.core.gui.widgets.Widget; import buildcraft.core.inventory.StackHelper; import buildcraft.core.network.PacketGuiWidget; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 7ab555e8..83ad8545 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -27,7 +27,7 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { public String getDescription() { if (getItemStack() != null) - return getItemStack().getItem().getItemDisplayName(getItemStack()); + return getItemStack().getItem().getItemStackDisplayName(getItemStack()); else return ""; } diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index b9b42bd9..300c5908 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -3,6 +3,7 @@ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; import buildcraft.core.inventory.filters.ArrayStackFilter; import buildcraft.core.inventory.filters.IStackFilter; +import buildcraft.core.utils.Utils; import net.minecraft.entity.item.EntityItem; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryLargeChest; @@ -124,19 +125,19 @@ public class InvUtils { public static NBTTagCompound getItemData(ItemStack stack) { NBTTagCompound nbt = stack.getTagCompound(); if (nbt == null) { - nbt = new NBTTagCompound("tag"); + nbt = new NBTTagCompound(); stack.setTagCompound(nbt); } return nbt; } - public static void addItemToolTip(ItemStack stack, String tag, String msg) { + public static void addItemToolTip(ItemStack stack, String msg) { NBTTagCompound nbt = getItemData(stack); NBTTagCompound display = nbt.getCompoundTag("display"); - nbt.setCompoundTag("display", display); - NBTTagList lore = display.getTagList("Lore"); + nbt.setTag("display", display); + NBTTagList lore = display.getTagList("Lore", Utils.NBTTag_Types.NBTTagString.ordinal()); display.setTag("Lore", lore); - lore.appendTag(new NBTTagString(tag, msg)); + lore.appendTag(new NBTTagString(msg)); } public static void writeInvToNBT(IInventory inv, String tag, NBTTagCompound data) { @@ -154,9 +155,9 @@ public class InvUtils { } public static void readInvFromNBT(IInventory inv, String tag, NBTTagCompound data) { - NBTTagList list = data.getTagList(tag); + NBTTagList list = data.getTagList(tag, Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (byte entry = 0; entry < list.tagCount(); entry++) { - NBTTagCompound itemTag = (NBTTagCompound) list.tagAt(entry); + NBTTagCompound itemTag = list.getCompoundTagAt(entry); int slot = itemTag.getByte("Slot"); if (slot >= 0 && slot < inv.getSizeInventory()) { ItemStack stack = ItemStack.loadItemStackFromNBT(itemTag); @@ -166,11 +167,11 @@ public class InvUtils { } public static void readStacksFromNBT(NBTTagCompound nbt, String name, ItemStack[] stacks) { - NBTTagList nbttaglist = nbt.getTagList(name); + NBTTagList nbttaglist = nbt.getTagList(name, Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int i = 0; i < stacks.length; ++i) { if (i < nbttaglist.tagCount()) { - NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist.tagAt(i); + NBTTagCompound nbttagcompound2 = nbttaglist.getCompoundTagAt(i); stacks[i] = ItemStack.loadItemStackFromNBT(nbttagcompound2); } else { diff --git a/common/buildcraft/core/inventory/InventoryConcatenator.java b/common/buildcraft/core/inventory/InventoryConcatenator.java index 9219f0d5..bfd139ba 100644 --- a/common/buildcraft/core/inventory/InventoryConcatenator.java +++ b/common/buildcraft/core/inventory/InventoryConcatenator.java @@ -69,20 +69,11 @@ public class InventoryConcatenator implements IInventory { return ""; } - @Override - public boolean isInvNameLocalized() { - return false; - } - @Override public int getInventoryStackLimit() { return 64; } - @Override - public void onInventoryChanged() { - } - @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return true; @@ -100,4 +91,13 @@ public class InventoryConcatenator implements IInventory { public boolean isItemValidForSlot(int slot, ItemStack stack) { return invMap.get(slot).isItemValidForSlot(slotMap.get(slot), stack); } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public void markDirty() { + } } diff --git a/common/buildcraft/core/inventory/InventoryCopy.java b/common/buildcraft/core/inventory/InventoryCopy.java index 767ceb65..0204b52d 100644 --- a/common/buildcraft/core/inventory/InventoryCopy.java +++ b/common/buildcraft/core/inventory/InventoryCopy.java @@ -44,14 +44,12 @@ public class InventoryCopy implements IInventory { if (contents[i].stackSize <= j) { ItemStack itemstack = contents[i]; contents[i] = null; - onInventoryChanged(); return itemstack; } ItemStack itemstack1 = contents[i].splitStack(j); if (contents[i].stackSize <= 0) { contents[i] = null; } - onInventoryChanged(); return itemstack1; } else { return null; @@ -64,7 +62,6 @@ public class InventoryCopy implements IInventory { if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); } - onInventoryChanged(); } @Override @@ -77,10 +74,6 @@ public class InventoryCopy implements IInventory { return orignal.getInventoryStackLimit(); } - @Override - public void onInventoryChanged() { - } - @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return true; @@ -99,11 +92,6 @@ public class InventoryCopy implements IInventory { return orignal.getStackInSlotOnClosing(slot); } - @Override - public boolean isInvNameLocalized() { - return orignal.isInvNameLocalized(); - } - @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return orignal.isItemValidForSlot(slot, stack); @@ -112,4 +100,14 @@ public class InventoryCopy implements IInventory { public ItemStack[] getItemStacks() { return contents; } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public void markDirty() { + + } } diff --git a/common/buildcraft/core/inventory/InventoryMapper.java b/common/buildcraft/core/inventory/InventoryMapper.java index 0c0e9f3d..f4237296 100644 --- a/common/buildcraft/core/inventory/InventoryMapper.java +++ b/common/buildcraft/core/inventory/InventoryMapper.java @@ -76,11 +76,6 @@ public class InventoryMapper implements IInventory { return stackSizeLimit > 0 ? stackSizeLimit : inv.getInventoryStackLimit(); } - @Override - public void onInventoryChanged() { - inv.onInventoryChanged(); - } - @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return inv.isUseableByPlayer(entityplayer); @@ -101,11 +96,6 @@ public class InventoryMapper implements IInventory { return inv.getStackInSlotOnClosing(start + slot); } - @Override - public boolean isInvNameLocalized() { - return inv.isInvNameLocalized(); - } - @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { if (checkItems) { @@ -113,4 +103,14 @@ public class InventoryMapper implements IInventory { } return true; } + + @Override + public boolean hasCustomInventoryName() { + return inv.hasCustomInventoryName(); + } + + @Override + public void markDirty() { + inv.markDirty(); + } } diff --git a/common/buildcraft/core/inventory/InventoryWrapper.java b/common/buildcraft/core/inventory/InventoryWrapper.java index ada89d08..89443d3a 100644 --- a/common/buildcraft/core/inventory/InventoryWrapper.java +++ b/common/buildcraft/core/inventory/InventoryWrapper.java @@ -22,7 +22,7 @@ public abstract class InventoryWrapper implements ISidedInventory { @Override public String getInventoryName() { return inventory.getInventoryName(); } @Override public boolean isInvNameLocalized() { return inventory.isInvNameLocalized(); } @Override public int getInventoryStackLimit() { return inventory.getInventoryStackLimit(); } - @Override public void onInventoryChanged() { inventory.onInventoryChanged(); } + @Override public void markDirty() { inventory.markDirty(); } @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return inventory.isUseableByPlayer(entityplayer); } @Override public void openInventory() { inventory.openInventory(); } @Override public void closeInventory() { inventory.closeInventory(); } diff --git a/common/buildcraft/core/inventory/InventoryWrapperSimple.java b/common/buildcraft/core/inventory/InventoryWrapperSimple.java index 2da6af71..5a66c930 100644 --- a/common/buildcraft/core/inventory/InventoryWrapperSimple.java +++ b/common/buildcraft/core/inventory/InventoryWrapperSimple.java @@ -28,4 +28,13 @@ public class InventoryWrapperSimple extends InventoryWrapper { return true; } + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public void markDirty() { + } + } diff --git a/common/buildcraft/core/inventory/SimpleInventory.java b/common/buildcraft/core/inventory/SimpleInventory.java index 4349d717..28c9be52 100644 --- a/common/buildcraft/core/inventory/SimpleInventory.java +++ b/common/buildcraft/core/inventory/SimpleInventory.java @@ -8,7 +8,10 @@ package buildcraft.core.inventory; import buildcraft.core.utils.INBTTagable; +import buildcraft.core.utils.Utils; + import java.util.LinkedList; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -44,7 +47,7 @@ public class SimpleInventory implements IInventory, INBTTagable { if (slotId < _contents.length && _contents[slotId] != null) { if (_contents[slotId].stackSize > count) { ItemStack result = _contents[slotId].splitStack(count); - onInventoryChanged(); + markDirty(); return result; } ItemStack stack = _contents[slotId]; @@ -64,7 +67,7 @@ public class SimpleInventory implements IInventory, INBTTagable { if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) { itemstack.stackSize = this.getInventoryStackLimit(); } - onInventoryChanged(); + markDirty(); } @Override @@ -77,13 +80,6 @@ public class SimpleInventory implements IInventory, INBTTagable { return _stackLimit; } - @Override - public void onInventoryChanged() { - for (TileEntity handler : _listener) { - handler.onInventoryChanged(); - } - } - @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return true; @@ -103,10 +99,10 @@ public class SimpleInventory implements IInventory, INBTTagable { } public void readFromNBT(NBTTagCompound data, String tag) { - NBTTagList nbttaglist = data.getTagList(tag); + NBTTagList nbttaglist = data.getTagList(tag, Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int j = 0; j < nbttaglist.tagCount(); ++j) { - NBTTagCompound slot = (NBTTagCompound) nbttaglist.tagAt(j); + NBTTagCompound slot = nbttaglist.getCompoundTagAt(j); int index; if (slot.hasKey("index")) { index = slot.getInteger("index"); @@ -157,12 +153,19 @@ public class SimpleInventory implements IInventory, INBTTagable { } @Override - public boolean isInvNameLocalized() { + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + return true; + } + + @Override + public boolean hasCustomInventoryName() { return false; } @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) { - return true; + public void markDirty() { + for (TileEntity handler : _listener) { + handler.markDirty(); + } } } diff --git a/common/buildcraft/core/inventory/TransactorSimple.java b/common/buildcraft/core/inventory/TransactorSimple.java index d7de9b5b..586eef50 100644 --- a/common/buildcraft/core/inventory/TransactorSimple.java +++ b/common/buildcraft/core/inventory/TransactorSimple.java @@ -34,7 +34,7 @@ public class TransactorSimple extends Transactor { injected = tryPut(stack, filledSlots, injected, doAdd); injected = tryPut(stack, emptySlots, injected, doAdd); - inventory.onInventoryChanged(); + inventory.markDirty(); return injected; } diff --git a/common/buildcraft/core/network/IClientState.java b/common/buildcraft/core/network/IClientState.java index 8ecf365a..6c2fd6fa 100644 --- a/common/buildcraft/core/network/IClientState.java +++ b/common/buildcraft/core/network/IClientState.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -17,7 +19,7 @@ public interface IClientState { * @param data * @throws IOException */ - public void writeData(DataOutputStream data) throws IOException; + public void writeData(ByteBuf data); /** * Deserializes the state from the stream @@ -25,5 +27,5 @@ public interface IClientState { * @param data * @throws IOException */ - public void readData(DataInputStream data) throws IOException; + public void readData(ByteBuf data); } diff --git a/common/buildcraft/core/network/IGuiReturnHandler.java b/common/buildcraft/core/network/IGuiReturnHandler.java index 3be79132..b4f3744d 100644 --- a/common/buildcraft/core/network/IGuiReturnHandler.java +++ b/common/buildcraft/core/network/IGuiReturnHandler.java @@ -1,5 +1,7 @@ package buildcraft.core.network; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -14,7 +16,7 @@ import net.minecraft.world.World; public abstract interface IGuiReturnHandler { public World getWorld(); - public void writeGuiData(DataOutputStream data) throws IOException; + public void writeGuiData(ByteBuf data); - public void readGuiData(DataInputStream data, EntityPlayer player) throws IOException; + public void readGuiData(ByteBuf data, EntityPlayer player); } diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index 8c90e7e3..e2889dcb 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -11,7 +11,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import cpw.mods.fml.common.network.PacketDispatcher; /** * @@ -39,6 +38,7 @@ public class PacketGuiReturn extends BuildCraftPacket { @Override public void writeData(ByteBuf data) { data.writeInt(obj.getWorld().provider.dimensionId); + if (obj instanceof TileEntity) { TileEntity tile = (TileEntity) obj; data.writeBoolean(true); @@ -49,11 +49,15 @@ public class PacketGuiReturn extends BuildCraftPacket { Entity entity = (Entity) obj; data.writeBoolean(false); data.writeInt(entity.getEntityId()); - } else + } else { return; + } + obj.writeGuiData(data); - if (extraData != null) - data.write(extraData); + + if (extraData != null) { + data.writeBytes(extraData); + } } @Override @@ -61,6 +65,7 @@ public class PacketGuiReturn extends BuildCraftPacket { int dim = data.readInt(); World world = DimensionManager.getWorld(dim); boolean tileReturn = data.readBoolean(); + if (tileReturn) { int x = data.readInt(); int y = data.readInt(); @@ -68,15 +73,16 @@ public class PacketGuiReturn extends BuildCraftPacket { TileEntity t = world.getTileEntity(x, y, z); - if (t instanceof IGuiReturnHandler) + if (t instanceof IGuiReturnHandler) { ((IGuiReturnHandler) t).readGuiData(data, sender); - + } } else { int entityId = data.readInt(); Entity entity = world.getEntityByID(entityId); - if (entity instanceof IGuiReturnHandler) + if (entity instanceof IGuiReturnHandler) { ((IGuiReturnHandler) entity).readGuiData(data, sender); + } } } diff --git a/common/buildcraft/core/network/PacketNBT.java b/common/buildcraft/core/network/PacketNBT.java index 92a1a929..fe735b8b 100644 --- a/common/buildcraft/core/network/PacketNBT.java +++ b/common/buildcraft/core/network/PacketNBT.java @@ -26,9 +26,14 @@ public class PacketNBT extends PacketCoordinates { super.writeData(data); - byte[] compressed = CompressedStreamTools.compress(nbttagcompound); - data.writeShort(compressed.length); - data.write(compressed); + try { + byte[] compressed = CompressedStreamTools.compress(nbttagcompound); + data.writeShort(compressed.length); + data.writeBytes(compressed); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } @Override @@ -38,8 +43,14 @@ public class PacketNBT extends PacketCoordinates { short length = data.readShort(); byte[] compressed = new byte[length]; - data.readFully(compressed); - this.nbttagcompound = CompressedStreamTools.decompress(compressed); + data.readBytes(compressed); + + try { + this.nbttagcompound = CompressedStreamTools.decompress(compressed); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } public NBTTagCompound getTagCompound() { diff --git a/common/buildcraft/core/network/PacketSlotChange.java b/common/buildcraft/core/network/PacketSlotChange.java index 3b276020..6490ea1f 100644 --- a/common/buildcraft/core/network/PacketSlotChange.java +++ b/common/buildcraft/core/network/PacketSlotChange.java @@ -6,6 +6,7 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; @@ -30,7 +31,7 @@ public class PacketSlotChange extends PacketCoordinates { data.writeInt(slot); if (stack != null) { - data.writeInt(stack.itemID); + data.writeInt(Item.itemRegistry.getIDForObject(stack.getItem())); data.writeInt(stack.stackSize); data.writeInt(stack.getItemDamage()); @@ -56,7 +57,8 @@ public class PacketSlotChange extends PacketCoordinates { int id = data.readInt(); if (id != 0) { - stack = new ItemStack(id, data.readInt(), data.readInt()); + Item item = Item.getItemById(id); + stack = new ItemStack(item, data.readInt(), data.readInt()); // Yes, this stuff may indeed have NBT and don't you forget it. short length = data.readShort(); diff --git a/common/buildcraft/core/network/PacketTileState.java b/common/buildcraft/core/network/PacketTileState.java index df9ccce4..b84361d7 100644 --- a/common/buildcraft/core/network/PacketTileState.java +++ b/common/buildcraft/core/network/PacketTileState.java @@ -49,7 +49,7 @@ public class PacketTileState extends PacketCoordinates { super.readData(data); } - public void applyStates(DataInputStream data, ISyncedTile tile) throws IOException { + public void applyStates(ByteBuf data, ISyncedTile tile) throws IOException { byte stateCount = data.readByte(); for (int i = 0; i < stateCount; i++) { byte stateId = data.readByte(); diff --git a/common/buildcraft/core/network/PacketUpdate.java b/common/buildcraft/core/network/PacketUpdate.java index 35d6b53d..9d9e3e1b 100644 --- a/common/buildcraft/core/network/PacketUpdate.java +++ b/common/buildcraft/core/network/PacketUpdate.java @@ -34,7 +34,6 @@ public class PacketUpdate extends BuildCraftPacket { public PacketUpdate(int packetId) { this.packetId = packetId; this.isChunkDataPacket = true; - } @Override diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 4d0e5d61..014fab44 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -34,7 +34,6 @@ import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; @@ -73,7 +72,7 @@ public class CoreProxy { /* ENTITY HANDLING */ public void removeEntity(Entity entity) { - entity.getWorldObj().removeEntity(entity); + entity.worldObj.removeEntity(entity); } /* WRAPPER */ diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 1e77ee35..b7343eb6 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -44,7 +44,6 @@ import net.minecraft.network.INetHandler; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; @@ -141,7 +140,7 @@ public class CoreProxyClient extends CoreProxy { /* BUILDCRAFT PLAYER */ @Override public String playerName() { - return FMLClientHandler.instance().getClient().thePlayer.username; + return FMLClientHandler.instance().getClient().thePlayer.getDisplayName(); } private EntityPlayer createNewPlayer(World world) { diff --git a/common/buildcraft/core/render/RenderingMarkers.java b/common/buildcraft/core/render/RenderingMarkers.java index 9222cb3d..e2166d21 100644 --- a/common/buildcraft/core/render/RenderingMarkers.java +++ b/common/buildcraft/core/render/RenderingMarkers.java @@ -125,7 +125,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { int yCoord = (int) y; int zCoord = (int) z; - IIcon i = block.getBlockTexture(iblockaccess, xCoord, yCoord, zCoord, 1); + IIcon i = block.getIcon(iblockaccess, xCoord, yCoord, zCoord, 1); int m = metaToOld[meta]; x += 0.5D; @@ -173,7 +173,7 @@ public class RenderingMarkers implements ISimpleBlockRenderingHandler { tessellator.addVertexWithUV(x - s, y + 0.5 - s, z - s, minU, minV); } - i = block.getBlockTexture(iblockaccess, xCoord, yCoord, zCoord, 0); + i = block.getIcon(iblockaccess, xCoord, yCoord, zCoord, 0); minU = i.getMinU(); maxU = i.getMaxU(); diff --git a/common/buildcraft/core/triggers/DefaultActionProvider.java b/common/buildcraft/core/triggers/DefaultActionProvider.java index dd8617a2..8a70ce6d 100644 --- a/common/buildcraft/core/triggers/DefaultActionProvider.java +++ b/common/buildcraft/core/triggers/DefaultActionProvider.java @@ -5,8 +5,8 @@ import buildcraft.api.gates.IAction; import buildcraft.api.gates.IActionProvider; import buildcraft.core.IMachine; import cpw.mods.fml.common.FMLLog; +import org.apache.logging.log4j.Level; import java.util.LinkedList; -import java.util.logging.Level; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; @@ -29,7 +29,7 @@ public class DefaultActionProvider implements IActionProvider { res.add(BuildCraftCore.actionLoop); } } catch (Throwable error) { - FMLLog.log("Buildcraft", Level.SEVERE, "Outdated API detected, please update your mods!"); + FMLLog.log("Buildcraft", Level.FATAL, "Outdated API detected, please update your mods!"); } return res; diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 93a23239..eba17df0 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -17,13 +17,11 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.BlockFluid; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.network.Packet60Explosion; import net.minecraft.world.ChunkPosition; import net.minecraft.world.Explosion; import net.minecraft.world.World; @@ -93,7 +91,7 @@ public class BlockUtil { } public static boolean canChangeBlock(World world, int x, int y, int z) { - return canChangeBlock(world.getBlockId(x, y, z), world, x, y, z); + return canChangeBlock(world.getBlock(x, y, z), world, x, y, z); } public static boolean canChangeBlock(Block block, World world, int x, int y, int z) { diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 4e9647c4..4dd99617 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -41,8 +41,19 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryLargeChest; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompressedStreamTools; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagByte; +import net.minecraft.nbt.NBTTagByteArray; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagDouble; +import net.minecraft.nbt.NBTTagEnd; +import net.minecraft.nbt.NBTTagFloat; +import net.minecraft.nbt.NBTTagInt; +import net.minecraft.nbt.NBTTagIntArray; import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagLong; +import net.minecraft.nbt.NBTTagShort; import net.minecraft.nbt.NBTTagString; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; @@ -56,6 +67,13 @@ public class Utils { public static final Random RANDOM = new Random(); private static final List directions = new ArrayList(Arrays.asList(ForgeDirection.VALID_DIRECTIONS)); + public enum NBTTag_Types { + NBTTagEnd, NBTTagByte, NBTTagShort, + NBTTagInt, NBTTagLong, NBTTagFloat, + NBTTagDouble, NBTTagByteArray, NBTTagString, + NBTTagList, NBTTagCompound, NBTTagIntArray + } + /* IINVENTORY HELPERS */ /** * Tries to add the passed stack to any valid inventories around the given @@ -423,4 +441,47 @@ public class Utils { return null; } } + + public static void writeNBT (ByteBuf data, NBTTagCompound nbt) { + try { + byte[] compressed = CompressedStreamTools.compress(nbt); + data.writeShort(compressed.length); + data.writeBytes(compressed); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static NBTTagCompound readNBT(ByteBuf data) { + try { + short length = data.readShort(); + byte[] compressed = new byte[length]; + data.readBytes(compressed); + return CompressedStreamTools.decompress(compressed); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + + public static void writeStack (ByteBuf data, ItemStack stack) { + if (stack == null) { + data.writeBoolean(false); + } else { + data.writeBoolean(true); + NBTTagCompound nbt = new NBTTagCompound(); + stack.writeToNBT(nbt); + Utils.writeNBT(data, nbt); + } + } + + + public static ItemStack readStack(ByteBuf data) { + if (!data.readBoolean()) { + return null; + } else { + NBTTagCompound nbt = readNBT(data); + return ItemStack.loadItemStackFromNBT(nbt); + } + } } diff --git a/common/buildcraft/energy/ItemBucketBuildcraft.java b/common/buildcraft/energy/ItemBucketBuildcraft.java index 42a79b32..35fb7755 100644 --- a/common/buildcraft/energy/ItemBucketBuildcraft.java +++ b/common/buildcraft/energy/ItemBucketBuildcraft.java @@ -29,14 +29,14 @@ public class ItemBucketBuildcraft extends ItemBucket { } @Override - public String getItemDisplayName(ItemStack itemstack) { + public String getItemStackDisplayName(ItemStack itemstack) { return StringUtils.localize(getUnlocalizedName(itemstack)); } @Override - public Item setBlockName(String par1Str) { + public Item setUnlocalizedName(String par1Str) { iconName = par1Str; - return super.setBlockName(par1Str); + return super.setUnlocalizedName(par1Str); } @Override diff --git a/common/buildcraft/energy/ItemEngine.java b/common/buildcraft/energy/ItemEngine.java index a32bbe73..f7f7a0d5 100644 --- a/common/buildcraft/energy/ItemEngine.java +++ b/common/buildcraft/energy/ItemEngine.java @@ -10,12 +10,13 @@ package buildcraft.energy; import buildcraft.core.ItemBlockBuildCraft; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; public class ItemEngine extends ItemBlockBuildCraft { - public ItemEngine(int i) { - super(i); + public ItemEngine(Block block) { + super(block); setMaxDamage(0); setHasSubtypes(true); } diff --git a/common/buildcraft/energy/render/RenderEngine.java b/common/buildcraft/energy/render/RenderEngine.java index 6e791068..d4890938 100644 --- a/common/buildcraft/energy/render/RenderEngine.java +++ b/common/buildcraft/energy/render/RenderEngine.java @@ -15,7 +15,7 @@ import buildcraft.energy.TileEngine; import buildcraft.energy.TileEngine.EnergyStage; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; @@ -26,6 +26,7 @@ import static net.minecraftforge.common.util.ForgeDirection.NORTH; import static net.minecraftforge.common.util.ForgeDirection.SOUTH; import static net.minecraftforge.common.util.ForgeDirection.UP; import static net.minecraftforge.common.util.ForgeDirection.WEST; + import org.lwjgl.opengl.GL11; public class RenderEngine extends TileEntitySpecialRenderer implements IInventoryRenderer { @@ -84,7 +85,7 @@ public class RenderEngine extends TileEntitySpecialRenderer implements IInventor public RenderEngine(ResourceLocation baseTexture) { this(); this.baseTexture = baseTexture; - setTileEntityRenderer(TileEntityRenderer.instance); + field_147501_a = TileEntityRendererDispatcher.instance; } @Override diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 461b14dd..40662598 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -27,7 +27,6 @@ import static net.minecraftforge.common.BiomeDictionary.Type.DESERT; import static net.minecraftforge.common.BiomeDictionary.Type.FOREST; import static net.minecraftforge.common.BiomeDictionary.Type.FROZEN; import static net.minecraftforge.common.BiomeDictionary.Type.WASTELAND; -import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType; @@ -280,7 +279,7 @@ public class OilPopulate { return true; } - if (block.isGenMineableReplaceable(world, x, y, z, Block.stone.blockID)) { + if (block.isGenMineableReplaceable(world, x, y, z, Blocks.stone)) { return true; } diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index ce2747a0..18fba0c0 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -74,7 +74,7 @@ public class BlockTank extends BlockContainer { @SuppressWarnings({"all"}) @Override - public IIcon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { + public IIcon getIcon(IBlockAccess iblockaccess, int i, int j, int k, int l) { switch (l) { case 0: case 1: diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 4272ef19..72722496 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -27,8 +27,8 @@ import net.minecraft.inventory.SlotCrafting; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.ForgeDirection; public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory { @@ -69,9 +69,9 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory } @Override - public void sendChatToPlayer(ChatMessageComponent var1) { + public void addChatMessage(IChatComponent var1) { } - + @Override public boolean canCommandSenderUseCommand(int var1, String var2) { return false; @@ -81,6 +81,8 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory public ChunkCoordinates getPlayerCoordinates() { return null; } + + } @Override diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index f32142d3..106f8950 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -16,9 +16,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet3Chat; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChatMessageComponent; import net.minecraft.world.ChunkCoordIntPair; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; @@ -51,9 +49,6 @@ import buildcraft.core.utils.Utils; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; - public class TileQuarry extends TileBuildCraft implements IMachine, IPowerReceptor, IBuilderInventory { public @TileNetworkData diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index c2e76d4f..6cbd3dc6 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -40,7 +40,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { public void setInventorySlotContents(int slot, ItemStack stack) { super.setInventorySlotContents(slot, stack); if (stack != null && tile.isLast() && CoreProxy.proxy.isRenderWorld(tile.getWorldObj())) { - InvUtils.addItemToolTip(stack, "tip", EnumChatFormatting.YELLOW + StringUtils.localize("gui.clickcraft")); + InvUtils.addItemToolTip(stack, EnumChatFormatting.YELLOW + StringUtils.localize("gui.clickcraft")); } } }; diff --git a/common/buildcraft/factory/render/RenderHopper.java b/common/buildcraft/factory/render/RenderHopper.java index 12f5a64c..d43c37b6 100644 --- a/common/buildcraft/factory/render/RenderHopper.java +++ b/common/buildcraft/factory/render/RenderHopper.java @@ -7,7 +7,7 @@ import buildcraft.core.IInventoryRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; @@ -35,7 +35,7 @@ public class RenderHopper extends TileEntitySpecialRenderer implements IInventor bottom.rotationPointX = 8F; bottom.rotationPointY = 8F; bottom.rotationPointZ = 8F; - setTileEntityRenderer(TileEntityRenderer.instance); + field_147501_a = TileEntityRendererDispatcher.instance; } @Override diff --git a/common/buildcraft/factory/render/RenderRefinery.java b/common/buildcraft/factory/render/RenderRefinery.java index f248df8b..649fc971 100644 --- a/common/buildcraft/factory/render/RenderRefinery.java +++ b/common/buildcraft/factory/render/RenderRefinery.java @@ -15,11 +15,12 @@ import buildcraft.core.render.RenderUtils; import buildcraft.factory.TileRefinery; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidStack; + import org.lwjgl.opengl.GL11; public class RenderRefinery extends TileEntitySpecialRenderer implements IInventoryRenderer { @@ -51,7 +52,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent } - setTileEntityRenderer(TileEntityRenderer.instance); + field_147501_a = TileEntityRendererDispatcher.instance; } public RenderRefinery(String baseTexture) { diff --git a/common/buildcraft/silicon/ItemLaserTable.java b/common/buildcraft/silicon/ItemLaserTable.java index 07dae233..ece29393 100644 --- a/common/buildcraft/silicon/ItemLaserTable.java +++ b/common/buildcraft/silicon/ItemLaserTable.java @@ -1,12 +1,14 @@ package buildcraft.silicon; import buildcraft.core.ItemBlockBuildCraft; +import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ItemLaserTable extends ItemBlockBuildCraft { - public ItemLaserTable(int par1) { - super(par1); + public ItemLaserTable(Block block) { + super(block); setMaxDamage(0); setHasSubtypes(true); } diff --git a/common/buildcraft/silicon/SiliconRenderBlock.java b/common/buildcraft/silicon/SiliconRenderBlock.java index 58740c11..168073c1 100644 --- a/common/buildcraft/silicon/SiliconRenderBlock.java +++ b/common/buildcraft/silicon/SiliconRenderBlock.java @@ -25,7 +25,7 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { } @Override - public boolean shouldRender3DInInventory() { + public boolean shouldRender3DInInventory(int modelId) { return true; } @@ -168,23 +168,4 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, i)); tessellator.draw(); } - - /* - * @Override public GuiScreen handleGUI(int i) { switch (Utils.intToPacketId(i)) { case AssemblyTableGUI: return new GuiAssemblyTable( - * ModLoader.getMinecraftInstance().thePlayer.inventory, new TileAssemblyTable()); default: return null; } } - */ - - /* - * @Override public void handlePacket(Packet230ModLoader packet) { switch (PacketIds.values()[packet.packetType]) { case AssemblyTableSelect: GuiScreen - * screen = ModLoader.getMinecraftInstance().currentScreen; - * - * if (screen instanceof GuiAssemblyTable) { GuiAssemblyTable gui = (GuiAssemblyTable) screen; SelectionMessage message = new SelectionMessage(); - * - * TileAssemblyTable.selectionMessageWrapper.updateFromPacket(message, packet); - * - * gui.handleSelectionMessage (message); } - * - * break; } } - */ - } diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index e4de8905..f0d37210 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -42,8 +42,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.util.ForgeDirection.DOWN; import static net.minecraftforge.common.util.ForgeDirection.EAST; @@ -52,8 +52,6 @@ import static net.minecraftforge.common.util.ForgeDirection.SOUTH; import static net.minecraftforge.common.util.ForgeDirection.WEST; import net.minecraftforge.oredict.OreDictionary; -import org.bouncycastle.util.Arrays; - public class TileAdvancedCraftingTable extends TileLaserTableBase implements IInventory, ILaserTarget, IMachine, IActionReceptor, ISidedInventory { private final class InternalInventoryCraftingContainer extends Container { @@ -149,7 +147,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn } @Override - public void sendChatToPlayer(ChatMessageComponent var1) { + public void addChatMessage(IChatComponent var1) { } @Override @@ -215,8 +213,8 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn } @Override - public void onInventoryChanged() { - super.onInventoryChanged(); + public void markDirty() { + super.markDirty(); craftable = craftResult.getStackInSlot(0) != null; } @@ -385,7 +383,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn currentRecipe = CraftingHelper.findMatchingRecipe(internalInventoryCrafting, worldObj); } internalInventoryCrafting.recipeUpdate(false); - onInventoryChanged(); + markDirty(); } private void updateRecipeOutputDisplay() { @@ -400,7 +398,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn internalInventoryCrafting.recipeUpdate(false); } craftResult.setInventorySlotContents(0, resultStack); - onInventoryChanged(); + markDirty(); } private ItemStack getRecipeOutput() { diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 311101f1..67418952 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -129,10 +129,10 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); - NBTTagList list = nbt.getTagList("planned"); + NBTTagList list = nbt.getTagList("planned", Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int i = 0; i < list.tagCount(); ++i) { - NBTTagCompound cpt = (NBTTagCompound) list.tagAt(i); + NBTTagCompound cpt = list.getCompoundTagAt(i); ItemStack stack = ItemStack.loadItemStackFromNBT(cpt); diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index ce303d4e..683979e2 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -943,7 +943,7 @@ public class BlockGenericPipe extends BlockBuildCraft { public static ItemPipe registerPipe(Class clas) { ItemPipe item = new ItemPipe(); - item.setBlockName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); + item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH)); GameRegistry.registerItem(item, item.getUnlocalizedName()); pipes.put(item, clas); diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index e091f1d7..97dc656d 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -71,7 +71,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { } if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack)) { - Pipe pipe = BlockGenericPipe.createPipe(itemID); + Pipe pipe = BlockGenericPipe.createPipe(this); if (pipe == null) { BCLog.logger.log(Level.WARNING, "Pipe failed to create during placement at {0},{1},{2}", new Object[]{i, j, k}); @@ -128,7 +128,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) { super.addInformation(stack, player, list, advanced); - Class pipe = BlockGenericPipe.pipes.get(itemID); + Class pipe = BlockGenericPipe.pipes.get(this); List toolTip = PipeToolTipManager.getToolTip(pipe); list.addAll(toolTip); } diff --git a/common/buildcraft/transport/ItemPipeWire.java b/common/buildcraft/transport/ItemPipeWire.java index c6164997..2220844f 100644 --- a/common/buildcraft/transport/ItemPipeWire.java +++ b/common/buildcraft/transport/ItemPipeWire.java @@ -24,7 +24,7 @@ public class ItemPipeWire extends ItemBuildCraft { setHasSubtypes(true); setMaxDamage(0); setPassSneakClick(true); - setBlockName("pipeWire"); + setUnlocalizedName("pipeWire"); } @Override diff --git a/common/buildcraft/transport/PipeRenderState.java b/common/buildcraft/transport/PipeRenderState.java index b37378c5..6aa6521b 100644 --- a/common/buildcraft/transport/PipeRenderState.java +++ b/common/buildcraft/transport/PipeRenderState.java @@ -7,9 +7,12 @@ import buildcraft.transport.utils.TextureMatrix; import buildcraft.transport.utils.WireMatrix; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraft.util.IIcon; public class PipeRenderState implements IClientState { @@ -72,7 +75,7 @@ public class PipeRenderState implements IClientState { } @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeBoolean(isGateLit); data.writeBoolean(isGatePulsing); data.writeInt(gateIconIndex); @@ -84,7 +87,7 @@ public class PipeRenderState implements IClientState { } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { isGateLit = data.readBoolean(); isGatePulsing = data.readBoolean(); gateIconIndex = data.readInt(); diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index ceb08c18..fefd7d7c 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -18,16 +18,18 @@ import buildcraft.core.inventory.Transactor; import buildcraft.core.utils.BCLog; import buildcraft.core.utils.BlockUtil; import buildcraft.core.utils.MathUtils; +import buildcraft.core.utils.Utils; import buildcraft.transport.network.PacketPipeTransportItemStackRequest; import buildcraft.transport.network.PacketPipeTransportTraveler; import buildcraft.transport.pipes.events.PipeEventItem; import buildcraft.transport.utils.TransportUtils; -import cpw.mods.fml.common.network.PacketDispatcher; + import java.util.Collections; import java.util.EnumSet; import java.util.LinkedList; import java.util.List; import java.util.logging.Level; + import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -370,11 +372,11 @@ public class PipeTransportItems extends PipeTransport { public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); - NBTTagList nbttaglist = nbt.getTagList("travelingEntities"); + NBTTagList nbttaglist = nbt.getTagList("travelingEntities", Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int j = 0; j < nbttaglist.tagCount(); ++j) { try { - NBTTagCompound dataTag = (NBTTagCompound) nbttaglist.tagAt(j); + NBTTagCompound dataTag = nbttaglist.getCompoundTagAt(j); TravelingItem item = TravelingItem.make(dataTag); diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 6d9c4ef6..bcca462d 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -8,6 +8,8 @@ package buildcraft.transport; import buildcraft.api.transport.PipeWire; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -16,6 +18,7 @@ import java.util.logging.Level; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; @@ -55,9 +58,10 @@ import buildcraft.transport.gates.GateDefinition; import buildcraft.transport.gates.GateFactory; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.HashSet; import java.util.Set; -import net.minecraft.server.management.PlayerInstance; + import net.minecraft.world.WorldServer; public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFluidHandler, IPipeTile, IOverrideDefaultTriggers, ITileBufferHolder, @@ -71,7 +75,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui public final Set expansions = new HashSet(); @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(pipeId); data.writeByte(gateMaterial); data.writeByte(gateLogic); @@ -82,7 +86,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } @Override - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { pipeId = data.readInt(); gateMaterial = data.readByte(); gateLogic = data.readByte(); @@ -106,7 +110,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui private boolean pipeBound = false; private boolean resyncGateExpansions = false; public int redstoneInput = 0; - private Block[] facadeBlocks = new int[ForgeDirection.VALID_DIRECTIONS.length]; + private Block[] facadeBlocks = new Block[ForgeDirection.VALID_DIRECTIONS.length]; private int[] facadeMeta = new int[ForgeDirection.VALID_DIRECTIONS.length]; private boolean[] plugs = new boolean[ForgeDirection.VALID_DIRECTIONS.length]; @@ -119,13 +123,13 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui nbt.setByte("redstoneInput", (byte)redstoneInput); if (pipe != null) { - nbt.setInteger("pipeId", pipe.itemID); + nbt.setInteger("pipeId", Item.itemRegistry.getIDForObject(pipe.item)); pipe.writeToNBT(nbt); } else nbt.setInteger("pipeId", coreState.pipeId); for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - nbt.setInteger("facadeBlocks[" + i + "]", facadeBlocks[i]); + nbt.setInteger("facadeBlocks[" + i + "]", Block.blockRegistry.getIDForObject(facadeBlocks[i])); nbt.setInteger("facadeMeta[" + i + "]", facadeMeta[i]); nbt.setBoolean("plug[" + i + "]", plugs[i]); } @@ -138,7 +142,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui redstoneInput = nbt.getByte("redstoneInput"); coreState.pipeId = nbt.getInteger("pipeId"); - pipe = BlockGenericPipe.createPipe(coreState.pipeId); + pipe = BlockGenericPipe.createPipe((Item) Item.itemRegistry.getObjectById(coreState.pipeId)); bindPipe(); if (pipe != null) @@ -149,7 +153,8 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - facadeBlocks[i] = nbt.getInteger("facadeBlocks[" + i + "]"); + facadeBlocks[i] = (Block) Block.blockRegistry.getObjectById(nbt + .getInteger("facadeBlocks[" + i + "]")); facadeMeta[i] = nbt.getInteger("facadeMeta[" + i + "]"); plugs[i] = nbt.getBoolean("plug[" + i + "]"); } @@ -327,7 +332,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui pipe.setTile(this); - coreState.pipeId = pipe.itemID; + coreState.pipeId = Item.getIdFromItem(pipe.item); pipeBound = true; } } @@ -609,7 +614,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui if (direction == null || direction == ForgeDirection.UNKNOWN) return false; if (this.getWorldObj().isRemote) - return renderState.facadeMatrix.getFacadeBlockId(direction) != 0; + return renderState.facadeMatrix.getFacadeBlock(direction) != null; return (this.facadeBlocks[direction.ordinal()] != null); } @@ -657,24 +662,28 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui switch (stateId) { case 0: - if (pipe == null && coreState.pipeId != 0) - initialize(BlockGenericPipe.createPipe(coreState.pipeId)); + if (pipe == null && coreState.pipeId != 0) { + initialize(BlockGenericPipe.createPipe((Item) Item.itemRegistry.getObjectById(coreState.pipeId))); + } - if (pipe == null) + if (pipe == null) { break; + } - if (coreState.gateMaterial == -1) + if (coreState.gateMaterial == -1) { pipe.gate = null; - else if (pipe.gate == null) + } else if (pipe.gate == null) { pipe.gate = GateFactory.makeGate(pipe, GateDefinition.GateMaterial.fromOrdinal(coreState.gateMaterial), GateDefinition.GateLogic.fromOrdinal(coreState.gateLogic)); + } syncGateExpansions(); - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); break; + case 1: { if (renderState.needsRenderUpdate()) { - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); renderState.clean(); } break; @@ -765,13 +774,13 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } @Override - public void writeGuiData(DataOutputStream data) throws IOException { + public void writeGuiData(ByteBuf data) { if (BlockGenericPipe.isValid(pipe) && pipe instanceof IGuiReturnHandler) ((IGuiReturnHandler) pipe).writeGuiData(data); } @Override - public void readGuiData(DataInputStream data, EntityPlayer sender) throws IOException { + public void readGuiData(ByteBuf data, EntityPlayer sender) { if (BlockGenericPipe.isValid(pipe) && pipe instanceof IGuiReturnHandler) ((IGuiReturnHandler) pipe).readGuiData(data, sender); } diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index 6cd0e640..c8967104 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -179,7 +179,7 @@ public final class TravelingItem { data.setFloat("speed", getSpeed()); NBTTagCompound itemStackTag = new NBTTagCompound(); getItemStack().writeToNBT(itemStackTag); - data.setCompoundTag("Item", itemStackTag); + data.setTag("Item", itemStackTag); data.setBoolean("toCenter", toCenter); data.setInteger("input", input.ordinal()); diff --git a/common/buildcraft/transport/gates/GateFactory.java b/common/buildcraft/transport/gates/GateFactory.java index f6dadb17..a4d5471c 100644 --- a/common/buildcraft/transport/gates/GateFactory.java +++ b/common/buildcraft/transport/gates/GateFactory.java @@ -11,6 +11,7 @@ package buildcraft.transport.gates; import buildcraft.api.gates.GateExpansionController; import buildcraft.api.gates.GateExpansions; import buildcraft.api.gates.IGateExpansion; +import buildcraft.core.utils.Utils; import buildcraft.transport.Gate; import buildcraft.transport.Pipe; import buildcraft.transport.gates.GateDefinition.GateLogic; @@ -98,9 +99,9 @@ public class GateFactory { gate.expansions.put(GateExpansionPulsar.INSTANCE, pulsarCon); } - NBTTagList exList = nbt.getTagList("expansions"); + NBTTagList exList = nbt.getTagList("expansions", Utils.NBTTag_Types.NBTTagCompound.ordinal()); for (int i = 0; i < exList.tagCount(); i++) { - NBTTagCompound conNBT = (NBTTagCompound) exList.tagAt(i); + NBTTagCompound conNBT = exList.getCompoundTagAt(i); IGateExpansion ex = GateExpansions.getExpansion(conNBT.getString("type")); if (ex != null) { GateExpansionController con = ex.makeController(pipe.container); diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index 507ad67b..5c576151 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -9,19 +9,23 @@ import buildcraft.api.gates.ITrigger; import buildcraft.core.ItemBuildCraft; import buildcraft.core.inventory.InvUtils; import buildcraft.core.utils.Localization; +import buildcraft.core.utils.Utils; import buildcraft.transport.Gate; import buildcraft.transport.gates.GateDefinition.GateLogic; import buildcraft.transport.gates.GateDefinition.GateMaterial; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -75,8 +79,8 @@ public class ItemGate extends ItemBuildCraft { NBTTagCompound nbt = getNBT(stack); if (nbt == null) return; - NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX); - expansionList.appendTag(new NBTTagString("", expansion.getUniqueIdentifier())); + NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); + expansionList.appendTag(new NBTTagString(expansion.getUniqueIdentifier())); nbt.setTag(NBT_TAG_EX, expansionList); } @@ -85,10 +89,10 @@ public class ItemGate extends ItemBuildCraft { if (nbt == null) return false; try { - NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX); + NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); for (int i = 0; i < expansionList.tagCount(); i++) { - NBTTagString ex = (NBTTagString) expansionList.tagAt(i); - if (ex.data.equals(expansion.getUniqueIdentifier())) + String ex = expansionList.getStringTagAt(i); + if (ex.equals(expansion.getUniqueIdentifier())) return true; } } catch (RuntimeException error) { @@ -102,10 +106,10 @@ public class ItemGate extends ItemBuildCraft { if (nbt == null) return expansions; try { - NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX); + NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); for (int i = 0; i < expansionList.tagCount(); i++) { - NBTTagString exTag = (NBTTagString) expansionList.tagAt(i); - IGateExpansion ex = GateExpansions.getExpansion(exTag.data); + String exTag = expansionList.getStringTagAt(i); + IGateExpansion ex = GateExpansions.getExpansion(exTag); if (ex != null) expansions.add(ex); } @@ -141,7 +145,7 @@ public class ItemGate extends ItemBuildCraft { @SuppressWarnings({"unchecked", "rawtypes"}) @Override @SideOnly(Side.CLIENT) - public void getSubItems(int id, CreativeTabs tab, List itemList) { + public void getSubItems(Item item, CreativeTabs tab, List itemList) { for (GateMaterial material : GateMaterial.VALUES) { for (GateLogic logic : GateLogic.VALUES) { if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index c6361c22..c6ad1c02 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -22,8 +22,10 @@ import buildcraft.core.network.PacketPayloadArrays; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import buildcraft.transport.Pipe; import buildcraft.transport.gates.GateDefinition; +import io.netty.buffer.ByteBuf; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -39,6 +41,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; @@ -163,50 +166,47 @@ public class ContainerGateInterface extends BuildCraftContainer { * @param packet */ public void setSelection(PacketUpdate packet, boolean notify) { - try { - PacketPayloadStream payload = (PacketPayloadStream) packet.payload; - DataInputStream data = payload.stream; + PacketPayloadStream payload = (PacketPayloadStream) packet.payload; + ByteBuf data = payload.stream; - int position = data.readInt(); + int position = data.readInt(); - setTrigger(position, ActionManager.triggers.get(data.readUTF()), notify); - setAction(position, ActionManager.actions.get(data.readUTF()), notify); + setTrigger(position, ActionManager.triggers.get(Utils.readUTF(data)), notify); + setAction(position, ActionManager.actions.get(Utils.readUTF(data)), notify); - ItemStack parameter = Packet.readItemStack(data); - if (parameter != null) { - ITriggerParameter param = new TriggerParameter(); - param.set(parameter); - setTriggerParameter(position, param, notify); - } else { - setTriggerParameter(position, null, notify); - } - } catch (IOException e) { - e.printStackTrace(); + ItemStack parameter = Utils.readStack(data); + + if (parameter != null) { + ITriggerParameter param = new TriggerParameter(); + param.set(parameter); + setTriggerParameter(position, param, notify); + } else { + setTriggerParameter(position, null, notify); } } private PacketPayload getSelectionPayload(final int position) { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeInt(position); if (pipe.gate.triggers[position] != null) { - data.writeUTF(pipe.gate.triggers[position].getUniqueTag()); + Utils.writeUTF(data, pipe.gate.triggers[position].getUniqueTag()); } else { - data.writeUTF(""); + Utils.writeUTF(data, ""); } if (pipe.gate.actions[position] != null) { - data.writeUTF(pipe.gate.actions[position].getUniqueTag()); + Utils.writeUTF(data, pipe.gate.actions[position].getUniqueTag()); } else { - data.writeUTF(""); + Utils.writeUTF(data, ""); } if (pipe.gate.triggerParameters[position] != null && pipe.gate.triggerParameters[position].getItemStack() != null) { - Packet.writeItemStack(pipe.gate.triggerParameters[position].getItemStack().copy(), data); + Utils.writeStack(data, pipe.gate.triggerParameters[position].getItemStack()); } else { - Packet.writeItemStack(null, data); + Utils.writeStack(data, null); } } }); diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java index d7f76db4..3c8c400d 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java @@ -2,6 +2,7 @@ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; +import buildcraft.core.utils.Utils; import buildcraft.transport.TravelingItem; import io.netty.buffer.ByteBuf; @@ -28,13 +29,13 @@ public class PacketPipeTransportItemStack extends BuildCraftPacket { @Override public void writeData(ByteBuf data) { data.writeInt(entityId); - Packet.writeItemStack(stack, data); + Utils.writeStack(data, stack); } @Override public void readData(ByteBuf data) { this.entityId = data.readInt(); - stack = Packet.readItemStack(data); + stack = Utils.readStack(data); TravelingItem item = TravelingItem.clientCache.get(entityId); if (item != null) item.setItemStack(stack); diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java index 16f4a879..e0942379 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java @@ -3,8 +3,6 @@ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.transport.TravelingItem; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; import io.netty.buffer.ByteBuf; import java.io.DataInputStream; diff --git a/common/buildcraft/transport/pipes/PipeFluidsEmerald.java b/common/buildcraft/transport/pipes/PipeFluidsEmerald.java index 78ee7ae4..c2a19b41 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeFluidsEmerald.java @@ -7,6 +7,7 @@ */ package buildcraft.transport.pipes; +import net.minecraft.item.Item; import buildcraft.transport.PipeIconProvider; /** @@ -15,8 +16,8 @@ import buildcraft.transport.PipeIconProvider; */ public class PipeFluidsEmerald extends PipeFluidsWood { - public PipeFluidsEmerald(int itemID) { - super(itemID); + public PipeFluidsEmerald(Item item) { + super(item); standardIconIndex = PipeIconProvider.TYPE.PipeFluidsEmerald_Standard.ordinal(); solidIconIndex = PipeIconProvider.TYPE.PipeAllEmerald_Solid.ordinal(); diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index ec237ca7..830c1f32 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -7,6 +7,8 @@ */ package buildcraft.transport.pipes; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -27,6 +29,7 @@ import buildcraft.core.inventory.SimpleInventory; import buildcraft.core.inventory.StackHelper; import buildcraft.core.network.IClientState; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import buildcraft.transport.BlockGenericPipe; import buildcraft.transport.Pipe; import buildcraft.transport.PipeIconProvider; @@ -138,17 +141,15 @@ public class PipeItemsDiamond extends Pipe implements IClien // ICLIENTSTATE @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { NBTTagCompound nbt = new NBTTagCompound(); writeToNBT(nbt); - NBTBase.writeNamedTag(nbt, data); + Utils.writeNBT(data, nbt); } @Override - public void readData(DataInputStream data) throws IOException { - NBTBase nbt = NBTBase.readNamedTag(data); - if (nbt instanceof NBTTagCompound) { - readFromNBT((NBTTagCompound) nbt); - } + public void readData(ByteBuf data) { + NBTTagCompound nbt = Utils.readNBT(data); + readFromNBT(nbt); } } diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index df03b3bc..94c8195d 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -7,6 +7,8 @@ */ package buildcraft.transport.pipes; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -14,6 +16,7 @@ import java.io.IOException; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; @@ -74,8 +77,8 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu private final SimpleInventory filters = new SimpleInventory(9, "Filters", 1); private int currentFilter = 0; - public PipeItemsEmerald(int itemID) { - super(itemID); + public PipeItemsEmerald(Item item) { + super(item); standardIconIndex = PipeIconProvider.TYPE.PipeItemsEmerald_Standard.ordinal(); solidIconIndex = PipeIconProvider.TYPE.PipeAllEmerald_Solid.ordinal(); @@ -245,18 +248,16 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu // ICLIENTSTATE @Override - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { NBTTagCompound nbt = new NBTTagCompound(); writeToNBT(nbt); - NBTBase.writeNamedTag(nbt, data); + Utils.writeNBT(data, nbt); } @Override - public void readData(DataInputStream data) throws IOException { - NBTBase nbt = NBTBase.readNamedTag(data); - if (nbt instanceof NBTTagCompound) { - readFromNBT((NBTTagCompound) nbt); - } + public void readData(ByteBuf data) { + NBTTagCompound nbt = Utils.readNBT(data); + readFromNBT(nbt); } public IInventory getFilters() { @@ -268,12 +269,12 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu } @Override - public void writeGuiData(DataOutputStream data) throws IOException { + public void writeGuiData(ByteBuf data) { data.writeByte(stateController.getCurrentState()); } @Override - public void readGuiData(DataInputStream data, EntityPlayer sender) throws IOException { + public void readGuiData(ByteBuf data, EntityPlayer sender) { stateController.setCurrentState(data.readByte()); } } diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index 4a3ea4da..bf23c38e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -8,6 +8,8 @@ */ package buildcraft.transport.pipes; +import io.netty.buffer.ByteBuf; + import java.util.BitSet; import java.util.LinkedList; import java.util.Map; @@ -16,6 +18,7 @@ import java.util.Map.Entry; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; @@ -32,6 +35,7 @@ import buildcraft.transport.BlockGenericPipe; import buildcraft.transport.PipeIconProvider; import buildcraft.transport.TravelingItem; import buildcraft.transport.triggers.ActionExtractionPreset; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -48,8 +52,8 @@ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler private final int filterCount = filters.getSizeInventory(); private int currentFilter = 0; - public PipeItemsEmzuli(int itemID) { - super(itemID); + public PipeItemsEmzuli(Item item) { + super(item); standardIconIndex = PipeIconProvider.TYPE.PipeItemsEmzuli_Standard.ordinal(); solidIconIndex = PipeIconProvider.TYPE.PipeAllEmzuli_Solid.ordinal(); @@ -234,11 +238,11 @@ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler } @Override - public void writeGuiData(DataOutputStream paramDataOutputStream) throws IOException { + public void writeGuiData(ByteBuf paramDataOutputStream) { } @Override - public void readGuiData(DataInputStream data, EntityPlayer paramEntityPlayer) throws IOException { + public void readGuiData(ByteBuf data, EntityPlayer paramEntityPlayer) { byte slot = data.readByte(); slotColors[slot] = data.readByte(); } diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 2366bf9e..181789b9 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -133,7 +133,7 @@ public class PipeItemsWood extends Pipe implements IPowerRec if (extracted == null) return; - tile.onInventoryChanged(); + tile.markDirty(); for (ItemStack stack : extracted) { if (stack == null || stack.stackSize == 0) { diff --git a/common/buildcraft/transport/utils/ConnectionMatrix.java b/common/buildcraft/transport/utils/ConnectionMatrix.java index e7dbc670..5502ffa2 100644 --- a/common/buildcraft/transport/utils/ConnectionMatrix.java +++ b/common/buildcraft/transport/utils/ConnectionMatrix.java @@ -1,8 +1,11 @@ package buildcraft.transport.utils; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraftforge.common.util.ForgeDirection; public class ConnectionMatrix { @@ -39,11 +42,11 @@ public class ConnectionMatrix { dirty = false; } - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeByte(mask); } - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { byte newMask = data.readByte(); if (newMask != mask) { diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index ed2941fa..a1b0f87e 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -1,5 +1,7 @@ package buildcraft.transport.utils; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -40,14 +42,14 @@ public class FacadeMatrix { dirty = false; } - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { data.writeShort(Block.blockRegistry.getIDForObject(_blocks[i])); data.writeByte(_blockMetas[i]); } } - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { short id = data.readShort(); diff --git a/common/buildcraft/transport/utils/TextureMatrix.java b/common/buildcraft/transport/utils/TextureMatrix.java index 005c65f2..4ca1fc37 100644 --- a/common/buildcraft/transport/utils/TextureMatrix.java +++ b/common/buildcraft/transport/utils/TextureMatrix.java @@ -1,8 +1,11 @@ package buildcraft.transport.utils; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; + import net.minecraftforge.common.util.ForgeDirection; public class TextureMatrix { @@ -29,13 +32,13 @@ public class TextureMatrix { dirty = false; } - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { for (int i = 0; i < _iconIndexes.length; i++) { data.writeByte(_iconIndexes[i]); } } - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { for (int i = 0; i < _iconIndexes.length; i++) { int icon = data.readByte(); if (_iconIndexes[i] != icon) { diff --git a/common/buildcraft/transport/utils/WireMatrix.java b/common/buildcraft/transport/utils/WireMatrix.java index b95509db..bd850430 100644 --- a/common/buildcraft/transport/utils/WireMatrix.java +++ b/common/buildcraft/transport/utils/WireMatrix.java @@ -2,10 +2,13 @@ package buildcraft.transport.utils; import buildcraft.transport.Pipe; import buildcraft.api.transport.PipeWire; +import io.netty.buffer.ByteBuf; + import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.BitSet; + import net.minecraftforge.common.util.ForgeDirection; public class WireMatrix { @@ -72,7 +75,7 @@ public class WireMatrix { dirty = false; } - public void writeData(DataOutputStream data) throws IOException { + public void writeData(ByteBuf data) { data.writeByte(_bitSetCodec.encode(_hasWire)); for (int i = 0; i < PipeWire.values().length; i++) { @@ -81,7 +84,7 @@ public class WireMatrix { } } - public void readData(DataInputStream data) throws IOException { + public void readData(ByteBuf data) { _bitSetCodec.decode(data.readByte(), _hasWire); for (int i = 0; i < PipeWire.values().length; i++) { _wires[i].readData(data); From 6692683e4f0a8e3f94234f2f4d679603f1e82cfd Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 12:30:02 +0100 Subject: [PATCH 09/31] removed obsolete file --- .../network/TransportConnectionHandler.java | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 common/buildcraft/transport/network/TransportConnectionHandler.java diff --git a/common/buildcraft/transport/network/TransportConnectionHandler.java b/common/buildcraft/transport/network/TransportConnectionHandler.java deleted file mode 100644 index 0e796a5e..00000000 --- a/common/buildcraft/transport/network/TransportConnectionHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.transport.network; - -import cpw.mods.fml.common.network.IConnectionHandler; -import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.NetLoginHandler; -import net.minecraft.network.packet.NetHandler; -import net.minecraft.network.Packet1Login; -import net.minecraft.server.MinecraftServer; - -/** - * - * @author CovertJaguar - */ -public class TransportConnectionHandler implements IConnectionHandler { - - @Override - public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) { - PacketGateExpansionMap pkt = new PacketGateExpansionMap(); - PacketDispatcher.sendPacketToPlayer(pkt.getPacket(), player); - } - - @Override - public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { - return null; - } - - @Override - public void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager) { - } - - @Override - public void connectionOpened(NetHandler netClientHandler, MinecraftServer server, INetworkManager manager) { - } - - @Override - public void connectionClosed(INetworkManager manager) { - } - - @Override - public void clientLoggedIn(NetHandler clientHandler, INetworkManager manager, Packet1Login login) { - } -} From 8762fafc9036eb41c66a2c3a5434d14643eff95b Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 9 Feb 2014 15:01:36 +0100 Subject: [PATCH 10/31] Build for latest 1.6.4 Forge version --- build.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 39a6a78e..2d9627aa 100644 --- a/build.xml +++ b/build.xml @@ -19,12 +19,13 @@ - + - + + @@ -99,7 +100,7 @@ - + From 4dacb568bab9225e3bc6f25491b07404936548a9 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 18:02:44 +0100 Subject: [PATCH 11/31] fixed last compilation errors --- common/buildcraft/BuildCraftCore.java | 3 +- common/buildcraft/BuildCraftMod.java | 5 +++ common/buildcraft/BuildCraftTransport.java | 9 +++- common/buildcraft/api/core/StackWrapper.java | 6 ++- common/buildcraft/builders/BlockMarker.java | 2 +- common/buildcraft/builders/TileBuilder.java | 2 +- .../filler/pattern/FillerPattern.java | 7 +++- common/buildcraft/core/BlockSpring.java | 7 +++- common/buildcraft/core/ItemBuildCraft.java | 3 +- common/buildcraft/core/ItemWrench.java | 2 +- .../core/TickHandlerCoreClient.java | 13 ++++-- common/buildcraft/core/TileBuildCraft.java | 20 +++++---- .../core/gui/BuildCraftContainer.java | 20 +++++++-- .../core/gui/GuiAdvancedInterface.java | 8 ++-- common/buildcraft/core/gui/GuiBuildCraft.java | 4 +- .../buildcraft/core/inventory/InvUtils.java | 2 +- .../core/inventory/InventoryWrapper.java | 2 +- .../inventory/InventoryWrapperSimple.java | 9 ---- .../core/network/ISynchronizedTile.java | 2 +- .../core/network/PacketGuiReturn.java | 3 +- .../core/network/PacketGuiWidget.java | 5 ++- .../core/network/PacketSlotChange.java | 41 ++----------------- .../core/network/PacketTileState.java | 2 +- common/buildcraft/core/proxy/CoreProxy.java | 19 ++++----- .../core/proxy/CoreProxyClient.java | 17 +++----- .../core/render/RenderEntityBlock.java | 8 +++- .../buildcraft/core/render/RenderingOil.java | 34 --------------- common/buildcraft/core/utils/BCLog.java | 4 +- common/buildcraft/core/utils/BlockUtil.java | 3 +- .../energy/BlockBuildcraftFluid.java | 13 +++--- .../energy/render/EntityDropParticleFX.java | 11 ++++- .../energy/worldgen/BiomeGenOilDesert.java | 5 ++- .../energy/worldgen/BiomeGenOilOcean.java | 5 ++- .../energy/worldgen/OilPopulate.java | 11 +++-- .../buildcraft/factory/BlockMiningWell.java | 4 +- common/buildcraft/factory/BlockQuarry.java | 9 +--- .../buildcraft/factory/TileAutoWorkbench.java | 9 ++-- common/buildcraft/factory/TileQuarry.java | 34 ++++++++++----- .../silicon/TileAdvancedCraftingTable.java | 9 +--- .../buildcraft/silicon/TileAssemblyTable.java | 5 --- common/buildcraft/transport/ItemFacade.java | 7 ++-- common/buildcraft/transport/ItemPipe.java | 11 +++-- common/buildcraft/transport/ItemPlug.java | 3 +- .../transport/PipeTransportItems.java | 5 +-- .../buildcraft/transport/TileGenericPipe.java | 21 +++++++--- .../network/PacketHandlerTransport.java | 2 +- .../PacketPipeTransportItemStackRequest.java | 25 ++++++----- .../transport/pipes/PipePowerIron.java | 7 +++- 48 files changed, 232 insertions(+), 226 deletions(-) delete mode 100644 common/buildcraft/core/render/RenderingOil.java diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 354d96eb..aa51aae3 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -94,7 +94,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.6.4,1.7)", dependencies = "required-after:Forge@[9.11.1.953,)") +@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.7.2,1.8)", dependencies = "required-after:Forge@[9.11.1.953,)") public class BuildCraftCore extends BuildCraftMod { public static enum RenderMode { Full, NoDynamic @@ -132,7 +132,6 @@ public class BuildCraftCore extends BuildCraftMod { public static int blockByEntityModel; public static int legacyPipeModel; public static int markerModel; - public static int oilModel; public static BCTrigger triggerMachineActive = new TriggerMachine(true); public static BCTrigger triggerMachineInactive = new TriggerMachine(false); public static BCTrigger triggerEmptyInventory = new TriggerInventory(TriggerInventory.State.Empty); diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java index 091810a4..a85162da 100755 --- a/common/buildcraft/BuildCraftMod.java +++ b/common/buildcraft/BuildCraftMod.java @@ -19,6 +19,11 @@ public class BuildCraftMod { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); channels.get(Side.SERVER).writeOutbound(packet); } + + public void sendToPlayers(BuildCraftPacket packet, World world, int x, int y, int z, int maxDistance) { + channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); + channels.get(Side.SERVER).writeOutbound(packet); + } public void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 012955eb..0bd3bb6f 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -45,6 +45,7 @@ import buildcraft.transport.ItemPipeWire; import buildcraft.transport.gates.GateExpansionRedstoneFader; import buildcraft.transport.gates.GateExpansionTimer; import buildcraft.transport.network.PacketHandlerTransport; +import buildcraft.transport.network.PacketPipeTransportTraveler; import buildcraft.transport.pipes.PipeFluidsCobblestone; import buildcraft.transport.pipes.PipeFluidsEmerald; import buildcraft.transport.pipes.PipeFluidsGold; @@ -212,14 +213,17 @@ public class BuildCraftTransport extends BuildCraftMod { int meta = world.getBlockMetadata(i, j, k); - for (String excluded : excludedBlocks) { + // TODO: the exculded list is not taken into account. This probably + // needs to be migrated to an implementation based on names instead + // of ids, low priority for now. + /*for (String excluded : excludedBlocks) { if (excluded.equals(block.getUnlocalizedName())) return false; String[] tokens = excluded.split(":"); if (tokens[0].equals(Integer.toString(id)) && (tokens.length == 1 || tokens[1].equals(Integer.toString(meta)))) return false; - } + }*/ return true; } } @@ -473,4 +477,5 @@ public class BuildCraftTransport extends BuildCraftMod { return res; } + } diff --git a/common/buildcraft/api/core/StackWrapper.java b/common/buildcraft/api/core/StackWrapper.java index 040eff09..3da94754 100644 --- a/common/buildcraft/api/core/StackWrapper.java +++ b/common/buildcraft/api/core/StackWrapper.java @@ -8,6 +8,7 @@ */ package buildcraft.api.core; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; /** @@ -25,7 +26,10 @@ public class StackWrapper { @Override public int hashCode() { int hash = 5; - hash = 67 * hash + stack.itemID; + + // TODO: this may have a speed impact. To be checked. + hash = 67 * hash + Item.itemRegistry.getIDForObject(stack.getItem()); + hash = 67 * hash + stack.getItemDamage(); if (stack.stackTagCompound != null) hash = 67 * hash + stack.stackTagCompound.hashCode(); diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 81ead8d7..35106e60 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -33,7 +33,7 @@ public class BlockMarker extends BlockContainer { public BlockMarker() { super(Material.circuits); - setLightValue(0.5F); + setLightLevel(0.5F); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index c9b04a09..038f2ce2 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -191,7 +191,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP for (BlockIndex b : path) { worldObj.setBlock(b.x, b.y, b.z, null); - BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, BuildCraftBuilders.pathMarkerBlock, 0); + BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, 0, 0); } break; diff --git a/common/buildcraft/builders/filler/pattern/FillerPattern.java b/common/buildcraft/builders/filler/pattern/FillerPattern.java index a69a6da8..11a327a0 100644 --- a/common/buildcraft/builders/filler/pattern/FillerPattern.java +++ b/common/buildcraft/builders/filler/pattern/FillerPattern.java @@ -196,8 +196,11 @@ public abstract class FillerPattern implements IFillerPattern { private static void breakBlock(World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block != null) - world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); + if (block != null) { + // TODO: fix sound + //world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); + } + if (BuildCraftBuilders.fillerDestroy) { world.setBlockToAir(x, y, z); } else if (BlockUtil.isToughBlock(world, x, y, z)) { diff --git a/common/buildcraft/core/BlockSpring.java b/common/buildcraft/core/BlockSpring.java index e5549834..69d481d3 100644 --- a/common/buildcraft/core/BlockSpring.java +++ b/common/buildcraft/core/BlockSpring.java @@ -46,7 +46,10 @@ public class BlockSpring extends Block { super(Material.rock); setBlockUnbreakable(); setResistance(6000000.0F); - setStepSound(soundStoneFootstep); + + // TODO: set proper sound + //setStepSound(soundStoneFootstep); + disableStats(); setTickRandomly(true); setCreativeTab(CreativeTabBuildCraft.MACHINES.get()); @@ -98,7 +101,7 @@ public class BlockSpring extends Block { // Prevents updates on chunk generation @Override - public boolean func_82506_l() { + public boolean func_149698_L () { return false; } diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index 13874083..8ce6e79e 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -11,6 +11,7 @@ import buildcraft.core.utils.StringUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -48,7 +49,7 @@ public class ItemBuildCraft extends Item { } @Override - public boolean shouldPassSneakingClickToBlock(World par2World, int par4, int par5, int par6) { + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { return passSneakClick; } } diff --git a/common/buildcraft/core/ItemWrench.java b/common/buildcraft/core/ItemWrench.java index 7a74d039..7f519c65 100644 --- a/common/buildcraft/core/ItemWrench.java +++ b/common/buildcraft/core/ItemWrench.java @@ -61,7 +61,7 @@ public class ItemWrench extends ItemBuildCraft implements IToolWrench { } @Override - public boolean shouldPassSneakingClickToBlock(World par2World, int par4, int par5, int par6) { + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { return true; } } diff --git a/common/buildcraft/core/TickHandlerCoreClient.java b/common/buildcraft/core/TickHandlerCoreClient.java index b405ebfa..af481a15 100644 --- a/common/buildcraft/core/TickHandlerCoreClient.java +++ b/common/buildcraft/core/TickHandlerCoreClient.java @@ -10,6 +10,7 @@ import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; public class TickHandlerCoreClient { @@ -28,12 +29,16 @@ public class TickHandlerCoreClient { // if(!Config.disableVersionCheck) { if (Version.needsUpdateNoticeAndMarkAsSeen()) { - player.addChatMessage(String.format("\u00A7cNew version of BuildCraft available: %s for Minecraft %s", Version.getRecommendedVersion(), - CoreProxy.proxy.getMinecraftVersion())); + player.addChatMessage(new ChatComponentText( + String.format( + "\u00A7cNew version of BuildCraft available: %s for Minecraft %s", + Version.getRecommendedVersion(), + CoreProxy.proxy.getMinecraftVersion()))); for (String updateLine : Version.getChangelog()) { - player.addChatMessage("\u00A79" + updateLine); + player.addChatMessage(new ChatComponentText("\u00A79" + updateLine)); } - player.addChatMessage("\u00A7cThis message only displays once. Type '/buildcraft version' if you want to see it again."); + player.addChatMessage(new ChatComponentText( + "\u00A7cThis message only displays once. Type '/buildcraft version' if you want to see it again.")); } // } diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 60bea7fb..d65375a5 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -7,8 +7,10 @@ */ package buildcraft.core; +import buildcraft.BuildCraftCore; import buildcraft.BuildCraftMod; import buildcraft.api.power.IPowerReceptor; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.ISynchronizedTile; import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadArrays; @@ -98,7 +100,11 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized @Override public Packet getDescriptionPacket() { - return new PacketTileUpdate(this).getPacket(); + // TODO: The description packet mechanism seems to have completely be replaced by other means, e.g. + // the update packet. If confirmed, remove the buffer packet mechanism in Utils as well, that is + // BuildCraftCore.bufferedDescriptions. + //return new PacketTileUpdate(this).getPacket(); + return null; } @Override @@ -107,14 +113,15 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized } @Override - public Packet getUpdatePacket() { - return new PacketTileUpdate(this).getPacket(); + public BuildCraftPacket getUpdatePacket() { + return new PacketTileUpdate(this); } @Override public void handleDescriptionPacket(PacketUpdate packet) throws IOException { - if (packet.payload instanceof PacketPayloadArrays) + if (packet.payload instanceof PacketPayloadArrays) { descriptionPacket.fromPayload(this, (PacketPayloadArrays) packet.payload); + } } @Override @@ -140,11 +147,6 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized owner = nbt.getString("owner"); } - public boolean isInvNameLocalized() { - // TODO Auto-generated method stub - return false; - } - public World getWorld() { return worldObj; } diff --git a/common/buildcraft/core/gui/BuildCraftContainer.java b/common/buildcraft/core/gui/BuildCraftContainer.java index 161e04ec..e34c394b 100644 --- a/common/buildcraft/core/gui/BuildCraftContainer.java +++ b/common/buildcraft/core/gui/BuildCraftContainer.java @@ -7,15 +7,22 @@ */ package buildcraft.core.gui; +import buildcraft.BuildCraftCore; import buildcraft.core.gui.slots.IPhantomSlot; import buildcraft.core.gui.slots.SlotBase; import buildcraft.core.gui.widgets.Widget; import buildcraft.core.inventory.StackHelper; import buildcraft.core.network.PacketGuiWidget; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufInputStream; + import java.io.DataInputStream; import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; import java.util.List; + +import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -47,11 +54,18 @@ public abstract class BuildCraftContainer extends Container { public void sendWidgetDataToClient(Widget widget, ICrafting player, byte[] data) { PacketGuiWidget pkt = new PacketGuiWidget(windowId, widgets.indexOf(widget), data); - PacketDispatcher.sendPacketToPlayer(pkt.getPacket(), (Player) player); + BuildCraftCore.instance.sendToPlayer((EntityPlayer) player, pkt); } - public void handleWidgetClientData(int widgetId, DataInputStream data) throws IOException { - widgets.get(widgetId).handleClientPacketData(data); + public void handleWidgetClientData(int widgetId, ByteBuf data) { + InputStream input = new ByteBufInputStream (data); + DataInputStream stream = new DataInputStream(input); + + try { + widgets.get(widgetId).handleClientPacketData(stream); + } catch (IOException e) { + e.printStackTrace(); + } } @Override diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 83ad8545..34656dc3 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -67,10 +67,10 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { int cornerX = (width - xSize) / 2; int cornerY = (height - ySize) / 2; - itemRenderer.zLevel = 200F; - itemRenderer.renderItemAndEffectIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); - itemRenderer.renderItemOverlayIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); - itemRenderer.zLevel = 0.0F; + itemRender.zLevel = 200F; + itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); + itemRender.renderItemOverlayIntoGUI(fontRendererObj, mc.renderEngine, item, cornerX + x, cornerY + y); + itemRender.zLevel = 0.0F; } } } diff --git a/common/buildcraft/core/gui/GuiBuildCraft.java b/common/buildcraft/core/gui/GuiBuildCraft.java index 65164482..2a860ef9 100644 --- a/common/buildcraft/core/gui/GuiBuildCraft.java +++ b/common/buildcraft/core/gui/GuiBuildCraft.java @@ -230,7 +230,7 @@ public abstract class GuiBuildCraft extends GuiContainer { } this.zLevel = 300.0F; - itemRendererObj.zLevel = 300.0F; + itemRender.zLevel = 300.0F; int var15 = -267386864; this.drawGradientRect(x - 3, y - 4, x + lenght + 3, y - 3, var15, var15); this.drawGradientRect(x - 3, y + var14 + 3, x + lenght + 3, y + var14 + 4, var15, var15); @@ -259,7 +259,7 @@ public abstract class GuiBuildCraft extends GuiContainer { } this.zLevel = 0.0F; - itemRenderer.zLevel = 0.0F; + itemRender.zLevel = 0.0F; } } diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index 300c5908..4aa04ad4 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -198,7 +198,7 @@ public class InvUtils { public static ItemStack consumeItem(ItemStack stack) { if (stack.stackSize == 1) { if (stack.getItem().hasContainerItem()) { - return stack.getItem().getContainerItemStack(stack); + return stack.getItem().getContainerItem(stack); } else { return null; } diff --git a/common/buildcraft/core/inventory/InventoryWrapper.java b/common/buildcraft/core/inventory/InventoryWrapper.java index 89443d3a..1aec2cb9 100644 --- a/common/buildcraft/core/inventory/InventoryWrapper.java +++ b/common/buildcraft/core/inventory/InventoryWrapper.java @@ -20,13 +20,13 @@ public abstract class InventoryWrapper implements ISidedInventory { @Override public ItemStack getStackInSlotOnClosing(int slotIndex) { return inventory.getStackInSlotOnClosing(slotIndex); } @Override public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { inventory.setInventorySlotContents(slotIndex, itemstack); } @Override public String getInventoryName() { return inventory.getInventoryName(); } - @Override public boolean isInvNameLocalized() { return inventory.isInvNameLocalized(); } @Override public int getInventoryStackLimit() { return inventory.getInventoryStackLimit(); } @Override public void markDirty() { inventory.markDirty(); } @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return inventory.isUseableByPlayer(entityplayer); } @Override public void openInventory() { inventory.openInventory(); } @Override public void closeInventory() { inventory.closeInventory(); } @Override public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) { return inventory.isItemValidForSlot(slotIndex, itemstack); } + @Override public boolean hasCustomInventoryName() { return inventory.hasCustomInventoryName(); }; /* STATIC HELPER */ public static ISidedInventory getWrappedInventory(Object inventory) { diff --git a/common/buildcraft/core/inventory/InventoryWrapperSimple.java b/common/buildcraft/core/inventory/InventoryWrapperSimple.java index 5a66c930..2da6af71 100644 --- a/common/buildcraft/core/inventory/InventoryWrapperSimple.java +++ b/common/buildcraft/core/inventory/InventoryWrapperSimple.java @@ -28,13 +28,4 @@ public class InventoryWrapperSimple extends InventoryWrapper { return true; } - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public void markDirty() { - } - } diff --git a/common/buildcraft/core/network/ISynchronizedTile.java b/common/buildcraft/core/network/ISynchronizedTile.java index 4e5c2a44..b6141b60 100644 --- a/common/buildcraft/core/network/ISynchronizedTile.java +++ b/common/buildcraft/core/network/ISynchronizedTile.java @@ -18,7 +18,7 @@ public interface ISynchronizedTile { public void postPacketHandling(PacketUpdate packet); - public Packet getUpdatePacket(); + public BuildCraftPacket getUpdatePacket(); public Packet getDescriptionPacket(); diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index e2889dcb..6a313eca 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -6,6 +6,7 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; +import buildcraft.BuildCraftCore; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; @@ -87,7 +88,7 @@ public class PacketGuiReturn extends BuildCraftPacket { } public void sendPacket() { - PacketDispatcher.sendPacketToServer(getPacket()); + BuildCraftCore.instance.sendToServer(this); } @Override diff --git a/common/buildcraft/core/network/PacketGuiWidget.java b/common/buildcraft/core/network/PacketGuiWidget.java index bdc1c4c8..fdb734e1 100644 --- a/common/buildcraft/core/network/PacketGuiWidget.java +++ b/common/buildcraft/core/network/PacketGuiWidget.java @@ -40,7 +40,7 @@ public class PacketGuiWidget extends BuildCraftPacket { public void writeData(ByteBuf data) { data.writeByte(windowId); data.writeByte(widgetId); - data.write(payload); + data.writeBytes(payload); } @Override @@ -50,8 +50,9 @@ public class PacketGuiWidget extends BuildCraftPacket { EntityClientPlayerMP player = FMLClientHandler.instance().getClient().thePlayer; - if (player.openContainer instanceof BuildCraftContainer && player.openContainer.windowId == windowId) + if (player.openContainer instanceof BuildCraftContainer && player.openContainer.windowId == windowId) { ((BuildCraftContainer) player.openContainer).handleWidgetClientData(widgetId, data); + } } @Override diff --git a/common/buildcraft/core/network/PacketSlotChange.java b/common/buildcraft/core/network/PacketSlotChange.java index 6490ea1f..905a6540 100644 --- a/common/buildcraft/core/network/PacketSlotChange.java +++ b/common/buildcraft/core/network/PacketSlotChange.java @@ -6,6 +6,7 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; +import buildcraft.core.utils.Utils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; @@ -26,53 +27,17 @@ public class PacketSlotChange extends PacketCoordinates { @Override public void writeData(ByteBuf data) { - super.writeData(data); data.writeInt(slot); - if (stack != null) { - data.writeInt(Item.itemRegistry.getIDForObject(stack.getItem())); - data.writeInt(stack.stackSize); - data.writeInt(stack.getItemDamage()); - - if(stack.hasTagCompound()) { - byte[] compressed = CompressedStreamTools.compress(stack.getTagCompound()); - data.writeShort(compressed.length); - data.write(compressed); - } else { - data.writeShort(0); - } - - } else { - data.writeInt(0); - } + Utils.writeStack(data, stack); } @Override public void readData(ByteBuf data) { - super.readData(data); this.slot = data.readInt(); - int id = data.readInt(); - - if (id != 0) { - Item item = Item.getItemById(id); - stack = new ItemStack(item, data.readInt(), data.readInt()); - - // Yes, this stuff may indeed have NBT and don't you forget it. - short length = data.readShort(); - - if(length > 0) { - byte[] compressed = new byte[length]; - data.readFully(compressed); - stack.setTagCompound(CompressedStreamTools.decompress(compressed)); - } - - - } else { - stack = null; - } + stack = Utils.readStack(data); } - } diff --git a/common/buildcraft/core/network/PacketTileState.java b/common/buildcraft/core/network/PacketTileState.java index b84361d7..058a067e 100644 --- a/common/buildcraft/core/network/PacketTileState.java +++ b/common/buildcraft/core/network/PacketTileState.java @@ -23,7 +23,7 @@ public class PacketTileState extends PacketCoordinates { private List stateList = new LinkedList(); /** - * Default constructor for incomming packets + * Default constructor for incoming packets */ public PacketTileState() { } diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 014fab44..7d7e7153 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -19,6 +19,8 @@ import java.io.File; import java.util.List; import java.util.Random; +import com.mojang.authlib.GameProfile; + import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -35,6 +37,7 @@ import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; @@ -138,10 +141,6 @@ public class CoreProxy { return 0; } - public void TakenFromCrafting(EntityPlayer thePlayer, ItemStack itemstack, IInventory craftMatrix) { - GameRegistry.onItemCrafted(thePlayer, itemstack, craftMatrix); - } - public Random createNewRandom(World world) { return new Random(world.getSeed()); } @@ -154,9 +153,9 @@ public class CoreProxy { } private EntityPlayer createNewPlayer(World world) { - EntityPlayer player = new EntityPlayer(world, "[BuildCraft]") { + EntityPlayer player = new EntityPlayer(world, new GameProfile (null, "[BuildCraft]")) { @Override - public void sendChatToPlayer(ChatMessageComponent var1) { + public void addChatMessage(IChatComponent var1) { } @Override @@ -173,11 +172,11 @@ public class CoreProxy { } private EntityPlayer createNewPlayer(World world, int x, int y, int z) { - EntityPlayer player = new EntityPlayer(world, "[BuildCraft]") { + EntityPlayer player = new EntityPlayer(world, new GameProfile (null, "[BuildCraft]")) { @Override - public void sendChatToPlayer(ChatMessageComponent var1) { + public void addChatMessage(IChatComponent var1) { } - + @Override public boolean canCommandSenderUseCommand(int var1, String var2) { return false; @@ -186,7 +185,7 @@ public class CoreProxy { @Override public ChunkCoordinates getPlayerCoordinates() { return null; - } + } }; player.posX = x; player.posY = y; diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index b7343eb6..df801110 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -21,7 +21,6 @@ import buildcraft.core.render.RenderLaser; import buildcraft.core.render.RenderRobot; import buildcraft.core.render.RenderingEntityBlocks; import buildcraft.core.render.RenderingMarkers; -import buildcraft.core.render.RenderingOil; import buildcraft.transport.render.TileEntityPickupFX; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -30,6 +29,8 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import java.io.File; import java.util.List; +import com.mojang.authlib.GameProfile; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; @@ -45,6 +46,7 @@ import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IChatComponent; import net.minecraft.world.World; public class CoreProxyClient extends CoreProxy { @@ -115,11 +117,9 @@ public class CoreProxyClient extends CoreProxy { BuildCraftCore.blockByEntityModel = RenderingRegistry.getNextAvailableRenderId(); BuildCraftCore.legacyPipeModel = RenderingRegistry.getNextAvailableRenderId(); BuildCraftCore.markerModel = RenderingRegistry.getNextAvailableRenderId(); - BuildCraftCore.oilModel = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new RenderingEntityBlocks()); RenderingRegistry.registerBlockHandler(BuildCraftCore.legacyPipeModel, new RenderingEntityBlocks()); - RenderingRegistry.registerBlockHandler(new RenderingOil()); RenderingRegistry.registerBlockHandler(new RenderingMarkers()); } @@ -131,12 +131,6 @@ public class CoreProxyClient extends CoreProxy { RenderingRegistry.registerEntityRenderingHandler(EntityRobot.class, new RenderRobot()); } - /* NETWORKING */ - @Override - public void sendToServer(Packet packet) { - FMLClientHandler.instance().getClient().getNetHandler().addToSendQueue(packet); - } - /* BUILDCRAFT PLAYER */ @Override public String playerName() { @@ -144,9 +138,9 @@ public class CoreProxyClient extends CoreProxy { } private EntityPlayer createNewPlayer(World world) { - EntityPlayer player = new EntityPlayer(world, "[BuildCraft]") { + EntityPlayer player = new EntityPlayer(world, new GameProfile(null, "[BuildCraft]")) { @Override - public void sendChatToPlayer(ChatMessageComponent var1) { + public void addChatMessage(IChatComponent var1) { } @Override @@ -159,6 +153,7 @@ public class CoreProxyClient extends CoreProxy { return null; } }; + return player; } diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index e46459d1..12d94aff 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -195,7 +195,9 @@ public class RenderEntityBlock extends Render { if (blockAccess == null) doLight = false; - if (doTessellating && !tessellator.isDrawing) + // TODO: needs to cancel the test because the variable is now private... May need to + // duplicate the tessellator code. + //if (doTessellating && !tessellator.isDrawing) tessellator.startDrawingQuads(); float light = 0; @@ -253,7 +255,9 @@ public class RenderEntityBlock extends Render { if (info.renderSide[5]) renderBlocks.renderFaceXPos(info.baseBlock, x, y, z, info.getBlockTextureFromSide(5)); - if (doTessellating && tessellator.isDrawing) + // TODO: needs to cancel the test because the variable is now private... May need to + // duplicate the tessellator code. + //if (doTessellating && tessellator.isDrawing) tessellator.draw(); } } diff --git a/common/buildcraft/core/render/RenderingOil.java b/common/buildcraft/core/render/RenderingOil.java deleted file mode 100644 index 892f53d8..00000000 --- a/common/buildcraft/core/render/RenderingOil.java +++ /dev/null @@ -1,34 +0,0 @@ -package buildcraft.core.render; - -import buildcraft.BuildCraftCore; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; - -public class RenderingOil implements ISimpleBlockRenderingHandler { - - @Override - public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { - } - - @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { - - if (block.getRenderType() != BuildCraftCore.oilModel) - return true; - - renderer.renderBlockFluids(block, x, y, z); - return true; - } - - @Override - public boolean shouldRender3DInInventory(int modelId) { - return false; - } - - @Override - public int getRenderId() { - return BuildCraftCore.oilModel; - } -} diff --git a/common/buildcraft/core/utils/BCLog.java b/common/buildcraft/core/utils/BCLog.java index e987345e..ee916fc7 100644 --- a/common/buildcraft/core/utils/BCLog.java +++ b/common/buildcraft/core/utils/BCLog.java @@ -22,7 +22,9 @@ public class BCLog { public static final Logger logger = Logger.getLogger("Buildcraft"); public static void initLog() { - logger.setParent(FMLLog.getLogger()); + // TODO: check if the code below is still useful and remove otherwise. + //logger.setParent(FMLLog.getLogger()); + logger.info("Starting BuildCraft " + Version.getVersion()); logger.info("Copyright (c) SpaceToad, 2011"); logger.info("http://www.mod-buildcraft.com"); diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index eba17df0..a602dc8c 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -22,6 +22,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.network.play.server.S27PacketExplosion; import net.minecraft.world.ChunkPosition; import net.minecraft.world.Explosion; import net.minecraft.world.World; @@ -190,7 +191,7 @@ public class BlockUtil { continue; if (player.getDistanceSq(x, y, z) < 4096) { - ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(new Packet60Explosion(x + .5, y + .5, z + .5, 3f, explosion.affectedBlockPositions, null)); + ((EntityPlayerMP) player).playerNetServerHandler.sendPacket(new S27PacketExplosion(x + .5, y + .5, z + .5, 3f, explosion.affectedBlockPositions, null)); } } } diff --git a/common/buildcraft/energy/BlockBuildcraftFluid.java b/common/buildcraft/energy/BlockBuildcraftFluid.java index c1cd6116..04045ef1 100644 --- a/common/buildcraft/energy/BlockBuildcraftFluid.java +++ b/common/buildcraft/energy/BlockBuildcraftFluid.java @@ -75,22 +75,22 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { } @Override - public int getFireSpreadSpeed(World world, int x, int y, int z, int metadata, ForgeDirection face) { + public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return flammable ? 300 : 0; } @Override - public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) { + public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return flammability; } @Override - public boolean isFlammable(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) { + public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return flammable; } @Override - public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side) { + public boolean isFireSource(World world, int x, int y, int z, ForgeDirection side) { return flammable && flammability == 0; } @@ -106,7 +106,10 @@ public class BlockBuildcraftFluid extends BlockFluidClassic { public void randomDisplayTick(World world, int x, int y, int z, Random rand) { super.randomDisplayTick(world, x, y, z, rand); - if (rand.nextInt(10) == 0 && world.doesBlockHaveSolidTopSurface(x, y - 1, z) && !world.getBlock(x, y - 2, z).getMaterial().blocksMovement()) { + if (rand.nextInt(10) == 0 + && World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) + && !world.getBlock(x, y - 2, z).getMaterial().blocksMovement()) { + double px = (double) ((float) x + rand.nextFloat()); double py = (double) y - 1.05D; double pz = (double) ((float) z + rand.nextFloat()); diff --git a/common/buildcraft/energy/render/EntityDropParticleFX.java b/common/buildcraft/energy/render/EntityDropParticleFX.java index ed0b16b0..f0337a62 100644 --- a/common/buildcraft/energy/render/EntityDropParticleFX.java +++ b/common/buildcraft/energy/render/EntityDropParticleFX.java @@ -3,6 +3,7 @@ package buildcraft.energy.render; import net.minecraft.client.particle.*; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -80,10 +81,16 @@ public class EntityDropParticleFX extends EntityFX { this.motionZ *= 0.699999988079071D; } - Material material = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)).getMaterial(); + int x = MathHelper.floor_double(this.posX); + int y = MathHelper.floor_double(this.posY); + int z = MathHelper.floor_double(this.posZ); + Block block = worldObj.getBlock(x, y, z); + + Material material = block.getMaterial(); if (material.isLiquid() || material.isSolid()) { - double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - BlockFluidBase.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))); + double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - ((BlockFluidBase) block) + .getFilledPercentage(worldObj, x, y, z)); if (this.posY < d0) { this.setDead(); diff --git a/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java b/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java index 170c50f7..82a46c89 100644 --- a/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java +++ b/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java @@ -1,5 +1,6 @@ package buildcraft.energy.worldgen; +import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenDesert; import net.minecraftforge.common.BiomeDictionary; @@ -9,6 +10,8 @@ import net.minecraftforge.common.BiomeDictionary; */ public class BiomeGenOilDesert extends BiomeGenDesert { + protected static final BiomeGenBase.Height height_OilDesert = new BiomeGenBase.Height(0.1F, 0.2F); + public static BiomeGenOilDesert makeBiome(int id) { BiomeGenOilDesert biome = new BiomeGenOilDesert(id); BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); @@ -23,6 +26,6 @@ public class BiomeGenOilDesert extends BiomeGenDesert { setBiomeName("Desert Oil Field"); setDisableRain(); setTemperatureRainfall(2.0F, 0.0F); - setMinMaxHeight(0.1F, 0.2F); + setHeight(height_OilDesert); } } diff --git a/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java b/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java index 963a4108..7d8b48f8 100644 --- a/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java +++ b/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java @@ -1,5 +1,6 @@ package buildcraft.energy.worldgen; +import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.common.BiomeDictionary; @@ -9,6 +10,8 @@ import net.minecraftforge.common.BiomeDictionary; */ public class BiomeGenOilOcean extends BiomeGenOcean { + protected static final BiomeGenBase.Height height_OilOcean = new BiomeGenBase.Height(0.1F, 0.2F); + public static BiomeGenOilOcean makeBiome(int id) { BiomeGenOilOcean biome = new BiomeGenOilOcean(id); BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.WATER); @@ -21,6 +24,6 @@ public class BiomeGenOilOcean extends BiomeGenOcean { super(id); setBiomeName("Ocean Oil Field"); setColor(112); - setMinMaxHeight(-1.0F, 0.4F); + setHeight(height_Oceans); } } diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 40662598..52c12eee 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -33,6 +33,7 @@ import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType import net.minecraftforge.event.terraingen.TerrainGen; import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.common.util.EnumHelper; public class OilPopulate { @@ -279,15 +280,17 @@ public class OilPopulate { return true; } - if (block.isGenMineableReplaceable(world, x, y, z, Blocks.stone)) { - return true; - } + // TODO: The code below doesn't seem to have been replaced by something + // in 1.7.2 - to update or remove. + //if (block.isGenMineableReplaceable(world, x, y, z, Blocks.stone)) { + // return true; + //} if (block instanceof BlockFlower) { return true; } - if (!world.isBlockOpaqueCube(x, y, z)) { + if (!block.isOpaqueCube()) { return true; } diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index cd66d308..33125b5d 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -37,7 +37,9 @@ public class BlockMiningWell extends BlockBuildCraft { setHardness(5F); setResistance(10F); - setStepSound(soundStoneFootstep); + + // TODO: set proper sound + //setStepSound(soundStoneFootstep); } @Override diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index cc260ba3..6867dcda 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -43,7 +43,8 @@ public class BlockQuarry extends BlockBuildCraft { setHardness(10F); setResistance(10F); - setStepSound(soundAnvilFootstep); + // TODO: set proper sound + //setStepSound(soundAnvilFootstep); } @Override @@ -197,12 +198,6 @@ public class BlockQuarry extends BlockBuildCraft { return false; } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); - } - @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 72722496..61f08438 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -7,6 +7,8 @@ */ package buildcraft.factory; +import com.mojang.authlib.GameProfile; + import buildcraft.core.TileBuildCraft; import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.InventoryConcatenator; @@ -62,7 +64,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory private final class InternalPlayer extends EntityPlayer { public InternalPlayer() { - super(TileAutoWorkbench.this.worldObj, "[BuildCraft]"); + super(TileAutoWorkbench.this.worldObj, new GameProfile(null, "[BuildCraft]")); posX = TileAutoWorkbench.this.xCoord; posY = TileAutoWorkbench.this.yCoord + 1; posZ = TileAutoWorkbench.this.zCoord; @@ -278,11 +280,6 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory public void closeInventory() { } - @Override - public boolean isInvNameLocalized() { - return false; - } - @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { if (slot == SLOT_RESULT) diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 106f8950..3fec53a2 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -12,11 +12,14 @@ import java.util.List; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.ChatComponentText; import net.minecraft.world.ChunkCoordIntPair; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; @@ -429,7 +432,8 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } } - worldObj.playAuxSFXAtEntity(null, 2001, i, j, k, blockId + (worldObj.getBlockMetadata(i, j, k) << 12)); + // FIXME: fix sound here + //worldObj.playAuxSFXAtEntity(null, 2001, i, j, k, blockId + (worldObj.getBlockMetadata(i, j, k) << 12)); worldObj.setBlockToAir(i, j, k); } @@ -527,9 +531,11 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (chunkTicket == null) { isAlive = false; if (placedBy != null && CoreProxy.proxy.isSimulating(worldObj)) { - PacketDispatcher.sendPacketToPlayer( - new Packet3Chat(ChatMessageComponent.createFromText(String.format("[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", - xCoord, yCoord, zCoord))), (Player) placedBy); + ((EntityPlayerMP) placedBy) + .addChatMessage(new ChatComponentText( + String.format( + "[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", + xCoord, yCoord, zCoord))); } sendNetworkUpdate(BuildCraftFactory.instance); return; @@ -556,10 +562,14 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (xSize < 3 || zSize < 3 || ((xSize * zSize) >> 8) >= chunkTicket.getMaxChunkListDepth()) { if (placedBy != null) { - PacketDispatcher.sendPacketToPlayer( - new Packet3Chat(ChatMessageComponent.createFromText(String.format("Quarry size is outside of chunkloading bounds or too small %d %d (%d)", xSize, zSize, - chunkTicket.getMaxChunkListDepth()))), (Player) placedBy); + ((EntityPlayerMP) placedBy) + .addChatMessage(new ChatComponentText( + String.format( + "Quarry size is outside of chunkloading bounds or too small %d %d (%d)", + xSize, zSize, + chunkTicket.getMaxChunkListDepth()))); } + a = new DefaultAreaProvider(xCoord, yCoord, zCoord, xCoord + 10, yCoord + 4, zCoord + 10); useDefault = true; @@ -845,11 +855,15 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept chunks.add(chunk); } } + if (placedBy != null) { - PacketDispatcher.sendPacketToPlayer( - new Packet3Chat(ChatMessageComponent.createFromText(String.format("[BUILDCRAFT] The quarry at %d %d %d will keep %d chunks loaded", xCoord, yCoord, zCoord, chunks.size()))), - (Player) placedBy); + ((EntityPlayerMP) placedBy) + .addChatMessage(new ChatComponentText( + String.format( + "[BUILDCRAFT] The quarry at %d %d %d will keep %d chunks loaded", + xCoord, yCoord, zCoord, chunks.size()))); } + sendNetworkUpdate(BuildCraftFactory.instance); } diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index f0d37210..c73f1860 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -26,6 +26,7 @@ import buildcraft.core.utils.StringUtils; import buildcraft.core.utils.Utils; import com.google.common.collect.Lists; +import com.mojang.authlib.GameProfile; import java.util.Arrays; import java.util.EnumSet; @@ -140,7 +141,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn private final class InternalPlayer extends EntityPlayer { public InternalPlayer() { - super(TileAdvancedCraftingTable.this.getWorldObj(), "[BuildCraft]"); + super(TileAdvancedCraftingTable.this.getWorldObj(), new GameProfile(null, "[BuildCraft]")); posX = TileAdvancedCraftingTable.this.xCoord; posY = TileAdvancedCraftingTable.this.yCoord + 1; posZ = TileAdvancedCraftingTable.this.zCoord; @@ -441,12 +442,6 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn return action == BuildCraftCore.actionOn || action == BuildCraftCore.actionOff; } - @Override - public boolean isInvNameLocalized() { - // TODO Auto-generated method stub - return false; - } - @Override public int[] getAccessibleSlotsFromSide(int side) { return SLOTS; diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 67418952..13e5047b 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -305,11 +305,6 @@ public class TileAssemblyTable extends TileLaserTableBase implements IMachine, I return currentRecipe != null; } - @Override - public boolean isInvNameLocalized() { - return false; - } - @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 12099a01..e24906e5 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -45,7 +45,8 @@ public class ItemFacade extends ItemBuildCraft { setCreativeTab(CreativeTabBuildCraft.FACADES.get()); } - @Override + //TODO: how to control name of items? + /*@Override public String getItemDisplayName(ItemStack itemstack) { String name = super.getItemDisplayName(itemstack); Block decodedBlock = ItemFacade.getBlock(itemstack); @@ -60,7 +61,7 @@ public class ItemFacade extends ItemBuildCraft { name += " < BROKEN (" + decodedBlock.getLocalizedName() + ":" + decodedMeta + " )>"; } return name; - } + }*/ @Override public String getUnlocalizedName(ItemStack itemstack) { @@ -156,7 +157,7 @@ public class ItemFacade extends ItemBuildCraft { } @Override - public boolean shouldPassSneakingClickToBlock(World worldObj, int x, int y, int z) { + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { // Simply send shift click to the pipe / mod block. return true; } diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index 97dc656d..23b0e335 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -80,10 +80,13 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { if (BlockGenericPipe.placePipe(pipe, world, i, j, k, block, 0)) { block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack); - world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F, - block.stepSound.getPlaceSound(), - (block.stepSound.getVolume() + 1.0F) / 2.0F, - block.stepSound.getPitch() * 0.8F); + + // TODO: Fix sound + //world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F, + // block.stepSound.getPlaceSound(), + // (block.stepSound.getVolume() + 1.0F) / 2.0F, + // block.stepSound.getPitch() * 0.8F); + itemstack.stackSize--; } diff --git a/common/buildcraft/transport/ItemPlug.java b/common/buildcraft/transport/ItemPlug.java index 4557417e..5eaa493d 100644 --- a/common/buildcraft/transport/ItemPlug.java +++ b/common/buildcraft/transport/ItemPlug.java @@ -4,6 +4,7 @@ import buildcraft.core.ItemBuildCraft; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -44,7 +45,7 @@ public class ItemPlug extends ItemBuildCraft { // } @Override - public boolean shouldPassSneakingClickToBlock(World worldObj, int x, int y, int z ) { + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { return true; } diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index fefd7d7c..184c529b 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -424,7 +424,7 @@ public class PipeTransportItems extends PipeTransport { items.add(item); if (packet.forceStackRefresh() || item.getItemStack() == null) { - PacketDispatcher.sendPacketToServer(new PacketPipeTransportItemStackRequest(packet.getTravelingEntityId()).getPacket()); + BuildCraftTransport.instance.sendToServer(new PacketPipeTransportItemStackRequest(packet.getTravelingEntityId())); } item.setPosition(packet.getItemX(), packet.getItemY(), packet.getItemZ()); @@ -440,8 +440,7 @@ public class PipeTransportItems extends PipeTransport { private void sendTravelerPacket(TravelingItem data, boolean forceStackRefresh) { PacketPipeTransportTraveler packet = new PacketPipeTransportTraveler(data, forceStackRefresh); - int dimension = container.getWorldObj().provider.dimensionId; - PacketDispatcher.sendPacketToAllAround(container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST, dimension, packet.getPacket()); + BuildCraftTransport.instance.sendToPlayers(packet, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord, DefaultProps.PIPE_CONTENTS_RENDER_DIST); } public int getNumberOfStacks() { diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index bcca462d..aff37790 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -221,16 +221,18 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui if (provider != null) provider.update(); - if (sendClientUpdate) { + // TODO: pipe synchronization with 1.7.2 needs to be reviewed. + /*if (sendClientUpdate) { sendClientUpdate = false; if (worldObj instanceof WorldServer) { WorldServer world = (WorldServer) worldObj; PlayerInstance playerInstance = world.getPlayerManager().getOrCreateChunkWatcher(xCoord >> 4, zCoord >> 4, false); + if (playerInstance != null) { playerInstance.sendToAllPlayersWatchingChunk(getDescriptionPacket()); } } - } + }*/ } // PRECONDITION: worldObj must not be null @@ -389,6 +391,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui PacketTileState packet = new PacketTileState(this.xCoord, this.yCoord, this.zCoord); coreState.expansions.clear(); + if (pipe != null && pipe.gate != null) { coreState.gateMaterial = pipe.gate.material.ordinal(); coreState.gateLogic = pipe.gate.logic.ordinal(); @@ -405,9 +408,15 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui packet.addStateForSerialization((byte) 0, coreState); packet.addStateForSerialization((byte) 1, renderState); - if (pipe instanceof IClientState) + + if (pipe instanceof IClientState) { packet.addStateForSerialization((byte) 2, (IClientState) pipe); - return packet.getPacket(); + } + + // TODO: pipe synchronization with 1.7.2 needs to be reviewed. + //return packet.getPacket(); + + return null; } public void sendUpdateToClient() { @@ -713,8 +722,8 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } @Override - public boolean shouldRefresh(int oldID, int newID, int oldMeta, int newMeta, World world, int x, int y, int z) { - return oldID != newID; + public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) { + return oldBlock != newBlock; } @Override diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index ca566373..dd3f1873 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -104,7 +104,7 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { break; case PacketIds.PIPE_ITEMSTACK_REQUEST: { - // action will have happened already at read time + ((PacketPipeTransportItemStackRequest) packet).sendDataToPlayer((EntityPlayer) player); break; } } diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java index e0942379..1dc18992 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java @@ -1,5 +1,6 @@ package buildcraft.transport.network; +import buildcraft.BuildCraftTransport; import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.PacketIds; import buildcraft.transport.TravelingItem; @@ -9,15 +10,13 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; +import net.minecraft.entity.player.EntityPlayer; + public class PacketPipeTransportItemStackRequest extends BuildCraftPacket { public int travelerID; - public Player player; - - public PacketPipeTransportItemStackRequest(Player player) { - this.player = player; - } - + TravelingItem item; + public PacketPipeTransportItemStackRequest(int travelerID) { this.travelerID = travelerID; } @@ -31,12 +30,18 @@ public class PacketPipeTransportItemStackRequest extends BuildCraftPacket { public void readData(ByteBuf data) { travelerID = data.readShort(); TravelingItem.TravelingItemCache cache = TravelingItem.serverCache; - TravelingItem item = cache.get(travelerID); - if (item == null) - return; - PacketDispatcher.sendPacketToPlayer(new PacketPipeTransportItemStack(travelerID, item.getItemStack()).getPacket(), player); + item = cache.get(travelerID); } + public void sendDataToPlayer (EntityPlayer player) { + if (item != null) { + BuildCraftTransport.instance.sendToPlayer( + player, + new PacketPipeTransportItemStack(travelerID, item + .getItemStack())); + } + } + @Override public int getID() { return PacketIds.PIPE_ITEMSTACK_REQUEST; diff --git a/common/buildcraft/transport/pipes/PipePowerIron.java b/common/buildcraft/transport/pipes/PipePowerIron.java index c1913451..ee72aaa9 100644 --- a/common/buildcraft/transport/pipes/PipePowerIron.java +++ b/common/buildcraft/transport/pipes/PipePowerIron.java @@ -18,10 +18,13 @@ import buildcraft.transport.PipeTransportPower; import buildcraft.transport.triggers.ActionPowerLimiter; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; + import java.util.LinkedList; import java.util.Map; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; +import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.util.ForgeDirection; public class PipePowerIron extends Pipe { @@ -76,7 +79,9 @@ public class PipePowerIron extends Pipe { setMode(getMode().getNext()); } if (getWorld().isRemote) - player.addChatMessage(String.format(StringUtils.localize("chat.pipe.power.iron.mode"), getMode().maxPower)); + player.addChatMessage(new ChatComponentText(String.format( + StringUtils.localize("chat.pipe.power.iron.mode"), + getMode().maxPower))); ((IToolWrench) equipped).wrenchUsed(player, container.xCoord, container.yCoord, container.zCoord); return true; From 58ed5ee20c3930774d175bb42f5ee639cbe2b1ed Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 18:15:15 +0100 Subject: [PATCH 12/31] fixed biomes conflicts and forge version --- common/buildcraft/BuildCraftCore.java | 2 +- common/buildcraft/core/DefaultProps.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index aa51aae3..f1836f47 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -94,7 +94,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.7.2,1.8)", dependencies = "required-after:Forge@[9.11.1.953,)") +@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.7.2,1.8)", dependencies = "required-after:Forge@[10.12.0.1024,)") public class BuildCraftCore extends BuildCraftMod { public static enum RenderMode { Full, NoDynamic diff --git a/common/buildcraft/core/DefaultProps.java b/common/buildcraft/core/DefaultProps.java index 89f85f6d..e57eba9d 100644 --- a/common/buildcraft/core/DefaultProps.java +++ b/common/buildcraft/core/DefaultProps.java @@ -125,6 +125,6 @@ public class DefaultProps { public static final int FILLER_LIFESPAN_TOUGH = 20; public static final int FILLER_LIFESPAN_NORMAL = 6000; - public static int BIOME_OIL_OCEAN = 160; - public static int BIOME_OIL_DESERT = 161; + public static int BIOME_OIL_OCEAN = 215; + public static int BIOME_OIL_DESERT = 216; } From c516cc58624a6ce5f548f42ba201d5eea96f1054 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 19:03:13 +0100 Subject: [PATCH 13/31] fixed facade display and pipe initialization --- .../transport/BlockGenericPipe.java | 3 +- common/buildcraft/transport/ItemFacade.java | 63 +++++++++---------- .../transport/render/FacadeItemRenderer.java | 2 +- 3 files changed, 32 insertions(+), 36 deletions(-) diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 683979e2..d1cee79a 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -61,7 +61,6 @@ import net.minecraft.client.Minecraft; public class BlockGenericPipe extends BlockBuildCraft { static enum Part { - Pipe, Gate, Facade, @@ -965,7 +964,7 @@ public class BlockGenericPipe extends BlockBuildCraft { try { Class pipe = pipes.get(key); if (pipe != null) - return pipe.getConstructor(int.class).newInstance(key); + return pipe.getConstructor(Item.class).newInstance(key); else { BCLog.logger.warning("Detected pipe with unknown key (" + key + "). Did you remove a buildcraft addon?"); } diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index e24906e5..5c7df7f5 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -100,42 +101,38 @@ public class ItemFacade extends ItemBuildCraft { } public static void initialize() { - for (Field f : Block.class.getDeclaredFields()) { - if (Modifier.isStatic(f.getModifiers()) && Block.class.isAssignableFrom(f.getType())) { - Block b; - try { - b = (Block) f.get(null); - } catch (Exception e) { + for (Object o : Block.blockRegistry) { + Block b = (Block) o; + + if (!(b == Blocks.glass)) { + if (b == Blocks.bedrock + || b == Blocks.grass + || b == Blocks.leaves + || b == Blocks.sponge + || b == Blocks.chest + || b == Blocks.redstone_lamp + || b == Blocks.lit_redstone_lamp + || b == Blocks.lit_pumpkin) { continue; } - - if (!(b == Blocks.glass)) { - if (b == Blocks.bedrock - || b == Blocks.grass - || b == Blocks.leaves - || b == Blocks.sponge - || b == Blocks.chest - || b == Blocks.redstone_lamp - || b == Blocks.lit_redstone_lamp - || b == Blocks.lit_pumpkin) { - continue; - } - if (!b.isOpaqueCube() || b.hasTileEntity(0) || !b.renderAsNormalBlock()) { - continue; - } - } - ItemStack base = new ItemStack(b, 1); - if (base.getHasSubtypes()) { - Set names = Sets.newHashSet(); - for (int meta = 0; meta <= 15; meta++) { - ItemStack is = new ItemStack(b, 1, meta); - if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) && names.add(is.getUnlocalizedName())) { - ItemFacade.addFacade(is); - } - } - } else { - ItemFacade.addFacade(base); + + if (!b.isOpaqueCube() + || b.hasTileEntity(0) + || !b.renderAsNormalBlock() + || b.getRenderType() != 0) { + continue; } + } + + Item base = Item.getItemFromBlock(b); + + if (base != null) { + List stackList = new ArrayList (); + base.getSubItems(base, null, stackList); + + for (ItemStack s : stackList) { + ItemFacade.addFacade(s); + } } } } diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index f3b2b849..58e4de3e 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -20,7 +20,7 @@ public class FacadeItemRenderer implements IItemRenderer { private void renderFacadeItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { int decodedMeta = ItemFacade.getMetaData(item); - Block block = Block.getBlockFromItem(item.getItem()); + Block block = ItemFacade.getBlock(item); try { int color = item.getItem().getColorFromItemStack(new ItemStack(block, 1, decodedMeta), 0); From 976b6733da60db14249a039705e725b62ed68d6b Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 19:55:54 +0100 Subject: [PATCH 14/31] fixed setBlock calls to null --- common/buildcraft/builders/BlockMarker.java | 2 +- common/buildcraft/builders/TileBuilder.java | 2 +- common/buildcraft/builders/TileMarker.java | 4 ++-- common/buildcraft/core/utils/BlockUtil.java | 2 +- common/buildcraft/energy/BucketHandler.java | 13 +++++++------ common/buildcraft/energy/worldgen/OilPopulate.java | 2 +- common/buildcraft/factory/BlockFrame.java | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 35106e60..9c37a814 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -141,7 +141,7 @@ public class BlockMarker extends BlockContainer { int meta = world.getBlockMetadata(x, y, z); if (!canPlaceBlockOnSide(world, x, y, z, meta)) { dropBlockAsItem(world, x, y, z, 0, 0); - world.setBlock(x, y, z, null); + world.setBlockToAir(x, y, z); } } diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 038f2ce2..0ce0f28c 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -189,7 +189,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP path = ((TilePathMarker) tile).getPath(); for (BlockIndex b : path) { - worldObj.setBlock(b.x, b.y, b.z, null); + worldObj.setBlockToAir(b.x, b.y, b.z); BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, 0, 0); } diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 71df892a..d6502907 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -404,13 +404,13 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { for (TileWrapper m : o.vect.clone()) { if (m.isSet()) { - worldObj.setBlock(m.x, m.y, m.z, null); + worldObj.setBlockToAir(m.x, m.y, m.z); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, m.x, m.y, m.z, 0, 0); } } - worldObj.setBlock(o.vectO.x, o.vectO.y, o.vectO.z, null); + worldObj.setBlockToAir(o.vectO.x, o.vectO.y, o.vectO.z); BuildCraftBuilders.markerBlock.dropBlockAsItem(worldObj, o.vectO.x, o.vectO.y, o.vectO.z, 0, 0); } diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index a602dc8c..507d8475 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -82,7 +82,7 @@ public class BlockUtil { } } - world.setBlock(x, y, z, null); + world.setBlockToAir(x, y, z); } public static boolean isAnObstructingBlock(Block block, World world, int x, int y, int z) { diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index 9938428b..11490f18 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -14,6 +14,7 @@ import java.util.Map; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -31,26 +32,26 @@ public class BucketHandler { @SubscribeEvent public void onBucketFill(FillBucketEvent event) { - ItemStack result = fillCustomBucket(event.world, event.target); - if (result == null) + if (result == null) { return; + } event.result = result; event.setResult(Result.ALLOW); } private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); Item bucket = Item.getItemFromBlock(block); + if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { - world.setBlock(pos.blockX, pos.blockY, pos.blockZ, null); + world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); return new ItemStack(bucket); - } else + } else { return null; - + } } } diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 52c12eee..06c74fee 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -330,7 +330,7 @@ public class OilPopulate { return; } if (!world.isAirBlock(x, y + 1, z)) { - world.setBlock(x, y + 1, z, null, 0, update); + world.setBlock(x, y + 1, z, Blocks.air, 0, update); } for (int d = 1; d <= depth - 1; d++) { diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index 9ee0fd20..110d5d04 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -47,7 +47,7 @@ public class BlockFrame extends Block implements IFramePipeConnection { int meta = world.getBlockMetadata(i, j, k); if (meta == 1 && random.nextInt(10) > 5) { - world.setBlock(i, j, k, null); + world.setBlockToAir(i, j, k); } } From 4d1e73f9e7c6944253ecf2e428c25de4bb77ad1c Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 21:19:35 +0100 Subject: [PATCH 15/31] added discriminator for tile update --- common/buildcraft/core/network/BuildCraftChannelHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/buildcraft/core/network/BuildCraftChannelHandler.java b/common/buildcraft/core/network/BuildCraftChannelHandler.java index 9de015aa..235e0bc3 100755 --- a/common/buildcraft/core/network/BuildCraftChannelHandler.java +++ b/common/buildcraft/core/network/BuildCraftChannelHandler.java @@ -7,6 +7,7 @@ import io.netty.channel.ChannelHandlerContext; public class BuildCraftChannelHandler extends FMLIndexedMessageToMessageCodec { public BuildCraftChannelHandler() { + addDiscriminator(0, PacketTileUpdate.class); } @Override From 32e3d44e1336bed090605c6987fdf189617719d1 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 9 Feb 2014 21:29:23 +0100 Subject: [PATCH 16/31] added missing channel to energy mod --- common/buildcraft/BuildCraftEnergy.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 738ef46c..100e7333 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -33,6 +33,7 @@ import buildcraft.energy.worldgen.BiomeGenOilDesert; import buildcraft.energy.worldgen.BiomeGenOilOcean; import buildcraft.energy.worldgen.BiomeInitializer; import buildcraft.energy.worldgen.OilPopulate; +import buildcraft.transport.network.PacketHandlerTransport; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -207,7 +208,10 @@ public class BuildCraftEnergy extends BuildCraftMod { @EventHandler public void init(FMLInitializationEvent evt) { - NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); + channels = NetworkRegistry.INSTANCE.newChannel + (DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new PacketHandlerTransport()); + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); //new BptBlockEngine(engineBlock.blockID); From 944b9d693b895a18d24f15724bf988011f162074 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 10 Feb 2014 13:04:20 +0100 Subject: [PATCH 17/31] fixed get description packets --- common/buildcraft/BuildCraftCore.java | 3 ++ common/buildcraft/core/TileBuildCraft.java | 17 +++++--- .../core/network/PacketHandler.java | 13 +++--- .../buildcraft/core/network/PacketUpdate.java | 5 +-- common/buildcraft/core/utils/Utils.java | 24 +++++++++++ common/buildcraft/energy/TileEngine.java | 43 ++++++++++++------- 6 files changed, 75 insertions(+), 30 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index f1836f47..d51cd47d 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -109,7 +109,10 @@ public class BuildCraftCore extends BuildCraftMod { public static int updateFactor = 10; public static long longUpdateFactor = 40; public static BuildCraftConfiguration mainConfiguration; + + // TODO: This doesn't seem used anymore. Remove if it's the case. public static TreeMap bufferedDescriptions = new TreeMap(); + public static final int trackedPassiveEntityId = 156; public static boolean continuousCurrentModel; public static Block springBlock; diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index d65375a5..256b4586 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -19,16 +19,22 @@ import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.TilePacketWrapper; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.EmptyByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.buffer.UnpooledHeapByteBuf; import java.io.IOException; import java.util.HashMap; import java.util.Map; +import cpw.mods.fml.common.network.internal.FMLProxyPacket; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; +import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -100,11 +106,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized @Override public Packet getDescriptionPacket() { - // TODO: The description packet mechanism seems to have completely be replaced by other means, e.g. - // the update packet. If confirmed, remove the buffer packet mechanism in Utils as well, that is - // BuildCraftCore.bufferedDescriptions. - //return new PacketTileUpdate(this).getPacket(); - return null; + return Utils.toPacket(getUpdatePacket(), 0); } @Override @@ -126,8 +128,9 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized @Override public void handleUpdatePacket(PacketUpdate packet) throws IOException { - if (packet.payload instanceof PacketPayloadArrays) - updatePacket.fromPayload(this, (PacketPayloadArrays) packet.payload); + if (packet.payload instanceof PacketPayloadArrays) { + updatePacket.fromPayload(this, (PacketPayloadArrays) packet.payload); + } } @Override diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index bd28c82d..1c87336b 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -17,15 +17,18 @@ import cpw.mods.fml.common.network.NetworkRegistry; public class PacketHandler extends BuildCraftChannelHandler { private void onTileUpdate(EntityPlayer player, PacketTileUpdate packet) throws IOException { - World world = player.worldObj; - - if (!packet.targetExists(world)) + World world = player.worldObj; + + if (!packet.targetExists(world)) { return; + } TileEntity entity = packet.getTarget(world); - if (!(entity instanceof ISynchronizedTile)) + + if (!(entity instanceof ISynchronizedTile)) { return; - + } + ISynchronizedTile tile = (ISynchronizedTile) entity; tile.handleUpdatePacket(packet); tile.postPacketHandling(packet); diff --git a/common/buildcraft/core/network/PacketUpdate.java b/common/buildcraft/core/network/PacketUpdate.java index 9d9e3e1b..1010feff 100644 --- a/common/buildcraft/core/network/PacketUpdate.java +++ b/common/buildcraft/core/network/PacketUpdate.java @@ -38,7 +38,6 @@ public class PacketUpdate extends BuildCraftPacket { @Override public void writeData(ByteBuf data) { - data.writeInt(posX); data.writeInt(posY); data.writeInt(posZ); @@ -53,7 +52,6 @@ public class PacketUpdate extends BuildCraftPacket { @Override public void readData(ByteBuf data) { - posX = data.readInt(); posY = data.readInt(); posZ = data.readInt(); @@ -62,8 +60,9 @@ public class PacketUpdate extends BuildCraftPacket { payload = PacketPayload.makePayload(type); - if (payload != null) + if (payload != null) { payload.readData(data); + } } @Override diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 4dd99617..69f0423b 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -14,6 +14,7 @@ import buildcraft.api.core.Position; import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.IPipeTile.PipeType; import buildcraft.core.BlockIndex; +import buildcraft.core.DefaultProps; import buildcraft.core.EntityBlock; import buildcraft.core.IDropControlInventory; import buildcraft.core.IFramePipeConnection; @@ -21,11 +22,14 @@ import buildcraft.core.TileBuildCraft; import buildcraft.core.inventory.ITransactor; import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.Transactor; +import buildcraft.core.network.BuildCraftPacket; import buildcraft.core.network.ISynchronizedTile; +import buildcraft.core.network.PacketTileUpdate; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; import buildcraft.energy.TileEngine; import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -36,6 +40,7 @@ import java.util.Collections; import java.util.List; import java.util.Random; +import cpw.mods.fml.common.network.internal.FMLProxyPacket; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.inventory.IInventory; @@ -484,4 +489,23 @@ public class Utils { return ItemStack.loadItemStackFromNBT(nbt); } } + + /** + * This subprogram transforms a packet into a FML packet to be send in the + * minecraft default packet mechanism. This always use BC-CORE as a + * channel, and as a result, should use discriminators declared there. + * + * WARNING! The implementation of this subprogram relies on the internal + * behavior of #FMLIndexedMessageToMessageCodec (in particular the encode + * member). It is probably opening a maintenance issue and should be + * replaced eventually by some more solid mechanism. + */ + public static FMLProxyPacket toPacket (BuildCraftPacket packet, int discriminator) { + ByteBuf buf = Unpooled.buffer(); + + buf.writeByte((byte) discriminator); + packet.writeData(buf); + + return new FMLProxyPacket(buf, DefaultProps.NET_CHANNEL_NAME + "-CORE"); + } } diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 9436ee16..c2263bc5 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -41,10 +41,10 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto public static final ResourceLocation IRON_TEXTURE = new ResourceLocation(DefaultProps.TEXTURE_PATH_BLOCKS + "/base_iron.png"); public enum EnergyStage { - BLUE, GREEN, YELLOW, RED, OVERHEAT; public static final EnergyStage[] VALUES = values(); } + public static final float MIN_HEAT = 20; public static final float IDEAL_HEAT = 100; public static final float MAX_HEAT = 250; @@ -135,8 +135,10 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto } public float getPistonSpeed() { - if (CoreProxy.proxy.isSimulating(worldObj)) + if (CoreProxy.proxy.isSimulating(worldObj)) { return Math.max(0.16f * getHeatLevel(), 0.01f); + } + switch (getEnergyStage()) { case BLUE: return 0.02F; @@ -163,21 +165,26 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto progressPart = 0; progress = 0; } - } else if (this.isPumping) + } else if (this.isPumping) { progressPart = 1; + } return; } if (checkOrienation) { checkOrienation = false; - if (!isOrientationValid()) + + if (!isOrientationValid()) { switchOrientation(true); + } } - if (!isRedstonePowered) - if (energy > 1) + if (!isRedstonePowered) { + if (energy > 1) { energy--; + } + } updateHeatLevel(); getEnergyStage(); @@ -195,17 +202,20 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto progress = 0; progressPart = 0; } - } else if (isRedstonePowered && isActive()) - if (isPoweredTile(tile, orientation)) + } else if (isRedstonePowered && isActive()) { + if (isPoweredTile(tile, orientation)) { if (getPowerToExtract() > 0) { progressPart = 1; setPumping(true); - } else + } else { setPumping(false); - else + } + } else { setPumping(false); - else + } + } else { setPumping(false); + } // Uncomment for constant power // if (isRedstonePowered && isActive()) { @@ -318,12 +328,13 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto orientation = ForgeDirection.getOrientation(data.getInteger("orientation")); progress = data.getFloat("progress"); energy = data.getDouble("energy"); - heat = data.getFloat("heat"); + heat = data.getFloat("heat"); } @Override public void writeToNBT(NBTTagCompound data) { super.writeToNBT(data); + data.setInteger("orientation", orientation.ordinal()); data.setFloat("progress", progress); data.setDouble("energy", energy); @@ -456,11 +467,13 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto @Override public ConnectOverride overridePipeConnection(PipeType type, ForgeDirection with) { - if (type == PipeType.POWER) + if (type == PipeType.POWER) { return ConnectOverride.DEFAULT; - if (with == orientation) + } else if (with == orientation) { return ConnectOverride.DISCONNECT; - return ConnectOverride.DEFAULT; + } else { + return ConnectOverride.DEFAULT; + } } @Override From f10e728b59535f875e2469d401b89321e97f1630 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 10 Feb 2014 15:16:32 +0100 Subject: [PATCH 18/31] fixed pipe state synchronization --- .../network/BuildCraftChannelHandler.java | 1 + .../core/network/PacketHandler.java | 4 +- .../transport/BlockGenericPipe.java | 7 +- .../buildcraft/transport/PipeRenderState.java | 12 ++- .../buildcraft/transport/TileGenericPipe.java | 95 +++++++++++++------ .../transport/render/FacadeRenderHelper.java | 1 + .../transport/render/PipeRendererTESR.java | 12 ++- .../transport/render/PipeRendererWorld.java | 15 +-- .../transport/utils/FacadeMatrix.java | 15 ++- 9 files changed, 116 insertions(+), 46 deletions(-) diff --git a/common/buildcraft/core/network/BuildCraftChannelHandler.java b/common/buildcraft/core/network/BuildCraftChannelHandler.java index 235e0bc3..f9a83e60 100755 --- a/common/buildcraft/core/network/BuildCraftChannelHandler.java +++ b/common/buildcraft/core/network/BuildCraftChannelHandler.java @@ -8,6 +8,7 @@ public class BuildCraftChannelHandler extends FMLIndexedMessageToMessageCodec> 4, zCoord >> 4, false); + BuildCraftPacket updatePacket = getBCDescriptionPacket(); - if (playerInstance != null) { - playerInstance.sendToAllPlayersWatchingChunk(getDescriptionPacket()); - } + for (Object o : world.playerEntities) { + EntityPlayerMP player = (EntityPlayerMP) o; + + if (world.getPlayerManager().isPlayerWatchingChunk (player, xCoord >> 4, zCoord >> 4)) { + BuildCraftCore.instance.sendToPlayer(player, updatePacket); + } + } } - }*/ + } } // PRECONDITION: worldObj must not be null @@ -251,9 +279,11 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui // WireState for (PipeWire color : PipeWire.values()) { renderState.wireMatrix.setWire(color, pipe.wireSet[color.ordinal()]); + for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { renderState.wireMatrix.setWireConnected(color, direction, pipe.isWireConnectedTo(this.getTile(direction), color)); } + boolean lit = pipe.signalStrength[color.ordinal()] > 0; switch (color) { @@ -383,10 +413,10 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui return pipe.transport.getPipeType(); return null; } - + /* SMP */ - @Override - public Packet getDescriptionPacket() { + + public BuildCraftPacket getBCDescriptionPacket() { bindPipe(); PacketTileState packet = new PacketTileState(this.xCoord, this.yCoord, this.zCoord); @@ -413,10 +443,12 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui packet.addStateForSerialization((byte) 2, (IClientState) pipe); } - // TODO: pipe synchronization with 1.7.2 needs to be reviewed. - //return packet.getPacket(); - - return null; + return packet; + } + + @Override + public Packet getDescriptionPacket() { + return Utils.toPacket(getBCDescriptionPacket(), 1); } public void sendUpdateToClient() { @@ -437,7 +469,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui @Override public void blockRemoved(ForgeDirection from) { - // TODO Auto-generated method stub + } public TileBuffer[] getTileCache() { @@ -604,18 +636,23 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } public boolean addFacade(ForgeDirection direction, Block block, int meta) { - if (this.getWorldObj().isRemote) + if (this.getWorldObj().isRemote) { return false; - if (this.facadeBlocks[direction.ordinal()] == block) + } + + if (this.facadeBlocks[direction.ordinal()] == block) { return false; + } - if (hasFacade(direction)) + if (hasFacade(direction)) { dropFacadeItem(direction); + } this.facadeBlocks[direction.ordinal()] = block; this.facadeMeta[direction.ordinal()] = meta; worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, getBlock()); scheduleRenderUpdate(); + return true; } diff --git a/common/buildcraft/transport/render/FacadeRenderHelper.java b/common/buildcraft/transport/render/FacadeRenderHelper.java index f46a43a2..daff89d7 100644 --- a/common/buildcraft/transport/render/FacadeRenderHelper.java +++ b/common/buildcraft/transport/render/FacadeRenderHelper.java @@ -94,6 +94,7 @@ public class FacadeRenderHelper { for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { Block renderBlock = state.facadeMatrix.getFacadeBlock(direction); + if (renderBlock != null) { int renderMeta = state.facadeMatrix.getFacadeMetaId(direction); diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index e5213c61..a552a198 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -255,14 +255,15 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { - - if (BuildCraftCore.render == RenderMode.NoDynamic) + if (BuildCraftCore.render == RenderMode.NoDynamic) { return; + } TileGenericPipe pipe = (TileGenericPipe) tileentity; - if (pipe.pipe == null) + if (pipe.pipe == null) { return; + } renderGatesWires(pipe, x, y, z); @@ -754,8 +755,9 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { public void doRenderItem(TravelingItem travellingItem, double x, double y, double z, float light, EnumColor color) { - if (travellingItem == null || travellingItem.getItemStack() == null) + if (travellingItem == null || travellingItem.getItemStack() == null) { return; + } float renderScale = 0.7f; ItemStack itemstack = travellingItem.getItemStack(); @@ -765,6 +767,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { GL11.glScalef(renderScale, renderScale, renderScale); dummyEntityItem.setEntityItemStack(itemstack); customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0); + if (color != null) { bindTexture(TextureMap.locationBlocksTexture); RenderInfo block = new RenderInfo(); @@ -788,6 +791,7 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { RenderUtils.setGLColorFromInt(color.getLightHex()); RenderEntityBlock.INSTANCE.renderBlock(block, null, 0, 0, 0, false, true); } + GL11.glPopMatrix(); } } diff --git a/common/buildcraft/transport/render/PipeRendererWorld.java b/common/buildcraft/transport/render/PipeRendererWorld.java index 820f2e85..ced74905 100644 --- a/common/buildcraft/transport/render/PipeRendererWorld.java +++ b/common/buildcraft/transport/render/PipeRendererWorld.java @@ -24,8 +24,10 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { public void renderPipe(RenderBlocks renderblocks, IBlockAccess iblockaccess, BlockGenericPipe block, TileGenericPipe tile, int x, int y, int z) { PipeRenderState state = tile.renderState; IIconProvider icons = tile.getPipeIcons(); - if (icons == null) + + if (icons == null) { return; + } int connectivity = state.pipeConnectionMatrix.getMask(); float[] dim = new float[6]; @@ -43,8 +45,10 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { for (int dir = 0; dir < 6; dir++) { int mask = 1 << dir; - if ((connectivity & mask) == 0) + + if ((connectivity & mask) == 0) { continue; // no connection towards dir + } // center piece offsets resetToCenterDimensions(dim); @@ -72,6 +76,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { for (int i = 0; i < 3; i++) { dim[i] = CoreConstants.PIPE_MIN_POS; } + for (int i = 3; i < 6; i++) { dim[i] = CoreConstants.PIPE_MAX_POS; } @@ -97,10 +102,9 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { } private void pipePlugRenderer(RenderBlocks renderblocks, Block block, PipeRenderState state, int x, int y, int z) { - float zFightOffset = 1F / 4096F; - float[][] zeroState = new float[3][2]; + // X START - END zeroState[0][0] = 0.25F + zFightOffset; zeroState[0][1] = 0.75F - zFightOffset; @@ -160,6 +164,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { TileGenericPipe pipeTile = (TileGenericPipe) tile; renderPipe(renderer, world, (BlockGenericPipe) block, pipeTile, x, y, z); } + return true; } @@ -172,6 +177,4 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler { public int getRenderId() { return TransportProxy.pipeModel; } - - } diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index a1b0f87e..387c1db8 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -44,7 +44,12 @@ public class FacadeMatrix { public void writeData(ByteBuf data) { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - data.writeShort(Block.blockRegistry.getIDForObject(_blocks[i])); + if (_blocks [i] == null) { + data.writeShort(0); + } else { + data.writeShort(Block.blockRegistry.getIDForObject(_blocks[i])); + } + data.writeByte(_blockMetas[i]); } } @@ -53,7 +58,13 @@ public class FacadeMatrix { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { short id = data.readShort(); - Block block = (Block) Block.blockRegistry.getObjectById(id); + Block block; + + if (id == 0) { + block = null; + } else { + block = (Block) Block.blockRegistry.getObjectById(id); + } if (_blocks[i] != block) { _blocks[i] = block; From f227dc2afcd4f15741566213ee6f02083137ef99 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 10 Feb 2014 16:05:05 +0100 Subject: [PATCH 19/31] fixed items traveling in pipes --- common/buildcraft/BuildCraftMod.java | 6 +++++- .../network/BuildCraftChannelHandler.java | 20 +++++++++++++++++++ .../transport/PipeTransportItems.java | 5 ++++- .../PacketPipeTransportItemStackRequest.java | 6 +++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java index a85162da..73874e92 100755 --- a/common/buildcraft/BuildCraftMod.java +++ b/common/buildcraft/BuildCraftMod.java @@ -30,10 +30,14 @@ public class BuildCraftMod { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(entityplayer); channels.get(Side.SERVER).writeOutbound(packet); } + + public void replyToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) { + channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.REPLY); + channels.get(Side.SERVER).writeOutbound(packet); + } public void sendToServer(BuildCraftPacket packet) { channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.TOSERVER); channels.get(Side.CLIENT).writeOutbound(packet); } - } \ No newline at end of file diff --git a/common/buildcraft/core/network/BuildCraftChannelHandler.java b/common/buildcraft/core/network/BuildCraftChannelHandler.java index f9a83e60..d1a7711a 100755 --- a/common/buildcraft/core/network/BuildCraftChannelHandler.java +++ b/common/buildcraft/core/network/BuildCraftChannelHandler.java @@ -1,5 +1,12 @@ package buildcraft.core.network; +import buildcraft.builders.network.PacketLibraryAction; +import buildcraft.transport.network.PacketFluidUpdate; +import buildcraft.transport.network.PacketGateExpansionMap; +import buildcraft.transport.network.PacketPipeTransportItemStack; +import buildcraft.transport.network.PacketPipeTransportItemStackRequest; +import buildcraft.transport.network.PacketPipeTransportTraveler; +import buildcraft.transport.network.PacketPowerUpdate; import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; @@ -9,6 +16,19 @@ public class BuildCraftChannelHandler extends FMLIndexedMessageToMessageCodec Date: Mon, 10 Feb 2014 18:06:44 +0100 Subject: [PATCH 20/31] fixed player in net handler and deprecated proxies --- common/buildcraft/BuildCraftMod.java | 5 - .../buildcraft/builders/BlockArchitect.java | 2 +- .../builders/BlockBlueprintLibrary.java | 4 +- common/buildcraft/builders/BlockBuilder.java | 2 +- common/buildcraft/builders/BlockFiller.java | 2 +- common/buildcraft/builders/ItemBptBase.java | 2 +- common/buildcraft/builders/TileArchitect.java | 4 +- .../builders/TileBlueprintLibrary.java | 6 +- common/buildcraft/builders/TileBuilder.java | 8 +- common/buildcraft/builders/TileFiller.java | 6 +- common/buildcraft/builders/TileMarker.java | 7 +- .../buildcraft/builders/TilePathMarker.java | 13 ++- .../network/PacketHandlerBuilders.java | 7 +- common/buildcraft/core/EntityLaser.java | 4 +- common/buildcraft/core/EntityRobot.java | 2 +- common/buildcraft/core/TileBuildCraft.java | 2 +- .../core/gui/GuiAdvancedInterface.java | 3 +- .../core/network/PacketHandler.java | 8 +- .../buildcraft/core/network/PacketUpdate.java | 2 + common/buildcraft/core/proxy/CoreProxy.java | 28 ++---- .../core/proxy/CoreProxyClient.java | 7 +- common/buildcraft/core/utils/Utils.java | 18 +++- common/buildcraft/energy/TileEngine.java | 11 ++- common/buildcraft/energy/TileEngineIron.java | 6 +- common/buildcraft/energy/TileEngineStone.java | 2 +- common/buildcraft/energy/TileEngineWood.java | 2 +- .../factory/BlockAutoWorkbench.java | 2 +- common/buildcraft/factory/BlockHopper.java | 2 +- common/buildcraft/factory/BlockQuarry.java | 4 +- .../buildcraft/factory/TileAutoWorkbench.java | 2 +- common/buildcraft/factory/TileFloodGate.java | 2 +- common/buildcraft/factory/TileHopper.java | 2 +- common/buildcraft/factory/TileQuarry.java | 10 +- common/buildcraft/factory/TileRefinery.java | 2 +- common/buildcraft/factory/TileTank.java | 2 +- .../factory/gui/ContainerAutoWorkbench.java | 2 +- .../factory/gui/ContainerRefinery.java | 2 +- .../factory/network/PacketHandlerFactory.java | 5 +- .../buildcraft/silicon/BlockLaserTable.java | 2 +- .../silicon/TileAdvancedCraftingTable.java | 4 +- common/buildcraft/silicon/TileLaser.java | 2 +- .../silicon/gui/GuiAssemblyTable.java | 7 +- .../silicon/network/PacketHandlerSilicon.java | 4 +- .../transport/BlockFilteredBuffer.java | 2 +- .../transport/BlockGenericPipe.java | 8 +- common/buildcraft/transport/Gate.java | 2 +- .../transport/PipeTransportFluids.java | 3 +- .../transport/PipeTransportPower.java | 3 +- .../buildcraft/transport/TileGenericPipe.java | 2 +- .../buildcraft/transport/TravelingItem.java | 2 +- .../transport/gui/ContainerGateInterface.java | 99 +++++++++++++------ .../transport/gui/GuiEmeraldPipe.java | 2 +- .../transport/gui/GuiGateInterface.java | 38 ++++--- .../network/PacketHandlerTransport.java | 23 ++--- .../PacketPipeTransportItemStackRequest.java | 2 +- .../transport/pipes/PipeItemsDiamond.java | 2 +- .../transport/pipes/PipeItemsEmerald.java | 2 +- .../transport/pipes/PipeItemsEmzuli.java | 2 +- .../transport/pipes/PipeItemsObsidian.java | 3 +- .../transport/pipes/PipeLogicWood.java | 4 +- 60 files changed, 237 insertions(+), 181 deletions(-) diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java index 73874e92..37474249 100755 --- a/common/buildcraft/BuildCraftMod.java +++ b/common/buildcraft/BuildCraftMod.java @@ -30,11 +30,6 @@ public class BuildCraftMod { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(entityplayer); channels.get(Side.SERVER).writeOutbound(packet); } - - public void replyToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) { - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.REPLY); - channels.get(Side.SERVER).writeOutbound(packet); - } public void sendToServer(BuildCraftPacket packet) { channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.TOSERVER); diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index 0cfa5775..cb2f3420 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -86,7 +86,7 @@ public class BlockArchitect extends BlockContainer { return true; } else { - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.ARCHITECT_TABLE, world, i, j, k); } return true; diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index 03f2eee8..dd78f65e 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -47,7 +47,7 @@ public class BlockBlueprintLibrary extends BlockContainer { TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); if (!tile.locked || entityplayer.getDisplayName().equals(tile.owner)) - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.BLUEPRINT_LIBRARY, world, i, j, k); } @@ -72,7 +72,7 @@ public class BlockBlueprintLibrary extends BlockContainer { @Override public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) { - if (CoreProxy.proxy.isSimulating(world) && entityliving instanceof EntityPlayer) { + if (!world.isRemote && entityliving instanceof EntityPlayer) { TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getTileEntity(i, j, k); tile.owner = ((EntityPlayer) entityliving).getDisplayName(); } diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index 41dd7365..b3a29888 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -97,7 +97,7 @@ public class BlockBuilder extends BlockContainer { return true; } else { - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.BUILDER, world, i, j, k); } return true; diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index 63ad1ea6..f38fe06e 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -52,7 +52,7 @@ public class BlockFiller extends BlockContainer { if (entityplayer.isSneaking()) return false; - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftBuilders.instance, GuiIds.FILLER, world, i, j, k); } return true; diff --git a/common/buildcraft/builders/ItemBptBase.java b/common/buildcraft/builders/ItemBptBase.java index 8d81ea6a..46a9b2b2 100644 --- a/common/buildcraft/builders/ItemBptBase.java +++ b/common/buildcraft/builders/ItemBptBase.java @@ -44,7 +44,7 @@ public abstract class ItemBptBase extends ItemBuildCraft { @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { - if (CoreProxy.proxy.isSimulating(world)) { + if (!world.isRemote) { BptBase bpt = BuildCraftBuilders.getBptRootIndex().getBluePrint(itemStack.getItemDamage()); if (bpt != null) return BuildCraftBuilders.getBptItemStack(itemStack.getItem(), itemStack.getItemDamage(), bpt.getName()); diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 5c8e2566..ac7c00d3 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -45,7 +45,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isSimulating(worldObj) && isComputing) { + if (!worldObj.isRemote && isComputing) { if (computingTime < 200) { computingTime++; } else { @@ -68,7 +68,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { } } - if (!CoreProxy.proxy.isRenderWorld(worldObj) && box.isInitialized()) { + if (!worldObj.isRemote && box.isInitialized()) { box.createLasers(worldObj, LaserKind.Stripes); } diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index f1239550..c8f7ac40 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -44,7 +44,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { @Override public void initialize() { super.initialize(); - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { setCurrentPage(getNextPage(null)); } } @@ -250,8 +250,10 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { @Override public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) + + if (worldObj.isRemote) { return; + } if (progressIn > 0 && progressIn < 100) { progressIn++; diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 0ce0f28c..1e705e62 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -177,8 +177,9 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP public void initialize() { super.initialize(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } for (int x = xCoord - 1; x <= xCoord + 1; ++x) { for (int y = yCoord - 1; y <= yCoord + 1; ++y) { @@ -264,8 +265,9 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP @Override public void doWork(PowerHandler workProvider) { - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } if (done) return; @@ -566,7 +568,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP box.deleteLasers(); box.reset(); - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { sendNetworkUpdate(BuildCraftBuilders.instance); } diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index 833bbd86..b6f07b97 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -74,7 +74,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece public void initialize() { super.initialize(); - if (!CoreProxy.proxy.isRenderWorld(worldObj)) { + if (!worldObj.isRemote) { IAreaProvider a = Utils.getNearbyAreaProvider(worldObj, xCoord, yCoord, zCoord); if (a != null) { @@ -84,7 +84,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece ((TileMarker) a).removeFromWorld(); } - if (!CoreProxy.proxy.isRenderWorld(worldObj) && box.isInitialized()) { + if (!worldObj.isRemote && box.isInitialized()) { box.createLasers(worldObj, LaserKind.Stripes); } sendNetworkUpdate(BuildCraftBuilders.instance); @@ -104,7 +104,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece @Override public void doWork(PowerHandler workProvider) { - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) return; if (done) return; diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index d6502907..6b365d56 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -91,7 +91,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { boolean showSignals = false; public void updateSignals() { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { showSignals = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); sendNetworkUpdate(BuildCraftBuilders.instance); } @@ -153,8 +153,9 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { } public void tryConnection() { - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } for (int j = 0; j < 3; ++j) { if (!origin.isSet() || !origin.vect[j].isSet()) { @@ -390,7 +391,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { signals = null; - if (CoreProxy.proxy.isSimulating(worldObj) && markerOrigin != null && markerOrigin != this) { + if (!worldObj.isRemote && markerOrigin != null && markerOrigin != this) { markerOrigin.sendNetworkUpdate(BuildCraftBuilders.instance); } } diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index dcf2e8bc..d00e01d1 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -55,8 +55,9 @@ public class TilePathMarker extends TileMarker { public void createLaserAndConnect(TilePathMarker pathMarker) { - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } EntityPowerLaser laser = new EntityPowerLaser(worldObj, new Position(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5), new Position(pathMarker.xCoord + 0.5, pathMarker.yCoord + 0.5, pathMarker.zCoord + 0.5)); @@ -97,8 +98,9 @@ public class TilePathMarker extends TileMarker { @Override public void tryConnection() { - if (CoreProxy.proxy.isRenderWorld(worldObj) || isFullyConnected()) + if (worldObj.isRemote || isFullyConnected()) { return; + } tryingToConnect = !tryingToConnect; // Allow the user to stop the path marker from searching for new path markers to connect sendNetworkUpdate(BuildCraftBuilders.instance); @@ -108,8 +110,9 @@ public class TilePathMarker extends TileMarker { public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } if (tryingToConnect) { TilePathMarker nearestPathMarker = findNearestAvailablePathMarker(); @@ -171,7 +174,7 @@ public class TilePathMarker extends TileMarker { public void initialize() { super.initialize(); - if (CoreProxy.proxy.isSimulating(worldObj) && !isFullyConnected()) { + if (!worldObj.isRemote && !isFullyConnected()) { availableMarkers.add(this); } @@ -207,7 +210,7 @@ public class TilePathMarker extends TileMarker { links[1] = null; } - if (!isFullyConnected() && !availableMarkers.contains(this) && CoreProxy.proxy.isSimulating(worldObj)) { + if (!isFullyConnected() && !availableMarkers.contains(this) && !worldObj.isRemote) { availableMarkers.add(this); } } diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index aa1d0cd4..857d5fd5 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -9,6 +9,7 @@ import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPayloadArrays; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import cpw.mods.fml.common.network.NetworkRegistry; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; @@ -27,10 +28,8 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { super.decodeInto(ctx, data, packet); try { - INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); - - EntityPlayer player = - CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + EntityPlayer player = Utils.getPlayerFromNetHandler(netHandler); int packetID = packet.getID(); diff --git a/common/buildcraft/core/EntityLaser.java b/common/buildcraft/core/EntityLaser.java index f0fc3260..c5a88532 100644 --- a/common/buildcraft/core/EntityLaser.java +++ b/common/buildcraft/core/EntityLaser.java @@ -68,12 +68,12 @@ public abstract class EntityLaser extends Entity { if (head == null || tail == null) return; - if (CoreProxy.proxy.isSimulating(worldObj) && needsUpdate) { + if (!worldObj.isRemote && needsUpdate) { updateDataServer(); needsUpdate = false; } - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { updateDataClient(); } diff --git a/common/buildcraft/core/EntityRobot.java b/common/buildcraft/core/EntityRobot.java index ca01412d..880cb562 100644 --- a/common/buildcraft/core/EntityRobot.java +++ b/common/buildcraft/core/EntityRobot.java @@ -210,7 +210,7 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { //System.out.printf("RobotChanging %d %d %d %s\n",target.x, target.y, target.z, target.mode); if (wait <= 0 && BlockUtil.canChangeBlock(worldObj, target.x, target.y, target.z)) { - if (!CoreProxy.proxy.isRenderWorld(worldObj)) { + if (!worldObj.isRemote) { if (target.mode == Mode.ClearIfInvalid) { diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 256b4586..5545aa33 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -99,7 +99,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized } public void sendNetworkUpdate(BuildCraftMod mod) { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { mod.sendToPlayers(getUpdatePacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE); } } diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 34656dc3..36164f34 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -49,8 +49,9 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft { } public void drawSprite(int cornerX, int cornerY) { - if (!isDefined()) + if (!isDefined()) { return; + } if (getItemStack() != null) { drawStack(getItemStack()); diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index 8eb67b67..59c831a7 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -8,8 +8,11 @@ import java.io.DataInputStream; import java.io.IOException; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.network.NetworkRegistry; @@ -39,11 +42,8 @@ public class PacketHandler extends BuildCraftChannelHandler { super.decodeInto(ctx, data, packet); try { - INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); - - EntityPlayer player = - CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + EntityPlayer player = Utils.getPlayerFromNetHandler(netHandler); int packetID = packet.getID(); diff --git a/common/buildcraft/core/network/PacketUpdate.java b/common/buildcraft/core/network/PacketUpdate.java index 1010feff..25ca15c4 100644 --- a/common/buildcraft/core/network/PacketUpdate.java +++ b/common/buildcraft/core/network/PacketUpdate.java @@ -38,6 +38,7 @@ public class PacketUpdate extends BuildCraftPacket { @Override public void writeData(ByteBuf data) { + data.writeByte(packetId); data.writeInt(posX); data.writeInt(posY); data.writeInt(posZ); @@ -52,6 +53,7 @@ public class PacketUpdate extends BuildCraftPacket { @Override public void readData(ByteBuf data) { + packetId = data.readByte(); posX = data.readInt(); posY = data.readInt(); posZ = data.readInt(); diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index 7d7e7153..df2ecbbd 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -32,8 +32,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.network.INetHandler; -import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; @@ -42,6 +40,12 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; + +/** + * This class comes from the old times where there were two Minecrafts + * codebases, one client and one server. We should slowly aim at removing it. + */ +@Deprecated public class CoreProxy { @SidedProxy(clientSide = "buildcraft.core.proxy.CoreProxyClient", serverSide = "buildcraft.core.proxy.CoreProxy") @@ -60,15 +64,6 @@ public class CoreProxy { return null; } - /* SIMULATION */ - public boolean isSimulating(World world) { - return !world.isRemote; - } - - public boolean isRenderWorld(World world) { - return world.isRemote; - } - public String getCurrentLanguage() { return null; } @@ -219,15 +214,4 @@ public class CoreProxy { public EntityBlock newEntityBlock(World world, double i, double j, double k, double iSize, double jSize, double kSize, LaserKind laserKind) { return new EntityBlock(world, i, j, k, iSize, jSize, kSize); } - - /** - * This function returns either the player from the handler if it's on the - * server, or directly from the minecraft instance if it's the client. - * - * TODO: This is a bit kludgy, probably better to separate the client and - * server channels instead. - */ - public EntityPlayer getPlayerFromNetHandler (INetHandler hander) { - return ((NetHandlerPlayServer) hander).playerEntity; - } } diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index df801110..03134c45 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -67,7 +67,7 @@ public class CoreProxyClient extends CoreProxy { public void removeEntity(Entity entity) { super.removeEntity(entity); - if (isRenderWorld(entity.worldObj)) { + if (entity.worldObj.isRemote) { ((WorldClient) entity.worldObj).removeEntityFromWorld(entity.getEntityId()); } } @@ -184,9 +184,4 @@ public class CoreProxyClient extends CoreProxy { } return eb; } - - @Override - public EntityPlayer getPlayerFromNetHandler (INetHandler hander) { - return Minecraft.getMinecraft().thePlayer; - } } diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 69f0423b..2f472f79 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -42,7 +42,9 @@ import java.util.Random; import cpw.mods.fml.common.network.internal.FMLProxyPacket; import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryLargeChest; import net.minecraft.item.ItemStack; @@ -60,6 +62,8 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagLong; import net.minecraft.nbt.NBTTagShort; import net.minecraft.nbt.NBTTagString; +import net.minecraft.network.INetHandler; +import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.MathHelper; @@ -334,7 +338,7 @@ public class Utils { public static void preDestroyBlock(World world, int i, int j, int k) { TileEntity tile = world.getTileEntity(i, j, k); - if (tile instanceof IInventory && !CoreProxy.proxy.isRenderWorld(world)) { + if (tile instanceof IInventory && !world.isRemote) { if (!(tile instanceof IDropControlInventory) || ((IDropControlInventory) tile).doDrop()) { InvUtils.dropItems(world, (IInventory) tile, i, j, k); InvUtils.wipeInventory((IInventory) tile); @@ -508,4 +512,16 @@ public class Utils { return new FMLProxyPacket(buf, DefaultProps.NET_CHANNEL_NAME + "-CORE"); } + + /** + * This function returns either the player from the handler if it's on the + * server, or directly from the minecraft instance if it's the client. + */ + public static EntityPlayer getPlayerFromNetHandler (INetHandler handler) { + if (handler instanceof NetHandlerPlayServer) { + return ((NetHandlerPlayServer) handler).playerEntity; + } else { + return Minecraft.getMinecraft().thePlayer; + } + } } diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index c2263bc5..9b8b2816 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -73,7 +73,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto @Override public void initialize() { - if (!CoreProxy.proxy.isRenderWorld(worldObj)) { + if (!worldObj.isRemote) { powerHandler.configure(minEnergyReceived(), maxEnergyReceived(), 1, getMaxEnergy()); checkRedstonePower(); } @@ -104,7 +104,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto } public final EnergyStage getEnergyStage() { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { if (energyStage == EnergyStage.OVERHEAT) return energyStage; EnergyStage newStage = computeEnergyStage(); @@ -135,7 +135,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto } public float getPistonSpeed() { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { return Math.max(0.16f * getHeatLevel(), 0.01f); } @@ -157,7 +157,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { if (progressPart != 0) { progress += getPistonSpeed(); @@ -381,8 +381,9 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto @Override public void doWork(PowerHandler workProvider) { - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) { return; + } addEnergy(powerHandler.useEnergy(1, maxEnergyReceived(), true) * 0.95F); } diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index e204418d..a29846d0 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -72,7 +72,7 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan } ItemStack current = player.getCurrentEquippedItem(); if (current != null) { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { if (FluidUtils.handleRightClick(this, side, player, true, true)) { return true; } @@ -83,7 +83,7 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan } } } - if (!CoreProxy.proxy.isRenderWorld(worldObj)) { + if (!worldObj.isRemote) { player.openGui(BuildCraftEnergy.instance, GuiIds.ENGINE_IRON, worldObj, xCoord, yCoord, zCoord); } return true; @@ -96,7 +96,7 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan @Override public float getPistonSpeed() { - if (CoreProxy.proxy.isSimulating(worldObj)) { + if (!worldObj.isRemote) { return Math.max(0.07f * getHeatLevel(), 0.01f); } switch (getEnergyStage()) { diff --git a/common/buildcraft/energy/TileEngineStone.java b/common/buildcraft/energy/TileEngineStone.java index 58303889..9e654075 100644 --- a/common/buildcraft/energy/TileEngineStone.java +++ b/common/buildcraft/energy/TileEngineStone.java @@ -43,7 +43,7 @@ public class TileEngineStone extends TileEngineWithInventory { @Override public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) { - if (!CoreProxy.proxy.isRenderWorld(worldObj)) { + if (!worldObj.isRemote) { player.openGui(BuildCraftEnergy.instance, GuiIds.ENGINE_STONE, worldObj, xCoord, yCoord, zCoord); } return true; diff --git a/common/buildcraft/energy/TileEngineWood.java b/common/buildcraft/energy/TileEngineWood.java index 6891ae8d..103b628a 100644 --- a/common/buildcraft/energy/TileEngineWood.java +++ b/common/buildcraft/energy/TileEngineWood.java @@ -52,7 +52,7 @@ public class TileEngineWood extends TileEngine { @Override public float getPistonSpeed() { - if (CoreProxy.proxy.isSimulating(worldObj)) + if (!worldObj.isRemote) return Math.max(0.08f * getHeatLevel(), 0.01f); switch (getEnergyStage()) { case GREEN: diff --git a/common/buildcraft/factory/BlockAutoWorkbench.java b/common/buildcraft/factory/BlockAutoWorkbench.java index 19ff1746..7a82f03c 100644 --- a/common/buildcraft/factory/BlockAutoWorkbench.java +++ b/common/buildcraft/factory/BlockAutoWorkbench.java @@ -56,7 +56,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft { return false; } - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftFactory.instance, GuiIds.AUTO_CRAFTING_TABLE, world, i, j, k); } diff --git a/common/buildcraft/factory/BlockHopper.java b/common/buildcraft/factory/BlockHopper.java index a7b6cfda..90514c9c 100644 --- a/common/buildcraft/factory/BlockHopper.java +++ b/common/buildcraft/factory/BlockHopper.java @@ -60,7 +60,7 @@ public class BlockHopper extends BlockBuildCraft { } } - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftFactory.instance, GuiIds.HOPPER, world, x, y, z); } diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index 6867dcda..b13bc0ed 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -135,9 +135,9 @@ public class BlockQuarry extends BlockBuildCraft { @Override public void breakBlock(World world, int i, int j, int k, Block block, int par6) { - - if (!CoreProxy.proxy.isSimulating(world)) + if (world.isRemote) { return; + } TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof TileQuarry) { diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 61f08438..7eb89a63 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -187,7 +187,7 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory @Override public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { return; } diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index fc29e601..1841048a 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -62,7 +62,7 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler { public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) + if (worldObj.isRemote) return; if (powered) diff --git a/common/buildcraft/factory/TileHopper.java b/common/buildcraft/factory/TileHopper.java index 2b3cd0f5..9fd30905 100644 --- a/common/buildcraft/factory/TileHopper.java +++ b/common/buildcraft/factory/TileHopper.java @@ -34,7 +34,7 @@ public class TileHopper extends TileBuildCraft implements IInventory { @Override public void updateEntity() { super.updateEntity(); - if (CoreProxy.proxy.isRenderWorld(worldObj) || worldObj.getTotalWorldTime() % 2 != 0) + if (worldObj.isRemote || worldObj.getTotalWorldTime() % 2 != 0) return; TileEntity tile = this.getWorldObj().getTileEntity(xCoord, yCoord - 1, zCoord); diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 3fec53a2..3375d61d 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -139,11 +139,11 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept @Override public void updateEntity() { - if (!isAlive && CoreProxy.proxy.isSimulating(worldObj)) { + if (!isAlive && !worldObj.isRemote) { super.updateEntity(); return; } - if (!CoreProxy.proxy.isSimulating(worldObj) && isAlive) { + if (!!worldObj.isRemote && isAlive) { super.updateEntity(); return; } @@ -158,7 +158,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } } - if (CoreProxy.proxy.isSimulating(worldObj) && inProcess) { + if (!worldObj.isRemote && inProcess) { sendNetworkUpdate(BuildCraftFactory.instance); } if (inProcess || !isDigging) @@ -530,7 +530,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } if (chunkTicket == null) { isAlive = false; - if (placedBy != null && CoreProxy.proxy.isSimulating(worldObj)) { + if (placedBy != null && !worldObj.isRemote) { ((EntityPlayerMP) placedBy) .addChatMessage(new ChatComponentText( String.format( @@ -673,7 +673,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept public void initialize() { super.initialize(); - if (CoreProxy.proxy.isSimulating(this.getWorldObj()) && !box.initialized) { + if (!this.getWorldObj().isRemote && !box.initialized) { setBoundaries(false); } diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index deced7de..396edefe 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -124,7 +124,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { simpleAnimationIterate(); return; } diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 4a004f2f..096ba5bd 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -45,7 +45,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { /* UPDATING */ @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { int lightValue = getFluidLightLevel(); if (prevLightValue != lightValue) { prevLightValue = lightValue; diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index 6cbd3dc6..10c52491 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -39,7 +39,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { @Override public void setInventorySlotContents(int slot, ItemStack stack) { super.setInventorySlotContents(slot, stack); - if (stack != null && tile.isLast() && CoreProxy.proxy.isRenderWorld(tile.getWorldObj())) { + if (stack != null && tile.isLast() && tile.getWorldObj().isRemote) { InvUtils.addItemToolTip(stack, EnumChatFormatting.YELLOW + StringUtils.localize("gui.clickcraft")); } } diff --git a/common/buildcraft/factory/gui/ContainerRefinery.java b/common/buildcraft/factory/gui/ContainerRefinery.java index b03634a5..efe6faa7 100644 --- a/common/buildcraft/factory/gui/ContainerRefinery.java +++ b/common/buildcraft/factory/gui/ContainerRefinery.java @@ -55,7 +55,7 @@ public class ContainerRefinery extends BuildCraftContainer { refinery.setFilter(slot, filter); - if (CoreProxy.proxy.isRenderWorld(refinery.getWorldObj())) { + if (refinery.getWorldObj().isRemote) { PacketPayloadStream payload = new PacketPayloadStream(new PacketPayloadStream.StreamWriter() { @Override public void writeData(ByteBuf data) { diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index eba22fc0..10e300f4 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -7,6 +7,7 @@ import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayloadStream; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import buildcraft.factory.TileRefinery; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; @@ -30,9 +31,7 @@ public class PacketHandlerFactory extends BuildCraftChannelHandler { try { INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); - - EntityPlayer player = - CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + EntityPlayer player = Utils.getPlayerFromNetHandler(netHandler); int packetID = packet.getID(); diff --git a/common/buildcraft/silicon/BlockLaserTable.java b/common/buildcraft/silicon/BlockLaserTable.java index 447f868b..7ef5bdb5 100644 --- a/common/buildcraft/silicon/BlockLaserTable.java +++ b/common/buildcraft/silicon/BlockLaserTable.java @@ -54,7 +54,7 @@ public class BlockLaserTable extends BlockContainer { if (entityplayer.isSneaking()) return false; - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { int meta = world.getBlockMetadata(i, j, k); entityplayer.openGui(BuildCraftSilicon.instance, meta, world, i, j, k); } diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index c73f1860..03089f29 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -242,7 +242,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn craftSlot = new SlotCrafting(internalPlayer, internalInventoryCrafting, craftResult, 0, 0, 0); updateRecipe(); } - if (!CoreProxy.proxy.isSimulating(worldObj)) + if (!!worldObj.isRemote) return; if (lastMode == ActionMachineControl.Mode.Off) return; @@ -369,7 +369,7 @@ public class TileAdvancedCraftingTable extends TileLaserTableBase implements IIn public void updateCraftingMatrix(int slot, ItemStack stack) { craftingSlots.setInventorySlotContents(slot, stack); updateRecipe(); - if (CoreProxy.proxy.isRenderWorld(worldObj)) { + if (worldObj.isRemote) { PacketSlotChange packet = new PacketSlotChange(PacketIds.ADVANCED_WORKBENCH_SETSLOT, xCoord, yCoord, zCoord, slot, stack); BuildCraftSilicon.instance.sendToServer(packet); } diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 636388a5..48c66049 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -59,7 +59,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction public void updateEntity() { super.updateEntity(); - if (!CoreProxy.proxy.isSimulating(worldObj)) + if (!!worldObj.isRemote) return; // If a gate disabled us, remove laser and do nothing. diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index 578f1d44..58f08d05 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -115,7 +115,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { updateRecipes(); // Request current selection from server - if (CoreProxy.proxy.isRenderWorld(assemblyTable.getWorldObj())) { + if (assemblyTable.getWorldObj().isRemote) { BuildCraftSilicon.instance.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord, assemblyTable.yCoord, assemblyTable.zCoord)); } @@ -197,14 +197,11 @@ public class GuiAssemblyTable extends GuiAdvancedInterface { message.stack = slot.recipe.output; - if (CoreProxy.proxy.isRenderWorld(table.getWorldObj())) { - + if (table.getWorldObj().isRemote) { PacketNBT packet = new PacketNBT(PacketIds.SELECTION_ASSEMBLY, message.getNBT(), table.xCoord, table.yCoord, table.zCoord); - BuildCraftSilicon.instance.sendToServer(packet); } } - } @Override diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index f1b14249..d5bb2baa 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -7,6 +7,7 @@ import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketNBT; import buildcraft.core.network.PacketSlotChange; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import buildcraft.silicon.TileAdvancedCraftingTable; import buildcraft.silicon.TileAssemblyTable; import buildcraft.silicon.TileAssemblyTable.SelectionMessage; @@ -33,8 +34,7 @@ public class PacketHandlerSilicon extends BuildCraftChannelHandler { try { INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); - EntityPlayer player = - CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + EntityPlayer player = Utils.getPlayerFromNetHandler(netHandler); int packetID = packet.getID(); diff --git a/common/buildcraft/transport/BlockFilteredBuffer.java b/common/buildcraft/transport/BlockFilteredBuffer.java index c8424961..638e2547 100644 --- a/common/buildcraft/transport/BlockFilteredBuffer.java +++ b/common/buildcraft/transport/BlockFilteredBuffer.java @@ -57,7 +57,7 @@ public class BlockFilteredBuffer extends BlockBuildCraft { } } - if (!CoreProxy.proxy.isRenderWorld(world)) { + if (!world.isRemote) { entityplayer.openGui(BuildCraftTransport.instance, GuiIds.FILTERED_BUFFER, world, x, y, z); } diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index e683aef8..fcce9722 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -514,7 +514,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @Override public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { - if (CoreProxy.proxy.isRenderWorld(world)) + if (world.isRemote) return null; ArrayList list = new ArrayList(); @@ -545,7 +545,7 @@ public class BlockGenericPipe extends BlockBuildCraft { @Override public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int dmg) { - if (CoreProxy.proxy.isRenderWorld(world)) + if (world.isRemote) return; int i1 = quantityDropped(world.rand); @@ -743,7 +743,7 @@ public class BlockGenericPipe extends BlockBuildCraft { private boolean stripGate(Pipe pipe) { if (pipe.hasGate()) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!pipe.container.getWorldObj().isRemote) { pipe.gate.dropGate(); } pipe.resetGate(); @@ -774,7 +774,7 @@ public class BlockGenericPipe extends BlockBuildCraft { private boolean stripWire(Pipe pipe, PipeWire color) { if (pipe.wireSet[color.ordinal()]) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!pipe.container.getWorldObj().isRemote) { dropWire(color, pipe); } pipe.wireSet[color.ordinal()] = false; diff --git a/common/buildcraft/transport/Gate.java b/common/buildcraft/transport/Gate.java index f6eaf3fc..808e6e10 100644 --- a/common/buildcraft/transport/Gate.java +++ b/common/buildcraft/transport/Gate.java @@ -147,7 +147,7 @@ public final class Gate { // GUI public void openGui(EntityPlayer player) { - if (!CoreProxy.proxy.isRenderWorld(player.worldObj)) { + if (!player.worldObj.isRemote) { player.openGui(BuildCraftTransport.instance, GuiIds.GATES, pipe.container.getWorldObj(), pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord); } } diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index c2154cfd..7b69a912 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -188,8 +188,9 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) + if (container.getWorldObj().isRemote) { return; + } moveFluids(); diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index e91cf4d7..b12a5532 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -134,8 +134,9 @@ public class PipeTransportPower extends PipeTransport { @Override public void updateEntity() { - if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) + if (container.getWorldObj().isRemote) { return; + } step(); diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index ab1618d5..e8614ba4 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -198,7 +198,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui public boolean initialized = false; @Override - public void updateEntity() { + public void updateEntity() { if (!worldObj.isRemote) { if (deletePipe) { worldObj.setBlockToAir(xCoord, yCoord, zCoord); diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index c8967104..b5e30428 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -192,7 +192,7 @@ public final class TravelingItem { } public EntityItem toEntityItem() { - if (container != null && !CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + if (container != null && !container.getWorldObj().isRemote) { if (getItemStack().stackSize <= 0) return null; diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index c6ad1c02..10276041 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -36,6 +36,7 @@ import java.util.NavigableSet; import java.util.TreeSet; import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; @@ -51,18 +52,21 @@ public class ContainerGateInterface extends BuildCraftContainer { IInventory playerIInventory; Pipe pipe; + private final NavigableSet _potentialTriggers = new TreeSet(new Comparator() { @Override public int compare(ITrigger o1, ITrigger o2) { return o1.getUniqueTag().compareTo(o2.getUniqueTag()); } }); + private final NavigableSet _potentialActions = new TreeSet(new Comparator() { @Override public int compare(IAction o1, IAction o2) { return o1.getUniqueTag().compareTo(o2.getUniqueTag()); } }); + private boolean isSynchronized = false; private boolean isNetInitialized = false; public boolean[] triggerState = new boolean[8]; @@ -70,6 +74,7 @@ public class ContainerGateInterface extends BuildCraftContainer { public ContainerGateInterface(IInventory playerInventory, Pipe pipe) { super(0); + this.playerIInventory = playerInventory; for (int y = 0; y < 3; y++) { @@ -86,7 +91,7 @@ public class ContainerGateInterface extends BuildCraftContainer { // Do not attempt to create a list of potential actions and triggers on // the client. - if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!pipe.container.getWorldObj().isRemote) { _potentialActions.addAll(pipe.getActions()); _potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe.container)); @@ -103,10 +108,13 @@ public class ContainerGateInterface extends BuildCraftContainer { if (!pipe.gate.material.hasParameterSlot) { Iterator it = _potentialTriggers.iterator(); + while (it.hasNext()) { ITrigger trigger = it.next(); - if (trigger.requiresParameter()) + + if (trigger.requiresParameter()) { it.remove(); + } } } } @@ -114,9 +122,11 @@ public class ContainerGateInterface extends BuildCraftContainer { @Override public boolean canInteractWith(EntityPlayer player) { - if (pipe == null || pipe.gate == null) + if (pipe == null || pipe.gate == null) { return false; - return true; + } else { + return true; + } } /** @@ -138,6 +148,7 @@ public class ContainerGateInterface extends BuildCraftContainer { public void updateActions(PacketUpdate packet) { _potentialActions.clear(); PacketPayloadArrays payload = (PacketPayloadArrays) packet.payload; + int length = payload.intPayload[0]; for (int i = 0; i < length; i++) { @@ -215,7 +226,12 @@ public class ContainerGateInterface extends BuildCraftContainer { } public void sendSelectionChange(int position) { - BuildCraftTransport.instance.sendToServer(new PacketUpdate(PacketIds.GATE_SELECTION_CHANGE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position))); + if (pipe.container.getWorld().isRemote) { + BuildCraftTransport.instance.sendToServer(new PacketUpdate( + PacketIds.GATE_SELECTION_CHANGE, pipe.container.xCoord, + pipe.container.yCoord, pipe.container.zCoord, + getSelectionPayload(position))); + } } /** @@ -223,13 +239,12 @@ public class ContainerGateInterface extends BuildCraftContainer { * (re-)requests the current selection on the gate if needed. */ public void synchronize() { - - if (!isNetInitialized && CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!isNetInitialized && pipe.container.getWorldObj().isRemote) { isNetInitialized = true; BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } - if (!isSynchronized && CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!isSynchronized && pipe.container.getWorldObj().isRemote) { isSynchronized = true; BuildCraftTransport.instance.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord)); } @@ -249,28 +264,36 @@ public class ContainerGateInterface extends BuildCraftContainer { * SERVER SIDE * */ private int calculateTriggerState() { - if (pipe.gate == null) + if (pipe.gate == null) { return 0; + } + int state = 0; + for (int i = 0; i < triggerState.length; i++) { if (pipe.gate.triggers[i] != null) { triggerState[i] = isNearbyTriggerActive(pipe.gate.triggers[i], pipe.gate.getTriggerParameter(i)); } + state |= triggerState[i] ? 0x01 << i : 0x0; } + return state; } @Override public void detectAndSendChanges() { super.detectAndSendChanges(); + int state = calculateTriggerState(); + if (state != lastTriggerState) { for (int i = 0; i < this.crafters.size(); i++) { ICrafting viewingPlayer = (ICrafting) this.crafters.get(i); viewingPlayer.sendProgressBarUpdate(this, 0 /* State update */, state); } + lastTriggerState = state; } } @@ -287,13 +310,15 @@ public class ContainerGateInterface extends BuildCraftContainer { * @param player */ private void sendActions(EntityPlayer player) { - // Compose update packet int length = _potentialActions.size(); + PacketPayloadArrays payload = new PacketPayloadArrays(1, 0, length); payload.intPayload[0] = length; + int i = 0; + for (IAction action : _potentialActions) { payload.stringPayload[i++] = action.getUniqueTag(); } @@ -310,7 +335,6 @@ public class ContainerGateInterface extends BuildCraftContainer { * @param player */ private void sendTriggers(EntityPlayer player) { - // Compose update packet int length = _potentialTriggers.size(); PacketPayloadArrays payload = new PacketPayloadArrays(1, 0, length); @@ -333,13 +357,13 @@ public class ContainerGateInterface extends BuildCraftContainer { * @param player */ public void sendSelection(EntityPlayer player) { - if (pipe == null || pipe.gate == null) + if (pipe == null || pipe.gate == null) { return; + } + for (int position = 0; position < pipe.gate.material.numSlots; position++) { BuildCraftTransport.instance.sendToPlayer(player, new PacketUpdate(PacketIds.GATE_SELECTION, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, getSelectionPayload(position))); } - - // System.out.println("Sending current selection to player"); } /** @@ -350,15 +374,19 @@ public class ContainerGateInterface extends BuildCraftContainer { } public ITrigger getFirstTrigger() { - if (_potentialTriggers.isEmpty()) + if (_potentialTriggers.isEmpty()) { return null; - return _potentialTriggers.first(); + } else { + return _potentialTriggers.first(); + } } public ITrigger getLastTrigger() { - if (_potentialTriggers.isEmpty()) + if (_potentialTriggers.isEmpty()) { return null; - return _potentialTriggers.last(); + } else { + return _potentialTriggers.last(); + } } public Iterator getTriggerIterator(boolean descending) { @@ -366,25 +394,33 @@ public class ContainerGateInterface extends BuildCraftContainer { } public boolean isNearbyTriggerActive(ITrigger trigger, ITriggerParameter parameter) { - if (pipe.gate == null) + if (pipe.gate == null) { return false; - return pipe.gate.isNearbyTriggerActive(trigger, parameter); + } else { + return pipe.gate.isNearbyTriggerActive(trigger, parameter); + } } public void setTrigger(int position, ITrigger trigger, boolean notify) { - if (pipe.gate == null) + if (pipe.gate == null) { return; + } + pipe.gate.setTrigger(position, trigger); - if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { + + if (pipe.container.getWorldObj().isRemote && notify) { sendSelectionChange(position); } } public void setTriggerParameter(int position, ITriggerParameter parameter, boolean notify) { - if (pipe.gate == null) + if (pipe.gate == null) { return; + } + pipe.gate.setTriggerParameter(position, parameter); - if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { + + if (pipe.container.getWorldObj().isRemote && notify) { sendSelectionChange(position); } } @@ -397,15 +433,19 @@ public class ContainerGateInterface extends BuildCraftContainer { } public IAction getFirstAction() { - if (_potentialActions.isEmpty()) + if (_potentialActions.isEmpty()) { return null; - return _potentialActions.first(); + } else { + return _potentialActions.first(); + } } public IAction getLastAction() { - if (_potentialActions.isEmpty()) + if (_potentialActions.isEmpty()) { return null; - return _potentialActions.last(); + } else { + return _potentialActions.last(); + } } public Iterator getActionIterator(boolean descending) { @@ -414,7 +454,8 @@ public class ContainerGateInterface extends BuildCraftContainer { public void setAction(int position, IAction action, boolean notify) { pipe.gate.setAction(position, action); - if (CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj()) && notify) { + + if (pipe.container.getWorldObj().isRemote && notify) { sendSelectionChange(position); } } diff --git a/common/buildcraft/transport/gui/GuiEmeraldPipe.java b/common/buildcraft/transport/gui/GuiEmeraldPipe.java index fb788657..baf26460 100644 --- a/common/buildcraft/transport/gui/GuiEmeraldPipe.java +++ b/common/buildcraft/transport/gui/GuiEmeraldPipe.java @@ -51,7 +51,7 @@ public class GuiEmeraldPipe extends GuiBuildCraft { @Override public void onGuiClosed() { - if (CoreProxy.proxy.isRenderWorld(pipe.getWorld())) { + if (pipe.getWorld().isRemote) { pipe.getStateController().setCurrentState(button.getController().getCurrentState()); PacketGuiReturn pkt = new PacketGuiReturn(pipe.getContainer()); pkt.sendPacket(); diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index fb8595b5..3f82d56e 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -46,20 +46,24 @@ public class GuiGateInterface extends GuiAdvancedInterface { @Override public String getDescription() { ITrigger trigger = pipe.gate.getTrigger(slot); - if (trigger != null) + + if (trigger != null) { return trigger.getDescription(); - else + } else { return ""; + } } @SideOnly(Side.CLIENT) @Override public IIcon getIcon() { ITrigger trigger = pipe.gate.getTrigger(slot); - if (trigger != null) + + if (trigger != null) { return trigger.getIcon(); - else + } else { return null; + } } @Override @@ -87,30 +91,37 @@ public class GuiGateInterface extends GuiAdvancedInterface { @Override public String getDescription() { IAction action = pipe.gate.getAction(slot); - if (action != null) + if (action != null) { return action.getDescription(); - else + } else { return ""; + } } @SideOnly(Side.CLIENT) @Override public IIcon getIcon() { IAction action = pipe.gate.getAction(slot); - if (action != null) + + if (action != null) { return action.getIcon(); - else + } else { return null; + } } @Override public ResourceLocation getTexture() { IAction action = pipe.gate.getAction(slot); + if (action instanceof BCAction) { BCAction bcAction = (BCAction) action; - if (bcAction.getTextureMap() == 0) + + if (bcAction.getTextureMap() == 0) { return TextureMap.locationBlocksTexture; + } } + return super.getTexture(); } @@ -144,10 +155,12 @@ public class GuiGateInterface extends GuiAdvancedInterface { @Override public ItemStack getItemStack() { ITriggerParameter parameter = pipe.gate.getTriggerParameter(slot); - if (parameter != null) + + if (parameter != null) { return parameter.getItemStack(); - else + } else { return null; + } } public ITriggerParameter getTriggerParameter() { @@ -290,8 +303,9 @@ public class GuiGateInterface extends GuiAdvancedInterface { AdvancedSlot slot = null; - if (position < 0) + if (position < 0) { return; + } slot = slots[position]; diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index dd3f1873..b4db6609 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -7,12 +7,14 @@ import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketSlotChange; import buildcraft.core.network.PacketUpdate; import buildcraft.core.proxy.CoreProxy; +import buildcraft.core.utils.Utils; import buildcraft.transport.PipeTransportItems; import buildcraft.transport.PipeTransportPower; import buildcraft.transport.TileGenericPipe; import buildcraft.transport.gui.ContainerGateInterface; import buildcraft.transport.pipes.PipeItemsDiamond; import buildcraft.transport.pipes.PipeItemsEmerald; +import cpw.mods.fml.common.network.FMLOutboundHandler; import cpw.mods.fml.common.network.NetworkRegistry; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; @@ -42,10 +44,8 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { public void decodeInto(ChannelHandlerContext ctx, ByteBuf data, BuildCraftPacket packet) { super.decodeInto(ctx, data, packet); try { - INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); - - EntityPlayer player = - CoreProxy.proxy.getPlayerFromNetHandler(netHandler); + INetHandler netHandler = ctx.channel().attr(NetworkRegistry.NET_HANDLER).get(); + EntityPlayer player = Utils.getPlayerFromNetHandler(netHandler); int packetID = packet.getID(); @@ -82,29 +82,29 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { * SERVER SIDE * */ case PacketIds.DIAMOND_PIPE_SELECT: { - onDiamondPipeSelect((EntityPlayer) player, (PacketSlotChange) packet); + onDiamondPipeSelect(player, (PacketSlotChange) packet); break; } case PacketIds.EMERALD_PIPE_SELECT: { - onEmeraldPipeSelect((EntityPlayer) player, (PacketSlotChange) packet); + onEmeraldPipeSelect(player, (PacketSlotChange) packet); break; } case PacketIds.GATE_REQUEST_INIT: - onGateInitRequest((EntityPlayer) player, (PacketCoordinates) packet); + onGateInitRequest(player, (PacketCoordinates) packet); break; case PacketIds.GATE_REQUEST_SELECTION: - onGateSelectionRequest((EntityPlayer) player, (PacketCoordinates) packet); + onGateSelectionRequest(player, (PacketCoordinates) packet); break; case PacketIds.GATE_SELECTION_CHANGE: - onGateSelectionChange((EntityPlayer) player, (PacketUpdate) packet); + onGateSelectionChange(player, (PacketUpdate) packet); break; case PacketIds.PIPE_ITEMSTACK_REQUEST: { - ((PacketPipeTransportItemStackRequest) packet).sendDataToPlayer((EntityPlayer) player); + ((PacketPipeTransportItemStackRequest) packet).sendDataToPlayer(player); break; } } @@ -216,8 +216,9 @@ public class PacketHandlerTransport extends BuildCraftChannelHandler { * @param packet */ private void onGateSelectionChange(EntityPlayer playerEntity, PacketUpdate packet) { - if (!(playerEntity.openContainer instanceof ContainerGateInterface)) + if (!(playerEntity.openContainer instanceof ContainerGateInterface)) { return; + } ((ContainerGateInterface) playerEntity.openContainer).setSelection(packet, true); } diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java index 917159fb..db0fff7e 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java @@ -39,7 +39,7 @@ public class PacketPipeTransportItemStackRequest extends BuildCraftPacket { public void sendDataToPlayer (EntityPlayer player) { if (item != null) { - BuildCraftTransport.instance.replyToPlayer( + BuildCraftTransport.instance.sendToPlayer( player, new PacketPipeTransportItemStack(travelerID, item .getItemStack())); diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index 830c1f32..c11dcf67 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -89,7 +89,7 @@ public class PipeItemsDiamond extends Pipe implements IClien if (Block.getBlockFromItem(entityplayer.getCurrentEquippedItem().getItem()) instanceof BlockGenericPipe) return false; - if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + if (!container.getWorldObj().isRemote) { entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_DIAMOND, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 94c8195d..5e017d61 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -96,7 +96,7 @@ public class PipeItemsEmerald extends PipeItemsWood implements IClientState, IGu return true; } - if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + if (!container.getWorldObj().isRemote) { entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_EMERALD_ITEM, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index bf23c38e..482a1dfe 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -71,7 +71,7 @@ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler return true; } - if (!CoreProxy.proxy.isRenderWorld(container.getWorldObj())) { + if (!container.getWorldObj().isRemote) { entityplayer.openGui(BuildCraftTransport.instance, GuiIds.PIPE_LOGEMERALD_ITEM, container.getWorldObj(), container.xCoord, container.yCoord, container.zCoord); } diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index b8cea000..0bca644f 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -192,8 +192,9 @@ public class PipeItemsObsidian extends Pipe implements IPowe } public void pullItemIntoPipe(Entity entity, int distance) { - if (CoreProxy.proxy.isRenderWorld(container.getWorldObj())) + if (container.getWorldObj().isRemote) { return; + } ForgeDirection orientation = getOpenOrientation().getOpposite(); diff --git a/common/buildcraft/transport/pipes/PipeLogicWood.java b/common/buildcraft/transport/pipes/PipeLogicWood.java index 192f5c54..b23f8e70 100644 --- a/common/buildcraft/transport/pipes/PipeLogicWood.java +++ b/common/buildcraft/transport/pipes/PipeLogicWood.java @@ -70,7 +70,7 @@ public abstract class PipeLogicWood { protected abstract boolean isValidConnectingTile(TileEntity tile); public void initialize() { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!pipe.container.getWorldObj().isRemote) { switchSourceIfNeeded(); } } @@ -87,7 +87,7 @@ public abstract class PipeLogicWood { } public void onNeighborBlockChange(int blockId) { - if (!CoreProxy.proxy.isRenderWorld(pipe.container.getWorldObj())) { + if (!pipe.container.getWorldObj().isRemote) { switchSourceIfNeeded(); } } From ef400b1d92f7e09a6b0066c52f2e555f74913a06 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 10 Feb 2014 18:24:27 +0100 Subject: [PATCH 21/31] fixed missing packet ids transmission --- common/buildcraft/core/network/PacketCoordinates.java | 8 ++------ common/buildcraft/core/network/PacketNBT.java | 2 -- .../buildcraft/transport/network/PacketPowerUpdate.java | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/common/buildcraft/core/network/PacketCoordinates.java b/common/buildcraft/core/network/PacketCoordinates.java index 3b9bb47f..045481ca 100644 --- a/common/buildcraft/core/network/PacketCoordinates.java +++ b/common/buildcraft/core/network/PacketCoordinates.java @@ -18,9 +18,7 @@ public class PacketCoordinates extends BuildCraftPacket { } public PacketCoordinates(int id, int x, int y, int z) { - this.id = id; - this.posX = x; this.posY = y; this.posZ = z; @@ -28,7 +26,7 @@ public class PacketCoordinates extends BuildCraftPacket { @Override public void writeData(ByteBuf data) { - + data.writeByte(id); data.writeInt(posX); data.writeInt(posY); data.writeInt(posZ); @@ -36,16 +34,14 @@ public class PacketCoordinates extends BuildCraftPacket { @Override public void readData(ByteBuf data) { - + id = data.readByte (); posX = data.readInt(); posY = data.readInt(); posZ = data.readInt(); - } @Override public int getID() { return id; } - } diff --git a/common/buildcraft/core/network/PacketNBT.java b/common/buildcraft/core/network/PacketNBT.java index fe735b8b..3c026a5f 100644 --- a/common/buildcraft/core/network/PacketNBT.java +++ b/common/buildcraft/core/network/PacketNBT.java @@ -23,7 +23,6 @@ public class PacketNBT extends PacketCoordinates { @Override public void writeData(ByteBuf data) { - super.writeData(data); try { @@ -38,7 +37,6 @@ public class PacketNBT extends PacketCoordinates { @Override public void readData(ByteBuf data) { - super.readData(data); short length = data.readShort(); diff --git a/common/buildcraft/transport/network/PacketPowerUpdate.java b/common/buildcraft/transport/network/PacketPowerUpdate.java index bb45d617..dd05e09a 100644 --- a/common/buildcraft/transport/network/PacketPowerUpdate.java +++ b/common/buildcraft/transport/network/PacketPowerUpdate.java @@ -21,9 +21,9 @@ public class PacketPowerUpdate extends PacketCoordinates { } @Override - public void readData(ByteBuf data) { - displayPower = new short[] { 0, 0, 0, 0, 0, 0 }; + public void readData(ByteBuf data) { super.readData(data); + displayPower = new short[] { 0, 0, 0, 0, 0, 0 }; overload = data.readBoolean(); for (int i = 0; i < displayPower.length; i++) { displayPower[i] = data.readByte(); From 9742bd69111635bcb838a22c2f6a493e79dbb97f Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Mon, 10 Feb 2014 21:49:48 +0100 Subject: [PATCH 22/31] fixed location of icons/triggers to get proper icon load --- common/buildcraft/BuildCraftTransport.java | 62 +++++++++---------- .../buildcraft/transport/gates/ItemGate.java | 1 - 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 0bd3bb6f..344e6fe1 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -332,6 +332,37 @@ public class BuildCraftTransport extends BuildCraftMod { filteredBufferBlock = new BlockFilteredBuffer(); CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock")); CoreProxy.proxy.addName(filteredBufferBlock, "Filtered Buffer"); + + for (PipeContents kind : PipeContents.values()) { + triggerPipe[kind.ordinal()] = new TriggerPipeContents(kind); + } + + for (PipeWire wire : PipeWire.values()) { + triggerPipeWireActive[wire.ordinal()] = new TriggerPipeSignal(true, wire); + triggerPipeWireInactive[wire.ordinal()] = new TriggerPipeSignal(false, wire); + actionPipeWire[wire.ordinal()] = new ActionSignalOutput(wire); + } + + for (Time time : TriggerClockTimer.Time.VALUES) { + triggerTimer[time.ordinal()] = new TriggerClockTimer(time); + } + + for (int level = 0; level < triggerRedstoneLevel.length; level++) { + triggerRedstoneLevel[level] = new TriggerRedstoneFaderInput(level + 1); + actionRedstoneLevel[level] = new ActionRedstoneFaderOutput(level + 1); + } + + for (EnumColor color : EnumColor.VALUES) { + actionPipeColor[color.ordinal()] = new ActionPipeColor(color); + } + + for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { + actionPipeDirection[direction.ordinal()] = new ActionPipeDirection(direction); + } + + for (PowerMode limit : PowerMode.VALUES) { + actionPowerLimiter[limit.ordinal()] = new ActionPowerLimiter(limit); + } } finally { BuildCraftCore.mainConfiguration.save(); } @@ -381,37 +412,6 @@ public class BuildCraftTransport extends BuildCraftMod { @EventHandler public void postInit(FMLPostInitializationEvent evt) { ItemFacade.initialize(); - - for (PipeContents kind : PipeContents.values()) { - triggerPipe[kind.ordinal()] = new TriggerPipeContents(kind); - } - - for (PipeWire wire : PipeWire.values()) { - triggerPipeWireActive[wire.ordinal()] = new TriggerPipeSignal(true, wire); - triggerPipeWireInactive[wire.ordinal()] = new TriggerPipeSignal(false, wire); - actionPipeWire[wire.ordinal()] = new ActionSignalOutput(wire); - } - - for (Time time : TriggerClockTimer.Time.VALUES) { - triggerTimer[time.ordinal()] = new TriggerClockTimer(time); - } - - for (int level = 0; level < triggerRedstoneLevel.length; level++) { - triggerRedstoneLevel[level] = new TriggerRedstoneFaderInput(level + 1); - actionRedstoneLevel[level] = new ActionRedstoneFaderOutput(level + 1); - } - - for (EnumColor color : EnumColor.VALUES) { - actionPipeColor[color.ordinal()] = new ActionPipeColor(color); - } - - for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { - actionPipeDirection[direction.ordinal()] = new ActionPipeDirection(direction); - } - - for (PowerMode limit : PowerMode.VALUES) { - actionPowerLimiter[limit.ordinal()] = new ActionPowerLimiter(limit); - } } public void loadRecipes() { diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index 5c576151..9d7e2058 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -193,7 +193,6 @@ public class ItemGate extends ItemBuildCraft { @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { - for (GateDefinition.GateMaterial material : GateDefinition.GateMaterial.VALUES) { material.registerItemIcon(iconRegister); } From 12ec799ea3c0a9e7f8e45d14e9d217fd25976654 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Tue, 11 Feb 2014 08:23:55 +0100 Subject: [PATCH 23/31] fixed calls to sendNetworkUpdate --- common/buildcraft/builders/TileArchitect.java | 4 +- .../builders/TileBlueprintLibrary.java | 2 +- common/buildcraft/builders/TileBuilder.java | 2 +- common/buildcraft/builders/TileFiller.java | 6 +-- common/buildcraft/builders/TileMarker.java | 6 +-- .../buildcraft/builders/TilePathMarker.java | 4 +- .../network/PacketHandlerBuilders.java | 4 +- common/buildcraft/core/TileBuildCraft.java | 5 +- common/buildcraft/energy/TileEngine.java | 54 ++++++++++++------- .../buildcraft/energy/TileEngineLegacy.java | 2 +- common/buildcraft/factory/TilePump.java | 6 +-- common/buildcraft/factory/TileQuarry.java | 8 +-- common/buildcraft/factory/TileRefinery.java | 2 +- common/buildcraft/factory/TileTank.java | 2 +- common/buildcraft/silicon/TileLaser.java | 6 +-- 15 files changed, 66 insertions(+), 47 deletions(-) diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index ac7c00d3..6181db0e 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -72,7 +72,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { box.createLasers(worldObj, LaserKind.Stripes); } - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } public void createBpt() { @@ -179,7 +179,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory { name += c; } } - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } @Override diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index c8f7ac40..08c2bf62 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -105,7 +105,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { for (int i = currentPage.size(); i < currentNames.length; i++) { currentNames[i] = ""; } - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } public ArrayList getCurrentPage() { diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 1e705e62..114a66d3 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -569,7 +569,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP box.reset(); if (!worldObj.isRemote) { - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } return; diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index b6f07b97..fea0de87 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -87,7 +87,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece if (!worldObj.isRemote && box.isInitialized()) { box.createLasers(worldObj, LaserKind.Stripes); } - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } } } @@ -139,7 +139,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece if (done) { patternIterator = null; - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } else if (powerHandler.getEnergyStored() >= POWER_USAGE) { doWork(workProvider); } @@ -239,7 +239,7 @@ public class TileFiller extends TileBuildCraft implements IInventory, IPowerRece currentPattern = pattern; patternIterator = null; done = false; - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } } diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 6b365d56..0a7ba375 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -93,7 +93,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { public void updateSignals() { if (!worldObj.isRemote) { showSignals = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } } @@ -163,7 +163,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { } } - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } void setVect(int n) { @@ -392,7 +392,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider { signals = null; if (!worldObj.isRemote && markerOrigin != null && markerOrigin != this) { - markerOrigin.sendNetworkUpdate(BuildCraftBuilders.instance); + markerOrigin.sendNetworkUpdate(); } } diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index d00e01d1..541b3118 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -103,7 +103,7 @@ public class TilePathMarker extends TileMarker { } tryingToConnect = !tryingToConnect; // Allow the user to stop the path marker from searching for new path markers to connect - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } @Override @@ -120,7 +120,7 @@ public class TilePathMarker extends TileMarker { if (nearestPathMarker != null) { createLaserAndConnect(nearestPathMarker); tryingToConnect = false; - sendNetworkUpdate(BuildCraftBuilders.instance); + sendNetworkUpdate(); } } } diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index 857d5fd5..78b150f1 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -67,7 +67,7 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { break; case TileBlueprintLibrary.COMMAND_LOCK_UPDATE: tbl.locked = !tbl.locked; - tbl.sendNetworkUpdate(BuildCraftBuilders.instance); + tbl.sendNetworkUpdate(); break; case TileBlueprintLibrary.COMMAND_NEXT: tbl.setCurrentPage(true); @@ -87,7 +87,7 @@ public class PacketHandlerBuilders extends BuildCraftChannelHandler { if (ySlot < tbl.getCurrentPage().size()) { tbl.selected = ySlot; } - tbl.sendNetworkUpdate(BuildCraftBuilders.instance); + tbl.sendNetworkUpdate(); } } diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 5545aa33..0f17c1e5 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -98,9 +98,10 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized public void destroy() { } - public void sendNetworkUpdate(BuildCraftMod mod) { + public void sendNetworkUpdate() { if (!worldObj.isRemote) { - mod.sendToPlayers(getUpdatePacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE); + BuildCraftCore.instance.sendToPlayers(getUpdatePacket(), worldObj, + xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE); } } diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 9b8b2816..30439bc1 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -111,7 +111,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto if (energyStage != newStage) { energyStage = newStage; - sendNetworkUpdate(BuildCraftEnergy.instance); + sendNetworkUpdate(); } } @@ -256,10 +256,11 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto protected void engineUpdate() { if (!isRedstonePowered) - if (energy >= 1) + if (energy >= 1) { energy -= 1; - else if (energy < 1) + } else if (energy < 1) { energy = 0; + } } public boolean isActive() { @@ -267,22 +268,26 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto } protected final void setPumping(boolean isActive) { - if (this.isPumping == isActive) + if (this.isPumping == isActive) { return; + } this.isPumping = isActive; - sendNetworkUpdate(BuildCraftEnergy.instance); + sendNetworkUpdate(); } public boolean isOrientationValid() { TileEntity tile = getTileBuffer(orientation).getTile(); + return isPoweredTile(tile, orientation); } public boolean switchOrientation(boolean preferPipe) { - if (preferPipe && switchOrientation_do(true)) + if (preferPipe && switchOrientation_do(true)) { return true; - return switchOrientation_do(false); + } else { + return switchOrientation_do(false); + } } private boolean switchOrientation_do(boolean pipesOnly) { @@ -299,12 +304,15 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto return true; } } + return false; } public TileBuffer getTileBuffer(ForgeDirection side) { - if (tileCache == null) + if (tileCache == null) { tileCache = TileBuffer.makeBuffer(worldObj, xCoord, yCoord, zCoord, false); + } + return tileCache[side.ordinal()]; } @@ -325,6 +333,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto @Override public void readFromNBT(NBTTagCompound data) { super.readFromNBT(data); + orientation = ForgeDirection.getOrientation(data.getInteger("orientation")); progress = data.getFloat("progress"); energy = data.getDouble("energy"); @@ -396,44 +405,53 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto worldObj.setBlockToAir(xCoord, yCoord, zCoord); } - if (energy > getMaxEnergy()) + if (energy > getMaxEnergy()) { energy = getMaxEnergy(); + } } public double extractEnergy(double min, double max, boolean doExtract) { - if (energy < min) + if (energy < min) { return 0; + } double actualMax; - if (max > maxEnergyExtracted()) + if (max > maxEnergyExtracted()) { actualMax = maxEnergyExtracted(); - else + } else { actualMax = max; + } - if (actualMax < min) + if (actualMax < min) { return 0; + } double extracted; if (energy >= actualMax) { extracted = actualMax; - if (doExtract) + + if (doExtract) { energy -= actualMax; + } } else { extracted = energy; - if (doExtract) + + if (doExtract) { energy = 0; + } } return extracted; } public boolean isPoweredTile(TileEntity tile, ForgeDirection side) { - if (tile instanceof IPowerReceptor) + if (tile instanceof IPowerReceptor) { return ((IPowerReceptor) tile).getPowerReceiver(side.getOpposite()) != null; - - return false; + } else { + return false; + } } public abstract double getMaxEnergy(); diff --git a/common/buildcraft/energy/TileEngineLegacy.java b/common/buildcraft/energy/TileEngineLegacy.java index 3e4ac358..5652902d 100644 --- a/common/buildcraft/energy/TileEngineLegacy.java +++ b/common/buildcraft/energy/TileEngineLegacy.java @@ -29,7 +29,7 @@ public class TileEngineLegacy extends TileEngine { TileEntity newTile = worldObj.getTileEntity(xCoord, yCoord, zCoord); if (newTile instanceof TileEngine) { newTile.readFromNBT(nbt); - sendNetworkUpdate(BuildCraftEnergy.instance); + sendNetworkUpdate(); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index ae59027c..153795c6 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -103,7 +103,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (tube.posY - aimY > 0.01) { tubeY = tube.posY - 0.01; setTubePosition(); - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); return; } @@ -152,7 +152,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (powered != p) { powered = p; if(!worldObj.isRemote) - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); } } @@ -194,7 +194,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor worldObj.spawnEntityInWorld(tube); if (!worldObj.isRemote) - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); } } diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 3375d61d..02559ddb 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -159,7 +159,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } if (!worldObj.isRemote && inProcess) { - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); } if (inProcess || !isDigging) return; @@ -537,7 +537,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept "[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", xCoord, yCoord, zCoord))); } - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); return; } chunkTicket.getModData().setInteger("quarryX", xCoord); @@ -679,7 +679,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept createUtilsIfNeeded(); - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); } public void reinitalize() { @@ -864,7 +864,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept xCoord, yCoord, zCoord, chunks.size()))); } - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); } @Override diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 396edefe..52257357 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -130,7 +130,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe } if (updateNetworkTime.markTimeIfDelay(worldObj, BuildCraftCore.updateFactor)) - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); isActive = false; diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 096ba5bd..4337b92a 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -60,7 +60,7 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { } if (hasUpdate && tracker.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) { - sendNetworkUpdate(BuildCraftFactory.instance); + sendNetworkUpdate(); hasUpdate = false; } } diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 48c66049..81923932 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -107,7 +107,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction onPowerSent(power); - sendNetworkUpdate(BuildCraftSilicon.instance); + sendNetworkUpdate(); } protected float getMaxPowerSent() { @@ -252,9 +252,9 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor, IAction } @Override - public void sendNetworkUpdate(BuildCraftMod mod) { + public void sendNetworkUpdate() { if (networkTracker.markTimeIfDelay(worldObj)) { - super.sendNetworkUpdate(mod); + super.sendNetworkUpdate(); } } From 3580d4b34aede68f50f8dcdd91b0f2f21a145ed6 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Tue, 11 Feb 2014 21:11:06 +0100 Subject: [PATCH 24/31] fixed quarry placement and various minors twearks --- common/buildcraft/BuildCraftEnergy.java | 8 +++-- common/buildcraft/api/core/StackWrapper.java | 8 +++-- common/buildcraft/energy/TileEngine.java | 2 +- common/buildcraft/factory/BlockTank.java | 24 ++++++++------- common/buildcraft/factory/TileQuarry.java | 31 +++++++++----------- 5 files changed, 38 insertions(+), 35 deletions(-) diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 100e7333..be7ea384 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -188,9 +188,11 @@ public class BuildCraftEnergy extends BuildCraftMod { FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket)); } - BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil); - BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel); - MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE); + // TODO: Are these still really necessary? If not, remove the + // BucketHandler class as well. + //BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil); + //BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel); + //MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE); BuildcraftRecipes.refinery.addRecipe(new FluidStack(fluidOil, 1), new FluidStack(fluidFuel, 1), 12, 1); diff --git a/common/buildcraft/api/core/StackWrapper.java b/common/buildcraft/api/core/StackWrapper.java index 3da94754..2cc81ab7 100644 --- a/common/buildcraft/api/core/StackWrapper.java +++ b/common/buildcraft/api/core/StackWrapper.java @@ -27,12 +27,14 @@ public class StackWrapper { public int hashCode() { int hash = 5; - // TODO: this may have a speed impact. To be checked. - hash = 67 * hash + Item.itemRegistry.getIDForObject(stack.getItem()); + hash = 67 * hash + stack.getItem().hashCode(); hash = 67 * hash + stack.getItemDamage(); - if (stack.stackTagCompound != null) + + if (stack.stackTagCompound != null) { hash = 67 * hash + stack.stackTagCompound.hashCode(); + } + return hash; } diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 30439bc1..632b1c7f 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -488,7 +488,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto public ConnectOverride overridePipeConnection(PipeType type, ForgeDirection with) { if (type == PipeType.POWER) { return ConnectOverride.DEFAULT; - } else if (with == orientation) { + } else if (with == orientation) { return ConnectOverride.DISCONNECT; } else { return ConnectOverride.DEFAULT; diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index 18fba0c0..ac9b38a7 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -51,10 +51,6 @@ public class BlockTank extends BlockContainer { return false; } - public boolean isACube() { - return false; - } - @Override public TileEntity createNewTileEntity(World world, int metadata) { return new TileTank(); @@ -80,19 +76,19 @@ public class BlockTank extends BlockContainer { case 1: return textureTop; default: - if (iblockaccess.getBlock(i, j - 1, k) == this) + if (iblockaccess.getBlock(i, j - 1, k) == this) { return textureStackedSide; - else + } else { return textureBottomSide; + } } } @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - + System.out.println ("ACTIVATED"); ItemStack current = entityplayer.inventory.getCurrentItem(); if (current != null) { - FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); TileTank tank = (TileTank) world.getTileEntity(i, j, k); @@ -109,8 +105,8 @@ public class BlockTank extends BlockContainer { // Handle empty containers } else { - FluidStack available = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid; + if (available != null) { ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current); @@ -129,7 +125,9 @@ public class BlockTank extends BlockContainer { entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled); } } + tank.drain(ForgeDirection.UNKNOWN, liquid.amount, true); + return true; } } @@ -141,9 +139,11 @@ public class BlockTank extends BlockContainer { @Override public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { - if (side <= 1) + if (side <= 1) { return world.getBlock(x, y, z) != this; - return super.shouldSideBeRendered(world, x, y, z, side); + } else { + return super.shouldSideBeRendered(world, x, y, z, side); + } } @Override @@ -157,10 +157,12 @@ public class BlockTank extends BlockContainer { @Override public int getLightValue(IBlockAccess world, int x, int y, int z) { TileEntity tile = world.getTileEntity(x, y, z); + if (tile instanceof TileTank) { TileTank tank = (TileTank) tile; return tank.getFluidLightLevel(); } + return super.getLightValue(world, x, y, z); } } diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 02559ddb..1bb68d4e 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -531,11 +531,10 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (chunkTicket == null) { isAlive = false; if (placedBy != null && !worldObj.isRemote) { - ((EntityPlayerMP) placedBy) - .addChatMessage(new ChatComponentText( - String.format( - "[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", - xCoord, yCoord, zCoord))); + placedBy.addChatMessage(new ChatComponentText( + String.format( + "[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available", + xCoord, yCoord, zCoord))); } sendNetworkUpdate(); return; @@ -561,13 +560,12 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept int zSize = a.zMax() - a.zMin() + 1; if (xSize < 3 || zSize < 3 || ((xSize * zSize) >> 8) >= chunkTicket.getMaxChunkListDepth()) { - if (placedBy != null) { - ((EntityPlayerMP) placedBy) - .addChatMessage(new ChatComponentText( - String.format( - "Quarry size is outside of chunkloading bounds or too small %d %d (%d)", - xSize, zSize, - chunkTicket.getMaxChunkListDepth()))); + if (placedBy != null) { + placedBy.addChatMessage(new ChatComponentText( + String.format( + "Quarry size is outside of chunkloading bounds or too small %d %d (%d)", + xSize, zSize, + chunkTicket.getMaxChunkListDepth()))); } a = new DefaultAreaProvider(xCoord, yCoord, zCoord, xCoord + 10, yCoord + 4, zCoord + 10); @@ -857,11 +855,10 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } if (placedBy != null) { - ((EntityPlayerMP) placedBy) - .addChatMessage(new ChatComponentText( - String.format( - "[BUILDCRAFT] The quarry at %d %d %d will keep %d chunks loaded", - xCoord, yCoord, zCoord, chunks.size()))); + placedBy.addChatMessage(new ChatComponentText( + String.format( + "[BUILDCRAFT] The quarry at %d %d %d will keep %d chunks loaded", + xCoord, yCoord, zCoord, chunks.size()))); } sendNetworkUpdate(); From ebbc8d214631aa3a80e78e4a5754a6538135cb33 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Tue, 11 Feb 2014 22:46:50 +0100 Subject: [PATCH 25/31] resurected minimum amount of blueprint for quarry frame --- .../buildcraft/api/blueprints/BptBlock.java | 20 ++++----- .../api/blueprints/BptSlotInfo.java | 4 +- .../api/bptblocks/BptBlockDelegate.java | 13 +++--- .../builders/TileBlueprintLibrary.java | 1 + common/buildcraft/core/EntityRobot.java | 14 +----- .../buildcraft/core/blueprints/BptBase.java | 6 +-- .../core/blueprints/BptBuilderBlueprint.java | 41 ++++++++++-------- .../core/blueprints/BptBuilderTemplate.java | 8 ++-- .../buildcraft/core/blueprints/BptSlot.java | 19 ++++++-- .../core/blueprints/BptTemplate.java | 8 ++-- common/buildcraft/factory/BlockTank.java | 2 +- common/buildcraft/factory/TileQuarry.java | 43 +++++++++++-------- 12 files changed, 99 insertions(+), 80 deletions(-) diff --git a/common/buildcraft/api/blueprints/BptBlock.java b/common/buildcraft/api/blueprints/BptBlock.java index 40e8bc40..220a9fab 100644 --- a/common/buildcraft/api/blueprints/BptBlock.java +++ b/common/buildcraft/api/blueprints/BptBlock.java @@ -57,7 +57,7 @@ public class BptBlock { * buildBlock. */ public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { - if (slot.blockId != 0) { + if (slot.block != null) { if (slot.storedRequirements.size() != 0) { requirements.addAll(slot.storedRequirements); } else { @@ -133,20 +133,20 @@ public class BptBlock { */ public void buildBlock(BptSlotInfo slot, IBptContext context) { // Meta needs to be specified twice, depending on the block behavior - //context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,3); + context.world().setBlock(slot.x, slot.y, slot.z, slot.block, slot.meta, 0); //context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,3); - /*if (Block.blocksList[slot.blockId] instanceof BlockContainer) { + if (slot.block instanceof BlockContainer) { TileEntity tile = context.world().getTileEntity(slot.x, slot.y, slot.z); - slot.cpt.setInteger("x", slot.x); - slot.cpt.setInteger("y", slot.y); - slot.cpt.setInteger("z", slot.z); + //slot.cpt.setInteger("x", slot.x); + //slot.cpt.setInteger("y", slot.y); + //slot.cpt.setInteger("z", slot.z); - if (tile != null) { - tile.readFromNBT(slot.cpt); - } - }*/ + //if (tile != null) { + // tile.readFromNBT(slot.cpt); + //} + } } /** diff --git a/common/buildcraft/api/blueprints/BptSlotInfo.java b/common/buildcraft/api/blueprints/BptSlotInfo.java index 5c76c905..727b135e 100644 --- a/common/buildcraft/api/blueprints/BptSlotInfo.java +++ b/common/buildcraft/api/blueprints/BptSlotInfo.java @@ -22,7 +22,7 @@ import net.minecraft.nbt.NBTTagCompound; @Deprecated public class BptSlotInfo { - public int blockId = 0; + public Block block = null; public int meta = 0; public int x; public int y; @@ -46,7 +46,7 @@ public class BptSlotInfo { obj.x = x; obj.y = y; obj.z = z; - obj.blockId = blockId; + obj.block = block; obj.meta = meta; obj.cpt = (NBTTagCompound) cpt.copy(); diff --git a/common/buildcraft/api/bptblocks/BptBlockDelegate.java b/common/buildcraft/api/bptblocks/BptBlockDelegate.java index bc7b9ccb..590f0997 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDelegate.java +++ b/common/buildcraft/api/bptblocks/BptBlockDelegate.java @@ -13,15 +13,18 @@ import buildcraft.api.blueprints.BlueprintManager; import buildcraft.api.blueprints.BptBlock; import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.IBptContext; + import java.util.LinkedList; + +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; @Deprecated public class BptBlockDelegate extends BptBlock { - final int delegateTo; + final Block delegateTo; - public BptBlockDelegate(int blockId, int delegateTo) { + public BptBlockDelegate(int blockId, Block delegateTo) { super(blockId); this.delegateTo = delegateTo; @@ -30,7 +33,7 @@ public class BptBlockDelegate extends BptBlock { @Override public void addRequirements(BptSlotInfo slot, IBptContext context, LinkedList requirements) { BptSlotInfo newSlot = slot.clone(); - slot.blockId = delegateTo; + slot.block = delegateTo; //if (BlueprintManager.blockBptProps[delegateTo] != null) { // BlueprintManager.blockBptProps[delegateTo].addRequirements(newSlot, context, requirements); @@ -42,7 +45,7 @@ public class BptBlockDelegate extends BptBlock { @Override public boolean isValid(BptSlotInfo slot, IBptContext context) { BptSlotInfo newSlot = slot.clone(); - slot.blockId = delegateTo; + slot.block = delegateTo; //if (BlueprintManager.blockBptProps[delegateTo] != null) // return BlueprintManager.blockBptProps[delegateTo].isValid(newSlot, context); @@ -55,7 +58,7 @@ public class BptBlockDelegate extends BptBlock { @Override public void rotateLeft(BptSlotInfo slot, IBptContext context) { BptSlotInfo newSlot = slot.clone(); - slot.blockId = delegateTo; + slot.block = delegateTo; //if (BlueprintManager.blockBptProps[delegateTo] != null) { // BlueprintManager.blockBptProps[delegateTo].rotateLeft(newSlot, context); diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index 08c2bf62..7c0de2f3 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -288,6 +288,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory { } else { setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(stack[2].getItem(), 0, null)); } + setInventorySlotContents(2, null); } } diff --git a/common/buildcraft/core/EntityRobot.java b/common/buildcraft/core/EntityRobot.java index 880cb562..b670f524 100644 --- a/common/buildcraft/core/EntityRobot.java +++ b/common/buildcraft/core/EntityRobot.java @@ -198,35 +198,28 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { } protected void build() { - updateWait(); if (targets.size() > 0) { - Action a = targets.getFirst(); + if (a.slot != null) { - BptSlot target = a.slot; //System.out.printf("RobotChanging %d %d %d %s\n",target.x, target.y, target.z, target.mode); + if (wait <= 0 && BlockUtil.canChangeBlock(worldObj, target.x, target.y, target.z)) { - if (!worldObj.isRemote) { - if (target.mode == Mode.ClearIfInvalid) { - if (!target.isValid(a.context)) { worldObj.setBlockToAir(target.x, target.y, target.z); } - } else if (target.stackToUse != null) { - worldObj.setBlockToAir(target.x, target.y, target.z); throw new RuntimeException("NOT IMPLEMENTED"); // target.stackToUse.getItem().onItemUse(target.stackToUse, // CoreProxy.getBuildCraftPlayer(worldObj), worldObj, target.x, target.y - 1, // target.z, 1); } else { - try { target.buildBlock(a.context); } catch (Throwable t) { @@ -239,7 +232,6 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { targets.pop(); } - } else if (a.builder != null) { a.builder.postProcessing(worldObj); targets.pop(); @@ -280,10 +272,8 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData { } public void scheduleContruction(BptSlot slot, BptContext context) { - if (slot != null) { targets.add(new Action(slot, context)); - } } diff --git a/common/buildcraft/core/blueprints/BptBase.java b/common/buildcraft/core/blueprints/BptBase.java index 4eec73ce..72cccde9 100644 --- a/common/buildcraft/core/blueprints/BptBase.java +++ b/common/buildcraft/core/blueprints/BptBase.java @@ -61,14 +61,14 @@ public abstract class BptBase { } public void setBlock(int x, int y, int z, Block block) { - /*if (contents[x][y][z] == null) { + if (contents[x][y][z] == null) { contents[x][y][z] = new BptSlot(); contents[x][y][z].x = x; contents[x][y][z].y = y; contents[x][y][z].z = z; } - contents[x][y][z].blockId = blockId;*/ + contents[x][y][z].block = block; } public void rotateLeft(BptContext context) { @@ -195,7 +195,7 @@ public abstract class BptBase { continue; } - if (contents[x][y][z].blockId != bpt.contents[x][y][z].blockId) + if (contents[x][y][z].block != bpt.contents[x][y][z].block) return false; } } diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index 3fbde9cb..d64faff7 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -13,15 +13,18 @@ import buildcraft.core.IBuilderInventory; import buildcraft.core.blueprints.BptSlot.Mode; import buildcraft.core.utils.BCLog; import buildcraft.core.utils.BlockUtil; + import java.util.Comparator; import java.util.LinkedList; import java.util.ListIterator; import java.util.TreeMap; import java.util.TreeSet; + import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import net.minecraft.world.WorldSettings.GameType; public class BptBuilderBlueprint extends BptBuilderBase { @@ -69,7 +72,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { } else { slot = new BptSlot(); slot.meta = 0; - slot.blockId = 0; + slot.block = null; } slot.x = xCoord; @@ -98,7 +101,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { } else { slot = new BptSlot(); slot.meta = 0; - slot.blockId = 0; + slot.block = null; } slot.x = xCoord; @@ -107,13 +110,13 @@ public class BptBuilderBlueprint extends BptBuilderBase { slot.mode = Mode.Build; - /*if (slot.blockId != 0 && Block.blocksList[slot.blockId].isOpaqueCube()) { + if (slot.block != null && slot.block.isOpaqueCube()) { primaryList.add(slot); } else { secondaryList.add(slot); - }*/ + } - if (slot.blockId != 0) { + if (slot.block != null) { postProcessingList.add(slot.clone()); } } @@ -139,30 +142,33 @@ public class BptBuilderBlueprint extends BptBuilderBase { BptSlot slot = internalGetNextBlock(world, inv, clearList); checkDone(); - if (slot != null) + if (slot != null) { return slot; - else + } else { return null; + } } if (primaryList.size() != 0) { BptSlot slot = internalGetNextBlock(world, inv, primaryList); checkDone(); - if (slot != null) + if (slot != null) { return slot; - else + } else { return null; + } } if (secondaryList.size() != 0) { BptSlot slot = internalGetNextBlock(world, inv, secondaryList); checkDone(); - if (slot != null) + if (slot != null) { return slot; - else + } else { return null; + } } checkDone(); @@ -189,13 +195,13 @@ public class BptBuilderBlueprint extends BptBuilderBase { getNext = false; } - /*if (getNext) + if (getNext) if (slot.mode == Mode.ClearIfInvalid) { if (!BlockUtil.isSoftBlock(world, slot.x, slot.y, slot.z)) { result = slot; break; } - } else if (world.getWorldInfo().getGameType() == EnumGameType.CREATIVE) { + } else if (world.getWorldInfo().getGameType() == GameType.CREATIVE) { // In creative, we don't use blocks given in the builder result = slot; @@ -208,8 +214,7 @@ public class BptBuilderBlueprint extends BptBuilderBase { break; } else { failSlots.add(slot); - } - */ + } } list.addAll(failSlots); @@ -218,8 +223,9 @@ public class BptBuilderBlueprint extends BptBuilderBase { } public boolean checkRequirements(IBuilderInventory inv, BptSlot slot) { - if (slot.blockId == 0) + if (slot.block == null) { return true; + } LinkedList tmpReq = new LinkedList(); LinkedList tmpInv = new LinkedList(); @@ -277,8 +283,9 @@ public class BptBuilderBlueprint extends BptBuilderBase { } public void useRequirements(IBuilderInventory inv, BptSlot slot) { - if (slot.blockId == 0) + if (slot.block == null) { return; + } LinkedList tmpReq = new LinkedList(); diff --git a/common/buildcraft/core/blueprints/BptBuilderTemplate.java b/common/buildcraft/core/blueprints/BptBuilderTemplate.java index a8104797..f2b35fd8 100644 --- a/common/buildcraft/core/blueprints/BptBuilderTemplate.java +++ b/common/buildcraft/core/blueprints/BptBuilderTemplate.java @@ -32,10 +32,10 @@ public class BptBuilderTemplate extends BptBuilderBase { BptSlot slot = bluePrint.contents[i][j][k]; - if (slot == null || slot.blockId == 0) { + if (slot == null || slot.block == null) { slot = new BptSlot(); slot.meta = 0; - slot.blockId = 0; + slot.block = null; slot.x = xCoord; slot.y = yCoord; slot.z = zCoord; @@ -62,7 +62,7 @@ public class BptBuilderTemplate extends BptBuilderBase { } else { slot = new BptSlot(); slot.meta = 0; - slot.blockId = 0; + slot.block = null; } slot.x = xCoord; @@ -71,7 +71,7 @@ public class BptBuilderTemplate extends BptBuilderBase { slot.mode = Mode.Build; - if (slot.blockId != 0) { + if (slot.block != null) { buildList.add(slot); } } diff --git a/common/buildcraft/core/blueprints/BptSlot.java b/common/buildcraft/core/blueprints/BptSlot.java index afbc9991..11e69b2a 100644 --- a/common/buildcraft/core/blueprints/BptSlot.java +++ b/common/buildcraft/core/blueprints/BptSlot.java @@ -3,7 +3,10 @@ package buildcraft.core.blueprints; import buildcraft.api.blueprints.BlueprintManager; import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.IBptContext; + import java.util.LinkedList; + +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -17,8 +20,14 @@ public class BptSlot extends BptSlotInfo { public ItemStack stackToUse; public boolean isValid(IBptContext context) { - //return BlueprintManager.blockBptProps[blockId].isValid(this, context); - return false; + // the following line is just to resurect quarry building + if (block == null && context.world().getBlock(x, y, z) == Blocks.air) { + return true; + } else { + return block == context.world().getBlock(x, y, z); + } + + //return BlueprintManager.blockBptProps[blockId].isValid(this, context); } public void rotateLeft(IBptContext context) { @@ -47,6 +56,10 @@ public class BptSlot extends BptSlotInfo { } public final void buildBlock(IBptContext context) { + // the following line is just to resurect quarry building + context.world().setBlock (x, y, z, block); + context.world().setBlockMetadataWithNotify(x, y, z, meta, 0); + //BlueprintManager.blockBptProps[blockId].buildBlock(this, context); } @@ -64,7 +77,7 @@ public class BptSlot extends BptSlotInfo { obj.x = x; obj.y = y; obj.z = z; - obj.blockId = blockId; + obj.block = block; obj.meta = meta; obj.cpt = (NBTTagCompound) cpt.copy(); obj.storedRequirements = (LinkedList) storedRequirements.clone(); diff --git a/common/buildcraft/core/blueprints/BptTemplate.java b/common/buildcraft/core/blueprints/BptTemplate.java index c4b54ee8..355a694e 100644 --- a/common/buildcraft/core/blueprints/BptTemplate.java +++ b/common/buildcraft/core/blueprints/BptTemplate.java @@ -28,7 +28,7 @@ public class BptTemplate extends BptBase { boolean first = true; - for (int x = 0; x < sizeX; ++x) { + /*for (int x = 0; x < sizeX; ++x) { for (int y = 0; y < sizeY; ++y) { for (int z = 0; z < sizeZ; ++z) { if (first) { @@ -40,7 +40,7 @@ public class BptTemplate extends BptBase { writer.write(contents[x][y][z].blockId + ""); } } - } + }*/ } @Override @@ -51,7 +51,7 @@ public class BptTemplate extends BptBase { String[] mask = val.split(","); int maskIndex = 0; - for (int x = 0; x < sizeX; ++x) { + /*for (int x = 0; x < sizeX; ++x) { for (int y = 0; y < sizeY; ++y) { for (int z = 0; z < sizeZ; ++z) { contents[x][y][z] = new BptSlot(); @@ -63,7 +63,7 @@ public class BptTemplate extends BptBase { maskIndex++; } } - } + }*/ } } diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index ac9b38a7..60bc0c2e 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -86,8 +86,8 @@ public class BlockTank extends BlockContainer { @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - System.out.println ("ACTIVATED"); ItemStack current = entityplayer.inventory.getCurrentItem(); + if (current != null) { FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 1bb68d4e..ba3568bc 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -143,11 +143,14 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept super.updateEntity(); return; } + if (!!worldObj.isRemote && isAlive) { super.updateEntity(); return; } + super.updateEntity(); + if (inProcess) { double energyToUse = 2 + powerHandler.getEnergyStored() / 500; @@ -161,23 +164,21 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (!worldObj.isRemote && inProcess) { sendNetworkUpdate(); } - if (inProcess || !isDigging) + + if (inProcess || !isDigging) { return; + } createUtilsIfNeeded(); if (bluePrintBuilder != null) { - builderDone = bluePrintBuilder.done; + if (!builderDone) { - buildFrame(); return; - } else { - if (builder != null && builder.done()) { - box.deleteLasers(); builder.setDead(); builder = null; @@ -188,7 +189,6 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (builder == null) { dig(); } - } @Override @@ -198,8 +198,10 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept protected void buildFrame() { float mj = 25 * BuildCraftFactory.miningMultiplier; powerHandler.configure(50 * BuildCraftFactory.miningMultiplier, 100 * BuildCraftFactory.miningMultiplier, mj, MAX_ENERGY * BuildCraftFactory.miningMultiplier); - if (powerHandler.useEnergy(mj, mj, true) != mj) + + if (powerHandler.useEnergy(mj, mj, true) != mj) { return; + } if (builder == null) { builder = new EntityRobot(worldObj, box); @@ -214,12 +216,13 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept protected void dig() { powerHandler.configure(100 * BuildCraftFactory.miningMultiplier, 500 * BuildCraftFactory.miningMultiplier, BuildCraftFactory.MINING_MJ_COST_PER_BLOCK, MAX_ENERGY * BuildCraftFactory.miningMultiplier); - float mj = BuildCraftFactory.MINING_MJ_COST_PER_BLOCK * BuildCraftFactory.miningMultiplier; - if (powerHandler.useEnergy(mj, mj, true) != mj) + float mj = BuildCraftFactory.MINING_MJ_COST_PER_BLOCK * BuildCraftFactory.miningMultiplier; + + if (powerHandler.useEnergy(mj, mj, true) != mj) { return; + } if (!findTarget(true)) { - // I believe the issue is box going null becuase of bad chunkloader positioning if (arm != null && box != null) { setTarget(box.xMin + 1, yCoord + 2, box.zMin + 1); @@ -238,8 +241,9 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept private final LinkedList visitList = Lists.newLinkedList(); public boolean findTarget(boolean doSet) { - if (worldObj.isRemote) + if (worldObj.isRemote) { return false; + } boolean columnVisitListIsUpdated = false; @@ -251,8 +255,9 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept if (!doSet) return !visitList.isEmpty(); - if (visitList.isEmpty()) + if (visitList.isEmpty()) { return false; + } int[] nextTarget = visitList.removeFirst(); @@ -267,12 +272,10 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } } } - if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty()) - { + + if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty()) { nextTarget = visitList.removeFirst(); - } - else if (columnVisitListIsUpdated && nextTarget == null) - { + } else if (columnVisitListIsUpdated && nextTarget == null) { return false; } @@ -289,6 +292,7 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept Integer[][] columnHeights = new Integer[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2]; boolean[][] blockedColumns = new boolean[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2]; + for (int searchY = yCoord + 3; searchY >= 1 && searchY >= yCoord - BuildCraftFactory.miningDepth; --searchY) { int startX, endX, incX; @@ -341,8 +345,9 @@ public class TileQuarry extends TileBuildCraft implements IMachine, IPowerRecept } // Stop at two planes - generally any obstructions will have been found and will force a recompute prior to this - if (visitList.size() > bluePrintBuilder.bluePrint.sizeZ * bluePrintBuilder.bluePrint.sizeX * 2) + if (visitList.size() > bluePrintBuilder.bluePrint.sizeZ * bluePrintBuilder.bluePrint.sizeX * 2) { return; + } } } } From b3dac2386694fd9722f75223c8f07129d3526000 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Fri, 14 Feb 2014 08:53:53 +0100 Subject: [PATCH 26/31] fixed generic fluid pumping --- common/buildcraft/core/utils/BlockUtil.java | 38 +++---- common/buildcraft/factory/TilePump.java | 109 +++++++++++++------- 2 files changed, 86 insertions(+), 61 deletions(-) diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 507d8475..167f4c28 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -137,14 +137,7 @@ public class BlockUtil { } public static Fluid getFluid(Block block) { - if (block instanceof IFluidBlock) { - return ((IFluidBlock) block).getFluid(); - } else if (block == Blocks.water || block == Blocks.flowing_water) { - return FluidRegistry.WATER; - } else if (block == Blocks.lava || block == Blocks.flowing_lava) { - return FluidRegistry.LAVA; - } - return null; + return FluidRegistry.lookupFluidForBlock (block); } public static FluidStack drainBlock(World world, int x, int y, int z, boolean doDrain) { @@ -152,26 +145,23 @@ public class BlockUtil { } public static FluidStack drainBlock(Block block, World world, int x, int y, int z, boolean doDrain) { - if (block instanceof IFluidBlock) { - IFluidBlock fluidBlock = (IFluidBlock) block; - if (fluidBlock.canDrain(world, x, y, z)) - return fluidBlock.drain(world, x, y, z, doDrain); - } else if (block == Blocks.water || block == Blocks.flowing_water) { + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) { int meta = world.getBlockMetadata(x, y, z); - if (meta != 0) + + if (meta != 0) { return null; - if (doDrain) + } + + if (doDrain) { world.setBlockToAir(x, y, z); - return new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME); - } else if (block == Blocks.lava || block == Blocks.lava) { - int meta = world.getBlockMetadata(x, y, z); - if (meta != 0) - return null; - if (doDrain) - world.setBlockToAir(x, y, z); - return new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME); + } + + return new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME); + } else { + return null; } - return null; } /** diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index 153795c6..08f5f61d 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -55,7 +55,7 @@ import net.minecraftforge.fluids.IFluidHandler; public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor, IFluidHandler { - public static int REBUID_DELAY = 512; + public static final int REBUID_DELAY = 512; public static int MAX_LIQUID = FluidContainerRegistry.BUCKET_VOLUME * 16; EntityBlock tube; private TreeMap> pumpLayerQueues = new TreeMap>(); @@ -64,7 +64,7 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor int aimY = 0; private PowerHandler powerHandler; private TileBuffer[] tileBuffer = null; - private SafeTimeTracker timer = new SafeTimeTracker(); + private SafeTimeTracker timer = new SafeTimeTracker(REBUID_DELAY); private int tick = Utils.RANDOM.nextInt(); private int numFluidBlocksFound = 0; private boolean powered = false; @@ -86,19 +86,23 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (powered) { pumpLayerQueues.clear(); destroyTube(); - } else + } else { createTube(); + } - if (worldObj.isRemote) + if (worldObj.isRemote) { return; + } pushToConsumers(); - if(powered) + if (powered) { return; + } - if(tube == null) + if (tube == null) { return; + } if (tube.posY - aimY > 0.01) { tubeY = tube.posY - 0.01; @@ -108,17 +112,17 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor } tick++; - if (tick % 16 != 0) + + if (tick % 16 != 0) { return; + } BlockIndex index = getNextIndexToPump(false); FluidStack fluidToPump = index != null ? BlockUtil.drainBlock(worldObj, index.x, index.y, index.z, false) : null; if (fluidToPump != null) { if (isFluidAllowed(fluidToPump.getFluid()) && tank.fill(fluidToPump, false) == fluidToPump.amount) { - if (powerHandler.useEnergy(10, 10, true) == 10) { - if (fluidToPump.getFluid() != FluidRegistry.WATER || BuildCraftCore.consumeWaterSources || numFluidBlocksFound < 9) { index = getNextIndexToPump(true); BlockUtil.drainBlock(worldObj, index.x, index.y, index.z, true); @@ -130,7 +134,6 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor } else { if (tick % 128 == 0) { // TODO: improve that decision - rebuildQueue(); if (getNextIndexToPump(false) == null) { @@ -149,27 +152,35 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor public void onNeighborBlockChange(Block block) { boolean p = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); + if (powered != p) { powered = p; - if(!worldObj.isRemote) + + if(!worldObj.isRemote) { sendNetworkUpdate(); + } } } private boolean isBlocked(int x, int y, int z) { Material mat = worldObj.getBlock(x, y, z).getMaterial(); + return mat.blocksMovement(); } private void pushToConsumers() { - if (tileBuffer == null) + if (tileBuffer == null) { tileBuffer = TileBuffer.makeBuffer(worldObj, xCoord, yCoord, zCoord, false); + } + FluidUtils.pushFluidToConsumers(tank, 400, tileBuffer); } private TileEntity getTile(ForgeDirection side) { - if (tileBuffer == null) + if (tileBuffer == null) { tileBuffer = TileBuffer.makeBuffer(worldObj, xCoord, yCoord, zCoord, false); + } + return tileBuffer[side.ordinal()].getTile(); } @@ -193,8 +204,9 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor worldObj.spawnEntityInWorld(tube); - if (!worldObj.isRemote) + if (!worldObj.isRemote) { sendNetworkUpdate(); + } } } @@ -209,33 +221,39 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor private BlockIndex getNextIndexToPump(boolean remove) { if (pumpLayerQueues.isEmpty()) { - if (timer.markTimeIfDelay(worldObj, REBUID_DELAY)) { + if (timer.markTimeIfDelay(worldObj)) { rebuildQueue(); } + return null; } Deque topLayer = pumpLayerQueues.lastEntry().getValue(); if (topLayer != null) { - if (topLayer.isEmpty()) + if (topLayer.isEmpty()) { pumpLayerQueues.pollLastEntry(); + } + if (remove) { BlockIndex index = topLayer.pollLast(); return index; + } else { + return topLayer.peekLast(); } - return topLayer.peekLast(); + } else { + return null; } - - return null; } private Deque getLayerQueue(int layer) { Deque pumpQueue = pumpLayerQueues.get(layer); + if (pumpQueue == null) { pumpQueue = new LinkedList(); pumpLayerQueues.put(layer, pumpQueue); } + return pumpQueue; } @@ -244,13 +262,16 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor pumpLayerQueues.clear(); int x = xCoord; int y = aimY; - int z = zCoord; + int z = zCoord; Fluid pumpingFluid = BlockUtil.getFluid(worldObj.getBlock(x, y, z)); - if (pumpingFluid == null) + + if (pumpingFluid == null) { return; + } - if (pumpingFluid != tank.getAcceptedFluid() && tank.getAcceptedFluid() != null) + if (pumpingFluid != tank.getAcceptedFluid() && tank.getAcceptedFluid() != null) { return; + } Set visitedBlocks = new HashSet(); Deque fluidsFound = new LinkedList(); @@ -270,8 +291,11 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor queueForPumping(index.x, index.y, index.z + 1, visitedBlocks, fluidsFound, pumpingFluid); queueForPumping(index.x, index.y, index.z - 1, visitedBlocks, fluidsFound, pumpingFluid); - if (pumpingFluid == FluidRegistry.WATER && !BuildCraftCore.consumeWaterSources && numFluidBlocksFound >= 9) + if (pumpingFluid == FluidRegistry.WATER + && !BuildCraftCore.consumeWaterSources + && numFluidBlocksFound >= 9) { return; + } // if (System.nanoTime() > timeoutTime) // return; @@ -282,13 +306,16 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor public void queueForPumping(int x, int y, int z, Set visitedBlocks, Deque fluidsFound, Fluid pumpingFluid) { BlockIndex index = new BlockIndex(x, y, z); if (visitedBlocks.add(index)) { - if ((x - xCoord) * (x - xCoord) + (z - zCoord) * (z - zCoord) > 64 * 64) + if ((x - xCoord) * (x - xCoord) + (z - zCoord) * (z - zCoord) > 64 * 64) { return; + } Block block = worldObj.getBlock(x, y, z); + if (BlockUtil.getFluid(block) == pumpingFluid) { fluidsFound.add(index); } + if (canDrainBlock(block, x, y, z, pumpingFluid)) { getLayerQueue(y).add(index); numFluidBlocksFound++; @@ -298,24 +325,30 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor private boolean isPumpableFluid(int x, int y, int z) { Fluid fluid = BlockUtil.getFluid(worldObj.getBlock(x, y, z)); - if (fluid == null) + + if (fluid == null) { return false; - if (!isFluidAllowed(fluid)) + } else if (!isFluidAllowed(fluid)) { return false; - if (tank.getAcceptedFluid() != null && tank.getAcceptedFluid() != fluid) + } else if (tank.getAcceptedFluid() != null && tank.getAcceptedFluid() != fluid) { return false; - return true; + } else { + return true; + } } private boolean canDrainBlock(Block block, int x, int y, int z, Fluid fluid) { - if (!isFluidAllowed(fluid)) + if (!isFluidAllowed(fluid)) { return false; + } FluidStack fluidStack = BlockUtil.drainBlock(block, worldObj, x, y, z, false); - if (fluidStack == null || fluidStack.amount <= 0) + + if (fluidStack == null || fluidStack.amount <= 0) { return false; - - return fluidStack.getFluid() == fluid; + } else { + return fluidStack.getFluid() == fluid; + } } private boolean isFluidAllowed(Fluid fluid) { @@ -361,9 +394,9 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor if (next != null) { return isPumpableFluid(next.x, next.y, next.z); + } else { + return false; } - - return false; } @Override @@ -463,11 +496,13 @@ public class TilePump extends TileBuildCraft implements IMachine, IPowerReceptor @Override public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { - if (resource == null) + if (resource == null) { return null; - if (!resource.isFluidEqual(tank.getFluid())) + } else if (!resource.isFluidEqual(tank.getFluid())) { return null; - return drain(from, resource.amount, doDrain); + } else { + return drain(from, resource.amount, doDrain); + } } @Override From d2a4dabdc7a428a58d6a6d6153c07478d93e26e9 Mon Sep 17 00:00:00 2001 From: fabricator77 Date: Sat, 15 Feb 2014 14:09:48 +1030 Subject: [PATCH 27/31] Fix IIcon sided crashes on dedicated server --- common/buildcraft/transport/ItemFacade.java | 4 +++- common/buildcraft/transport/gates/GateDefinition.java | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 5c7df7f5..a6efdb71 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -128,7 +128,9 @@ public class ItemFacade extends ItemBuildCraft { if (base != null) { List stackList = new ArrayList (); - base.getSubItems(base, null, stackList); + if ( FMLCommonHandler.instance().getSide() == Side.CLIENT ) { + base.getSubItems(base, null, stackList); + } for (ItemStack s : stackList) { ItemFacade.addFacade(s); diff --git a/common/buildcraft/transport/gates/GateDefinition.java b/common/buildcraft/transport/gates/GateDefinition.java index 5fa11ca4..20ea7a41 100644 --- a/common/buildcraft/transport/gates/GateDefinition.java +++ b/common/buildcraft/transport/gates/GateDefinition.java @@ -38,13 +38,17 @@ public final class GateDefinition { public final int guiHeight; public final int numSlots; public final boolean hasParameterSlot; + @SideOnly(Side.CLIENT) private IIcon iconBlock; + @SideOnly(Side.CLIENT) private IIcon iconItem; + @SideOnly(Side.CLIENT) public IIcon getIconBlock() { return iconBlock; } + @SideOnly(Side.CLIENT) public IIcon getIconItem() { return iconItem; } @@ -53,11 +57,13 @@ public final class GateDefinition { return name().toLowerCase(Locale.ENGLISH); } + @SideOnly(Side.CLIENT) public void registerBlockIcon(IIconRegister iconRegister) { if (this != REDSTONE) iconBlock = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag()); } + @SideOnly(Side.CLIENT) public void registerItemIcon(IIconRegister iconRegister) { if (this != REDSTONE) iconItem = iconRegister.registerIcon("buildcraft:gates/gate_material_" + getTag()); From 360d782ea9a03ce9cb90fb5149797307615eac77 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 15 Feb 2014 09:21:40 +0100 Subject: [PATCH 28/31] normalized file headers --- common/buildcraft/BuildCraftBuilders.java | 7 ++++--- common/buildcraft/BuildCraftCore.java | 11 ++++++----- common/buildcraft/BuildCraftEnergy.java | 11 ++++++----- common/buildcraft/BuildCraftFactory.java | 11 ++++++----- common/buildcraft/BuildCraftMod.java | 8 ++++++++ common/buildcraft/BuildCraftSilicon.java | 11 ++++++----- common/buildcraft/BuildCraftTransport.java | 11 ++++++----- .../api/blueprints/BlockSignature.java | 9 ++++----- .../api/blueprints/BlueprintManager.java | 8 ++++++++ common/buildcraft/api/blueprints/BptBlock.java | 3 +-- .../buildcraft/api/blueprints/BptBlockUtils.java | 9 ++++----- .../buildcraft/api/blueprints/BptSlotInfo.java | 9 ++++----- .../buildcraft/api/blueprints/IBptContext.java | 9 ++++----- .../buildcraft/api/blueprints/ItemSignature.java | 9 ++++----- common/buildcraft/api/bptblocks/BptBlockBed.java | 3 +-- .../api/bptblocks/BptBlockCustomStack.java | 9 ++++----- .../api/bptblocks/BptBlockDelegate.java | 9 ++++----- .../buildcraft/api/bptblocks/BptBlockDirt.java | 3 +-- .../buildcraft/api/bptblocks/BptBlockDoor.java | 3 +-- .../buildcraft/api/bptblocks/BptBlockFluid.java | 3 +-- .../buildcraft/api/bptblocks/BptBlockIgnore.java | 9 ++++----- .../api/bptblocks/BptBlockIgnoreMeta.java | 9 ++++----- .../api/bptblocks/BptBlockInventory.java | 9 +++++++++ .../buildcraft/api/bptblocks/BptBlockLever.java | 9 ++++----- .../buildcraft/api/bptblocks/BptBlockPiston.java | 3 +-- .../api/bptblocks/BptBlockPumpkin.java | 9 ++++----- .../api/bptblocks/BptBlockRedstoneRepeater.java | 9 ++++----- .../api/bptblocks/BptBlockRotateInventory.java | 8 ++++++++ .../api/bptblocks/BptBlockRotateMeta.java | 9 ++++----- .../buildcraft/api/bptblocks/BptBlockSign.java | 3 +-- .../buildcraft/api/bptblocks/BptBlockStairs.java | 9 ++++----- .../api/bptblocks/BptBlockWallSide.java | 9 ++++----- common/buildcraft/api/core/BuildCraftAPI.java | 3 +-- common/buildcraft/api/core/IAreaProvider.java | 9 ++++----- common/buildcraft/api/core/IBox.java | 9 ++++----- common/buildcraft/api/core/IIconProvider.java | 8 ++++++++ common/buildcraft/api/core/LaserKind.java | 9 ++++----- common/buildcraft/api/core/Position.java | 3 +-- common/buildcraft/api/core/SafeTimeTracker.java | 7 ++++--- common/buildcraft/api/core/StackWrapper.java | 10 +++------- common/buildcraft/api/filler/FillerManager.java | 8 ++++++++ common/buildcraft/api/filler/IFillerPattern.java | 8 ++++++++ .../buildcraft/api/filler/IFillerRegistry.java | 8 ++++++++ .../buildcraft/api/filler/IPatternIterator.java | 10 +++------- .../buildcraft/api/fuels/IronEngineCoolant.java | 7 ++++--- common/buildcraft/api/fuels/IronEngineFuel.java | 7 ++++--- common/buildcraft/api/gates/ActionManager.java | 8 ++++++++ .../api/gates/GateExpansionController.java | 10 +++------- common/buildcraft/api/gates/GateExpansions.java | 10 +++------- common/buildcraft/api/gates/IAction.java | 8 ++++++++ common/buildcraft/api/gates/IActionProvider.java | 9 ++++----- common/buildcraft/api/gates/IActionReceptor.java | 9 ++++----- common/buildcraft/api/gates/IGateExpansion.java | 10 +++------- .../api/gates/IOverrideDefaultTriggers.java | 9 ++++----- common/buildcraft/api/gates/ITileTrigger.java | 10 +++------- common/buildcraft/api/gates/ITrigger.java | 8 ++++++++ .../buildcraft/api/gates/ITriggerParameter.java | 8 ++++++++ .../buildcraft/api/gates/ITriggerProvider.java | 9 ++++----- .../buildcraft/api/gates/TriggerParameter.java | 9 ++++----- .../api/inventory/ISpecialInventory.java | 9 +++++++++ common/buildcraft/api/power/ILaserTarget.java | 11 +++-------- common/buildcraft/api/power/IPowerEmitter.java | 8 +++----- common/buildcraft/api/power/IPowerReceptor.java | 9 ++++----- common/buildcraft/api/power/PowerHandler.java | 9 ++++----- .../api/recipes/BuildcraftRecipes.java | 10 +++------- .../api/recipes/IAssemblyRecipeManager.java | 10 +++------- .../api/recipes/IIntegrationRecipeManager.java | 8 +++----- .../api/recipes/IRefineryRecipeManager.java | 10 +++------- common/buildcraft/api/tools/IToolPipette.java | 8 ++++++++ common/buildcraft/api/tools/IToolWrench.java | 8 ++++++++ .../api/transport/IExtractionHandler.java | 8 ++++++++ .../api/transport/IPipeConnection.java | 7 ++++--- .../api/transport/IPipeDefinition.java | 10 +++------- common/buildcraft/api/transport/IPipeTile.java | 7 ++++--- .../buildcraft/api/transport/PipeBehavior.java | 10 +++------- common/buildcraft/api/transport/PipeManager.java | 8 ++++++++ common/buildcraft/api/transport/PipeWire.java | 10 +++------- common/buildcraft/builders/BlockArchitect.java | 3 +-- .../builders/BlockBlueprintLibrary.java | 3 +-- common/buildcraft/builders/BlockBuilder.java | 7 ++++--- common/buildcraft/builders/BlockFiller.java | 3 +-- common/buildcraft/builders/BlockMarker.java | 7 ++++--- common/buildcraft/builders/BlockPathMarker.java | 3 +-- common/buildcraft/builders/BuilderProxy.java | 8 ++++++++ .../buildcraft/builders/BuilderProxyClient.java | 8 ++++++++ common/buildcraft/builders/BuildersProxy.java | 3 +-- .../buildcraft/builders/ClientBuilderHook.java | 8 ++++++++ .../builders/EventHandlerBuilders.java | 8 ++++---- common/buildcraft/builders/GuiHandler.java | 8 ++++++++ common/buildcraft/builders/IBuilderHook.java | 8 ++++++++ common/buildcraft/builders/ItemBptBase.java | 3 +-- common/buildcraft/builders/ItemBptBluePrint.java | 3 +-- common/buildcraft/builders/ItemBptTemplate.java | 8 ++++++++ common/buildcraft/builders/TileArchitect.java | 7 ++++--- .../builders/TileBlueprintLibrary.java | 8 ++++++++ common/buildcraft/builders/TileBuilder.java | 7 ++++--- common/buildcraft/builders/TileFiller.java | 7 ++++--- common/buildcraft/builders/TileMarker.java | 9 ++++----- common/buildcraft/builders/TilePathMarker.java | 8 ++++++++ .../builders/filler/FillerRegistry.java | 7 ++++--- .../builders/filler/pattern/FillerPattern.java | 7 ++++--- .../builders/filler/pattern/PatternBox.java | 7 ++++--- .../builders/filler/pattern/PatternClear.java | 7 ++++--- .../builders/filler/pattern/PatternCylinder.java | 7 ++++--- .../builders/filler/pattern/PatternFill.java | 7 ++++--- .../builders/filler/pattern/PatternFlatten.java | 7 ++++--- .../builders/filler/pattern/PatternHorizon.java | 7 ++++--- .../builders/filler/pattern/PatternPyramid.java | 7 ++++--- .../builders/filler/pattern/PatternStairs.java | 7 ++++--- .../builders/gui/ContainerBlueprintLibrary.java | 9 ++++----- .../builders/gui/ContainerBuilder.java | 9 ++++----- .../buildcraft/builders/gui/ContainerFiller.java | 7 ++++--- .../builders/gui/ContainerTemplate.java | 9 ++++----- .../builders/gui/GuiBlueprintLibrary.java | 7 ++++--- common/buildcraft/builders/gui/GuiBuilder.java | 7 ++++--- common/buildcraft/builders/gui/GuiFiller.java | 7 ++++--- common/buildcraft/builders/gui/GuiTemplate.java | 7 ++++--- .../builders/network/PacketHandlerBuilders.java | 8 ++++++++ .../builders/network/PacketLibraryAction.java | 8 ++++++++ .../builders/triggers/ActionFiller.java | 7 ++++--- .../triggers/BuildersActionProvider.java | 12 ++++++++---- common/buildcraft/core/BlockBuildCraft.java | 8 ++++++++ common/buildcraft/core/BlockIndex.java | 3 +-- common/buildcraft/core/BlockSpring.java | 8 ++++++++ common/buildcraft/core/Box.java | 7 ++++--- .../buildcraft/core/BuildCraftConfiguration.java | 3 +-- common/buildcraft/core/ByteBuffer.java | 3 +-- common/buildcraft/core/CommandBuildCraft.java | 8 ++++++++ common/buildcraft/core/CoreConstants.java | 10 +++------- common/buildcraft/core/CoreIconProvider.java | 8 ++++++++ common/buildcraft/core/DefaultAreaProvider.java | 3 +-- common/buildcraft/core/DefaultProps.java | 3 +-- common/buildcraft/core/EntityBlock.java | 7 ++++--- common/buildcraft/core/EntityEnergyLaser.java | 7 ++++--- common/buildcraft/core/EntityLaser.java | 7 ++++--- common/buildcraft/core/EntityPowerLaser.java | 8 ++++++++ common/buildcraft/core/EntityRobot.java | 3 +-- common/buildcraft/core/GuiIds.java | 8 ++++++++ common/buildcraft/core/IBptContributor.java | 8 ++++++++ common/buildcraft/core/IBuilderInventory.java | 8 ++++++++ .../buildcraft/core/IDropControlInventory.java | 8 ++++++++ common/buildcraft/core/IFramePipeConnection.java | 9 ++++----- common/buildcraft/core/IInventoryRenderer.java | 3 +-- common/buildcraft/core/IItemPipe.java | 3 +-- common/buildcraft/core/IMachine.java | 3 +-- common/buildcraft/core/ITileBufferHolder.java | 3 +-- common/buildcraft/core/InterModComms.java | 11 ++++++----- common/buildcraft/core/ItemBlockBuildCraft.java | 8 ++++++++ common/buildcraft/core/ItemBuildCraft.java | 7 ++++--- common/buildcraft/core/ItemSpring.java | 9 ++++----- common/buildcraft/core/ItemWrench.java | 8 ++++++++ common/buildcraft/core/SpringPopulate.java | 7 ++++--- .../buildcraft/core/TickHandlerCoreClient.java | 8 ++++++++ common/buildcraft/core/TileBuffer.java | 7 ++++--- common/buildcraft/core/TileBuildCraft.java | 7 ++++--- common/buildcraft/core/Version.java | 8 ++++++++ .../core/blueprints/BptActionBuild.java | 8 ++++++++ common/buildcraft/core/blueprints/BptBase.java | 3 +-- .../buildcraft/core/blueprints/BptBlueprint.java | 3 +-- .../core/blueprints/BptBuilderBase.java | 3 +-- .../core/blueprints/BptBuilderBlueprint.java | 3 +-- .../core/blueprints/BptBuilderTemplate.java | 3 +-- .../buildcraft/core/blueprints/BptContext.java | 3 +-- .../core/blueprints/BptDataStream.java | 3 +-- common/buildcraft/core/blueprints/BptError.java | 3 +-- common/buildcraft/core/blueprints/BptItem.java | 3 +-- .../core/blueprints/BptPlayerIndex.java | 8 ++++++++ .../buildcraft/core/blueprints/BptRootIndex.java | 3 +-- common/buildcraft/core/blueprints/BptSlot.java | 8 ++++++++ .../buildcraft/core/blueprints/BptTemplate.java | 3 +-- common/buildcraft/core/fluids/BCFluid.java | 10 +++------- common/buildcraft/core/fluids/FluidUtils.java | 12 ++++++++---- .../buildcraft/core/fluids/RestrictedTank.java | 10 +++------- common/buildcraft/core/fluids/SingleUseTank.java | 10 +++------- common/buildcraft/core/fluids/Tank.java | 10 +++------- common/buildcraft/core/fluids/TankManager.java | 10 +++------- .../buildcraft/core/gui/BuildCraftContainer.java | 7 ++++--- .../core/gui/GuiAdvancedInterface.java | 8 ++++++++ common/buildcraft/core/gui/GuiBuildCraft.java | 8 ++++++++ common/buildcraft/core/gui/GuiTools.java | 8 ++++++++ .../core/gui/buttons/ButtonTextureSet.java | 12 ++++++++---- .../core/gui/buttons/GuiBetterButton.java | 12 ++++++++---- .../core/gui/buttons/GuiButtonSmall.java | 12 ++++++++---- .../core/gui/buttons/GuiMultiButton.java | 12 ++++++++---- .../core/gui/buttons/GuiToggleButton.java | 12 ++++++++---- .../core/gui/buttons/GuiToggleButtonSmall.java | 12 ++++++++---- .../core/gui/buttons/IButtonTextureSet.java | 12 ++++++++---- .../core/gui/buttons/IMultiButtonState.java | 12 ++++++++---- .../core/gui/buttons/LockButtonState.java | 12 ++++++++---- .../core/gui/buttons/MultiButtonController.java | 10 ++++++++-- .../gui/buttons/StandardButtonTextureSets.java | 12 ++++++++---- .../buildcraft/core/gui/slots/IPhantomSlot.java | 8 ++++++++ common/buildcraft/core/gui/slots/SlotBase.java | 11 ++++------- .../buildcraft/core/gui/slots/SlotLimited.java | 12 ++++++++---- common/buildcraft/core/gui/slots/SlotOutput.java | 8 ++++++++ .../buildcraft/core/gui/slots/SlotPhantom.java | 11 ++++------- .../core/gui/slots/SlotUntouchable.java | 11 ++++------- .../buildcraft/core/gui/slots/SlotValidated.java | 16 ++++++---------- .../buildcraft/core/gui/slots/SlotWorkbench.java | 8 ++++++++ .../core/gui/tooltips/IToolTipProvider.java | 12 ++++++++---- common/buildcraft/core/gui/tooltips/ToolTip.java | 12 ++++++++---- .../core/gui/tooltips/ToolTipLine.java | 12 ++++++++---- .../core/gui/widgets/ButtonWidget.java | 10 +++------- .../core/gui/widgets/FluidGaugeWidget.java | 13 ++++++++----- .../core/gui/widgets/IIndicatorController.java | 13 ++++++++----- .../core/gui/widgets/IndicatorController.java | 12 ++++++++---- .../core/gui/widgets/IndicatorWidget.java | 12 ++++++++---- common/buildcraft/core/gui/widgets/Widget.java | 11 ++++------- .../buildcraft/core/inventory/ITransactor.java | 8 ++++++++ common/buildcraft/core/inventory/InvUtils.java | 12 ++++++++---- .../core/inventory/InventoryConcatenator.java | 8 +++----- .../buildcraft/core/inventory/InventoryCopy.java | 10 ++++++++-- .../core/inventory/InventoryIterator.java | 11 ++++++++--- .../core/inventory/InventoryIteratorSided.java | 11 ++++++++--- .../core/inventory/InventoryIteratorSimple.java | 11 ++++++++--- .../core/inventory/InventoryMapper.java | 10 ++++++++-- .../core/inventory/InventoryWrapper.java | 8 ++++++++ .../core/inventory/InventoryWrapperSimple.java | 8 ++++++++ .../core/inventory/SimpleInventory.java | 5 +++-- .../buildcraft/core/inventory/StackHelper.java | 7 ++++--- common/buildcraft/core/inventory/Transactor.java | 8 ++++++++ .../core/inventory/TransactorRoundRobin.java | 8 ++++++++ .../core/inventory/TransactorSimple.java | 8 ++++++++ .../core/inventory/TransactorSpecial.java | 8 ++++++++ .../core/inventory/filters/ArrayStackFilter.java | 10 ++++++++-- .../core/inventory/filters/CraftingFilter.java | 10 ++++++++-- .../core/inventory/filters/IStackFilter.java | 10 ++++++++-- .../inventory/filters/InvertedStackFilter.java | 12 ++++++++---- .../core/inventory/filters/StackFilter.java | 10 ++++++++-- .../core/network/BuildCraftChannelHandler.java | 8 ++++++++ .../core/network/BuildCraftPacket.java | 8 ++++++++ common/buildcraft/core/network/ClassMapping.java | 3 +-- common/buildcraft/core/network/EntityIds.java | 8 ++++++++ common/buildcraft/core/network/IClientState.java | 11 ++++++++--- .../core/network/IGuiReturnHandler.java | 12 ++++++++---- common/buildcraft/core/network/ISyncedTile.java | 14 ++++++++------ .../core/network/ISynchronizedTile.java | 7 ++++--- .../buildcraft/core/network/IndexInPayload.java | 8 ++++++++ .../core/network/PacketCoordinates.java | 8 ++++++++ .../buildcraft/core/network/PacketGuiReturn.java | 12 ++++++++---- .../buildcraft/core/network/PacketGuiWidget.java | 11 ++++------- .../buildcraft/core/network/PacketHandler.java | 8 ++++++++ common/buildcraft/core/network/PacketIds.java | 8 ++++++++ common/buildcraft/core/network/PacketNBT.java | 8 ++++++++ .../buildcraft/core/network/PacketPayload.java | 8 ++++++++ .../core/network/PacketPayloadArrays.java | 10 +++------- .../core/network/PacketPayloadStream.java | 8 +++----- .../core/network/PacketSlotChange.java | 8 ++++++++ .../buildcraft/core/network/PacketTileState.java | 8 ++++++++ .../core/network/PacketTileUpdate.java | 8 ++++++++ common/buildcraft/core/network/PacketUpdate.java | 8 ++++++++ .../buildcraft/core/network/TileNetworkData.java | 9 ++++----- .../core/network/TilePacketWrapper.java | 3 +-- common/buildcraft/core/proxy/CoreProxy.java | 7 ++++--- .../buildcraft/core/proxy/CoreProxyClient.java | 3 +-- .../core/recipes/AssemblyRecipeManager.java | 8 ++++++++ .../core/recipes/IntegrationRecipeManager.java | 8 ++++++++ .../core/recipes/RefineryRecipeManager.java | 7 ++++--- common/buildcraft/core/render/FluidRenderer.java | 11 ++++------- .../core/render/RenderEnergyLaser.java | 3 +-- .../core/render/RenderEntityBlock.java | 7 ++++--- common/buildcraft/core/render/RenderLaser.java | 8 ++++++++ common/buildcraft/core/render/RenderRobot.java | 8 ++++++++ common/buildcraft/core/render/RenderUtils.java | 8 ++++++++ common/buildcraft/core/render/RenderVoid.java | 3 +-- .../core/render/RenderingEntityBlocks.java | 8 ++++++++ .../buildcraft/core/render/RenderingMarkers.java | 8 ++++++++ .../core/triggers/ActionMachineControl.java | 8 ++++++++ .../core/triggers/ActionRedstoneOutput.java | 7 ++++--- .../core/triggers/ActionTriggerIconProvider.java | 10 ++++++++-- common/buildcraft/core/triggers/BCAction.java | 7 ++++--- common/buildcraft/core/triggers/BCTrigger.java | 7 ++++--- .../core/triggers/DefaultActionProvider.java | 8 ++++++++ .../core/triggers/DefaultTriggerProvider.java | 8 ++++++++ .../core/triggers/TriggerFluidContainer.java | 7 ++++--- .../triggers/TriggerFluidContainerLevel.java | 7 ++++--- .../core/triggers/TriggerInventory.java | 7 ++++--- .../core/triggers/TriggerInventoryLevel.java | 7 ++++--- .../buildcraft/core/triggers/TriggerMachine.java | 7 ++++--- .../core/triggers/TriggerRedstoneInput.java | 7 ++++--- common/buildcraft/core/utils/BCLog.java | 10 +++------- common/buildcraft/core/utils/BlockUtil.java | 11 ++++++----- common/buildcraft/core/utils/ConfigUtils.java | 10 +++------- common/buildcraft/core/utils/CraftingHelper.java | 8 ++++++++ common/buildcraft/core/utils/EnumColor.java | 12 ++++++++---- common/buildcraft/core/utils/INBTTagable.java | 8 ++++++++ common/buildcraft/core/utils/Localization.java | 13 +++++++++---- common/buildcraft/core/utils/MathUtils.java | 10 +++------- .../core/utils/MatrixTranformations.java | 10 +++------- common/buildcraft/core/utils/RevolvingList.java | 11 ++++------- common/buildcraft/core/utils/SessionVars.java | 8 ++++++++ common/buildcraft/core/utils/StringUtils.java | 8 ++++++++ common/buildcraft/core/utils/Utils.java | 7 ++++--- .../buildcraft/energy/BlockBuildcraftFluid.java | 10 +++------- common/buildcraft/energy/BlockEngine.java | 7 ++++--- common/buildcraft/energy/BptBlockEngine.java | 3 +-- common/buildcraft/energy/BucketHandler.java | 7 ++++--- common/buildcraft/energy/EnergyProxy.java | 8 ++++++++ common/buildcraft/energy/EnergyProxyClient.java | 8 ++++++++ common/buildcraft/energy/GuiHandler.java | 8 ++++++++ .../buildcraft/energy/ItemBucketBuildcraft.java | 7 ++++--- common/buildcraft/energy/ItemEngine.java | 9 ++++----- common/buildcraft/energy/TileEngine.java | 7 ++++--- common/buildcraft/energy/TileEngineIron.java | 7 ++++--- common/buildcraft/energy/TileEngineLegacy.java | 9 ++++----- common/buildcraft/energy/TileEngineStone.java | 7 ++++--- .../energy/TileEngineWithInventory.java | 8 ++++++++ common/buildcraft/energy/TileEngineWood.java | 7 ++++--- .../buildcraft/energy/gui/ContainerEngine.java | 7 ++++--- .../energy/gui/GuiCombustionEngine.java | 7 ++++--- common/buildcraft/energy/gui/GuiEngine.java | 8 ++++++++ common/buildcraft/energy/gui/GuiStoneEngine.java | 7 ++++--- .../energy/render/EntityDropParticleFX.java | 8 ++++++++ .../buildcraft/energy/render/RenderEngine.java | 7 ++++--- .../energy/triggers/TriggerEngineHeat.java | 7 ++++--- .../energy/worldgen/BiomeGenOilDesert.java | 12 ++++++++---- .../energy/worldgen/BiomeGenOilOcean.java | 12 ++++++++---- .../energy/worldgen/BiomeInitializer.java | 12 ++++++++---- .../energy/worldgen/GenLayerAddOilDesert.java | 12 ++++++++---- .../energy/worldgen/GenLayerAddOilOcean.java | 12 ++++++++---- .../energy/worldgen/GenLayerBiomeReplacer.java | 12 ++++++++---- .../buildcraft/energy/worldgen/OilPopulate.java | 7 ++++--- .../buildcraft/energy/worldgen/SimplexNoise.java | 11 +++++++++-- .../buildcraft/factory/BlockAutoWorkbench.java | 3 +-- common/buildcraft/factory/BlockFloodGate.java | 7 ++++--- common/buildcraft/factory/BlockFrame.java | 3 +-- common/buildcraft/factory/BlockHopper.java | 8 ++++++++ common/buildcraft/factory/BlockMiningWell.java | 3 +-- common/buildcraft/factory/BlockPlainPipe.java | 7 ++++--- common/buildcraft/factory/BlockQuarry.java | 7 ++++--- common/buildcraft/factory/BlockRefinery.java | 7 ++++--- common/buildcraft/factory/BlockTank.java | 7 ++++--- .../factory/BptBlockAutoWorkbench.java | 9 ++++----- common/buildcraft/factory/BptBlockFrame.java | 9 ++++----- common/buildcraft/factory/BptBlockRefinery.java | 12 ++++++------ common/buildcraft/factory/BptBlockTank.java | 8 ++++++++ .../buildcraft/factory/EntityMechanicalArm.java | 3 +-- common/buildcraft/factory/FactoryProxy.java | 8 ++++++++ .../buildcraft/factory/FactoryProxyClient.java | 8 ++++++++ common/buildcraft/factory/GuiHandler.java | 8 ++++++++ common/buildcraft/factory/PumpDimensionList.java | 8 ++++++++ common/buildcraft/factory/TileAutoWorkbench.java | 7 ++++--- common/buildcraft/factory/TileFloodGate.java | 7 ++++--- common/buildcraft/factory/TileHopper.java | 8 ++++++++ common/buildcraft/factory/TileMiningWell.java | 7 ++++--- common/buildcraft/factory/TilePump.java | 7 ++++--- common/buildcraft/factory/TileQuarry.java | 7 ++++--- common/buildcraft/factory/TileRefinery.java | 7 ++++--- common/buildcraft/factory/TileTank.java | 7 ++++--- .../factory/gui/ContainerAutoWorkbench.java | 7 ++++--- .../buildcraft/factory/gui/ContainerHopper.java | 8 ++++++++ .../factory/gui/ContainerRefinery.java | 7 ++++--- .../buildcraft/factory/gui/GuiAutoCrafting.java | 7 ++++--- common/buildcraft/factory/gui/GuiHopper.java | 8 ++++++++ common/buildcraft/factory/gui/GuiRefinery.java | 7 ++++--- .../factory/network/PacketHandlerFactory.java | 8 ++++++++ .../buildcraft/factory/render/ModelFrustum.java | 8 ++++++++ .../buildcraft/factory/render/RenderHopper.java | 8 ++++++++ .../factory/render/RenderRefinery.java | 7 ++++--- common/buildcraft/factory/render/RenderTank.java | 7 ++++--- common/buildcraft/silicon/BlockLaser.java | 7 ++++--- common/buildcraft/silicon/BlockLaserTable.java | 8 ++++++++ common/buildcraft/silicon/GuiHandler.java | 8 ++++++++ common/buildcraft/silicon/ItemLaserTable.java | 8 ++++++++ .../buildcraft/silicon/ItemRedstoneChipset.java | 8 ++++++++ common/buildcraft/silicon/SiliconProxy.java | 8 ++++++++ .../buildcraft/silicon/SiliconProxyClient.java | 8 ++++++++ .../buildcraft/silicon/SiliconRenderBlock.java | 3 +-- .../silicon/TileAdvancedCraftingTable.java | 8 ++++++++ common/buildcraft/silicon/TileAssemblyTable.java | 8 ++++++++ .../buildcraft/silicon/TileIntegrationTable.java | 10 +++------- common/buildcraft/silicon/TileLaser.java | 7 ++++--- .../buildcraft/silicon/TileLaserTableBase.java | 10 +++------- .../gui/ContainerAdvancedCraftingTable.java | 8 ++++++++ .../silicon/gui/ContainerAssemblyTable.java | 3 +-- .../silicon/gui/ContainerIntegrationTable.java | 8 ++++++++ .../silicon/gui/GuiAdvancedCraftingTable.java | 8 ++++++++ .../buildcraft/silicon/gui/GuiAssemblyTable.java | 7 ++++--- .../silicon/gui/GuiIntegrationTable.java | 8 ++++++++ common/buildcraft/silicon/gui/GuiLaserTable.java | 8 ++++++++ .../silicon/network/PacketHandlerSilicon.java | 8 ++++++++ .../silicon/recipes/GateExpansionRecipe.java | 10 +++------- .../silicon/recipes/GateLogicSwapRecipe.java | 10 +++------- .../transport/BlockFilteredBuffer.java | 11 ++++------- .../buildcraft/transport/BlockGenericPipe.java | 7 ++++--- common/buildcraft/transport/Gate.java | 8 ++++++++ common/buildcraft/transport/GuiHandler.java | 8 ++++++++ .../buildcraft/transport/IItemTravelingHook.java | 8 ++++++++ .../transport/IPipeConnectionForced.java | 8 ++++++++ .../transport/IPipeTransportFluidsHook.java | 3 +-- .../transport/IPipeTransportItemsHook.java | 7 ++++--- .../transport/IPipeTransportPowerHook.java | 3 +-- common/buildcraft/transport/IPipeTrigger.java | 7 ++++--- common/buildcraft/transport/ISolidSideTile.java | 8 ++++++++ common/buildcraft/transport/ItemFacade.java | 8 ++++++++ common/buildcraft/transport/ItemPipe.java | 7 ++++--- common/buildcraft/transport/ItemPipeWire.java | 8 ++++++++ common/buildcraft/transport/ItemPlug.java | 8 ++++++++ common/buildcraft/transport/Pipe.java | 7 ++++--- .../buildcraft/transport/PipeConnectionBans.java | 8 +++----- .../buildcraft/transport/PipeIconProvider.java | 8 ++++++++ common/buildcraft/transport/PipeRenderState.java | 8 ++++++++ .../buildcraft/transport/PipeToolTipManager.java | 10 +++------- common/buildcraft/transport/PipeTransport.java | 7 ++++--- .../transport/PipeTransportFluids.java | 7 ++++--- .../buildcraft/transport/PipeTransportItems.java | 7 ++++--- .../buildcraft/transport/PipeTransportPower.java | 7 ++++--- .../transport/PipeTransportStructure.java | 8 ++++++++ .../transport/PipeTriggerProvider.java | 8 ++++++++ .../transport/TileDummyGenericPipe.java | 8 ++++++++ .../transport/TileDummyGenericPipe2.java | 8 ++++++++ .../buildcraft/transport/TileFilteredBuffer.java | 8 ++++++++ common/buildcraft/transport/TileGenericPipe.java | 7 ++++--- .../buildcraft/transport/TransportConstants.java | 10 +++------- common/buildcraft/transport/TransportProxy.java | 8 ++++++++ .../transport/TransportProxyClient.java | 8 ++++++++ common/buildcraft/transport/TravelerSet.java | 10 +++------- common/buildcraft/transport/TravelingItem.java | 7 ++++--- .../buildcraft/transport/WireIconProvider.java | 8 ++++++++ .../transport/blueprints/BptBlockPipe.java | 3 +-- .../transport/blueprints/BptItemPipeDiamond.java | 3 +-- .../transport/blueprints/BptItemPipeEmerald.java | 3 +-- .../transport/blueprints/BptItemPipeIron.java | 3 +-- .../transport/blueprints/BptItemPipeWooden.java | 3 +-- .../transport/gates/GateDefinition.java | 10 +++------- .../transport/gates/GateExpansionBuildcraft.java | 10 +++------- .../transport/gates/GateExpansionPulsar.java | 8 ++------ .../gates/GateExpansionRedstoneFader.java | 10 +++------- .../transport/gates/GateExpansionTimer.java | 10 +++------- .../buildcraft/transport/gates/GateFactory.java | 10 +++------- common/buildcraft/transport/gates/ItemGate.java | 8 ++++++++ .../transport/gui/ContainerDiamondPipe.java | 7 ++++--- .../transport/gui/ContainerEmeraldPipe.java | 7 ++++--- .../transport/gui/ContainerEmzuliPipe.java | 11 ++++------- .../transport/gui/ContainerFilteredBuffer.java | 11 ++++------- .../transport/gui/ContainerGateInterface.java | 7 ++++--- .../buildcraft/transport/gui/GuiDiamondPipe.java | 7 ++++--- .../buildcraft/transport/gui/GuiEmeraldPipe.java | 7 ++++--- .../buildcraft/transport/gui/GuiEmzuliPipe.java | 11 ++++------- .../transport/gui/GuiFilteredBuffer.java | 11 ++++------- .../transport/gui/GuiGateInterface.java | 7 ++++--- .../transport/network/PacketFluidUpdate.java | 8 ++++++++ .../network/PacketGateExpansionMap.java | 8 ++++++++ .../network/PacketHandlerTransport.java | 8 ++++++++ .../network/PacketPipeTransportItemStack.java | 8 ++++++++ .../PacketPipeTransportItemStackRequest.java | 8 ++++++++ .../network/PacketPipeTransportTraveler.java | 8 ++++++++ .../transport/network/PacketPowerUpdate.java | 8 ++++++++ .../transport/pipes/PipeFluidsCobblestone.java | 11 ++++++----- .../transport/pipes/PipeFluidsEmerald.java | 11 ++++------- .../transport/pipes/PipeFluidsGold.java | 11 ++++++----- .../transport/pipes/PipeFluidsIron.java | 11 ++++++----- .../transport/pipes/PipeFluidsSandstone.java | 7 ++++--- .../transport/pipes/PipeFluidsStone.java | 11 ++++++----- .../transport/pipes/PipeFluidsVoid.java | 7 ++++--- .../transport/pipes/PipeFluidsWood.java | 11 ++++++----- .../transport/pipes/PipeItemsCobblestone.java | 11 ++++++----- .../transport/pipes/PipeItemsDaizuli.java | 11 ++++++----- .../transport/pipes/PipeItemsDiamond.java | 11 ++++++----- .../transport/pipes/PipeItemsEmerald.java | 7 ++++--- .../transport/pipes/PipeItemsEmzuli.java | 10 +++------- .../transport/pipes/PipeItemsGold.java | 11 ++++++----- .../transport/pipes/PipeItemsIron.java | 11 ++++++----- .../transport/pipes/PipeItemsLapis.java | 7 ++++--- .../transport/pipes/PipeItemsObsidian.java | 11 ++++++----- .../transport/pipes/PipeItemsQuartz.java | 11 ++++++----- .../transport/pipes/PipeItemsSandstone.java | 7 ++++--- .../transport/pipes/PipeItemsStone.java | 11 ++++++----- .../transport/pipes/PipeItemsVoid.java | 7 ++++--- .../transport/pipes/PipeItemsWood.java | 11 ++++++----- .../transport/pipes/PipeLogicIron.java | 7 ++++--- .../transport/pipes/PipeLogicWood.java | 7 ++++--- .../transport/pipes/PipePowerCobblestone.java | 11 ++++++----- .../transport/pipes/PipePowerDiamond.java | 11 ++++++----- .../transport/pipes/PipePowerGold.java | 11 ++++++----- .../transport/pipes/PipePowerIron.java | 11 ++++++----- .../transport/pipes/PipePowerQuartz.java | 11 ++++++----- .../transport/pipes/PipePowerStone.java | 11 ++++++----- .../transport/pipes/PipePowerWood.java | 11 ++++++----- .../pipes/PipeStructureCobblestone.java | 8 ++++++++ .../transport/pipes/events/PipeEvent.java | 10 +++------- .../transport/pipes/events/PipeEventItem.java | 10 +++------- .../transport/render/FacadeItemRenderer.java | 8 ++++++++ .../transport/render/FacadeRenderHelper.java | 10 +++------- .../transport/render/GateItemRenderer.java | 12 ++++++++---- .../transport/render/PipeItemRenderer.java | 8 ++++++++ .../transport/render/PipeRendererTESR.java | 7 ++++--- .../transport/render/PipeRendererWorld.java | 8 ++++++++ .../transport/render/PlugItemRenderer.java | 8 ++++++++ .../transport/render/TileEntityPickupFX.java | 2 +- .../transport/triggers/ActionEnergyPulsar.java | 8 ++++++++ .../triggers/ActionExtractionPreset.java | 7 ++++--- .../transport/triggers/ActionPipeColor.java | 7 ++++--- .../transport/triggers/ActionPipeDirection.java | 7 ++++--- .../transport/triggers/ActionPowerLimiter.java | 7 ++++--- .../triggers/ActionRedstoneFaderOutput.java | 7 ++++--- .../transport/triggers/ActionSignalOutput.java | 7 ++++--- .../triggers/ActionSingleEnergyPulse.java | 8 ++++++++ .../transport/triggers/TriggerClockTimer.java | 8 ++++++++ .../transport/triggers/TriggerPipeContents.java | 7 ++++--- .../transport/triggers/TriggerPipeSignal.java | 7 ++++--- .../triggers/TriggerRedstoneFaderInput.java | 7 ++++--- .../buildcraft/transport/utils/BitSetCodec.java | 8 ++++++++ .../transport/utils/ConnectionMatrix.java | 8 ++++++++ .../buildcraft/transport/utils/FacadeMatrix.java | 8 ++++++++ .../transport/utils/TextureMatrix.java | 8 ++++++++ .../transport/utils/TransportUtils.java | 10 +++------- .../buildcraft/transport/utils/WireMatrix.java | 8 ++++++++ 508 files changed, 2678 insertions(+), 1409 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 226099e2..28a59bd8 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011-2012 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index d51cd47d..345005de 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index be7ea384..ecdf8141 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/BuildCraftFactory.java b/common/buildcraft/BuildCraftFactory.java index 861eded9..881dbf74 100644 --- a/common/buildcraft/BuildCraftFactory.java +++ b/common/buildcraft/BuildCraftFactory.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/BuildCraftMod.java b/common/buildcraft/BuildCraftMod.java index 37474249..4612a1f2 100755 --- a/common/buildcraft/BuildCraftMod.java +++ b/common/buildcraft/BuildCraftMod.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft; import java.util.EnumMap; diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 2b757138..3221f627 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 344e6fe1..a9cd1f38 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft; diff --git a/common/buildcraft/api/blueprints/BlockSignature.java b/common/buildcraft/api/blueprints/BlockSignature.java index 51db24d4..519ce016 100644 --- a/common/buildcraft/api/blueprints/BlockSignature.java +++ b/common/buildcraft/api/blueprints/BlockSignature.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; public class BlockSignature { diff --git a/common/buildcraft/api/blueprints/BlueprintManager.java b/common/buildcraft/api/blueprints/BlueprintManager.java index cb8ca974..07df78d5 100644 --- a/common/buildcraft/api/blueprints/BlueprintManager.java +++ b/common/buildcraft/api/blueprints/BlueprintManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.blueprints; import buildcraft.api.core.BuildCraftAPI; diff --git a/common/buildcraft/api/blueprints/BptBlock.java b/common/buildcraft/api/blueprints/BptBlock.java index 220a9fab..305cdee4 100644 --- a/common/buildcraft/api/blueprints/BptBlock.java +++ b/common/buildcraft/api/blueprints/BptBlock.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; import buildcraft.api.core.BuildCraftAPI; diff --git a/common/buildcraft/api/blueprints/BptBlockUtils.java b/common/buildcraft/api/blueprints/BptBlockUtils.java index 42d41749..e5dfac7e 100644 --- a/common/buildcraft/api/blueprints/BptBlockUtils.java +++ b/common/buildcraft/api/blueprints/BptBlockUtils.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; import java.util.LinkedList; diff --git a/common/buildcraft/api/blueprints/BptSlotInfo.java b/common/buildcraft/api/blueprints/BptSlotInfo.java index 727b135e..afa74156 100644 --- a/common/buildcraft/api/blueprints/BptSlotInfo.java +++ b/common/buildcraft/api/blueprints/BptSlotInfo.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; import java.util.LinkedList; diff --git a/common/buildcraft/api/blueprints/IBptContext.java b/common/buildcraft/api/blueprints/IBptContext.java index 8498bfd3..d785722b 100644 --- a/common/buildcraft/api/blueprints/IBptContext.java +++ b/common/buildcraft/api/blueprints/IBptContext.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; import buildcraft.api.core.IBox; diff --git a/common/buildcraft/api/blueprints/ItemSignature.java b/common/buildcraft/api/blueprints/ItemSignature.java index d6bd0310..b3fa2065 100644 --- a/common/buildcraft/api/blueprints/ItemSignature.java +++ b/common/buildcraft/api/blueprints/ItemSignature.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.blueprints; @Deprecated diff --git a/common/buildcraft/api/bptblocks/BptBlockBed.java b/common/buildcraft/api/bptblocks/BptBlockBed.java index 3882abf8..e2f22e0c 100644 --- a/common/buildcraft/api/bptblocks/BptBlockBed.java +++ b/common/buildcraft/api/bptblocks/BptBlockBed.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockCustomStack.java b/common/buildcraft/api/bptblocks/BptBlockCustomStack.java index 79aef15c..1087520f 100644 --- a/common/buildcraft/api/bptblocks/BptBlockCustomStack.java +++ b/common/buildcraft/api/bptblocks/BptBlockCustomStack.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockDelegate.java b/common/buildcraft/api/bptblocks/BptBlockDelegate.java index 590f0997..45c4891e 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDelegate.java +++ b/common/buildcraft/api/bptblocks/BptBlockDelegate.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BlueprintManager; diff --git a/common/buildcraft/api/bptblocks/BptBlockDirt.java b/common/buildcraft/api/bptblocks/BptBlockDirt.java index 031acf8e..12720bf3 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDirt.java +++ b/common/buildcraft/api/bptblocks/BptBlockDirt.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockDoor.java b/common/buildcraft/api/bptblocks/BptBlockDoor.java index 26453308..dedb75e8 100644 --- a/common/buildcraft/api/bptblocks/BptBlockDoor.java +++ b/common/buildcraft/api/bptblocks/BptBlockDoor.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockFluid.java b/common/buildcraft/api/bptblocks/BptBlockFluid.java index d360b7f6..dc5cd325 100644 --- a/common/buildcraft/api/bptblocks/BptBlockFluid.java +++ b/common/buildcraft/api/bptblocks/BptBlockFluid.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockIgnore.java b/common/buildcraft/api/bptblocks/BptBlockIgnore.java index ab3143c3..465143ca 100644 --- a/common/buildcraft/api/bptblocks/BptBlockIgnore.java +++ b/common/buildcraft/api/bptblocks/BptBlockIgnore.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java b/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java index 2d58e2f7..4f60fb2f 100644 --- a/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java +++ b/common/buildcraft/api/bptblocks/BptBlockIgnoreMeta.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockInventory.java b/common/buildcraft/api/bptblocks/BptBlockInventory.java index 1fd6c05f..e307eb18 100644 --- a/common/buildcraft/api/bptblocks/BptBlockInventory.java +++ b/common/buildcraft/api/bptblocks/BptBlockInventory.java @@ -1,3 +1,12 @@ + +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockLever.java b/common/buildcraft/api/bptblocks/BptBlockLever.java index 4eda6cde..d731c238 100644 --- a/common/buildcraft/api/bptblocks/BptBlockLever.java +++ b/common/buildcraft/api/bptblocks/BptBlockLever.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/api/bptblocks/BptBlockPiston.java b/common/buildcraft/api/bptblocks/BptBlockPiston.java index 61472b82..8e3950cb 100644 --- a/common/buildcraft/api/bptblocks/BptBlockPiston.java +++ b/common/buildcraft/api/bptblocks/BptBlockPiston.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/api/bptblocks/BptBlockPumpkin.java b/common/buildcraft/api/bptblocks/BptBlockPumpkin.java index a1f88fb0..4eff9e4c 100644 --- a/common/buildcraft/api/bptblocks/BptBlockPumpkin.java +++ b/common/buildcraft/api/bptblocks/BptBlockPumpkin.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java b/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java index edf5ed69..8852cb98 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java +++ b/common/buildcraft/api/bptblocks/BptBlockRedstoneRepeater.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java b/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java index 87662eee..e0b9bd67 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java +++ b/common/buildcraft/api/bptblocks/BptBlockRotateInventory.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java b/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java index 1864df61..9066ee62 100644 --- a/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java +++ b/common/buildcraft/api/bptblocks/BptBlockRotateMeta.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockSign.java b/common/buildcraft/api/bptblocks/BptBlockSign.java index 311e1c4b..29af85d4 100644 --- a/common/buildcraft/api/bptblocks/BptBlockSign.java +++ b/common/buildcraft/api/bptblocks/BptBlockSign.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BlockSignature; diff --git a/common/buildcraft/api/bptblocks/BptBlockStairs.java b/common/buildcraft/api/bptblocks/BptBlockStairs.java index 20ff2b28..391112c9 100644 --- a/common/buildcraft/api/bptblocks/BptBlockStairs.java +++ b/common/buildcraft/api/bptblocks/BptBlockStairs.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/bptblocks/BptBlockWallSide.java b/common/buildcraft/api/bptblocks/BptBlockWallSide.java index f401d441..ac0d8ada 100644 --- a/common/buildcraft/api/bptblocks/BptBlockWallSide.java +++ b/common/buildcraft/api/bptblocks/BptBlockWallSide.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.bptblocks; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/api/core/BuildCraftAPI.java b/common/buildcraft/api/core/BuildCraftAPI.java index f25e176c..4dadfae9 100644 --- a/common/buildcraft/api/core/BuildCraftAPI.java +++ b/common/buildcraft/api/core/BuildCraftAPI.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.core; import java.util.HashSet; diff --git a/common/buildcraft/api/core/IAreaProvider.java b/common/buildcraft/api/core/IAreaProvider.java index fa905d2c..2338e0c7 100644 --- a/common/buildcraft/api/core/IAreaProvider.java +++ b/common/buildcraft/api/core/IAreaProvider.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.core; /** diff --git a/common/buildcraft/api/core/IBox.java b/common/buildcraft/api/core/IBox.java index 6337a96c..bfcafe6c 100644 --- a/common/buildcraft/api/core/IBox.java +++ b/common/buildcraft/api/core/IBox.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.core; import net.minecraft.world.World; diff --git a/common/buildcraft/api/core/IIconProvider.java b/common/buildcraft/api/core/IIconProvider.java index 8b0370ea..3df0b6d9 100644 --- a/common/buildcraft/api/core/IIconProvider.java +++ b/common/buildcraft/api/core/IIconProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.core; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/api/core/LaserKind.java b/common/buildcraft/api/core/LaserKind.java index 24e66dba..85f5ce8e 100644 --- a/common/buildcraft/api/core/LaserKind.java +++ b/common/buildcraft/api/core/LaserKind.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.core; public enum LaserKind { diff --git a/common/buildcraft/api/core/Position.java b/common/buildcraft/api/core/Position.java index 72bdbf87..3ea1a731 100644 --- a/common/buildcraft/api/core/Position.java +++ b/common/buildcraft/api/core/Position.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.core; import net.minecraft.nbt.NBTTagCompound; diff --git a/common/buildcraft/api/core/SafeTimeTracker.java b/common/buildcraft/api/core/SafeTimeTracker.java index 14d94230..46ca2809 100644 --- a/common/buildcraft/api/core/SafeTimeTracker.java +++ b/common/buildcraft/api/core/SafeTimeTracker.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.core; diff --git a/common/buildcraft/api/core/StackWrapper.java b/common/buildcraft/api/core/StackWrapper.java index 2cc81ab7..a155c1cd 100644 --- a/common/buildcraft/api/core/StackWrapper.java +++ b/common/buildcraft/api/core/StackWrapper.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.api.core; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class StackWrapper { public final ItemStack stack; diff --git a/common/buildcraft/api/filler/FillerManager.java b/common/buildcraft/api/filler/FillerManager.java index ae104c59..cd774d46 100644 --- a/common/buildcraft/api/filler/FillerManager.java +++ b/common/buildcraft/api/filler/FillerManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.filler; public class FillerManager { diff --git a/common/buildcraft/api/filler/IFillerPattern.java b/common/buildcraft/api/filler/IFillerPattern.java index 0575af61..6c1c4182 100644 --- a/common/buildcraft/api/filler/IFillerPattern.java +++ b/common/buildcraft/api/filler/IFillerPattern.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.filler; import buildcraft.api.core.IBox; diff --git a/common/buildcraft/api/filler/IFillerRegistry.java b/common/buildcraft/api/filler/IFillerRegistry.java index f0b4c950..ec9bf29f 100644 --- a/common/buildcraft/api/filler/IFillerRegistry.java +++ b/common/buildcraft/api/filler/IFillerRegistry.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.filler; import buildcraft.api.gates.IAction; diff --git a/common/buildcraft/api/filler/IPatternIterator.java b/common/buildcraft/api/filler/IPatternIterator.java index 0ea8c202..efce4c43 100644 --- a/common/buildcraft/api/filler/IPatternIterator.java +++ b/common/buildcraft/api/filler/IPatternIterator.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -10,10 +10,6 @@ package buildcraft.api.filler; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public interface IPatternIterator { public boolean iteratePattern(ItemStack stackToPlace); diff --git a/common/buildcraft/api/fuels/IronEngineCoolant.java b/common/buildcraft/api/fuels/IronEngineCoolant.java index 1ae04392..3e1de954 100644 --- a/common/buildcraft/api/fuels/IronEngineCoolant.java +++ b/common/buildcraft/api/fuels/IronEngineCoolant.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.fuels; diff --git a/common/buildcraft/api/fuels/IronEngineFuel.java b/common/buildcraft/api/fuels/IronEngineFuel.java index 3ab5ca2a..20b14eb5 100644 --- a/common/buildcraft/api/fuels/IronEngineFuel.java +++ b/common/buildcraft/api/fuels/IronEngineFuel.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.fuels; diff --git a/common/buildcraft/api/gates/ActionManager.java b/common/buildcraft/api/gates/ActionManager.java index a4b3a5ba..44e4b741 100644 --- a/common/buildcraft/api/gates/ActionManager.java +++ b/common/buildcraft/api/gates/ActionManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.gates; import buildcraft.api.transport.IPipeTile; diff --git a/common/buildcraft/api/gates/GateExpansionController.java b/common/buildcraft/api/gates/GateExpansionController.java index 3f047ac5..20f38713 100644 --- a/common/buildcraft/api/gates/GateExpansionController.java +++ b/common/buildcraft/api/gates/GateExpansionController.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -12,10 +12,6 @@ import java.util.List; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -/** - * - * @author CovertJaguar - */ public abstract class GateExpansionController { public final IGateExpansion type; diff --git a/common/buildcraft/api/gates/GateExpansions.java b/common/buildcraft/api/gates/GateExpansions.java index d3ec09df..b8732442 100644 --- a/common/buildcraft/api/gates/GateExpansions.java +++ b/common/buildcraft/api/gates/GateExpansions.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -15,10 +15,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -/** - * - * @author CovertJaguar - */ public final class GateExpansions { private static final Map expansions = new HashMap(); diff --git a/common/buildcraft/api/gates/IAction.java b/common/buildcraft/api/gates/IAction.java index bd1d3874..38f134eb 100644 --- a/common/buildcraft/api/gates/IAction.java +++ b/common/buildcraft/api/gates/IAction.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.gates; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/api/gates/IActionProvider.java b/common/buildcraft/api/gates/IActionProvider.java index 6c64b57e..6712ca6f 100644 --- a/common/buildcraft/api/gates/IActionProvider.java +++ b/common/buildcraft/api/gates/IActionProvider.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.gates; import java.util.LinkedList; diff --git a/common/buildcraft/api/gates/IActionReceptor.java b/common/buildcraft/api/gates/IActionReceptor.java index c4637adc..86916298 100644 --- a/common/buildcraft/api/gates/IActionReceptor.java +++ b/common/buildcraft/api/gates/IActionReceptor.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.gates; public interface IActionReceptor { diff --git a/common/buildcraft/api/gates/IGateExpansion.java b/common/buildcraft/api/gates/IGateExpansion.java index 60cd7dd2..361f0a4d 100644 --- a/common/buildcraft/api/gates/IGateExpansion.java +++ b/common/buildcraft/api/gates/IGateExpansion.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -12,10 +12,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -/** - * - * @author CovertJaguar - */ public interface IGateExpansion { String getUniqueIdentifier(); diff --git a/common/buildcraft/api/gates/IOverrideDefaultTriggers.java b/common/buildcraft/api/gates/IOverrideDefaultTriggers.java index 8a2e47c6..a105f52d 100644 --- a/common/buildcraft/api/gates/IOverrideDefaultTriggers.java +++ b/common/buildcraft/api/gates/IOverrideDefaultTriggers.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.gates; import java.util.LinkedList; diff --git a/common/buildcraft/api/gates/ITileTrigger.java b/common/buildcraft/api/gates/ITileTrigger.java index db088158..93c84e01 100644 --- a/common/buildcraft/api/gates/ITileTrigger.java +++ b/common/buildcraft/api/gates/ITileTrigger.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.api.gates; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public interface ITileTrigger extends ITrigger { /** diff --git a/common/buildcraft/api/gates/ITrigger.java b/common/buildcraft/api/gates/ITrigger.java index 94a074e8..affc418b 100644 --- a/common/buildcraft/api/gates/ITrigger.java +++ b/common/buildcraft/api/gates/ITrigger.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.gates; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/api/gates/ITriggerParameter.java b/common/buildcraft/api/gates/ITriggerParameter.java index b097667a..8570cf0f 100644 --- a/common/buildcraft/api/gates/ITriggerParameter.java +++ b/common/buildcraft/api/gates/ITriggerParameter.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.gates; import net.minecraft.item.ItemStack; diff --git a/common/buildcraft/api/gates/ITriggerProvider.java b/common/buildcraft/api/gates/ITriggerProvider.java index 471eac10..1966e73b 100644 --- a/common/buildcraft/api/gates/ITriggerProvider.java +++ b/common/buildcraft/api/gates/ITriggerProvider.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.gates; import buildcraft.api.transport.IPipeTile; diff --git a/common/buildcraft/api/gates/TriggerParameter.java b/common/buildcraft/api/gates/TriggerParameter.java index 9c6647f5..46336c15 100644 --- a/common/buildcraft/api/gates/TriggerParameter.java +++ b/common/buildcraft/api/gates/TriggerParameter.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.api.gates; import net.minecraft.item.Item; diff --git a/common/buildcraft/api/inventory/ISpecialInventory.java b/common/buildcraft/api/inventory/ISpecialInventory.java index fd535153..827a7a7d 100644 --- a/common/buildcraft/api/inventory/ISpecialInventory.java +++ b/common/buildcraft/api/inventory/ISpecialInventory.java @@ -1,9 +1,18 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.inventory; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public interface ISpecialInventory extends IInventory { /** diff --git a/common/buildcraft/api/power/ILaserTarget.java b/common/buildcraft/api/power/ILaserTarget.java index b4808004..8f859158 100644 --- a/common/buildcraft/api/power/ILaserTarget.java +++ b/common/buildcraft/api/power/ILaserTarget.java @@ -1,18 +1,13 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.power; -/** - * Specifies a Tile Entity that can receive power via laser beam. - * - * @author cpw - */ public interface ILaserTarget { /** diff --git a/common/buildcraft/api/power/IPowerEmitter.java b/common/buildcraft/api/power/IPowerEmitter.java index 7a06f4a4..4bb48497 100644 --- a/common/buildcraft/api/power/IPowerEmitter.java +++ b/common/buildcraft/api/power/IPowerEmitter.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -15,8 +15,6 @@ import net.minecraftforge.common.util.ForgeDirection; * * This Tile Entity interface allows you to indicate that a block can emit power * from a specific side. - * - * @author CovertJaguar */ public interface IPowerEmitter { diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/common/buildcraft/api/power/IPowerReceptor.java index b781423e..79586e9e 100644 --- a/common/buildcraft/api/power/IPowerReceptor.java +++ b/common/buildcraft/api/power/IPowerReceptor.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.power; @@ -13,8 +14,6 @@ import net.minecraftforge.common.util.ForgeDirection; /** * This interface should be implemented by any Tile Entity that wishes to be * able to receive power. - * - * @author CovertJaguar */ public interface IPowerReceptor { diff --git a/common/buildcraft/api/power/PowerHandler.java b/common/buildcraft/api/power/PowerHandler.java index 46a090ab..8979086e 100644 --- a/common/buildcraft/api/power/PowerHandler.java +++ b/common/buildcraft/api/power/PowerHandler.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.power; @@ -26,8 +27,6 @@ import net.minecraftforge.common.util.ForgeDirection; * * @see IPowerReceptor * @see IPowerEmitter - * - * @author CovertJaguar */ public final class PowerHandler { diff --git a/common/buildcraft/api/recipes/BuildcraftRecipes.java b/common/buildcraft/api/recipes/BuildcraftRecipes.java index 57f7e092..0454944d 100644 --- a/common/buildcraft/api/recipes/BuildcraftRecipes.java +++ b/common/buildcraft/api/recipes/BuildcraftRecipes.java @@ -1,17 +1,13 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.recipes; -/** - * - * @author CovertJaguar - */ public final class BuildcraftRecipes { public static IAssemblyRecipeManager assemblyTable; diff --git a/common/buildcraft/api/recipes/IAssemblyRecipeManager.java b/common/buildcraft/api/recipes/IAssemblyRecipeManager.java index 10fb3bc9..30530919 100644 --- a/common/buildcraft/api/recipes/IAssemblyRecipeManager.java +++ b/common/buildcraft/api/recipes/IAssemblyRecipeManager.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.api.recipes; import java.util.List; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public interface IAssemblyRecipeManager { public static interface IAssemblyRecipe { diff --git a/common/buildcraft/api/recipes/IIntegrationRecipeManager.java b/common/buildcraft/api/recipes/IIntegrationRecipeManager.java index 9f796dbd..8b03055f 100644 --- a/common/buildcraft/api/recipes/IIntegrationRecipeManager.java +++ b/common/buildcraft/api/recipes/IIntegrationRecipeManager.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -15,8 +15,6 @@ import net.minecraft.item.ItemStack; * The Integration Table's primary purpose is to modify an input item's NBT * data. As such its not a "traditional" type of recipe. Rather than predefined * inputs and outputs, it takes an input and transforms it. - * - * @author CovertJaguar */ public interface IIntegrationRecipeManager { diff --git a/common/buildcraft/api/recipes/IRefineryRecipeManager.java b/common/buildcraft/api/recipes/IRefineryRecipeManager.java index 01ca1a88..5e353a11 100644 --- a/common/buildcraft/api/recipes/IRefineryRecipeManager.java +++ b/common/buildcraft/api/recipes/IRefineryRecipeManager.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.api.recipes; import java.util.SortedSet; import net.minecraftforge.fluids.FluidStack; -/** - * - * @author CovertJaguar - */ public interface IRefineryRecipeManager { void addRecipe(FluidStack ingredient, FluidStack result, int energy, int delay); diff --git a/common/buildcraft/api/tools/IToolPipette.java b/common/buildcraft/api/tools/IToolPipette.java index d636523d..bca9d267 100644 --- a/common/buildcraft/api/tools/IToolPipette.java +++ b/common/buildcraft/api/tools/IToolPipette.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.tools; import net.minecraft.item.ItemStack; diff --git a/common/buildcraft/api/tools/IToolWrench.java b/common/buildcraft/api/tools/IToolWrench.java index bd0c3c59..a6c56e8d 100644 --- a/common/buildcraft/api/tools/IToolWrench.java +++ b/common/buildcraft/api/tools/IToolWrench.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.tools; import net.minecraft.entity.player.EntityPlayer; diff --git a/common/buildcraft/api/transport/IExtractionHandler.java b/common/buildcraft/api/transport/IExtractionHandler.java index e912f65b..4d56659e 100644 --- a/common/buildcraft/api/transport/IExtractionHandler.java +++ b/common/buildcraft/api/transport/IExtractionHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.transport; import net.minecraft.world.World; diff --git a/common/buildcraft/api/transport/IPipeConnection.java b/common/buildcraft/api/transport/IPipeConnection.java index 02904099..39f14ee9 100644 --- a/common/buildcraft/api/transport/IPipeConnection.java +++ b/common/buildcraft/api/transport/IPipeConnection.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.transport; diff --git a/common/buildcraft/api/transport/IPipeDefinition.java b/common/buildcraft/api/transport/IPipeDefinition.java index d6e39a6a..73a1c890 100644 --- a/common/buildcraft/api/transport/IPipeDefinition.java +++ b/common/buildcraft/api/transport/IPipeDefinition.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -12,10 +12,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -/** - * - * @author CovertJaguar - */ public interface IPipeDefinition { String getUniqueTag(); diff --git a/common/buildcraft/api/transport/IPipeTile.java b/common/buildcraft/api/transport/IPipeTile.java index 91c70eb7..22f287f2 100644 --- a/common/buildcraft/api/transport/IPipeTile.java +++ b/common/buildcraft/api/transport/IPipeTile.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.transport; diff --git a/common/buildcraft/api/transport/PipeBehavior.java b/common/buildcraft/api/transport/PipeBehavior.java index ef0b3605..66c528cb 100644 --- a/common/buildcraft/api/transport/PipeBehavior.java +++ b/common/buildcraft/api/transport/PipeBehavior.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -13,10 +13,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public abstract class PipeBehavior { public final TileEntity tile; diff --git a/common/buildcraft/api/transport/PipeManager.java b/common/buildcraft/api/transport/PipeManager.java index c78c86e2..ae7bd918 100644 --- a/common/buildcraft/api/transport/PipeManager.java +++ b/common/buildcraft/api/transport/PipeManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.api.transport; import java.util.ArrayList; diff --git a/common/buildcraft/api/transport/PipeWire.java b/common/buildcraft/api/transport/PipeWire.java index a668ba55..8024e6bb 100644 --- a/common/buildcraft/api/transport/PipeWire.java +++ b/common/buildcraft/api/transport/PipeWire.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -12,10 +12,6 @@ import java.util.Locale; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public enum PipeWire { RED, BLUE, GREEN, YELLOW; diff --git a/common/buildcraft/builders/BlockArchitect.java b/common/buildcraft/builders/BlockArchitect.java index cb2f3420..66edb169 100644 --- a/common/buildcraft/builders/BlockArchitect.java +++ b/common/buildcraft/builders/BlockArchitect.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/BlockBlueprintLibrary.java b/common/buildcraft/builders/BlockBlueprintLibrary.java index dd78f65e..f06f4beb 100644 --- a/common/buildcraft/builders/BlockBlueprintLibrary.java +++ b/common/buildcraft/builders/BlockBlueprintLibrary.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index b3a29888..1e1f20df 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders; diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index f38fe06e..f77c04d2 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 9c37a814..7340f814 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders; diff --git a/common/buildcraft/builders/BlockPathMarker.java b/common/buildcraft/builders/BlockPathMarker.java index 197f62ad..129e1dec 100644 --- a/common/buildcraft/builders/BlockPathMarker.java +++ b/common/buildcraft/builders/BlockPathMarker.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.core.utils.Utils; diff --git a/common/buildcraft/builders/BuilderProxy.java b/common/buildcraft/builders/BuilderProxy.java index de38e264..f2bb842a 100644 --- a/common/buildcraft/builders/BuilderProxy.java +++ b/common/buildcraft/builders/BuilderProxy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import cpw.mods.fml.common.SidedProxy; diff --git a/common/buildcraft/builders/BuilderProxyClient.java b/common/buildcraft/builders/BuilderProxyClient.java index f06a6569..05734cc7 100644 --- a/common/buildcraft/builders/BuilderProxyClient.java +++ b/common/buildcraft/builders/BuilderProxyClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/BuildersProxy.java b/common/buildcraft/builders/BuildersProxy.java index 66146e09..dedfb570 100644 --- a/common/buildcraft/builders/BuildersProxy.java +++ b/common/buildcraft/builders/BuildersProxy.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import net.minecraft.block.Block; diff --git a/common/buildcraft/builders/ClientBuilderHook.java b/common/buildcraft/builders/ClientBuilderHook.java index d68e43b1..62d59507 100644 --- a/common/buildcraft/builders/ClientBuilderHook.java +++ b/common/buildcraft/builders/ClientBuilderHook.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/EventHandlerBuilders.java b/common/buildcraft/builders/EventHandlerBuilders.java index 7f6f384f..27ea7402 100644 --- a/common/buildcraft/builders/EventHandlerBuilders.java +++ b/common/buildcraft/builders/EventHandlerBuilders.java @@ -1,11 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import cpw.mods.fml.common.FMLCommonHandler; diff --git a/common/buildcraft/builders/GuiHandler.java b/common/buildcraft/builders/GuiHandler.java index b6727c14..422adf23 100644 --- a/common/buildcraft/builders/GuiHandler.java +++ b/common/buildcraft/builders/GuiHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.builders.gui.ContainerBlueprintLibrary; diff --git a/common/buildcraft/builders/IBuilderHook.java b/common/buildcraft/builders/IBuilderHook.java index 4a7ae238..ce06a593 100644 --- a/common/buildcraft/builders/IBuilderHook.java +++ b/common/buildcraft/builders/IBuilderHook.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.core.blueprints.BptRootIndex; diff --git a/common/buildcraft/builders/ItemBptBase.java b/common/buildcraft/builders/ItemBptBase.java index 46a9b2b2..05bf9171 100644 --- a/common/buildcraft/builders/ItemBptBase.java +++ b/common/buildcraft/builders/ItemBptBase.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/ItemBptBluePrint.java b/common/buildcraft/builders/ItemBptBluePrint.java index 2c5ea4e5..7fb4d5d0 100644 --- a/common/buildcraft/builders/ItemBptBluePrint.java +++ b/common/buildcraft/builders/ItemBptBluePrint.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/builders/ItemBptTemplate.java b/common/buildcraft/builders/ItemBptTemplate.java index 0a655e4e..852c5c84 100644 --- a/common/buildcraft/builders/ItemBptTemplate.java +++ b/common/buildcraft/builders/ItemBptTemplate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/builders/TileArchitect.java b/common/buildcraft/builders/TileArchitect.java index 6181db0e..b070ca4c 100644 --- a/common/buildcraft/builders/TileArchitect.java +++ b/common/buildcraft/builders/TileArchitect.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders; diff --git a/common/buildcraft/builders/TileBlueprintLibrary.java b/common/buildcraft/builders/TileBlueprintLibrary.java index 7c0de2f3..3d043e07 100644 --- a/common/buildcraft/builders/TileBlueprintLibrary.java +++ b/common/buildcraft/builders/TileBlueprintLibrary.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/TileBuilder.java b/common/buildcraft/builders/TileBuilder.java index 114a66d3..a8d82022 100644 --- a/common/buildcraft/builders/TileBuilder.java +++ b/common/buildcraft/builders/TileBuilder.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders; diff --git a/common/buildcraft/builders/TileFiller.java b/common/buildcraft/builders/TileFiller.java index fea0de87..9eb3ab83 100644 --- a/common/buildcraft/builders/TileFiller.java +++ b/common/buildcraft/builders/TileFiller.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders; diff --git a/common/buildcraft/builders/TileMarker.java b/common/buildcraft/builders/TileMarker.java index 0a7ba375..4de578dd 100644 --- a/common/buildcraft/builders/TileMarker.java +++ b/common/buildcraft/builders/TileMarker.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/TilePathMarker.java b/common/buildcraft/builders/TilePathMarker.java index 541b3118..a8eea89c 100644 --- a/common/buildcraft/builders/TilePathMarker.java +++ b/common/buildcraft/builders/TilePathMarker.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/filler/FillerRegistry.java b/common/buildcraft/builders/filler/FillerRegistry.java index abb7141c..9f4c2785 100644 --- a/common/buildcraft/builders/filler/FillerRegistry.java +++ b/common/buildcraft/builders/filler/FillerRegistry.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler; diff --git a/common/buildcraft/builders/filler/pattern/FillerPattern.java b/common/buildcraft/builders/filler/pattern/FillerPattern.java index 11a327a0..752dd7d8 100644 --- a/common/buildcraft/builders/filler/pattern/FillerPattern.java +++ b/common/buildcraft/builders/filler/pattern/FillerPattern.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternBox.java b/common/buildcraft/builders/filler/pattern/PatternBox.java index 615466fe..0527b3fa 100644 --- a/common/buildcraft/builders/filler/pattern/PatternBox.java +++ b/common/buildcraft/builders/filler/pattern/PatternBox.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternClear.java b/common/buildcraft/builders/filler/pattern/PatternClear.java index 03b33dad..6eaa4f1d 100644 --- a/common/buildcraft/builders/filler/pattern/PatternClear.java +++ b/common/buildcraft/builders/filler/pattern/PatternClear.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternCylinder.java b/common/buildcraft/builders/filler/pattern/PatternCylinder.java index af6e3a12..801748de 100644 --- a/common/buildcraft/builders/filler/pattern/PatternCylinder.java +++ b/common/buildcraft/builders/filler/pattern/PatternCylinder.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternFill.java b/common/buildcraft/builders/filler/pattern/PatternFill.java index ce27d1df..ae8657bc 100644 --- a/common/buildcraft/builders/filler/pattern/PatternFill.java +++ b/common/buildcraft/builders/filler/pattern/PatternFill.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternFlatten.java b/common/buildcraft/builders/filler/pattern/PatternFlatten.java index 34ab3aba..dcd682f9 100644 --- a/common/buildcraft/builders/filler/pattern/PatternFlatten.java +++ b/common/buildcraft/builders/filler/pattern/PatternFlatten.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternHorizon.java b/common/buildcraft/builders/filler/pattern/PatternHorizon.java index f35911ec..60a479f0 100644 --- a/common/buildcraft/builders/filler/pattern/PatternHorizon.java +++ b/common/buildcraft/builders/filler/pattern/PatternHorizon.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternPyramid.java b/common/buildcraft/builders/filler/pattern/PatternPyramid.java index 352b93a2..3ace2ec1 100644 --- a/common/buildcraft/builders/filler/pattern/PatternPyramid.java +++ b/common/buildcraft/builders/filler/pattern/PatternPyramid.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/filler/pattern/PatternStairs.java b/common/buildcraft/builders/filler/pattern/PatternStairs.java index 3a1e0c72..b219f272 100644 --- a/common/buildcraft/builders/filler/pattern/PatternStairs.java +++ b/common/buildcraft/builders/filler/pattern/PatternStairs.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.filler.pattern; diff --git a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java index e3ad35bc..e87ba3ae 100644 --- a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders.gui; import buildcraft.builders.TileBlueprintLibrary; diff --git a/common/buildcraft/builders/gui/ContainerBuilder.java b/common/buildcraft/builders/gui/ContainerBuilder.java index 3e9e1ac7..2c66d0bd 100644 --- a/common/buildcraft/builders/gui/ContainerBuilder.java +++ b/common/buildcraft/builders/gui/ContainerBuilder.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders.gui; import buildcraft.builders.TileBuilder; diff --git a/common/buildcraft/builders/gui/ContainerFiller.java b/common/buildcraft/builders/gui/ContainerFiller.java index 90f614ea..b264cdc1 100644 --- a/common/buildcraft/builders/gui/ContainerFiller.java +++ b/common/buildcraft/builders/gui/ContainerFiller.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.gui; diff --git a/common/buildcraft/builders/gui/ContainerTemplate.java b/common/buildcraft/builders/gui/ContainerTemplate.java index 9d813283..15eb2a6b 100644 --- a/common/buildcraft/builders/gui/ContainerTemplate.java +++ b/common/buildcraft/builders/gui/ContainerTemplate.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.builders.gui; import buildcraft.builders.TileArchitect; diff --git a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java index 6e1aee5f..4eede86c 100644 --- a/common/buildcraft/builders/gui/GuiBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/GuiBlueprintLibrary.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.gui; diff --git a/common/buildcraft/builders/gui/GuiBuilder.java b/common/buildcraft/builders/gui/GuiBuilder.java index 26bdc4c8..8bc8c4ad 100644 --- a/common/buildcraft/builders/gui/GuiBuilder.java +++ b/common/buildcraft/builders/gui/GuiBuilder.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.gui; diff --git a/common/buildcraft/builders/gui/GuiFiller.java b/common/buildcraft/builders/gui/GuiFiller.java index 95a82e61..9752ecac 100644 --- a/common/buildcraft/builders/gui/GuiFiller.java +++ b/common/buildcraft/builders/gui/GuiFiller.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.gui; diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index cee150c1..c5cfa09c 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.gui; diff --git a/common/buildcraft/builders/network/PacketHandlerBuilders.java b/common/buildcraft/builders/network/PacketHandlerBuilders.java index 78b150f1..43c937f7 100644 --- a/common/buildcraft/builders/network/PacketHandlerBuilders.java +++ b/common/buildcraft/builders/network/PacketHandlerBuilders.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders.network; import buildcraft.BuildCraftBuilders; diff --git a/common/buildcraft/builders/network/PacketLibraryAction.java b/common/buildcraft/builders/network/PacketLibraryAction.java index 4fcb5f28..1e91971e 100644 --- a/common/buildcraft/builders/network/PacketLibraryAction.java +++ b/common/buildcraft/builders/network/PacketLibraryAction.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders.network; import buildcraft.core.network.PacketCoordinates; diff --git a/common/buildcraft/builders/triggers/ActionFiller.java b/common/buildcraft/builders/triggers/ActionFiller.java index 09ca8444..0c991df1 100644 --- a/common/buildcraft/builders/triggers/ActionFiller.java +++ b/common/buildcraft/builders/triggers/ActionFiller.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.builders.triggers; diff --git a/common/buildcraft/builders/triggers/BuildersActionProvider.java b/common/buildcraft/builders/triggers/BuildersActionProvider.java index 3602034a..d4bfc1fc 100644 --- a/common/buildcraft/builders/triggers/BuildersActionProvider.java +++ b/common/buildcraft/builders/triggers/BuildersActionProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.builders.triggers; import buildcraft.api.filler.FillerManager; @@ -8,10 +16,6 @@ import java.util.LinkedList; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; -/** - * - * @author CovertJaguar - */ public class BuildersActionProvider implements IActionProvider { @Override diff --git a/common/buildcraft/core/BlockBuildCraft.java b/common/buildcraft/core/BlockBuildCraft.java index 0d780e9e..b4957d29 100644 --- a/common/buildcraft/core/BlockBuildCraft.java +++ b/common/buildcraft/core/BlockBuildCraft.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.core.utils.Utils; diff --git a/common/buildcraft/core/BlockIndex.java b/common/buildcraft/core/BlockIndex.java index f9097b28..508f9543 100644 --- a/common/buildcraft/core/BlockIndex.java +++ b/common/buildcraft/core/BlockIndex.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import net.minecraft.block.Block; diff --git a/common/buildcraft/core/BlockSpring.java b/common/buildcraft/core/BlockSpring.java index 69d481d3..32f8779a 100644 --- a/common/buildcraft/core/BlockSpring.java +++ b/common/buildcraft/core/BlockSpring.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/core/Box.java b/common/buildcraft/core/Box.java index d33eb7ba..91b1e10e 100644 --- a/common/buildcraft/core/Box.java +++ b/common/buildcraft/core/Box.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/BuildCraftConfiguration.java b/common/buildcraft/core/BuildCraftConfiguration.java index 0aec3428..7d78fa9e 100644 --- a/common/buildcraft/core/BuildCraftConfiguration.java +++ b/common/buildcraft/core/BuildCraftConfiguration.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import java.io.File; diff --git a/common/buildcraft/core/ByteBuffer.java b/common/buildcraft/core/ByteBuffer.java index 89784b58..a0641fea 100644 --- a/common/buildcraft/core/ByteBuffer.java +++ b/common/buildcraft/core/ByteBuffer.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import java.util.LinkedList; diff --git a/common/buildcraft/core/CommandBuildCraft.java b/common/buildcraft/core/CommandBuildCraft.java index 8306be4d..8961baab 100644 --- a/common/buildcraft/core/CommandBuildCraft.java +++ b/common/buildcraft/core/CommandBuildCraft.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.core.proxy.CoreProxy; diff --git a/common/buildcraft/core/CoreConstants.java b/common/buildcraft/core/CoreConstants.java index eb9ab89d..be161fe3 100644 --- a/common/buildcraft/core/CoreConstants.java +++ b/common/buildcraft/core/CoreConstants.java @@ -1,17 +1,13 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; -/** - * - * @author CovertJaguar - */ public class CoreConstants { public static final float PIPE_MIN_POS = 0.25F; diff --git a/common/buildcraft/core/CoreIconProvider.java b/common/buildcraft/core/CoreIconProvider.java index 8b5fb490..6e3f2d65 100644 --- a/common/buildcraft/core/CoreIconProvider.java +++ b/common/buildcraft/core/CoreIconProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.api.core.IIconProvider; diff --git a/common/buildcraft/core/DefaultAreaProvider.java b/common/buildcraft/core/DefaultAreaProvider.java index e28844c8..8f01d0ae 100644 --- a/common/buildcraft/core/DefaultAreaProvider.java +++ b/common/buildcraft/core/DefaultAreaProvider.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import buildcraft.api.core.IAreaProvider; diff --git a/common/buildcraft/core/DefaultProps.java b/common/buildcraft/core/DefaultProps.java index e57eba9d..33d77c54 100644 --- a/common/buildcraft/core/DefaultProps.java +++ b/common/buildcraft/core/DefaultProps.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; public class DefaultProps { diff --git a/common/buildcraft/core/EntityBlock.java b/common/buildcraft/core/EntityBlock.java index e5d0bdea..c8070a02 100644 --- a/common/buildcraft/core/EntityBlock.java +++ b/common/buildcraft/core/EntityBlock.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/EntityEnergyLaser.java b/common/buildcraft/core/EntityEnergyLaser.java index eb324c93..aa6a5390 100644 --- a/common/buildcraft/core/EntityEnergyLaser.java +++ b/common/buildcraft/core/EntityEnergyLaser.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/EntityLaser.java b/common/buildcraft/core/EntityLaser.java index c5a88532..692678b3 100644 --- a/common/buildcraft/core/EntityLaser.java +++ b/common/buildcraft/core/EntityLaser.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/EntityPowerLaser.java b/common/buildcraft/core/EntityPowerLaser.java index edf3f424..57b6fa3a 100644 --- a/common/buildcraft/core/EntityPowerLaser.java +++ b/common/buildcraft/core/EntityPowerLaser.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.api.core.Position; diff --git a/common/buildcraft/core/EntityRobot.java b/common/buildcraft/core/EntityRobot.java index b670f524..57c2d9f4 100644 --- a/common/buildcraft/core/EntityRobot.java +++ b/common/buildcraft/core/EntityRobot.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/GuiIds.java b/common/buildcraft/core/GuiIds.java index 3d1263fb..dd9ae131 100644 --- a/common/buildcraft/core/GuiIds.java +++ b/common/buildcraft/core/GuiIds.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; public class GuiIds { diff --git a/common/buildcraft/core/IBptContributor.java b/common/buildcraft/core/IBptContributor.java index 2e008e4b..e4522e15 100644 --- a/common/buildcraft/core/IBptContributor.java +++ b/common/buildcraft/core/IBptContributor.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/core/IBuilderInventory.java b/common/buildcraft/core/IBuilderInventory.java index 2b77922c..861c653e 100644 --- a/common/buildcraft/core/IBuilderInventory.java +++ b/common/buildcraft/core/IBuilderInventory.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import net.minecraft.inventory.IInventory; diff --git a/common/buildcraft/core/IDropControlInventory.java b/common/buildcraft/core/IDropControlInventory.java index f13c339f..3c248814 100644 --- a/common/buildcraft/core/IDropControlInventory.java +++ b/common/buildcraft/core/IDropControlInventory.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; public interface IDropControlInventory { diff --git a/common/buildcraft/core/IFramePipeConnection.java b/common/buildcraft/core/IFramePipeConnection.java index 7dc850f8..e2301e3a 100644 --- a/common/buildcraft/core/IFramePipeConnection.java +++ b/common/buildcraft/core/IFramePipeConnection.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import net.minecraft.world.IBlockAccess; diff --git a/common/buildcraft/core/IInventoryRenderer.java b/common/buildcraft/core/IInventoryRenderer.java index 1caf7a44..f366c3cd 100644 --- a/common/buildcraft/core/IInventoryRenderer.java +++ b/common/buildcraft/core/IInventoryRenderer.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; public interface IInventoryRenderer { diff --git a/common/buildcraft/core/IItemPipe.java b/common/buildcraft/core/IItemPipe.java index ca8b2b45..f1778a07 100644 --- a/common/buildcraft/core/IItemPipe.java +++ b/common/buildcraft/core/IItemPipe.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; /** diff --git a/common/buildcraft/core/IMachine.java b/common/buildcraft/core/IMachine.java index 3ced98a9..4fb094d0 100644 --- a/common/buildcraft/core/IMachine.java +++ b/common/buildcraft/core/IMachine.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import buildcraft.api.gates.IAction; diff --git a/common/buildcraft/core/ITileBufferHolder.java b/common/buildcraft/core/ITileBufferHolder.java index 4cc31d63..c070f522 100644 --- a/common/buildcraft/core/ITileBufferHolder.java +++ b/common/buildcraft/core/ITileBufferHolder.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import net.minecraft.block.Block; diff --git a/common/buildcraft/core/InterModComms.java b/common/buildcraft/core/InterModComms.java index dfcc2c64..cba54075 100644 --- a/common/buildcraft/core/InterModComms.java +++ b/common/buildcraft/core/InterModComms.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/ItemBlockBuildCraft.java b/common/buildcraft/core/ItemBlockBuildCraft.java index 01d76262..f30bc0fe 100644 --- a/common/buildcraft/core/ItemBlockBuildCraft.java +++ b/common/buildcraft/core/ItemBlockBuildCraft.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.core.utils.StringUtils; diff --git a/common/buildcraft/core/ItemBuildCraft.java b/common/buildcraft/core/ItemBuildCraft.java index 8ce6e79e..d3d6998f 100644 --- a/common/buildcraft/core/ItemBuildCraft.java +++ b/common/buildcraft/core/ItemBuildCraft.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/ItemSpring.java b/common/buildcraft/core/ItemSpring.java index bc145921..deb2580d 100644 --- a/common/buildcraft/core/ItemSpring.java +++ b/common/buildcraft/core/ItemSpring.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core; import java.util.Locale; diff --git a/common/buildcraft/core/ItemWrench.java b/common/buildcraft/core/ItemWrench.java index 7f519c65..5922b1b5 100644 --- a/common/buildcraft/core/ItemWrench.java +++ b/common/buildcraft/core/ItemWrench.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.api.tools.IToolWrench; diff --git a/common/buildcraft/core/SpringPopulate.java b/common/buildcraft/core/SpringPopulate.java index 73e0fc8c..e8e0b560 100644 --- a/common/buildcraft/core/SpringPopulate.java +++ b/common/buildcraft/core/SpringPopulate.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/TickHandlerCoreClient.java b/common/buildcraft/core/TickHandlerCoreClient.java index af481a15..30b04759 100644 --- a/common/buildcraft/core/TickHandlerCoreClient.java +++ b/common/buildcraft/core/TickHandlerCoreClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.core.proxy.CoreProxy; diff --git a/common/buildcraft/core/TileBuffer.java b/common/buildcraft/core/TileBuffer.java index b937b39c..2dd8b0e2 100644 --- a/common/buildcraft/core/TileBuffer.java +++ b/common/buildcraft/core/TileBuffer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 0f17c1e5..74f547b7 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core; diff --git a/common/buildcraft/core/Version.java b/common/buildcraft/core/Version.java index 3269ca07..fd616df0 100644 --- a/common/buildcraft/core/Version.java +++ b/common/buildcraft/core/Version.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/blueprints/BptActionBuild.java b/common/buildcraft/core/blueprints/BptActionBuild.java index b8ece4a6..38af87fc 100644 --- a/common/buildcraft/core/blueprints/BptActionBuild.java +++ b/common/buildcraft/core/blueprints/BptActionBuild.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.blueprints; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/core/blueprints/BptBase.java b/common/buildcraft/core/blueprints/BptBase.java index 72cccde9..fca26d0d 100644 --- a/common/buildcraft/core/blueprints/BptBase.java +++ b/common/buildcraft/core/blueprints/BptBase.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/blueprints/BptBlueprint.java b/common/buildcraft/core/blueprints/BptBlueprint.java index 41df5223..45fa8aee 100644 --- a/common/buildcraft/core/blueprints/BptBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBlueprint.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.api.blueprints.BlockSignature; diff --git a/common/buildcraft/core/blueprints/BptBuilderBase.java b/common/buildcraft/core/blueprints/BptBuilderBase.java index c3be6bb0..8742de16 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBase.java +++ b/common/buildcraft/core/blueprints/BptBuilderBase.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.api.core.IAreaProvider; diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index d64faff7..0a0a5516 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.core.IBuilderInventory; diff --git a/common/buildcraft/core/blueprints/BptBuilderTemplate.java b/common/buildcraft/core/blueprints/BptBuilderTemplate.java index f2b35fd8..25cbfaa7 100644 --- a/common/buildcraft/core/blueprints/BptBuilderTemplate.java +++ b/common/buildcraft/core/blueprints/BptBuilderTemplate.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.core.IBuilderInventory; diff --git a/common/buildcraft/core/blueprints/BptContext.java b/common/buildcraft/core/blueprints/BptContext.java index ff74dfdd..e1408c4c 100644 --- a/common/buildcraft/core/blueprints/BptContext.java +++ b/common/buildcraft/core/blueprints/BptContext.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.api.blueprints.IBptContext; diff --git a/common/buildcraft/core/blueprints/BptDataStream.java b/common/buildcraft/core/blueprints/BptDataStream.java index 05046def..6ab431a7 100644 --- a/common/buildcraft/core/blueprints/BptDataStream.java +++ b/common/buildcraft/core/blueprints/BptDataStream.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import java.io.DataInput; diff --git a/common/buildcraft/core/blueprints/BptError.java b/common/buildcraft/core/blueprints/BptError.java index 7a4fa0a5..7d187f15 100644 --- a/common/buildcraft/core/blueprints/BptError.java +++ b/common/buildcraft/core/blueprints/BptError.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.core.utils.BCLog; diff --git a/common/buildcraft/core/blueprints/BptItem.java b/common/buildcraft/core/blueprints/BptItem.java index 59329dc9..64215151 100644 --- a/common/buildcraft/core/blueprints/BptItem.java +++ b/common/buildcraft/core/blueprints/BptItem.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/core/blueprints/BptPlayerIndex.java b/common/buildcraft/core/blueprints/BptPlayerIndex.java index 4dc666a2..da191fa4 100644 --- a/common/buildcraft/core/blueprints/BptPlayerIndex.java +++ b/common/buildcraft/core/blueprints/BptPlayerIndex.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.blueprints; import buildcraft.core.proxy.CoreProxy; diff --git a/common/buildcraft/core/blueprints/BptRootIndex.java b/common/buildcraft/core/blueprints/BptRootIndex.java index 926082c3..1a46ff74 100644 --- a/common/buildcraft/core/blueprints/BptRootIndex.java +++ b/common/buildcraft/core/blueprints/BptRootIndex.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import buildcraft.core.proxy.CoreProxy; diff --git a/common/buildcraft/core/blueprints/BptSlot.java b/common/buildcraft/core/blueprints/BptSlot.java index 11e69b2a..48508989 100644 --- a/common/buildcraft/core/blueprints/BptSlot.java +++ b/common/buildcraft/core/blueprints/BptSlot.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.blueprints; import buildcraft.api.blueprints.BlueprintManager; diff --git a/common/buildcraft/core/blueprints/BptTemplate.java b/common/buildcraft/core/blueprints/BptTemplate.java index 355a694e..5ed4e6b2 100644 --- a/common/buildcraft/core/blueprints/BptTemplate.java +++ b/common/buildcraft/core/blueprints/BptTemplate.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.blueprints; import java.io.BufferedReader; diff --git a/common/buildcraft/core/fluids/BCFluid.java b/common/buildcraft/core/fluids/BCFluid.java index 8df7bbd8..4d3983ec 100644 --- a/common/buildcraft/core/fluids/BCFluid.java +++ b/common/buildcraft/core/fluids/BCFluid.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.core.fluids; import buildcraft.core.utils.StringUtils; import net.minecraftforge.fluids.Fluid; -/** - * - * @author CovertJaguar - */ public class BCFluid extends Fluid { public BCFluid(String name) { diff --git a/common/buildcraft/core/fluids/FluidUtils.java b/common/buildcraft/core/fluids/FluidUtils.java index 100eeb4b..1081f3d2 100644 --- a/common/buildcraft/core/fluids/FluidUtils.java +++ b/common/buildcraft/core/fluids/FluidUtils.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.fluids; import buildcraft.core.TileBuffer; @@ -16,10 +24,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; -/** - * - * @author CovertJaguar - */ public class FluidUtils { public static boolean handleRightClick(IFluidHandler tank, ForgeDirection side, EntityPlayer player, boolean fill, boolean drain) { diff --git a/common/buildcraft/core/fluids/RestrictedTank.java b/common/buildcraft/core/fluids/RestrictedTank.java index 40f92e11..8980f76c 100644 --- a/common/buildcraft/core/fluids/RestrictedTank.java +++ b/common/buildcraft/core/fluids/RestrictedTank.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -12,10 +12,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -/** - * - * @author CovertJaguar - */ public class RestrictedTank extends Tank { private final Fluid[] acceptedFluids; diff --git a/common/buildcraft/core/fluids/SingleUseTank.java b/common/buildcraft/core/fluids/SingleUseTank.java index 2b18ba63..4c4a3339 100644 --- a/common/buildcraft/core/fluids/SingleUseTank.java +++ b/common/buildcraft/core/fluids/SingleUseTank.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -14,10 +14,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -/** - * - * @author CovertJaguar - */ public class SingleUseTank extends Tank { private Fluid acceptedFluid; diff --git a/common/buildcraft/core/fluids/Tank.java b/common/buildcraft/core/fluids/Tank.java index f165616e..bee7a45a 100644 --- a/common/buildcraft/core/fluids/Tank.java +++ b/common/buildcraft/core/fluids/Tank.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -16,10 +16,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidTank; -/** - * - * @author CovertJaguar - */ public class Tank extends FluidTank { private final String name; diff --git a/common/buildcraft/core/fluids/TankManager.java b/common/buildcraft/core/fluids/TankManager.java index 0bc36878..e18e4165 100644 --- a/common/buildcraft/core/fluids/TankManager.java +++ b/common/buildcraft/core/fluids/TankManager.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -28,10 +28,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -/** - * - * @author CovertJaguar - */ public class TankManager extends ForwardingList implements IFluidHandler, List { private List tanks = new ArrayList(); diff --git a/common/buildcraft/core/gui/BuildCraftContainer.java b/common/buildcraft/core/gui/BuildCraftContainer.java index e34c394b..35ed0416 100644 --- a/common/buildcraft/core/gui/BuildCraftContainer.java +++ b/common/buildcraft/core/gui/BuildCraftContainer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui; diff --git a/common/buildcraft/core/gui/GuiAdvancedInterface.java b/common/buildcraft/core/gui/GuiAdvancedInterface.java index 36164f34..ee4e7693 100644 --- a/common/buildcraft/core/gui/GuiAdvancedInterface.java +++ b/common/buildcraft/core/gui/GuiAdvancedInterface.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui; import net.minecraft.client.renderer.OpenGlHelper; diff --git a/common/buildcraft/core/gui/GuiBuildCraft.java b/common/buildcraft/core/gui/GuiBuildCraft.java index 2a860ef9..f0b7290c 100644 --- a/common/buildcraft/core/gui/GuiBuildCraft.java +++ b/common/buildcraft/core/gui/GuiBuildCraft.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/core/gui/GuiTools.java b/common/buildcraft/core/gui/GuiTools.java index 570000d8..36e543ee 100644 --- a/common/buildcraft/core/gui/GuiTools.java +++ b/common/buildcraft/core/gui/GuiTools.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui; import buildcraft.core.gui.buttons.GuiBetterButton; diff --git a/common/buildcraft/core/gui/buttons/ButtonTextureSet.java b/common/buildcraft/core/gui/buttons/ButtonTextureSet.java index 65aad053..82a5c9d6 100644 --- a/common/buildcraft/core/gui/buttons/ButtonTextureSet.java +++ b/common/buildcraft/core/gui/buttons/ButtonTextureSet.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; -/** - * - * @author CovertJaguar - */ public class ButtonTextureSet implements IButtonTextureSet { private final int x, y, height, width; diff --git a/common/buildcraft/core/gui/buttons/GuiBetterButton.java b/common/buildcraft/core/gui/buttons/GuiBetterButton.java index 95ab5803..d32838b4 100644 --- a/common/buildcraft/core/gui/buttons/GuiBetterButton.java +++ b/common/buildcraft/core/gui/buttons/GuiBetterButton.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import buildcraft.core.DefaultProps; @@ -11,10 +19,6 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -/** - * - * @author CovertJaguar - */ @SideOnly(Side.CLIENT) public class GuiBetterButton extends GuiButton implements IToolTipProvider { diff --git a/common/buildcraft/core/gui/buttons/GuiButtonSmall.java b/common/buildcraft/core/gui/buttons/GuiButtonSmall.java index abeb26cf..a54c0b6a 100644 --- a/common/buildcraft/core/gui/buttons/GuiButtonSmall.java +++ b/common/buildcraft/core/gui/buttons/GuiButtonSmall.java @@ -1,12 +1,16 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * - * @author CovertJaguar - */ @SideOnly(Side.CLIENT) public class GuiButtonSmall extends GuiBetterButton { diff --git a/common/buildcraft/core/gui/buttons/GuiMultiButton.java b/common/buildcraft/core/gui/buttons/GuiMultiButton.java index 03cca2e4..12e029eb 100644 --- a/common/buildcraft/core/gui/buttons/GuiMultiButton.java +++ b/common/buildcraft/core/gui/buttons/GuiMultiButton.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import net.minecraft.client.Minecraft; @@ -9,10 +17,6 @@ import buildcraft.core.gui.tooltips.ToolTip; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * - * @author CovertJaguar - */ @SideOnly(Side.CLIENT) public class GuiMultiButton extends GuiBetterButton { diff --git a/common/buildcraft/core/gui/buttons/GuiToggleButton.java b/common/buildcraft/core/gui/buttons/GuiToggleButton.java index 5ac298c3..c155ed8b 100644 --- a/common/buildcraft/core/gui/buttons/GuiToggleButton.java +++ b/common/buildcraft/core/gui/buttons/GuiToggleButton.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; -/** - * - * @author CovertJaguar - */ public class GuiToggleButton extends GuiBetterButton { public boolean active; diff --git a/common/buildcraft/core/gui/buttons/GuiToggleButtonSmall.java b/common/buildcraft/core/gui/buttons/GuiToggleButtonSmall.java index 38f2b220..4ffe0111 100644 --- a/common/buildcraft/core/gui/buttons/GuiToggleButtonSmall.java +++ b/common/buildcraft/core/gui/buttons/GuiToggleButtonSmall.java @@ -1,12 +1,16 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * - * @author CovertJaguar - */ @SideOnly(Side.CLIENT) public class GuiToggleButtonSmall extends GuiToggleButton { diff --git a/common/buildcraft/core/gui/buttons/IButtonTextureSet.java b/common/buildcraft/core/gui/buttons/IButtonTextureSet.java index 6fbb4e76..2e9b23bf 100644 --- a/common/buildcraft/core/gui/buttons/IButtonTextureSet.java +++ b/common/buildcraft/core/gui/buttons/IButtonTextureSet.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; -/** - * - * @author CovertJaguar - */ public interface IButtonTextureSet { public int getX(); diff --git a/common/buildcraft/core/gui/buttons/IMultiButtonState.java b/common/buildcraft/core/gui/buttons/IMultiButtonState.java index 33deca20..36b2f123 100644 --- a/common/buildcraft/core/gui/buttons/IMultiButtonState.java +++ b/common/buildcraft/core/gui/buttons/IMultiButtonState.java @@ -1,11 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import buildcraft.core.gui.tooltips.ToolTip; -/** - * - * @author CovertJaguar - */ public interface IMultiButtonState { public String getLabel(); diff --git a/common/buildcraft/core/gui/buttons/LockButtonState.java b/common/buildcraft/core/gui/buttons/LockButtonState.java index db86bed9..7b6a6f48 100644 --- a/common/buildcraft/core/gui/buttons/LockButtonState.java +++ b/common/buildcraft/core/gui/buttons/LockButtonState.java @@ -1,11 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import buildcraft.core.gui.tooltips.ToolTip; -/** - * - * @author CovertJaguar - */ public enum LockButtonState implements IMultiButtonState { UNLOCKED(new ButtonTextureSet(224, 0, 16, 16)), LOCKED(new ButtonTextureSet(240, 0, 16, 16)); diff --git a/common/buildcraft/core/gui/buttons/MultiButtonController.java b/common/buildcraft/core/gui/buttons/MultiButtonController.java index 0de811aa..1f087b4d 100644 --- a/common/buildcraft/core/gui/buttons/MultiButtonController.java +++ b/common/buildcraft/core/gui/buttons/MultiButtonController.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; import net.minecraft.nbt.NBTTagByte; @@ -6,8 +14,6 @@ import net.minecraft.nbt.NBTTagString; /** * T should be an Enum of button states - * - * @author CovertJaguar */ public class MultiButtonController { diff --git a/common/buildcraft/core/gui/buttons/StandardButtonTextureSets.java b/common/buildcraft/core/gui/buttons/StandardButtonTextureSets.java index 5155cd29..4654d4db 100644 --- a/common/buildcraft/core/gui/buttons/StandardButtonTextureSets.java +++ b/common/buildcraft/core/gui/buttons/StandardButtonTextureSets.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.buttons; -/** - * - * @author CovertJaguar - */ public enum StandardButtonTextureSets implements IButtonTextureSet { LARGE_BUTTON(0, 0, 20, 200), diff --git a/common/buildcraft/core/gui/slots/IPhantomSlot.java b/common/buildcraft/core/gui/slots/IPhantomSlot.java index 20be7af3..16184cf9 100644 --- a/common/buildcraft/core/gui/slots/IPhantomSlot.java +++ b/common/buildcraft/core/gui/slots/IPhantomSlot.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.slots; /* diff --git a/common/buildcraft/core/gui/slots/SlotBase.java b/common/buildcraft/core/gui/slots/SlotBase.java index 63cedc8c..f94aa385 100644 --- a/common/buildcraft/core/gui/slots/SlotBase.java +++ b/common/buildcraft/core/gui/slots/SlotBase.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui.slots; @@ -12,10 +13,6 @@ import buildcraft.core.gui.tooltips.ToolTip; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -/** - * - * @author CovertJaguar - */ public class SlotBase extends Slot implements IToolTipProvider { private ToolTip toolTips; diff --git a/common/buildcraft/core/gui/slots/SlotLimited.java b/common/buildcraft/core/gui/slots/SlotLimited.java index ef07a1f8..57feedd9 100644 --- a/common/buildcraft/core/gui/slots/SlotLimited.java +++ b/common/buildcraft/core/gui/slots/SlotLimited.java @@ -1,11 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.slots; import net.minecraft.inventory.IInventory; -/** - * - * @author CovertJaguar - */ public class SlotLimited extends SlotBase { private final int limit; diff --git a/common/buildcraft/core/gui/slots/SlotOutput.java b/common/buildcraft/core/gui/slots/SlotOutput.java index 590c82b7..ede106b0 100644 --- a/common/buildcraft/core/gui/slots/SlotOutput.java +++ b/common/buildcraft/core/gui/slots/SlotOutput.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.slots; import net.minecraft.inventory.IInventory; diff --git a/common/buildcraft/core/gui/slots/SlotPhantom.java b/common/buildcraft/core/gui/slots/SlotPhantom.java index 7b88df2d..6341e023 100644 --- a/common/buildcraft/core/gui/slots/SlotPhantom.java +++ b/common/buildcraft/core/gui/slots/SlotPhantom.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui.slots; @@ -10,10 +11,6 @@ package buildcraft.core.gui.slots; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -/** - * - * @author CovertJaguar - */ public class SlotPhantom extends SlotBase implements IPhantomSlot { public SlotPhantom(IInventory iinventory, int slotIndex, int posX, int posY) { diff --git a/common/buildcraft/core/gui/slots/SlotUntouchable.java b/common/buildcraft/core/gui/slots/SlotUntouchable.java index e5a015d9..97983506 100644 --- a/common/buildcraft/core/gui/slots/SlotUntouchable.java +++ b/common/buildcraft/core/gui/slots/SlotUntouchable.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui.slots; @@ -11,10 +12,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class SlotUntouchable extends SlotBase implements IPhantomSlot { public SlotUntouchable(IInventory contents, int id, int x, int y) { diff --git a/common/buildcraft/core/gui/slots/SlotValidated.java b/common/buildcraft/core/gui/slots/SlotValidated.java index b3e1a89f..26224485 100644 --- a/common/buildcraft/core/gui/slots/SlotValidated.java +++ b/common/buildcraft/core/gui/slots/SlotValidated.java @@ -1,10 +1,10 @@ -/* - * Copyright (c) CovertJaguar, 2011 http://railcraft.info +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * This code is the property of CovertJaguar - * and may only be used with explicit written - * permission unless otherwise specified on the - * license page at railcraft.wikispaces.com. + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui.slots; @@ -12,10 +12,6 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -/** - * - * @author SandGrainOne - */ public class SlotValidated extends Slot { public SlotValidated(IInventory inv, int id, int x, int y) { diff --git a/common/buildcraft/core/gui/slots/SlotWorkbench.java b/common/buildcraft/core/gui/slots/SlotWorkbench.java index 5185e732..c3280a1e 100644 --- a/common/buildcraft/core/gui/slots/SlotWorkbench.java +++ b/common/buildcraft/core/gui/slots/SlotWorkbench.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.slots; import net.minecraft.inventory.IInventory; diff --git a/common/buildcraft/core/gui/tooltips/IToolTipProvider.java b/common/buildcraft/core/gui/tooltips/IToolTipProvider.java index 59351e3f..ad074b9e 100644 --- a/common/buildcraft/core/gui/tooltips/IToolTipProvider.java +++ b/common/buildcraft/core/gui/tooltips/IToolTipProvider.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.tooltips; -/** - * - * @author CovertJaguar - */ public interface IToolTipProvider { ToolTip getToolTip(); diff --git a/common/buildcraft/core/gui/tooltips/ToolTip.java b/common/buildcraft/core/gui/tooltips/ToolTip.java index 48ab984d..4afc49b7 100644 --- a/common/buildcraft/core/gui/tooltips/ToolTip.java +++ b/common/buildcraft/core/gui/tooltips/ToolTip.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.tooltips; import com.google.common.collect.ForwardingList; import java.util.ArrayList; import java.util.List; -/** - * - * @author CovertJaguar - */ public class ToolTip extends ForwardingList { private final List delegate = new ArrayList(); diff --git a/common/buildcraft/core/gui/tooltips/ToolTipLine.java b/common/buildcraft/core/gui/tooltips/ToolTipLine.java index 15059679..e6b2e69f 100644 --- a/common/buildcraft/core/gui/tooltips/ToolTipLine.java +++ b/common/buildcraft/core/gui/tooltips/ToolTipLine.java @@ -1,9 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.tooltips; -/** - * - * @author CovertJaguar - */ public class ToolTipLine { public String text; diff --git a/common/buildcraft/core/gui/widgets/ButtonWidget.java b/common/buildcraft/core/gui/widgets/ButtonWidget.java index 0cb200fc..da9a4364 100644 --- a/common/buildcraft/core/gui/widgets/ButtonWidget.java +++ b/common/buildcraft/core/gui/widgets/ButtonWidget.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -10,10 +10,6 @@ package buildcraft.core.gui.widgets; import buildcraft.core.gui.GuiBuildCraft; -/** - * - * @author CovertJaguar - */ public class ButtonWidget extends Widget { private boolean pressed; diff --git a/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java b/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java index 885283e2..1ad268ba 100644 --- a/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java +++ b/common/buildcraft/core/gui/widgets/FluidGaugeWidget.java @@ -1,6 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.widgets; - import buildcraft.core.fluids.Tank; import buildcraft.core.gui.GuiBuildCraft; import buildcraft.core.gui.tooltips.ToolTip; @@ -8,10 +15,6 @@ import buildcraft.core.render.FluidRenderer; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidStack; -/** - * - * @author CovertJaguar - */ public class FluidGaugeWidget extends Widget { public final Tank tank; diff --git a/common/buildcraft/core/gui/widgets/IIndicatorController.java b/common/buildcraft/core/gui/widgets/IIndicatorController.java index efece096..ffb1cfbf 100644 --- a/common/buildcraft/core/gui/widgets/IIndicatorController.java +++ b/common/buildcraft/core/gui/widgets/IIndicatorController.java @@ -1,12 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.widgets; import buildcraft.core.gui.tooltips.ToolTip; - -/** - * - * @author CovertJaguar - */ public interface IIndicatorController { ToolTip getToolTip(); diff --git a/common/buildcraft/core/gui/widgets/IndicatorController.java b/common/buildcraft/core/gui/widgets/IndicatorController.java index 85b6c056..6c09f0f4 100644 --- a/common/buildcraft/core/gui/widgets/IndicatorController.java +++ b/common/buildcraft/core/gui/widgets/IndicatorController.java @@ -1,12 +1,16 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.widgets; import buildcraft.core.gui.tooltips.ToolTip; import buildcraft.core.gui.tooltips.ToolTipLine; -/** - * - * @author CovertJaguar - */ public abstract class IndicatorController implements IIndicatorController { private final ToolTip tips = new ToolTip() { diff --git a/common/buildcraft/core/gui/widgets/IndicatorWidget.java b/common/buildcraft/core/gui/widgets/IndicatorWidget.java index 41c7b75f..0fd7992e 100644 --- a/common/buildcraft/core/gui/widgets/IndicatorWidget.java +++ b/common/buildcraft/core/gui/widgets/IndicatorWidget.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.gui.widgets; import buildcraft.core.gui.GuiBuildCraft; @@ -5,10 +13,6 @@ import buildcraft.core.gui.tooltips.ToolTip; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * - * @author CovertJaguar - */ public class IndicatorWidget extends Widget { public final IIndicatorController controller; diff --git a/common/buildcraft/core/gui/widgets/Widget.java b/common/buildcraft/core/gui/widgets/Widget.java index 3e79de41..771abb1a 100644 --- a/common/buildcraft/core/gui/widgets/Widget.java +++ b/common/buildcraft/core/gui/widgets/Widget.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.gui.widgets; @@ -17,10 +18,6 @@ import java.io.DataInputStream; import java.io.IOException; import net.minecraft.inventory.ICrafting; -/** - * - * @author CovertJaguar - */ public class Widget implements IToolTipProvider { public final int x; diff --git a/common/buildcraft/core/inventory/ITransactor.java b/common/buildcraft/core/inventory/ITransactor.java index 1a6a19fc..803068e0 100644 --- a/common/buildcraft/core/inventory/ITransactor.java +++ b/common/buildcraft/core/inventory/ITransactor.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.filters.IStackFilter; diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index 4aa04ad4..7c1d465e 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; @@ -15,10 +23,6 @@ import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public class InvUtils { public static int countItems(IInventory inv, ForgeDirection side, ItemStack... filter) { diff --git a/common/buildcraft/core/inventory/InventoryConcatenator.java b/common/buildcraft/core/inventory/InventoryConcatenator.java index bfd139ba..13112208 100644 --- a/common/buildcraft/core/inventory/InventoryConcatenator.java +++ b/common/buildcraft/core/inventory/InventoryConcatenator.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -16,8 +16,6 @@ import net.minecraft.item.ItemStack; /** * Allows you to deal with multiple inventories through a single interface. - * - * @author CovertJaguar */ public class InventoryConcatenator implements IInventory { diff --git a/common/buildcraft/core/inventory/InventoryCopy.java b/common/buildcraft/core/inventory/InventoryCopy.java index 0204b52d..99d3ad7d 100644 --- a/common/buildcraft/core/inventory/InventoryCopy.java +++ b/common/buildcraft/core/inventory/InventoryCopy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import net.minecraft.entity.player.EntityPlayer; @@ -9,8 +17,6 @@ import net.minecraft.item.ItemStack; * * Useful for performing inventory manipulations and then examining the results * without affecting the original inventory. - * - * @author CovertJaguar */ public class InventoryCopy implements IInventory { diff --git a/common/buildcraft/core/inventory/InventoryIterator.java b/common/buildcraft/core/inventory/InventoryIterator.java index e04f8f5d..59587a6e 100644 --- a/common/buildcraft/core/inventory/InventoryIterator.java +++ b/common/buildcraft/core/inventory/InventoryIterator.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import net.minecraft.inventory.IInventory; @@ -5,9 +13,6 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -/** - * @author CovertJaguar - */ public class InventoryIterator { /** diff --git a/common/buildcraft/core/inventory/InventoryIteratorSided.java b/common/buildcraft/core/inventory/InventoryIteratorSided.java index f9d8af65..e04b324c 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSided.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSided.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; @@ -6,9 +14,6 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -/** - * @author CovertJaguar - */ class InventoryIteratorSided implements Iterable { private final ISidedInventory inv; diff --git a/common/buildcraft/core/inventory/InventoryIteratorSimple.java b/common/buildcraft/core/inventory/InventoryIteratorSimple.java index e0b311ae..7e3b7a63 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSimple.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSimple.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; @@ -5,9 +13,6 @@ import java.util.Iterator; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -/** - * @author CovertJaguar - */ class InventoryIteratorSimple implements Iterable { private final IInventory inv; diff --git a/common/buildcraft/core/inventory/InventoryMapper.java b/common/buildcraft/core/inventory/InventoryMapper.java index f4237296..fcff04a0 100644 --- a/common/buildcraft/core/inventory/InventoryMapper.java +++ b/common/buildcraft/core/inventory/InventoryMapper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import net.minecraft.entity.player.EntityPlayer; @@ -8,8 +16,6 @@ import net.minecraft.item.ItemStack; * Wrapper class used to specify part of an existing inventory to be treated as * a complete inventory. Used primarily to map a side of an ISidedInventory, but * it is also helpful for complex inventories such as the Tunnel Bore. - * - * @author CovertJaguar */ public class InventoryMapper implements IInventory { diff --git a/common/buildcraft/core/inventory/InventoryWrapper.java b/common/buildcraft/core/inventory/InventoryWrapper.java index 1aec2cb9..08d61c25 100644 --- a/common/buildcraft/core/inventory/InventoryWrapper.java +++ b/common/buildcraft/core/inventory/InventoryWrapper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import net.minecraft.entity.player.EntityPlayer; diff --git a/common/buildcraft/core/inventory/InventoryWrapperSimple.java b/common/buildcraft/core/inventory/InventoryWrapperSimple.java index 2da6af71..84bb3f21 100644 --- a/common/buildcraft/core/inventory/InventoryWrapperSimple.java +++ b/common/buildcraft/core/inventory/InventoryWrapperSimple.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.utils.Utils; diff --git a/common/buildcraft/core/inventory/SimpleInventory.java b/common/buildcraft/core/inventory/SimpleInventory.java index 28c9be52..b7e2b9d2 100644 --- a/common/buildcraft/core/inventory/SimpleInventory.java +++ b/common/buildcraft/core/inventory/SimpleInventory.java @@ -1,7 +1,8 @@ /** - * Copyright (c) Krapht, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * "LogisticsPipes" is distributed under the terms of the Minecraft Mod Public + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ diff --git a/common/buildcraft/core/inventory/StackHelper.java b/common/buildcraft/core/inventory/StackHelper.java index 49437123..95c815a7 100644 --- a/common/buildcraft/core/inventory/StackHelper.java +++ b/common/buildcraft/core/inventory/StackHelper.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.inventory; diff --git a/common/buildcraft/core/inventory/Transactor.java b/common/buildcraft/core/inventory/Transactor.java index 58400ac4..55e71ca4 100644 --- a/common/buildcraft/core/inventory/Transactor.java +++ b/common/buildcraft/core/inventory/Transactor.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.api.inventory.ISpecialInventory; diff --git a/common/buildcraft/core/inventory/TransactorRoundRobin.java b/common/buildcraft/core/inventory/TransactorRoundRobin.java index fa6fa815..28ef6f5e 100644 --- a/common/buildcraft/core/inventory/TransactorRoundRobin.java +++ b/common/buildcraft/core/inventory/TransactorRoundRobin.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; diff --git a/common/buildcraft/core/inventory/TransactorSimple.java b/common/buildcraft/core/inventory/TransactorSimple.java index 586eef50..21600424 100644 --- a/common/buildcraft/core/inventory/TransactorSimple.java +++ b/common/buildcraft/core/inventory/TransactorSimple.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.core.inventory.InventoryIterator.IInvSlot; diff --git a/common/buildcraft/core/inventory/TransactorSpecial.java b/common/buildcraft/core/inventory/TransactorSpecial.java index 3cf6388b..0fa3414c 100644 --- a/common/buildcraft/core/inventory/TransactorSpecial.java +++ b/common/buildcraft/core/inventory/TransactorSpecial.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory; import buildcraft.api.inventory.ISpecialInventory; diff --git a/common/buildcraft/core/inventory/filters/ArrayStackFilter.java b/common/buildcraft/core/inventory/filters/ArrayStackFilter.java index 41fa0f76..bd22c00b 100644 --- a/common/buildcraft/core/inventory/filters/ArrayStackFilter.java +++ b/common/buildcraft/core/inventory/filters/ArrayStackFilter.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory.filters; import buildcraft.core.inventory.StackHelper; @@ -5,8 +13,6 @@ import net.minecraft.item.ItemStack; /** * Returns true if the stack matches any one one of the filter stacks. - * - * @author CovertJaguar */ public class ArrayStackFilter implements IStackFilter { diff --git a/common/buildcraft/core/inventory/filters/CraftingFilter.java b/common/buildcraft/core/inventory/filters/CraftingFilter.java index b2dc1558..12ce75a5 100644 --- a/common/buildcraft/core/inventory/filters/CraftingFilter.java +++ b/common/buildcraft/core/inventory/filters/CraftingFilter.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory.filters; import buildcraft.core.inventory.StackHelper; @@ -6,8 +14,6 @@ import net.minecraft.item.ItemStack; /** * Returns true if the stack matches any one one of the filter stacks. * Checks the OreDictionary and wildcards. - * - * @author CovertJaguar */ public class CraftingFilter implements IStackFilter { diff --git a/common/buildcraft/core/inventory/filters/IStackFilter.java b/common/buildcraft/core/inventory/filters/IStackFilter.java index fafc9756..f5382866 100644 --- a/common/buildcraft/core/inventory/filters/IStackFilter.java +++ b/common/buildcraft/core/inventory/filters/IStackFilter.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory.filters; import net.minecraft.item.ItemStack; @@ -5,8 +13,6 @@ import net.minecraft.item.ItemStack; /** * This interface provides a convenient means of dealing with entire classes of * items without having to specify each item individually. - * - * @author CovertJaguar */ public interface IStackFilter { diff --git a/common/buildcraft/core/inventory/filters/InvertedStackFilter.java b/common/buildcraft/core/inventory/filters/InvertedStackFilter.java index de862603..e3432bd2 100644 --- a/common/buildcraft/core/inventory/filters/InvertedStackFilter.java +++ b/common/buildcraft/core/inventory/filters/InvertedStackFilter.java @@ -1,11 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory.filters; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class InvertedStackFilter implements IStackFilter { private final IStackFilter filter; diff --git a/common/buildcraft/core/inventory/filters/StackFilter.java b/common/buildcraft/core/inventory/filters/StackFilter.java index ba63eab6..a293c94d 100644 --- a/common/buildcraft/core/inventory/filters/StackFilter.java +++ b/common/buildcraft/core/inventory/filters/StackFilter.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.inventory.filters; import net.minecraft.item.ItemStack; @@ -7,8 +15,6 @@ import net.minecraft.tileentity.TileEntityFurnace; * This interface is used with several of the functions in IItemTransfer to * provide a convenient means of dealing with entire classes of items without * having to specify each item individually. - * - * @author CovertJaguar */ public enum StackFilter implements IStackFilter { diff --git a/common/buildcraft/core/network/BuildCraftChannelHandler.java b/common/buildcraft/core/network/BuildCraftChannelHandler.java index d1a7711a..91b3f92f 100755 --- a/common/buildcraft/core/network/BuildCraftChannelHandler.java +++ b/common/buildcraft/core/network/BuildCraftChannelHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import buildcraft.builders.network.PacketLibraryAction; diff --git a/common/buildcraft/core/network/BuildCraftPacket.java b/common/buildcraft/core/network/BuildCraftPacket.java index 70a946f4..d684824c 100644 --- a/common/buildcraft/core/network/BuildCraftPacket.java +++ b/common/buildcraft/core/network/BuildCraftPacket.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/core/network/ClassMapping.java b/common/buildcraft/core/network/ClassMapping.java index 5e1899ed..9beaa0a0 100644 --- a/common/buildcraft/core/network/ClassMapping.java +++ b/common/buildcraft/core/network/ClassMapping.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.network; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/network/EntityIds.java b/common/buildcraft/core/network/EntityIds.java index 8d541f50..5faf3e6a 100644 --- a/common/buildcraft/core/network/EntityIds.java +++ b/common/buildcraft/core/network/EntityIds.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; public class EntityIds { diff --git a/common/buildcraft/core/network/IClientState.java b/common/buildcraft/core/network/IClientState.java index 6c2fd6fa..2fee39f0 100644 --- a/common/buildcraft/core/network/IClientState.java +++ b/common/buildcraft/core/network/IClientState.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; @@ -8,9 +16,6 @@ import java.io.IOException; /** * Implemented by classes representing serializable client state - * - * @author Krapht - * */ public interface IClientState { /** diff --git a/common/buildcraft/core/network/IGuiReturnHandler.java b/common/buildcraft/core/network/IGuiReturnHandler.java index b4f3744d..68a40c7a 100644 --- a/common/buildcraft/core/network/IGuiReturnHandler.java +++ b/common/buildcraft/core/network/IGuiReturnHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; @@ -9,10 +17,6 @@ import java.io.IOException; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; -/** - * - * @author CovertJaguar - */ public abstract interface IGuiReturnHandler { public World getWorld(); diff --git a/common/buildcraft/core/network/ISyncedTile.java b/common/buildcraft/core/network/ISyncedTile.java index 3a1fa6ac..fe5eb215 100644 --- a/common/buildcraft/core/network/ISyncedTile.java +++ b/common/buildcraft/core/network/ISyncedTile.java @@ -1,11 +1,13 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; -/** - * Implemented by TileEntites - * - * @author Krapht - * - */ public interface ISyncedTile { /** diff --git a/common/buildcraft/core/network/ISynchronizedTile.java b/common/buildcraft/core/network/ISynchronizedTile.java index b6141b60..a6b4e85f 100644 --- a/common/buildcraft/core/network/ISynchronizedTile.java +++ b/common/buildcraft/core/network/ISynchronizedTile.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.network; diff --git a/common/buildcraft/core/network/IndexInPayload.java b/common/buildcraft/core/network/IndexInPayload.java index 4a21c3a9..432e63a1 100644 --- a/common/buildcraft/core/network/IndexInPayload.java +++ b/common/buildcraft/core/network/IndexInPayload.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; /** diff --git a/common/buildcraft/core/network/PacketCoordinates.java b/common/buildcraft/core/network/PacketCoordinates.java index 045481ca..5a2deed2 100644 --- a/common/buildcraft/core/network/PacketCoordinates.java +++ b/common/buildcraft/core/network/PacketCoordinates.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/PacketGuiReturn.java b/common/buildcraft/core/network/PacketGuiReturn.java index 6a313eca..5e33de0f 100644 --- a/common/buildcraft/core/network/PacketGuiReturn.java +++ b/common/buildcraft/core/network/PacketGuiReturn.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; @@ -13,10 +21,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -/** - * - * @author CovertJaguar - */ public class PacketGuiReturn extends BuildCraftPacket { private EntityPlayer sender; private IGuiReturnHandler obj; diff --git a/common/buildcraft/core/network/PacketGuiWidget.java b/common/buildcraft/core/network/PacketGuiWidget.java index fdb734e1..3e320463 100644 --- a/common/buildcraft/core/network/PacketGuiWidget.java +++ b/common/buildcraft/core/network/PacketGuiWidget.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -17,10 +17,7 @@ import java.io.DataOutputStream; import java.io.IOException; import net.minecraft.client.entity.EntityClientPlayerMP; -/** - * - * @author CovertJaguar - */ + public class PacketGuiWidget extends BuildCraftPacket { private byte windowId, widgetId; diff --git a/common/buildcraft/core/network/PacketHandler.java b/common/buildcraft/core/network/PacketHandler.java index 59c831a7..b1c0a9f7 100644 --- a/common/buildcraft/core/network/PacketHandler.java +++ b/common/buildcraft/core/network/PacketHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/PacketIds.java b/common/buildcraft/core/network/PacketIds.java index cc7cea80..6b52c7ec 100644 --- a/common/buildcraft/core/network/PacketIds.java +++ b/common/buildcraft/core/network/PacketIds.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; public class PacketIds { diff --git a/common/buildcraft/core/network/PacketNBT.java b/common/buildcraft/core/network/PacketNBT.java index 3c026a5f..a60d07d8 100644 --- a/common/buildcraft/core/network/PacketNBT.java +++ b/common/buildcraft/core/network/PacketNBT.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/PacketPayload.java b/common/buildcraft/core/network/PacketPayload.java index 973c6ef8..d1383b58 100644 --- a/common/buildcraft/core/network/PacketPayload.java +++ b/common/buildcraft/core/network/PacketPayload.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import cpw.mods.fml.relauncher.Side; diff --git a/common/buildcraft/core/network/PacketPayloadArrays.java b/common/buildcraft/core/network/PacketPayloadArrays.java index 429cd480..1dcd904f 100644 --- a/common/buildcraft/core/network/PacketPayloadArrays.java +++ b/common/buildcraft/core/network/PacketPayloadArrays.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -15,10 +15,6 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -/** - * - * @author CovertJaguar - */ public class PacketPayloadArrays extends PacketPayload { public int[] intPayload = new int[0]; diff --git a/common/buildcraft/core/network/PacketPayloadStream.java b/common/buildcraft/core/network/PacketPayloadStream.java index 9c164088..c3e197c5 100644 --- a/common/buildcraft/core/network/PacketPayloadStream.java +++ b/common/buildcraft/core/network/PacketPayloadStream.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -20,8 +20,6 @@ import java.io.IOException; * Note, you cannot use a Stream payload and the TileNetworkData annotation at * the same time. Attempting to do will most likely result in a class cast * exception somewhere. - * - * @author CovertJaguar */ public class PacketPayloadStream extends PacketPayload { diff --git a/common/buildcraft/core/network/PacketSlotChange.java b/common/buildcraft/core/network/PacketSlotChange.java index 905a6540..714eba68 100644 --- a/common/buildcraft/core/network/PacketSlotChange.java +++ b/common/buildcraft/core/network/PacketSlotChange.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/PacketTileState.java b/common/buildcraft/core/network/PacketTileState.java index 058a067e..7fdca50c 100644 --- a/common/buildcraft/core/network/PacketTileState.java +++ b/common/buildcraft/core/network/PacketTileState.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/PacketTileUpdate.java b/common/buildcraft/core/network/PacketTileUpdate.java index b9d178e3..07ccc0bb 100644 --- a/common/buildcraft/core/network/PacketTileUpdate.java +++ b/common/buildcraft/core/network/PacketTileUpdate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import net.minecraft.tileentity.TileEntity; diff --git a/common/buildcraft/core/network/PacketUpdate.java b/common/buildcraft/core/network/PacketUpdate.java index 25ca15c4..26bfb05d 100644 --- a/common/buildcraft/core/network/PacketUpdate.java +++ b/common/buildcraft/core/network/PacketUpdate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.network; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/core/network/TileNetworkData.java b/common/buildcraft/core/network/TileNetworkData.java index 0c2eab0c..fa4d5c9a 100644 --- a/common/buildcraft/core/network/TileNetworkData.java +++ b/common/buildcraft/core/network/TileNetworkData.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.network; import java.lang.annotation.Inherited; diff --git a/common/buildcraft/core/network/TilePacketWrapper.java b/common/buildcraft/core/network/TilePacketWrapper.java index cf978521..611ee883 100644 --- a/common/buildcraft/core/network/TilePacketWrapper.java +++ b/common/buildcraft/core/network/TilePacketWrapper.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.network; import buildcraft.core.ByteBuffer; diff --git a/common/buildcraft/core/proxy/CoreProxy.java b/common/buildcraft/core/proxy/CoreProxy.java index df2ecbbd..a6856327 100644 --- a/common/buildcraft/core/proxy/CoreProxy.java +++ b/common/buildcraft/core/proxy/CoreProxy.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.proxy; diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index 03134c45..61e050c5 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.proxy; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/recipes/AssemblyRecipeManager.java b/common/buildcraft/core/recipes/AssemblyRecipeManager.java index 4c116ded..a86de95f 100644 --- a/common/buildcraft/core/recipes/AssemblyRecipeManager.java +++ b/common/buildcraft/core/recipes/AssemblyRecipeManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.recipes; import buildcraft.api.recipes.IAssemblyRecipeManager; diff --git a/common/buildcraft/core/recipes/IntegrationRecipeManager.java b/common/buildcraft/core/recipes/IntegrationRecipeManager.java index f2faa0d6..6c1791af 100644 --- a/common/buildcraft/core/recipes/IntegrationRecipeManager.java +++ b/common/buildcraft/core/recipes/IntegrationRecipeManager.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.recipes; import buildcraft.api.recipes.IIntegrationRecipeManager; diff --git a/common/buildcraft/core/recipes/RefineryRecipeManager.java b/common/buildcraft/core/recipes/RefineryRecipeManager.java index 39278c3f..5552f66a 100644 --- a/common/buildcraft/core/recipes/RefineryRecipeManager.java +++ b/common/buildcraft/core/recipes/RefineryRecipeManager.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.recipes; diff --git a/common/buildcraft/core/render/FluidRenderer.java b/common/buildcraft/core/render/FluidRenderer.java index 6cbf2dd4..a35c0070 100644 --- a/common/buildcraft/core/render/FluidRenderer.java +++ b/common/buildcraft/core/render/FluidRenderer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.render; @@ -25,10 +26,6 @@ import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; -/** - * - * @author CovertJaguar - */ public class FluidRenderer { private static final ResourceLocation BLOCK_TEXTURE = TextureMap.locationBlocksTexture; diff --git a/common/buildcraft/core/render/RenderEnergyLaser.java b/common/buildcraft/core/render/RenderEnergyLaser.java index 7c3027dc..929e2bba 100644 --- a/common/buildcraft/core/render/RenderEnergyLaser.java +++ b/common/buildcraft/core/render/RenderEnergyLaser.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.render; import buildcraft.core.EntityEnergyLaser; diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index 12d94aff..8e169f6f 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.render; diff --git a/common/buildcraft/core/render/RenderLaser.java b/common/buildcraft/core/render/RenderLaser.java index dc5b859a..9cb9b76f 100644 --- a/common/buildcraft/core/render/RenderLaser.java +++ b/common/buildcraft/core/render/RenderLaser.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.render; import buildcraft.api.core.Position; diff --git a/common/buildcraft/core/render/RenderRobot.java b/common/buildcraft/core/render/RenderRobot.java index 6af671a5..8fc130e9 100644 --- a/common/buildcraft/core/render/RenderRobot.java +++ b/common/buildcraft/core/render/RenderRobot.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.render; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/core/render/RenderUtils.java b/common/buildcraft/core/render/RenderUtils.java index 62b88d4c..dedad7ae 100644 --- a/common/buildcraft/core/render/RenderUtils.java +++ b/common/buildcraft/core/render/RenderUtils.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.render; import org.lwjgl.opengl.GL11; diff --git a/common/buildcraft/core/render/RenderVoid.java b/common/buildcraft/core/render/RenderVoid.java index 842ed879..7960f227 100644 --- a/common/buildcraft/core/render/RenderVoid.java +++ b/common/buildcraft/core/render/RenderVoid.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.core.render; import net.minecraft.client.renderer.entity.Render; diff --git a/common/buildcraft/core/render/RenderingEntityBlocks.java b/common/buildcraft/core/render/RenderingEntityBlocks.java index b95ada34..223146c1 100644 --- a/common/buildcraft/core/render/RenderingEntityBlocks.java +++ b/common/buildcraft/core/render/RenderingEntityBlocks.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.render; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/render/RenderingMarkers.java b/common/buildcraft/core/render/RenderingMarkers.java index e2166d21..704429ec 100644 --- a/common/buildcraft/core/render/RenderingMarkers.java +++ b/common/buildcraft/core/render/RenderingMarkers.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.render; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/triggers/ActionMachineControl.java b/common/buildcraft/core/triggers/ActionMachineControl.java index b9c6f3ef..c06378f2 100644 --- a/common/buildcraft/core/triggers/ActionMachineControl.java +++ b/common/buildcraft/core/triggers/ActionMachineControl.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.triggers; import buildcraft.core.utils.StringUtils; diff --git a/common/buildcraft/core/triggers/ActionRedstoneOutput.java b/common/buildcraft/core/triggers/ActionRedstoneOutput.java index ec43af46..122c0dc9 100644 --- a/common/buildcraft/core/triggers/ActionRedstoneOutput.java +++ b/common/buildcraft/core/triggers/ActionRedstoneOutput.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/ActionTriggerIconProvider.java b/common/buildcraft/core/triggers/ActionTriggerIconProvider.java index 97cffc74..9cabafed 100644 --- a/common/buildcraft/core/triggers/ActionTriggerIconProvider.java +++ b/common/buildcraft/core/triggers/ActionTriggerIconProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.triggers; import buildcraft.api.core.IIconProvider; @@ -9,8 +17,6 @@ import net.minecraft.util.IIcon; /** * Don't put new Trigger Icons in here please, put them in the Trigger classes * like the #TriggerClockTimer. This class will go away someday. - * - * @author CovertJaguar */ public class ActionTriggerIconProvider implements IIconProvider { diff --git a/common/buildcraft/core/triggers/BCAction.java b/common/buildcraft/core/triggers/BCAction.java index 2130a140..acd083ac 100644 --- a/common/buildcraft/core/triggers/BCAction.java +++ b/common/buildcraft/core/triggers/BCAction.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/BCTrigger.java b/common/buildcraft/core/triggers/BCTrigger.java index 084a8b15..b6eb66b6 100644 --- a/common/buildcraft/core/triggers/BCTrigger.java +++ b/common/buildcraft/core/triggers/BCTrigger.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/DefaultActionProvider.java b/common/buildcraft/core/triggers/DefaultActionProvider.java index 8a70ce6d..a5bc68b0 100644 --- a/common/buildcraft/core/triggers/DefaultActionProvider.java +++ b/common/buildcraft/core/triggers/DefaultActionProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.triggers; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/triggers/DefaultTriggerProvider.java b/common/buildcraft/core/triggers/DefaultTriggerProvider.java index aed1aa1d..8fe73e93 100644 --- a/common/buildcraft/core/triggers/DefaultTriggerProvider.java +++ b/common/buildcraft/core/triggers/DefaultTriggerProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.triggers; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/core/triggers/TriggerFluidContainer.java b/common/buildcraft/core/triggers/TriggerFluidContainer.java index aa3c27e7..83aac0fa 100644 --- a/common/buildcraft/core/triggers/TriggerFluidContainer.java +++ b/common/buildcraft/core/triggers/TriggerFluidContainer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java b/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java index 918be28c..3e8fbec6 100644 --- a/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java +++ b/common/buildcraft/core/triggers/TriggerFluidContainerLevel.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/TriggerInventory.java b/common/buildcraft/core/triggers/TriggerInventory.java index 973a8347..70ae3cc1 100644 --- a/common/buildcraft/core/triggers/TriggerInventory.java +++ b/common/buildcraft/core/triggers/TriggerInventory.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/TriggerInventoryLevel.java b/common/buildcraft/core/triggers/TriggerInventoryLevel.java index b29aa6f3..28302948 100644 --- a/common/buildcraft/core/triggers/TriggerInventoryLevel.java +++ b/common/buildcraft/core/triggers/TriggerInventoryLevel.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/TriggerMachine.java b/common/buildcraft/core/triggers/TriggerMachine.java index 604feed8..7d816caa 100644 --- a/common/buildcraft/core/triggers/TriggerMachine.java +++ b/common/buildcraft/core/triggers/TriggerMachine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/triggers/TriggerRedstoneInput.java b/common/buildcraft/core/triggers/TriggerRedstoneInput.java index a5d1d654..15154136 100644 --- a/common/buildcraft/core/triggers/TriggerRedstoneInput.java +++ b/common/buildcraft/core/triggers/TriggerRedstoneInput.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.triggers; diff --git a/common/buildcraft/core/utils/BCLog.java b/common/buildcraft/core/utils/BCLog.java index ee916fc7..54b49d75 100644 --- a/common/buildcraft/core/utils/BCLog.java +++ b/common/buildcraft/core/utils/BCLog.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -13,10 +13,6 @@ import cpw.mods.fml.common.FMLLog; import java.util.logging.Level; import java.util.logging.Logger; -/** - * - * @author CovertJaguar - */ public class BCLog { public static final Logger logger = Logger.getLogger("Buildcraft"); diff --git a/common/buildcraft/core/utils/BlockUtil.java b/common/buildcraft/core/utils/BlockUtil.java index 167f4c28..d85973ad 100644 --- a/common/buildcraft/core/utils/BlockUtil.java +++ b/common/buildcraft/core/utils/BlockUtil.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.utils; diff --git a/common/buildcraft/core/utils/ConfigUtils.java b/common/buildcraft/core/utils/ConfigUtils.java index 53f0eada..2b630682 100644 --- a/common/buildcraft/core/utils/ConfigUtils.java +++ b/common/buildcraft/core/utils/ConfigUtils.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -13,10 +13,6 @@ import java.util.logging.Level; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -/** - * - * @author CovertJaguar - */ public class ConfigUtils { private static final String COMMENT_PREFIX = ""; diff --git a/common/buildcraft/core/utils/CraftingHelper.java b/common/buildcraft/core/utils/CraftingHelper.java index ddc8156c..c47435be 100644 --- a/common/buildcraft/core/utils/CraftingHelper.java +++ b/common/buildcraft/core/utils/CraftingHelper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; import java.util.ArrayList; diff --git a/common/buildcraft/core/utils/EnumColor.java b/common/buildcraft/core/utils/EnumColor.java index 2c522f6a..9e02a85b 100644 --- a/common/buildcraft/core/utils/EnumColor.java +++ b/common/buildcraft/core/utils/EnumColor.java @@ -1,11 +1,15 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; import java.util.Locale; -/** - * - * @author CovertJaguar - */ public enum EnumColor { BLACK, diff --git a/common/buildcraft/core/utils/INBTTagable.java b/common/buildcraft/core/utils/INBTTagable.java index d1d7abf1..c3587b47 100644 --- a/common/buildcraft/core/utils/INBTTagable.java +++ b/common/buildcraft/core/utils/INBTTagable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; import net.minecraft.nbt.NBTTagCompound; diff --git a/common/buildcraft/core/utils/Localization.java b/common/buildcraft/core/utils/Localization.java index 9ec1fa45..f7d21ad8 100644 --- a/common/buildcraft/core/utils/Localization.java +++ b/common/buildcraft/core/utils/Localization.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; import buildcraft.core.proxy.CoreProxy; @@ -7,10 +15,7 @@ import java.util.LinkedList; import java.util.Properties; /** - * Simple mod localization class. - * - * @author Jimeo Wan - * @license Public domain + * Simple mod localization class. */ public class Localization { diff --git a/common/buildcraft/core/utils/MathUtils.java b/common/buildcraft/core/utils/MathUtils.java index d0c3adff..54f36fb8 100644 --- a/common/buildcraft/core/utils/MathUtils.java +++ b/common/buildcraft/core/utils/MathUtils.java @@ -1,17 +1,13 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.utils; -/** - * - * @author CovertJaguar - */ public class MathUtils { public static int clamp(int value, int min, int max) { diff --git a/common/buildcraft/core/utils/MatrixTranformations.java b/common/buildcraft/core/utils/MatrixTranformations.java index 60d4712f..92794b91 100644 --- a/common/buildcraft/core/utils/MatrixTranformations.java +++ b/common/buildcraft/core/utils/MatrixTranformations.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -10,10 +10,6 @@ package buildcraft.core.utils; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author Krapht - */ public class MatrixTranformations { /** diff --git a/common/buildcraft/core/utils/RevolvingList.java b/common/buildcraft/core/utils/RevolvingList.java index c2b08343..6ec887f5 100644 --- a/common/buildcraft/core/utils/RevolvingList.java +++ b/common/buildcraft/core/utils/RevolvingList.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.utils; @@ -10,10 +11,6 @@ package buildcraft.core.utils; import com.google.common.collect.ForwardingCollection; import java.util.*; -/** - * - * @author CovertJaguar - */ public class RevolvingList extends ForwardingCollection { private Deque list = new LinkedList(); diff --git a/common/buildcraft/core/utils/SessionVars.java b/common/buildcraft/core/utils/SessionVars.java index 74c00965..9aa7477f 100644 --- a/common/buildcraft/core/utils/SessionVars.java +++ b/common/buildcraft/core/utils/SessionVars.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; public class SessionVars { diff --git a/common/buildcraft/core/utils/StringUtils.java b/common/buildcraft/core/utils/StringUtils.java index a64e79c1..dde2fcbd 100644 --- a/common/buildcraft/core/utils/StringUtils.java +++ b/common/buildcraft/core/utils/StringUtils.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.core.utils; public class StringUtils { diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index 2f472f79..ee90bbc0 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.core.utils; diff --git a/common/buildcraft/energy/BlockBuildcraftFluid.java b/common/buildcraft/energy/BlockBuildcraftFluid.java index 04045ef1..31151a40 100644 --- a/common/buildcraft/energy/BlockBuildcraftFluid.java +++ b/common/buildcraft/energy/BlockBuildcraftFluid.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -26,10 +26,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; -/** - * - * @author CovertJaguar - */ public class BlockBuildcraftFluid extends BlockFluidClassic { protected float particleRed; diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index 72de0d4a..740a6df9 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/BptBlockEngine.java b/common/buildcraft/energy/BptBlockEngine.java index 2c8ba58b..96a649bd 100644 --- a/common/buildcraft/energy/BptBlockEngine.java +++ b/common/buildcraft/energy/BptBlockEngine.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.energy; import buildcraft.api.blueprints.BlockSignature; diff --git a/common/buildcraft/energy/BucketHandler.java b/common/buildcraft/energy/BucketHandler.java index 11490f18..efb86e9b 100644 --- a/common/buildcraft/energy/BucketHandler.java +++ b/common/buildcraft/energy/BucketHandler.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/EnergyProxy.java b/common/buildcraft/energy/EnergyProxy.java index 299b847e..12ecaa94 100644 --- a/common/buildcraft/energy/EnergyProxy.java +++ b/common/buildcraft/energy/EnergyProxy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy; import cpw.mods.fml.common.SidedProxy; diff --git a/common/buildcraft/energy/EnergyProxyClient.java b/common/buildcraft/energy/EnergyProxyClient.java index 447dcc9b..694e6b14 100644 --- a/common/buildcraft/energy/EnergyProxyClient.java +++ b/common/buildcraft/energy/EnergyProxyClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy; import buildcraft.BuildCraftEnergy; diff --git a/common/buildcraft/energy/GuiHandler.java b/common/buildcraft/energy/GuiHandler.java index 363d3654..4ad92d12 100644 --- a/common/buildcraft/energy/GuiHandler.java +++ b/common/buildcraft/energy/GuiHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy; import net.minecraft.entity.player.EntityPlayer; diff --git a/common/buildcraft/energy/ItemBucketBuildcraft.java b/common/buildcraft/energy/ItemBucketBuildcraft.java index 35fb7755..6b41b9ea 100644 --- a/common/buildcraft/energy/ItemBucketBuildcraft.java +++ b/common/buildcraft/energy/ItemBucketBuildcraft.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/ItemEngine.java b/common/buildcraft/energy/ItemEngine.java index f7f7a0d5..c0307673 100644 --- a/common/buildcraft/energy/ItemEngine.java +++ b/common/buildcraft/energy/ItemEngine.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.energy; import buildcraft.core.ItemBlockBuildCraft; diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 632b1c7f..64cded5b 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/TileEngineIron.java b/common/buildcraft/energy/TileEngineIron.java index a29846d0..e8e247b2 100644 --- a/common/buildcraft/energy/TileEngineIron.java +++ b/common/buildcraft/energy/TileEngineIron.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/TileEngineLegacy.java b/common/buildcraft/energy/TileEngineLegacy.java index 5652902d..6756df4b 100644 --- a/common/buildcraft/energy/TileEngineLegacy.java +++ b/common/buildcraft/energy/TileEngineLegacy.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; @@ -16,8 +17,6 @@ import net.minecraft.util.ResourceLocation; * This class is just intended to update pre 4.0 engines to the design. * * It can be deleted someday. - * - * @author CovertJaguar */ public class TileEngineLegacy extends TileEngine { diff --git a/common/buildcraft/energy/TileEngineStone.java b/common/buildcraft/energy/TileEngineStone.java index 9e654075..89c24e1a 100644 --- a/common/buildcraft/energy/TileEngineStone.java +++ b/common/buildcraft/energy/TileEngineStone.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/TileEngineWithInventory.java b/common/buildcraft/energy/TileEngineWithInventory.java index 7a6036ae..87b42808 100644 --- a/common/buildcraft/energy/TileEngineWithInventory.java +++ b/common/buildcraft/energy/TileEngineWithInventory.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy; import net.minecraft.entity.player.EntityPlayer; diff --git a/common/buildcraft/energy/TileEngineWood.java b/common/buildcraft/energy/TileEngineWood.java index 103b628a..f0910115 100644 --- a/common/buildcraft/energy/TileEngineWood.java +++ b/common/buildcraft/energy/TileEngineWood.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy; diff --git a/common/buildcraft/energy/gui/ContainerEngine.java b/common/buildcraft/energy/gui/ContainerEngine.java index 5b8d017a..9666230e 100644 --- a/common/buildcraft/energy/gui/ContainerEngine.java +++ b/common/buildcraft/energy/gui/ContainerEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.gui; diff --git a/common/buildcraft/energy/gui/GuiCombustionEngine.java b/common/buildcraft/energy/gui/GuiCombustionEngine.java index edf1e31a..6357bc53 100644 --- a/common/buildcraft/energy/gui/GuiCombustionEngine.java +++ b/common/buildcraft/energy/gui/GuiCombustionEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.gui; diff --git a/common/buildcraft/energy/gui/GuiEngine.java b/common/buildcraft/energy/gui/GuiEngine.java index a9c78253..9abf7bb4 100644 --- a/common/buildcraft/energy/gui/GuiEngine.java +++ b/common/buildcraft/energy/gui/GuiEngine.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.gui; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/energy/gui/GuiStoneEngine.java b/common/buildcraft/energy/gui/GuiStoneEngine.java index f1754921..7a2e72d0 100644 --- a/common/buildcraft/energy/gui/GuiStoneEngine.java +++ b/common/buildcraft/energy/gui/GuiStoneEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.gui; diff --git a/common/buildcraft/energy/render/EntityDropParticleFX.java b/common/buildcraft/energy/render/EntityDropParticleFX.java index f0337a62..fa49a890 100644 --- a/common/buildcraft/energy/render/EntityDropParticleFX.java +++ b/common/buildcraft/energy/render/EntityDropParticleFX.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.render; import net.minecraft.client.particle.*; diff --git a/common/buildcraft/energy/render/RenderEngine.java b/common/buildcraft/energy/render/RenderEngine.java index d4890938..8ab069de 100644 --- a/common/buildcraft/energy/render/RenderEngine.java +++ b/common/buildcraft/energy/render/RenderEngine.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.render; diff --git a/common/buildcraft/energy/triggers/TriggerEngineHeat.java b/common/buildcraft/energy/triggers/TriggerEngineHeat.java index 93ae505c..c1b76131 100644 --- a/common/buildcraft/energy/triggers/TriggerEngineHeat.java +++ b/common/buildcraft/energy/triggers/TriggerEngineHeat.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.triggers; diff --git a/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java b/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java index 82a46c89..7a23b977 100644 --- a/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java +++ b/common/buildcraft/energy/worldgen/BiomeGenOilDesert.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenDesert; import net.minecraftforge.common.BiomeDictionary; -/** - * - * @author CovertJaguar - */ public class BiomeGenOilDesert extends BiomeGenDesert { protected static final BiomeGenBase.Height height_OilDesert = new BiomeGenBase.Height(0.1F, 0.2F); diff --git a/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java b/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java index 7d8b48f8..e2727db1 100644 --- a/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java +++ b/common/buildcraft/energy/worldgen/BiomeGenOilOcean.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.common.BiomeDictionary; -/** - * - * @author CovertJaguar - */ public class BiomeGenOilOcean extends BiomeGenOcean { protected static final BiomeGenBase.Height height_OilOcean = new BiomeGenBase.Height(0.1F, 0.2F); diff --git a/common/buildcraft/energy/worldgen/BiomeInitializer.java b/common/buildcraft/energy/worldgen/BiomeInitializer.java index 1bebaf47..05bd9ce2 100644 --- a/common/buildcraft/energy/worldgen/BiomeInitializer.java +++ b/common/buildcraft/energy/worldgen/BiomeInitializer.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import buildcraft.BuildCraftEnergy; import net.minecraftforge.event.terraingen.WorldTypeEvent; -/** - * - * @author CovertJaguar - */ public class BiomeInitializer { public BiomeInitializer() { diff --git a/common/buildcraft/energy/worldgen/GenLayerAddOilDesert.java b/common/buildcraft/energy/worldgen/GenLayerAddOilDesert.java index 5e2bc8dd..f25f7855 100644 --- a/common/buildcraft/energy/worldgen/GenLayerAddOilDesert.java +++ b/common/buildcraft/energy/worldgen/GenLayerAddOilDesert.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import buildcraft.BuildCraftEnergy; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; -/** - * - * @author CovertJaguar - */ public class GenLayerAddOilDesert extends GenLayerBiomeReplacer { protected static final double NOISE_FIELD_SCALE = 0.001; diff --git a/common/buildcraft/energy/worldgen/GenLayerAddOilOcean.java b/common/buildcraft/energy/worldgen/GenLayerAddOilOcean.java index cf0a1be7..e3e7c462 100644 --- a/common/buildcraft/energy/worldgen/GenLayerAddOilOcean.java +++ b/common/buildcraft/energy/worldgen/GenLayerAddOilOcean.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import buildcraft.BuildCraftEnergy; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; -/** - * - * @author CovertJaguar - */ public class GenLayerAddOilOcean extends GenLayerBiomeReplacer { public static final double NOISE_FIELD_SCALE = 0.0005; diff --git a/common/buildcraft/energy/worldgen/GenLayerBiomeReplacer.java b/common/buildcraft/energy/worldgen/GenLayerBiomeReplacer.java index 934cd971..89851ab9 100644 --- a/common/buildcraft/energy/worldgen/GenLayerBiomeReplacer.java +++ b/common/buildcraft/energy/worldgen/GenLayerBiomeReplacer.java @@ -1,13 +1,17 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; import java.util.Random; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; -/** - * - * @author CovertJaguar - */ public abstract class GenLayerBiomeReplacer extends GenLayer { public static final int OFFSET_RANGE = 500000; diff --git a/common/buildcraft/energy/worldgen/OilPopulate.java b/common/buildcraft/energy/worldgen/OilPopulate.java index 06c74fee..b29ae03a 100644 --- a/common/buildcraft/energy/worldgen/OilPopulate.java +++ b/common/buildcraft/energy/worldgen/OilPopulate.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.energy.worldgen; diff --git a/common/buildcraft/energy/worldgen/SimplexNoise.java b/common/buildcraft/energy/worldgen/SimplexNoise.java index f4196c0a..6fd47406 100644 --- a/common/buildcraft/energy/worldgen/SimplexNoise.java +++ b/common/buildcraft/energy/worldgen/SimplexNoise.java @@ -1,6 +1,14 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.energy.worldgen; -/* +/** * A speed-improved simplex noise algorithm for 2D, 3D and 4D in Java. * * Based on example code by Stefan Gustavson (stegu@itn.liu.se). @@ -16,7 +24,6 @@ package buildcraft.energy.worldgen; * attribution is appreciated. * */ - public class SimplexNoise { // Simplex noise in 2D, 3D and 4D private static Grad grad3[] = { new Grad(1, 1, 0), new Grad(-1, 1, 0), new Grad(1, -1, 0), new Grad(-1, -1, 0), new Grad(1, 0, 1), new Grad(-1, 0, 1), new Grad(1, 0, -1), new Grad(-1, 0, -1), new Grad(0, 1, 1), new Grad(0, -1, 1), new Grad(0, 1, -1), new Grad(0, -1, -1) }; diff --git a/common/buildcraft/factory/BlockAutoWorkbench.java b/common/buildcraft/factory/BlockAutoWorkbench.java index 7a82f03c..1f9b0b0c 100644 --- a/common/buildcraft/factory/BlockAutoWorkbench.java +++ b/common/buildcraft/factory/BlockAutoWorkbench.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.BuildCraftFactory; diff --git a/common/buildcraft/factory/BlockFloodGate.java b/common/buildcraft/factory/BlockFloodGate.java index a39b5798..6cc5bf8f 100644 --- a/common/buildcraft/factory/BlockFloodGate.java +++ b/common/buildcraft/factory/BlockFloodGate.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index 110d5d04..90503215 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/factory/BlockHopper.java b/common/buildcraft/factory/BlockHopper.java index 90514c9c..c958c1be 100644 --- a/common/buildcraft/factory/BlockHopper.java +++ b/common/buildcraft/factory/BlockHopper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/factory/BlockMiningWell.java b/common/buildcraft/factory/BlockMiningWell.java index 33125b5d..ef8ef4f7 100644 --- a/common/buildcraft/factory/BlockMiningWell.java +++ b/common/buildcraft/factory/BlockMiningWell.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.BuildCraftFactory; diff --git a/common/buildcraft/factory/BlockPlainPipe.java b/common/buildcraft/factory/BlockPlainPipe.java index 22fb4968..075e6b01 100644 --- a/common/buildcraft/factory/BlockPlainPipe.java +++ b/common/buildcraft/factory/BlockPlainPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/BlockQuarry.java b/common/buildcraft/factory/BlockQuarry.java index b13bc0ed..520f7721 100644 --- a/common/buildcraft/factory/BlockQuarry.java +++ b/common/buildcraft/factory/BlockQuarry.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/BlockRefinery.java b/common/buildcraft/factory/BlockRefinery.java index 6dad53cf..ea86fc96 100644 --- a/common/buildcraft/factory/BlockRefinery.java +++ b/common/buildcraft/factory/BlockRefinery.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/BlockTank.java b/common/buildcraft/factory/BlockTank.java index 60bc0c2e..8d480746 100644 --- a/common/buildcraft/factory/BlockTank.java +++ b/common/buildcraft/factory/BlockTank.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/BptBlockAutoWorkbench.java b/common/buildcraft/factory/BptBlockAutoWorkbench.java index 0a51817a..1790af22 100644 --- a/common/buildcraft/factory/BptBlockAutoWorkbench.java +++ b/common/buildcraft/factory/BptBlockAutoWorkbench.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/factory/BptBlockFrame.java b/common/buildcraft/factory/BptBlockFrame.java index 6f8c0e15..a0cb6c3d 100644 --- a/common/buildcraft/factory/BptBlockFrame.java +++ b/common/buildcraft/factory/BptBlockFrame.java @@ -1,12 +1,11 @@ -/** - * Copyright (c) SpaceToad, 2011 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/factory/BptBlockRefinery.java b/common/buildcraft/factory/BptBlockRefinery.java index 97d79fb9..6135396b 100644 --- a/common/buildcraft/factory/BptBlockRefinery.java +++ b/common/buildcraft/factory/BptBlockRefinery.java @@ -1,11 +1,11 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile - * or run the code. It does *NOT* grant the right to redistribute this software - * or its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/factory/BptBlockTank.java b/common/buildcraft/factory/BptBlockTank.java index 682476ae..7f971d98 100644 --- a/common/buildcraft/factory/BptBlockTank.java +++ b/common/buildcraft/factory/BptBlockTank.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import buildcraft.api.blueprints.BptBlock; diff --git a/common/buildcraft/factory/EntityMechanicalArm.java b/common/buildcraft/factory/EntityMechanicalArm.java index a18770e8..c9141ee8 100644 --- a/common/buildcraft/factory/EntityMechanicalArm.java +++ b/common/buildcraft/factory/EntityMechanicalArm.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.core.EntityBlock; diff --git a/common/buildcraft/factory/FactoryProxy.java b/common/buildcraft/factory/FactoryProxy.java index f150464b..fe27b477 100644 --- a/common/buildcraft/factory/FactoryProxy.java +++ b/common/buildcraft/factory/FactoryProxy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import buildcraft.core.EntityBlock; diff --git a/common/buildcraft/factory/FactoryProxyClient.java b/common/buildcraft/factory/FactoryProxyClient.java index 9c45b3bb..19e54624 100644 --- a/common/buildcraft/factory/FactoryProxyClient.java +++ b/common/buildcraft/factory/FactoryProxyClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import buildcraft.BuildCraftFactory; diff --git a/common/buildcraft/factory/GuiHandler.java b/common/buildcraft/factory/GuiHandler.java index dedc56a3..3d5f8a73 100644 --- a/common/buildcraft/factory/GuiHandler.java +++ b/common/buildcraft/factory/GuiHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import buildcraft.core.GuiIds; diff --git a/common/buildcraft/factory/PumpDimensionList.java b/common/buildcraft/factory/PumpDimensionList.java index d8e5da4d..5a9aa236 100644 --- a/common/buildcraft/factory/PumpDimensionList.java +++ b/common/buildcraft/factory/PumpDimensionList.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import java.util.ArrayList; diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 7eb89a63..48c7163a 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TileFloodGate.java b/common/buildcraft/factory/TileFloodGate.java index 1841048a..57cfa131 100644 --- a/common/buildcraft/factory/TileFloodGate.java +++ b/common/buildcraft/factory/TileFloodGate.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TileHopper.java b/common/buildcraft/factory/TileHopper.java index 9fd30905..70dceb37 100644 --- a/common/buildcraft/factory/TileHopper.java +++ b/common/buildcraft/factory/TileHopper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory; import net.minecraft.entity.player.EntityPlayer; diff --git a/common/buildcraft/factory/TileMiningWell.java b/common/buildcraft/factory/TileMiningWell.java index 2ba5af0e..59adaa8a 100644 --- a/common/buildcraft/factory/TileMiningWell.java +++ b/common/buildcraft/factory/TileMiningWell.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index 08f5f61d..47f606a1 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index ba3568bc..4f02399f 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 52257357..9886521a 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 4337b92a..eb66cdb3 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory; diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index 10c52491..a6f60c6d 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.gui; diff --git a/common/buildcraft/factory/gui/ContainerHopper.java b/common/buildcraft/factory/gui/ContainerHopper.java index 701761ee..2826295c 100644 --- a/common/buildcraft/factory/gui/ContainerHopper.java +++ b/common/buildcraft/factory/gui/ContainerHopper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory.gui; import buildcraft.core.gui.BuildCraftContainer; diff --git a/common/buildcraft/factory/gui/ContainerRefinery.java b/common/buildcraft/factory/gui/ContainerRefinery.java index efe6faa7..7822c635 100644 --- a/common/buildcraft/factory/gui/ContainerRefinery.java +++ b/common/buildcraft/factory/gui/ContainerRefinery.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.gui; diff --git a/common/buildcraft/factory/gui/GuiAutoCrafting.java b/common/buildcraft/factory/gui/GuiAutoCrafting.java index 9c0053cf..ae6b8c96 100644 --- a/common/buildcraft/factory/gui/GuiAutoCrafting.java +++ b/common/buildcraft/factory/gui/GuiAutoCrafting.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.gui; diff --git a/common/buildcraft/factory/gui/GuiHopper.java b/common/buildcraft/factory/gui/GuiHopper.java index 2ab5c7c5..c96e8fa6 100644 --- a/common/buildcraft/factory/gui/GuiHopper.java +++ b/common/buildcraft/factory/gui/GuiHopper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory.gui; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index 7807dabb..04047aaa 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.gui; diff --git a/common/buildcraft/factory/network/PacketHandlerFactory.java b/common/buildcraft/factory/network/PacketHandlerFactory.java index 10e300f4..af51ce8c 100644 --- a/common/buildcraft/factory/network/PacketHandlerFactory.java +++ b/common/buildcraft/factory/network/PacketHandlerFactory.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory.network; import buildcraft.core.network.BuildCraftChannelHandler; diff --git a/common/buildcraft/factory/render/ModelFrustum.java b/common/buildcraft/factory/render/ModelFrustum.java index e55cb8dc..976f0af4 100644 --- a/common/buildcraft/factory/render/ModelFrustum.java +++ b/common/buildcraft/factory/render/ModelFrustum.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory.render; import net.minecraft.client.model.ModelRenderer; diff --git a/common/buildcraft/factory/render/RenderHopper.java b/common/buildcraft/factory/render/RenderHopper.java index d43c37b6..7aff042a 100644 --- a/common/buildcraft/factory/render/RenderHopper.java +++ b/common/buildcraft/factory/render/RenderHopper.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.factory.render; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/factory/render/RenderRefinery.java b/common/buildcraft/factory/render/RenderRefinery.java index 649fc971..4873fb3a 100644 --- a/common/buildcraft/factory/render/RenderRefinery.java +++ b/common/buildcraft/factory/render/RenderRefinery.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.render; diff --git a/common/buildcraft/factory/render/RenderTank.java b/common/buildcraft/factory/render/RenderTank.java index 75beb90a..f44d32d5 100644 --- a/common/buildcraft/factory/render/RenderTank.java +++ b/common/buildcraft/factory/render/RenderTank.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.factory.render; diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index 8cfdbe9c..7f392a23 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.silicon; diff --git a/common/buildcraft/silicon/BlockLaserTable.java b/common/buildcraft/silicon/BlockLaserTable.java index 7ef5bdb5..6cdf68c4 100644 --- a/common/buildcraft/silicon/BlockLaserTable.java +++ b/common/buildcraft/silicon/BlockLaserTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.BuildCraftSilicon; diff --git a/common/buildcraft/silicon/GuiHandler.java b/common/buildcraft/silicon/GuiHandler.java index 7d7cbf06..dc6bbc18 100644 --- a/common/buildcraft/silicon/GuiHandler.java +++ b/common/buildcraft/silicon/GuiHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.silicon.gui.ContainerAdvancedCraftingTable; diff --git a/common/buildcraft/silicon/ItemLaserTable.java b/common/buildcraft/silicon/ItemLaserTable.java index ece29393..85192e0b 100644 --- a/common/buildcraft/silicon/ItemLaserTable.java +++ b/common/buildcraft/silicon/ItemLaserTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.core.ItemBlockBuildCraft; diff --git a/common/buildcraft/silicon/ItemRedstoneChipset.java b/common/buildcraft/silicon/ItemRedstoneChipset.java index 8acbad34..ed6162bb 100644 --- a/common/buildcraft/silicon/ItemRedstoneChipset.java +++ b/common/buildcraft/silicon/ItemRedstoneChipset.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.BuildCraftSilicon; diff --git a/common/buildcraft/silicon/SiliconProxy.java b/common/buildcraft/silicon/SiliconProxy.java index e1e39c5b..64825a33 100644 --- a/common/buildcraft/silicon/SiliconProxy.java +++ b/common/buildcraft/silicon/SiliconProxy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import cpw.mods.fml.common.SidedProxy; diff --git a/common/buildcraft/silicon/SiliconProxyClient.java b/common/buildcraft/silicon/SiliconProxyClient.java index 47b1a81a..2a0c7785 100644 --- a/common/buildcraft/silicon/SiliconProxyClient.java +++ b/common/buildcraft/silicon/SiliconProxyClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import cpw.mods.fml.client.registry.RenderingRegistry; diff --git a/common/buildcraft/silicon/SiliconRenderBlock.java b/common/buildcraft/silicon/SiliconRenderBlock.java index 168073c1..f3a44055 100644 --- a/common/buildcraft/silicon/SiliconRenderBlock.java +++ b/common/buildcraft/silicon/SiliconRenderBlock.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.silicon; import buildcraft.core.CoreConstants; diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index 03089f29..2f56f12c 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.api.power.ILaserTarget; diff --git a/common/buildcraft/silicon/TileAssemblyTable.java b/common/buildcraft/silicon/TileAssemblyTable.java index 13e5047b..85c5716c 100644 --- a/common/buildcraft/silicon/TileAssemblyTable.java +++ b/common/buildcraft/silicon/TileAssemblyTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon; import buildcraft.BuildCraftSilicon; diff --git a/common/buildcraft/silicon/TileIntegrationTable.java b/common/buildcraft/silicon/TileIntegrationTable.java index 97821dd4..c9cdb4f7 100644 --- a/common/buildcraft/silicon/TileIntegrationTable.java +++ b/common/buildcraft/silicon/TileIntegrationTable.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -22,10 +22,6 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public class TileIntegrationTable extends TileLaserTableBase implements ISidedInventory { public static final int SLOT_INPUT_A = 0; diff --git a/common/buildcraft/silicon/TileLaser.java b/common/buildcraft/silicon/TileLaser.java index 81923932..ec5ef581 100644 --- a/common/buildcraft/silicon/TileLaser.java +++ b/common/buildcraft/silicon/TileLaser.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.silicon; diff --git a/common/buildcraft/silicon/TileLaserTableBase.java b/common/buildcraft/silicon/TileLaserTableBase.java index ca659c8e..84dd7cf4 100644 --- a/common/buildcraft/silicon/TileLaserTableBase.java +++ b/common/buildcraft/silicon/TileLaserTableBase.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -18,10 +18,6 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -/** - * - * @author CovertJaguar - */ public abstract class TileLaserTableBase extends TileBuildCraft implements ILaserTarget, IInventory { public double clientRequiredEnergy = 0; diff --git a/common/buildcraft/silicon/gui/ContainerAdvancedCraftingTable.java b/common/buildcraft/silicon/gui/ContainerAdvancedCraftingTable.java index db312d76..68c4a14b 100644 --- a/common/buildcraft/silicon/gui/ContainerAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/gui/ContainerAdvancedCraftingTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.gui; import buildcraft.core.gui.BuildCraftContainer; diff --git a/common/buildcraft/silicon/gui/ContainerAssemblyTable.java b/common/buildcraft/silicon/gui/ContainerAssemblyTable.java index 61c60eb6..cf43bf6c 100644 --- a/common/buildcraft/silicon/gui/ContainerAssemblyTable.java +++ b/common/buildcraft/silicon/gui/ContainerAssemblyTable.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.silicon.gui; import buildcraft.core.gui.BuildCraftContainer; diff --git a/common/buildcraft/silicon/gui/ContainerIntegrationTable.java b/common/buildcraft/silicon/gui/ContainerIntegrationTable.java index 3bd6c70d..8de3b69e 100644 --- a/common/buildcraft/silicon/gui/ContainerIntegrationTable.java +++ b/common/buildcraft/silicon/gui/ContainerIntegrationTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.gui; import buildcraft.core.gui.BuildCraftContainer; diff --git a/common/buildcraft/silicon/gui/GuiAdvancedCraftingTable.java b/common/buildcraft/silicon/gui/GuiAdvancedCraftingTable.java index c0ca8eac..aa931e1b 100644 --- a/common/buildcraft/silicon/gui/GuiAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/gui/GuiAdvancedCraftingTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.gui; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/silicon/gui/GuiAssemblyTable.java b/common/buildcraft/silicon/gui/GuiAssemblyTable.java index 58f08d05..8490e301 100644 --- a/common/buildcraft/silicon/gui/GuiAssemblyTable.java +++ b/common/buildcraft/silicon/gui/GuiAssemblyTable.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.silicon.gui; diff --git a/common/buildcraft/silicon/gui/GuiIntegrationTable.java b/common/buildcraft/silicon/gui/GuiIntegrationTable.java index 66d52d87..5c4680eb 100644 --- a/common/buildcraft/silicon/gui/GuiIntegrationTable.java +++ b/common/buildcraft/silicon/gui/GuiIntegrationTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.gui; import buildcraft.core.DefaultProps; diff --git a/common/buildcraft/silicon/gui/GuiLaserTable.java b/common/buildcraft/silicon/gui/GuiLaserTable.java index ffe5eea8..6ca1b8f1 100644 --- a/common/buildcraft/silicon/gui/GuiLaserTable.java +++ b/common/buildcraft/silicon/gui/GuiLaserTable.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.gui; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/silicon/network/PacketHandlerSilicon.java b/common/buildcraft/silicon/network/PacketHandlerSilicon.java index d5bb2baa..515a5176 100644 --- a/common/buildcraft/silicon/network/PacketHandlerSilicon.java +++ b/common/buildcraft/silicon/network/PacketHandlerSilicon.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.silicon.network; import buildcraft.core.network.BuildCraftChannelHandler; diff --git a/common/buildcraft/silicon/recipes/GateExpansionRecipe.java b/common/buildcraft/silicon/recipes/GateExpansionRecipe.java index aeb91b7d..6f601d8a 100644 --- a/common/buildcraft/silicon/recipes/GateExpansionRecipe.java +++ b/common/buildcraft/silicon/recipes/GateExpansionRecipe.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -14,10 +14,6 @@ import buildcraft.core.inventory.StackHelper; import buildcraft.transport.gates.ItemGate; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class GateExpansionRecipe implements IIntegrationRecipe { private final IGateExpansion expansion; diff --git a/common/buildcraft/silicon/recipes/GateLogicSwapRecipe.java b/common/buildcraft/silicon/recipes/GateLogicSwapRecipe.java index 6fbe3afe..dba84c10 100644 --- a/common/buildcraft/silicon/recipes/GateLogicSwapRecipe.java +++ b/common/buildcraft/silicon/recipes/GateLogicSwapRecipe.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -16,10 +16,6 @@ import buildcraft.transport.gates.GateDefinition.GateMaterial; import buildcraft.transport.gates.ItemGate; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class GateLogicSwapRecipe implements IIntegrationRecipe { private final GateMaterial material; diff --git a/common/buildcraft/transport/BlockFilteredBuffer.java b/common/buildcraft/transport/BlockFilteredBuffer.java index 638e2547..e31b2a6c 100644 --- a/common/buildcraft/transport/BlockFilteredBuffer.java +++ b/common/buildcraft/transport/BlockFilteredBuffer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; @@ -23,10 +24,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -/** - * - * @author SandGrainOne - */ public class BlockFilteredBuffer extends BlockBuildCraft { private static IIcon blockTexture; diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index fcce9722..fae407f8 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/Gate.java b/common/buildcraft/transport/Gate.java index 808e6e10..87dbb6ee 100644 --- a/common/buildcraft/transport/Gate.java +++ b/common/buildcraft/transport/Gate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.api.transport.PipeWire; diff --git a/common/buildcraft/transport/GuiHandler.java b/common/buildcraft/transport/GuiHandler.java index 74e5473e..ca1df888 100644 --- a/common/buildcraft/transport/GuiHandler.java +++ b/common/buildcraft/transport/GuiHandler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.core.GuiIds; diff --git a/common/buildcraft/transport/IItemTravelingHook.java b/common/buildcraft/transport/IItemTravelingHook.java index 51abbad6..5449fddc 100644 --- a/common/buildcraft/transport/IItemTravelingHook.java +++ b/common/buildcraft/transport/IItemTravelingHook.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import net.minecraft.tileentity.TileEntity; diff --git a/common/buildcraft/transport/IPipeConnectionForced.java b/common/buildcraft/transport/IPipeConnectionForced.java index 25a7bbf1..330a583c 100644 --- a/common/buildcraft/transport/IPipeConnectionForced.java +++ b/common/buildcraft/transport/IPipeConnectionForced.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/IPipeTransportFluidsHook.java b/common/buildcraft/transport/IPipeTransportFluidsHook.java index c4e77923..a8f1ee03 100644 --- a/common/buildcraft/transport/IPipeTransportFluidsHook.java +++ b/common/buildcraft/transport/IPipeTransportFluidsHook.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/IPipeTransportItemsHook.java b/common/buildcraft/transport/IPipeTransportItemsHook.java index 31d2fe1f..7e087983 100644 --- a/common/buildcraft/transport/IPipeTransportItemsHook.java +++ b/common/buildcraft/transport/IPipeTransportItemsHook.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/IPipeTransportPowerHook.java b/common/buildcraft/transport/IPipeTransportPowerHook.java index 70e47bf0..af7a1fae 100644 --- a/common/buildcraft/transport/IPipeTransportPowerHook.java +++ b/common/buildcraft/transport/IPipeTransportPowerHook.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/IPipeTrigger.java b/common/buildcraft/transport/IPipeTrigger.java index 50368edb..4e09294a 100644 --- a/common/buildcraft/transport/IPipeTrigger.java +++ b/common/buildcraft/transport/IPipeTrigger.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/ISolidSideTile.java b/common/buildcraft/transport/ISolidSideTile.java index 7b3b4e8a..7ab82d45 100644 --- a/common/buildcraft/transport/ISolidSideTile.java +++ b/common/buildcraft/transport/ISolidSideTile.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 5c7df7f5..48ab2459 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index 23b0e335..2873971d 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/ItemPipeWire.java b/common/buildcraft/transport/ItemPipeWire.java index 2220844f..1b75061d 100644 --- a/common/buildcraft/transport/ItemPipeWire.java +++ b/common/buildcraft/transport/ItemPipeWire.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.api.transport.PipeWire; diff --git a/common/buildcraft/transport/ItemPlug.java b/common/buildcraft/transport/ItemPlug.java index 5eaa493d..d10778c8 100644 --- a/common/buildcraft/transport/ItemPlug.java +++ b/common/buildcraft/transport/ItemPlug.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.core.ItemBuildCraft; diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 2066c0b8..2ad7d316 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/PipeConnectionBans.java b/common/buildcraft/transport/PipeConnectionBans.java index 12e2db23..53bf43ab 100644 --- a/common/buildcraft/transport/PipeConnectionBans.java +++ b/common/buildcraft/transport/PipeConnectionBans.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -23,8 +23,6 @@ import com.google.common.collect.SetMultimap; /** * Controls whether one type of pipe can connect to another. - * - * @author CovertJaguar */ public class PipeConnectionBans { diff --git a/common/buildcraft/transport/PipeIconProvider.java b/common/buildcraft/transport/PipeIconProvider.java index 43bca23e..1cb2f366 100644 --- a/common/buildcraft/transport/PipeIconProvider.java +++ b/common/buildcraft/transport/PipeIconProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/common/buildcraft/transport/PipeRenderState.java b/common/buildcraft/transport/PipeRenderState.java index 0c1e6746..9d70b15a 100644 --- a/common/buildcraft/transport/PipeRenderState.java +++ b/common/buildcraft/transport/PipeRenderState.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.core.network.IClientState; diff --git a/common/buildcraft/transport/PipeToolTipManager.java b/common/buildcraft/transport/PipeToolTipManager.java index f7c22df1..2ec6e3e1 100644 --- a/common/buildcraft/transport/PipeToolTipManager.java +++ b/common/buildcraft/transport/PipeToolTipManager.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -17,10 +17,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -/** - * - * @author CovertJaguar - */ @SideOnly(Side.CLIENT) public class PipeToolTipManager { diff --git a/common/buildcraft/transport/PipeTransport.java b/common/buildcraft/transport/PipeTransport.java index f741e4ba..5fa3c1a1 100644 --- a/common/buildcraft/transport/PipeTransport.java +++ b/common/buildcraft/transport/PipeTransport.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index 7b69a912..5fd79865 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index 37e0ed4f..53f5f564 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index b12a5532..f773b591 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/PipeTransportStructure.java b/common/buildcraft/transport/PipeTransportStructure.java index b2488978..43810754 100644 --- a/common/buildcraft/transport/PipeTransportStructure.java +++ b/common/buildcraft/transport/PipeTransportStructure.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.api.transport.IPipeTile.PipeType; diff --git a/common/buildcraft/transport/PipeTriggerProvider.java b/common/buildcraft/transport/PipeTriggerProvider.java index 42598117..cf6f0a90 100644 --- a/common/buildcraft/transport/PipeTriggerProvider.java +++ b/common/buildcraft/transport/PipeTriggerProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.api.gates.IOverrideDefaultTriggers; diff --git a/common/buildcraft/transport/TileDummyGenericPipe.java b/common/buildcraft/transport/TileDummyGenericPipe.java index d4f9db2c..0aa4ea2e 100644 --- a/common/buildcraft/transport/TileDummyGenericPipe.java +++ b/common/buildcraft/transport/TileDummyGenericPipe.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; public class TileDummyGenericPipe extends TileGenericPipe { diff --git a/common/buildcraft/transport/TileDummyGenericPipe2.java b/common/buildcraft/transport/TileDummyGenericPipe2.java index e6c344d1..718c6854 100644 --- a/common/buildcraft/transport/TileDummyGenericPipe2.java +++ b/common/buildcraft/transport/TileDummyGenericPipe2.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; public class TileDummyGenericPipe2 extends TileGenericPipe { diff --git a/common/buildcraft/transport/TileFilteredBuffer.java b/common/buildcraft/transport/TileFilteredBuffer.java index d588eed4..6e512e9f 100644 --- a/common/buildcraft/transport/TileFilteredBuffer.java +++ b/common/buildcraft/transport/TileFilteredBuffer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.core.TileBuildCraft; diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index e8614ba4..0fda3c68 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/TransportConstants.java b/common/buildcraft/transport/TransportConstants.java index e76ef048..c80c3496 100644 --- a/common/buildcraft/transport/TransportConstants.java +++ b/common/buildcraft/transport/TransportConstants.java @@ -1,17 +1,13 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; -/** - * - * @author CovertJaguar - */ public class TransportConstants { public static final float FACADE_THICKNESS = 2F / 16F; diff --git a/common/buildcraft/transport/TransportProxy.java b/common/buildcraft/transport/TransportProxy.java index b27824bf..121ac53d 100644 --- a/common/buildcraft/transport/TransportProxy.java +++ b/common/buildcraft/transport/TransportProxy.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/TransportProxyClient.java b/common/buildcraft/transport/TransportProxyClient.java index c3c3b1e1..d8010f3e 100644 --- a/common/buildcraft/transport/TransportProxyClient.java +++ b/common/buildcraft/transport/TransportProxyClient.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/TravelerSet.java b/common/buildcraft/transport/TravelerSet.java index c978a755..d22f5f40 100644 --- a/common/buildcraft/transport/TravelerSet.java +++ b/common/buildcraft/transport/TravelerSet.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -16,10 +16,6 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; -/** - * - * @author CovertJaguar - */ public class TravelerSet extends ForwardingSet { private final BiMap items = HashBiMap.create(); diff --git a/common/buildcraft/transport/TravelingItem.java b/common/buildcraft/transport/TravelingItem.java index b5e30428..95738054 100644 --- a/common/buildcraft/transport/TravelingItem.java +++ b/common/buildcraft/transport/TravelingItem.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport; diff --git a/common/buildcraft/transport/WireIconProvider.java b/common/buildcraft/transport/WireIconProvider.java index 7eb2eb12..89102a41 100644 --- a/common/buildcraft/transport/WireIconProvider.java +++ b/common/buildcraft/transport/WireIconProvider.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport; import buildcraft.api.core.IIconProvider; diff --git a/common/buildcraft/transport/blueprints/BptBlockPipe.java b/common/buildcraft/transport/blueprints/BptBlockPipe.java index f615e907..91c51225 100644 --- a/common/buildcraft/transport/blueprints/BptBlockPipe.java +++ b/common/buildcraft/transport/blueprints/BptBlockPipe.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011-2012 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport.blueprints; import buildcraft.BuildCraftCore; diff --git a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java index 0f5abbf4..b6bfdebd 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeDiamond.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport.blueprints; import buildcraft.api.blueprints.BptBlockUtils; diff --git a/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java b/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java index a6badf4c..508f8d26 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeEmerald.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport.blueprints; import buildcraft.api.blueprints.BptBlockUtils; diff --git a/common/buildcraft/transport/blueprints/BptItemPipeIron.java b/common/buildcraft/transport/blueprints/BptItemPipeIron.java index 7bb5d57e..64eb3b98 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeIron.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeIron.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport.blueprints; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/transport/blueprints/BptItemPipeWooden.java b/common/buildcraft/transport/blueprints/BptItemPipeWooden.java index 835ad040..161af8db 100644 --- a/common/buildcraft/transport/blueprints/BptItemPipeWooden.java +++ b/common/buildcraft/transport/blueprints/BptItemPipeWooden.java @@ -1,12 +1,11 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.transport.blueprints; import buildcraft.api.blueprints.BptSlotInfo; diff --git a/common/buildcraft/transport/gates/GateDefinition.java b/common/buildcraft/transport/gates/GateDefinition.java index 5fa11ca4..75eb5e0f 100644 --- a/common/buildcraft/transport/gates/GateDefinition.java +++ b/common/buildcraft/transport/gates/GateDefinition.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -15,10 +15,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -/** - * - * @author CovertJaguar - */ public final class GateDefinition { private GateDefinition() { diff --git a/common/buildcraft/transport/gates/GateExpansionBuildcraft.java b/common/buildcraft/transport/gates/GateExpansionBuildcraft.java index 3e801c8d..d338c14f 100644 --- a/common/buildcraft/transport/gates/GateExpansionBuildcraft.java +++ b/common/buildcraft/transport/gates/GateExpansionBuildcraft.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -13,10 +13,6 @@ import buildcraft.core.utils.StringUtils; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; -/** - * - * @author CovertJaguar - */ public abstract class GateExpansionBuildcraft implements IGateExpansion { private final String tag; diff --git a/common/buildcraft/transport/gates/GateExpansionPulsar.java b/common/buildcraft/transport/gates/GateExpansionPulsar.java index 6f09d0d7..95f41068 100644 --- a/common/buildcraft/transport/gates/GateExpansionPulsar.java +++ b/common/buildcraft/transport/gates/GateExpansionPulsar.java @@ -1,5 +1,5 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public @@ -25,10 +25,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public class GateExpansionPulsar extends GateExpansionBuildcraft implements IGateExpansion { public static GateExpansionPulsar INSTANCE = new GateExpansionPulsar(); diff --git a/common/buildcraft/transport/gates/GateExpansionRedstoneFader.java b/common/buildcraft/transport/gates/GateExpansionRedstoneFader.java index 3f098726..e413b03e 100644 --- a/common/buildcraft/transport/gates/GateExpansionRedstoneFader.java +++ b/common/buildcraft/transport/gates/GateExpansionRedstoneFader.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -20,10 +20,6 @@ import java.util.Arrays; import java.util.List; import net.minecraft.tileentity.TileEntity; -/** - * - * @author CovertJaguar - */ public class GateExpansionRedstoneFader extends GateExpansionBuildcraft implements IGateExpansion { public static GateExpansionRedstoneFader INSTANCE = new GateExpansionRedstoneFader(); diff --git a/common/buildcraft/transport/gates/GateExpansionTimer.java b/common/buildcraft/transport/gates/GateExpansionTimer.java index 470d58c8..456d5da1 100644 --- a/common/buildcraft/transport/gates/GateExpansionTimer.java +++ b/common/buildcraft/transport/gates/GateExpansionTimer.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -18,10 +18,6 @@ import buildcraft.transport.triggers.TriggerClockTimer.Time; import java.util.List; import net.minecraft.tileentity.TileEntity; -/** - * - * @author CovertJaguar - */ public class GateExpansionTimer extends GateExpansionBuildcraft implements IGateExpansion { public static GateExpansionTimer INSTANCE = new GateExpansionTimer(); diff --git a/common/buildcraft/transport/gates/GateFactory.java b/common/buildcraft/transport/gates/GateFactory.java index a4d5471c..cabb67de 100644 --- a/common/buildcraft/transport/gates/GateFactory.java +++ b/common/buildcraft/transport/gates/GateFactory.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -20,10 +20,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -/** - * - * @author CovertJaguar - */ public class GateFactory { public static Gate makeGate(Pipe pipe, GateMaterial material, GateLogic logic) { diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index 9d7e2058..f119db70 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.gates; import buildcraft.api.gates.GateExpansions; diff --git a/common/buildcraft/transport/gui/ContainerDiamondPipe.java b/common/buildcraft/transport/gui/ContainerDiamondPipe.java index b55c9987..a0c7f3f2 100644 --- a/common/buildcraft/transport/gui/ContainerDiamondPipe.java +++ b/common/buildcraft/transport/gui/ContainerDiamondPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/gui/ContainerEmeraldPipe.java b/common/buildcraft/transport/gui/ContainerEmeraldPipe.java index 86beec41..7acbc334 100644 --- a/common/buildcraft/transport/gui/ContainerEmeraldPipe.java +++ b/common/buildcraft/transport/gui/ContainerEmeraldPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/gui/ContainerEmzuliPipe.java b/common/buildcraft/transport/gui/ContainerEmzuliPipe.java index 76e5a3ef..031d1846 100644 --- a/common/buildcraft/transport/gui/ContainerEmzuliPipe.java +++ b/common/buildcraft/transport/gui/ContainerEmzuliPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; @@ -32,10 +33,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -/** - * - * @author SandGrainOne - */ public class ContainerEmzuliPipe extends BuildCraftContainer { private final PipeItemsEmzuli pipe; diff --git a/common/buildcraft/transport/gui/ContainerFilteredBuffer.java b/common/buildcraft/transport/gui/ContainerFilteredBuffer.java index 4e9cb88f..731aa6ed 100644 --- a/common/buildcraft/transport/gui/ContainerFilteredBuffer.java +++ b/common/buildcraft/transport/gui/ContainerFilteredBuffer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; @@ -16,10 +17,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -/** - * - * @author SandGrainOne - */ public class ContainerFilteredBuffer extends BuildCraftContainer { private class SlotPhantomLockable extends SlotPhantom { diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index 10276041..68daeacb 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/gui/GuiDiamondPipe.java b/common/buildcraft/transport/gui/GuiDiamondPipe.java index dbb17071..82dc48e5 100644 --- a/common/buildcraft/transport/gui/GuiDiamondPipe.java +++ b/common/buildcraft/transport/gui/GuiDiamondPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/gui/GuiEmeraldPipe.java b/common/buildcraft/transport/gui/GuiEmeraldPipe.java index baf26460..00c91dff 100644 --- a/common/buildcraft/transport/gui/GuiEmeraldPipe.java +++ b/common/buildcraft/transport/gui/GuiEmeraldPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/gui/GuiEmzuliPipe.java b/common/buildcraft/transport/gui/GuiEmzuliPipe.java index dd845a31..c7e30a1e 100644 --- a/common/buildcraft/transport/gui/GuiEmzuliPipe.java +++ b/common/buildcraft/transport/gui/GuiEmzuliPipe.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; @@ -16,10 +17,6 @@ import buildcraft.core.gui.GuiBuildCraft; import buildcraft.core.utils.StringUtils; import buildcraft.transport.pipes.PipeItemsEmzuli; -/** - * - * @author SandGrainOne - */ public class GuiEmzuliPipe extends GuiBuildCraft { private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/pipe_emzuli.png"); diff --git a/common/buildcraft/transport/gui/GuiFilteredBuffer.java b/common/buildcraft/transport/gui/GuiFilteredBuffer.java index b423e2d9..a5ec8f3c 100644 --- a/common/buildcraft/transport/gui/GuiFilteredBuffer.java +++ b/common/buildcraft/transport/gui/GuiFilteredBuffer.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; @@ -16,10 +17,6 @@ import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -/** - * - * @author SandGrainOne - */ public class GuiFilteredBuffer extends GuiContainer { private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/filteredBuffer_gui.png"); diff --git a/common/buildcraft/transport/gui/GuiGateInterface.java b/common/buildcraft/transport/gui/GuiGateInterface.java index 3f82d56e..ca8c0ea4 100644 --- a/common/buildcraft/transport/gui/GuiGateInterface.java +++ b/common/buildcraft/transport/gui/GuiGateInterface.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.gui; diff --git a/common/buildcraft/transport/network/PacketFluidUpdate.java b/common/buildcraft/transport/network/PacketFluidUpdate.java index 4bba54ca..5526be75 100644 --- a/common/buildcraft/transport/network/PacketFluidUpdate.java +++ b/common/buildcraft/transport/network/PacketFluidUpdate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.core.network.PacketCoordinates; diff --git a/common/buildcraft/transport/network/PacketGateExpansionMap.java b/common/buildcraft/transport/network/PacketGateExpansionMap.java index efacbc5c..7dc3b1b8 100644 --- a/common/buildcraft/transport/network/PacketGateExpansionMap.java +++ b/common/buildcraft/transport/network/PacketGateExpansionMap.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.api.gates.GateExpansions; diff --git a/common/buildcraft/transport/network/PacketHandlerTransport.java b/common/buildcraft/transport/network/PacketHandlerTransport.java index b4db6609..43c1d90b 100644 --- a/common/buildcraft/transport/network/PacketHandlerTransport.java +++ b/common/buildcraft/transport/network/PacketHandlerTransport.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftChannelHandler; diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java index 3c8c400d..94d6f08d 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStack.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStack.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftPacket; diff --git a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java index db0fff7e..52fe82b3 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java +++ b/common/buildcraft/transport/network/PacketPipeTransportItemStackRequest.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java index b8429d62..ba0b162d 100644 --- a/common/buildcraft/transport/network/PacketPipeTransportTraveler.java +++ b/common/buildcraft/transport/network/PacketPipeTransportTraveler.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.core.network.BuildCraftPacket; diff --git a/common/buildcraft/transport/network/PacketPowerUpdate.java b/common/buildcraft/transport/network/PacketPowerUpdate.java index dd05e09a..630ccaf9 100644 --- a/common/buildcraft/transport/network/PacketPowerUpdate.java +++ b/common/buildcraft/transport/network/PacketPowerUpdate.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.network; import buildcraft.core.network.PacketCoordinates; diff --git a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java index d0110d7f..2b8f1a1a 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsCobblestone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsEmerald.java b/common/buildcraft/transport/pipes/PipeFluidsEmerald.java index c2a19b41..06353d75 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeFluidsEmerald.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; @@ -10,10 +11,6 @@ package buildcraft.transport.pipes; import net.minecraft.item.Item; import buildcraft.transport.PipeIconProvider; -/** - * - * @author CovertJaguar - */ public class PipeFluidsEmerald extends PipeFluidsWood { public PipeFluidsEmerald(Item item) { diff --git a/common/buildcraft/transport/pipes/PipeFluidsGold.java b/common/buildcraft/transport/pipes/PipeFluidsGold.java index c17e1602..d05680b0 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsGold.java +++ b/common/buildcraft/transport/pipes/PipeFluidsGold.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsIron.java b/common/buildcraft/transport/pipes/PipeFluidsIron.java index 9cd56977..1e334ee1 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsIron.java +++ b/common/buildcraft/transport/pipes/PipeFluidsIron.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java index 246baebb..1a98b5fe 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsSandstone.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsStone.java b/common/buildcraft/transport/pipes/PipeFluidsStone.java index 7a8d6e4c..d7c740b0 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsStone.java +++ b/common/buildcraft/transport/pipes/PipeFluidsStone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsVoid.java b/common/buildcraft/transport/pipes/PipeFluidsVoid.java index 24b6e8d5..24e8f3d3 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsVoid.java +++ b/common/buildcraft/transport/pipes/PipeFluidsVoid.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeFluidsWood.java b/common/buildcraft/transport/pipes/PipeFluidsWood.java index 59ce439b..79b9c0c6 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsWood.java +++ b/common/buildcraft/transport/pipes/PipeFluidsWood.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java index e27843f1..702c1a0e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeItemsCobblestone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java index 0047d4ac..f7691cd1 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDaizuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsDaizuli.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsDiamond.java b/common/buildcraft/transport/pipes/PipeItemsDiamond.java index c11dcf67..122f087f 100644 --- a/common/buildcraft/transport/pipes/PipeItemsDiamond.java +++ b/common/buildcraft/transport/pipes/PipeItemsDiamond.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmerald.java b/common/buildcraft/transport/pipes/PipeItemsEmerald.java index 5e017d61..20b8fca8 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmerald.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmerald.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java index 482a1dfe..cc002882 100644 --- a/common/buildcraft/transport/pipes/PipeItemsEmzuli.java +++ b/common/buildcraft/transport/pipes/PipeItemsEmzuli.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -40,10 +40,6 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -/** - * - * @author SandGrainOne - */ public class PipeItemsEmzuli extends PipeItemsWood implements IGuiReturnHandler { public final byte[] slotColors = new byte[4]; diff --git a/common/buildcraft/transport/pipes/PipeItemsGold.java b/common/buildcraft/transport/pipes/PipeItemsGold.java index 738def06..9f9c785e 100644 --- a/common/buildcraft/transport/pipes/PipeItemsGold.java +++ b/common/buildcraft/transport/pipes/PipeItemsGold.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsIron.java b/common/buildcraft/transport/pipes/PipeItemsIron.java index 8c147182..c8f89b33 100644 --- a/common/buildcraft/transport/pipes/PipeItemsIron.java +++ b/common/buildcraft/transport/pipes/PipeItemsIron.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsLapis.java b/common/buildcraft/transport/pipes/PipeItemsLapis.java index 2c53747d..65e7c9d6 100644 --- a/common/buildcraft/transport/pipes/PipeItemsLapis.java +++ b/common/buildcraft/transport/pipes/PipeItemsLapis.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsObsidian.java b/common/buildcraft/transport/pipes/PipeItemsObsidian.java index 0bca644f..7c89d8f5 100644 --- a/common/buildcraft/transport/pipes/PipeItemsObsidian.java +++ b/common/buildcraft/transport/pipes/PipeItemsObsidian.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsQuartz.java b/common/buildcraft/transport/pipes/PipeItemsQuartz.java index f0e97ba9..ff4ab304 100644 --- a/common/buildcraft/transport/pipes/PipeItemsQuartz.java +++ b/common/buildcraft/transport/pipes/PipeItemsQuartz.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsSandstone.java b/common/buildcraft/transport/pipes/PipeItemsSandstone.java index bfcd991d..2ace9d41 100644 --- a/common/buildcraft/transport/pipes/PipeItemsSandstone.java +++ b/common/buildcraft/transport/pipes/PipeItemsSandstone.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsStone.java b/common/buildcraft/transport/pipes/PipeItemsStone.java index 063aa2db..fa688d84 100644 --- a/common/buildcraft/transport/pipes/PipeItemsStone.java +++ b/common/buildcraft/transport/pipes/PipeItemsStone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsVoid.java b/common/buildcraft/transport/pipes/PipeItemsVoid.java index 229f3faa..33c2c6c2 100644 --- a/common/buildcraft/transport/pipes/PipeItemsVoid.java +++ b/common/buildcraft/transport/pipes/PipeItemsVoid.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 181789b9..4c0dd9ca 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeLogicIron.java b/common/buildcraft/transport/pipes/PipeLogicIron.java index 708a92d7..d12564d9 100644 --- a/common/buildcraft/transport/pipes/PipeLogicIron.java +++ b/common/buildcraft/transport/pipes/PipeLogicIron.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeLogicWood.java b/common/buildcraft/transport/pipes/PipeLogicWood.java index b23f8e70..c2902268 100644 --- a/common/buildcraft/transport/pipes/PipeLogicWood.java +++ b/common/buildcraft/transport/pipes/PipeLogicWood.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerCobblestone.java b/common/buildcraft/transport/pipes/PipePowerCobblestone.java index 2cc726b5..5e9a3545 100644 --- a/common/buildcraft/transport/pipes/PipePowerCobblestone.java +++ b/common/buildcraft/transport/pipes/PipePowerCobblestone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerDiamond.java b/common/buildcraft/transport/pipes/PipePowerDiamond.java index 8afc0001..084987bc 100644 --- a/common/buildcraft/transport/pipes/PipePowerDiamond.java +++ b/common/buildcraft/transport/pipes/PipePowerDiamond.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerGold.java b/common/buildcraft/transport/pipes/PipePowerGold.java index 28d8626e..8941e383 100644 --- a/common/buildcraft/transport/pipes/PipePowerGold.java +++ b/common/buildcraft/transport/pipes/PipePowerGold.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerIron.java b/common/buildcraft/transport/pipes/PipePowerIron.java index ee72aaa9..fd035033 100644 --- a/common/buildcraft/transport/pipes/PipePowerIron.java +++ b/common/buildcraft/transport/pipes/PipePowerIron.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerQuartz.java b/common/buildcraft/transport/pipes/PipePowerQuartz.java index 0ea4e62b..a9ad0a4a 100644 --- a/common/buildcraft/transport/pipes/PipePowerQuartz.java +++ b/common/buildcraft/transport/pipes/PipePowerQuartz.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerStone.java b/common/buildcraft/transport/pipes/PipePowerStone.java index a830f64b..096f8f82 100644 --- a/common/buildcraft/transport/pipes/PipePowerStone.java +++ b/common/buildcraft/transport/pipes/PipePowerStone.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index 09888b58..8bd8a0ff 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -1,9 +1,10 @@ /** - * BuildCraft is open-source. It is distributed under the terms of the - * BuildCraft Open Source License. It grants rights to read, modify, compile or - * run the code. It does *NOT* grant the right to redistribute this software or - * its modifications in any form, binary or source, except if expressively - * granted by the copyright holder. + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes; diff --git a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java index 72ea650d..f0a2e114 100644 --- a/common/buildcraft/transport/pipes/PipeStructureCobblestone.java +++ b/common/buildcraft/transport/pipes/PipeStructureCobblestone.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.pipes; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/pipes/events/PipeEvent.java b/common/buildcraft/transport/pipes/events/PipeEvent.java index 8cc7177e..e5d74a5a 100644 --- a/common/buildcraft/transport/pipes/events/PipeEvent.java +++ b/common/buildcraft/transport/pipes/events/PipeEvent.java @@ -1,16 +1,12 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.pipes.events; -/** - * - * @author CovertJaguar - */ public abstract class PipeEvent { } diff --git a/common/buildcraft/transport/pipes/events/PipeEventItem.java b/common/buildcraft/transport/pipes/events/PipeEventItem.java index 641606af..f06c7e42 100644 --- a/common/buildcraft/transport/pipes/events/PipeEventItem.java +++ b/common/buildcraft/transport/pipes/events/PipeEventItem.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -14,10 +14,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public abstract class PipeEventItem extends PipeEvent { public final TravelingItem item; diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index 58e4de3e..0a16db8f 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.render; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/render/FacadeRenderHelper.java b/common/buildcraft/transport/render/FacadeRenderHelper.java index daff89d7..690164fc 100644 --- a/common/buildcraft/transport/render/FacadeRenderHelper.java +++ b/common/buildcraft/transport/render/FacadeRenderHelper.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -22,10 +22,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; -/** - * - * @author CovertJaguar - */ public class FacadeRenderHelper { private static final float zFightOffset = 1F / 4096F; diff --git a/common/buildcraft/transport/render/GateItemRenderer.java b/common/buildcraft/transport/render/GateItemRenderer.java index 56315dfd..831bc441 100644 --- a/common/buildcraft/transport/render/GateItemRenderer.java +++ b/common/buildcraft/transport/render/GateItemRenderer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.render; import buildcraft.api.gates.IGateExpansion; @@ -15,10 +23,6 @@ import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; import org.lwjgl.opengl.GL11; import net.minecraft.entity.item.EntityItem; -/** - * - * @author CovertJaguar - */ public class GateItemRenderer implements IItemRenderer { RenderItem renderItem = new RenderItem(); diff --git a/common/buildcraft/transport/render/PipeItemRenderer.java b/common/buildcraft/transport/render/PipeItemRenderer.java index eb3a0336..9cd4eb51 100644 --- a/common/buildcraft/transport/render/PipeItemRenderer.java +++ b/common/buildcraft/transport/render/PipeItemRenderer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.render; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index a552a198..40126ef6 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.render; diff --git a/common/buildcraft/transport/render/PipeRendererWorld.java b/common/buildcraft/transport/render/PipeRendererWorld.java index ced74905..c19e6dbb 100644 --- a/common/buildcraft/transport/render/PipeRendererWorld.java +++ b/common/buildcraft/transport/render/PipeRendererWorld.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.render; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/render/PlugItemRenderer.java b/common/buildcraft/transport/render/PlugItemRenderer.java index 6514e5aa..b75a41c4 100644 --- a/common/buildcraft/transport/render/PlugItemRenderer.java +++ b/common/buildcraft/transport/render/PlugItemRenderer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.render; import buildcraft.BuildCraftTransport; diff --git a/common/buildcraft/transport/render/TileEntityPickupFX.java b/common/buildcraft/transport/render/TileEntityPickupFX.java index d5ac1411..9e7c5a3e 100644 --- a/common/buildcraft/transport/render/TileEntityPickupFX.java +++ b/common/buildcraft/transport/render/TileEntityPickupFX.java @@ -1,5 +1,5 @@ /** - * Copyright (c) SpaceToad, 2011 + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com * * BuildCraft is distributed under the terms of the Minecraft Mod Public diff --git a/common/buildcraft/transport/triggers/ActionEnergyPulsar.java b/common/buildcraft/transport/triggers/ActionEnergyPulsar.java index 89281975..4245b08d 100644 --- a/common/buildcraft/transport/triggers/ActionEnergyPulsar.java +++ b/common/buildcraft/transport/triggers/ActionEnergyPulsar.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.triggers; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/common/buildcraft/transport/triggers/ActionExtractionPreset.java b/common/buildcraft/transport/triggers/ActionExtractionPreset.java index 6498cd85..d201c1e2 100644 --- a/common/buildcraft/transport/triggers/ActionExtractionPreset.java +++ b/common/buildcraft/transport/triggers/ActionExtractionPreset.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionPipeColor.java b/common/buildcraft/transport/triggers/ActionPipeColor.java index a11946dd..f7ec1741 100644 --- a/common/buildcraft/transport/triggers/ActionPipeColor.java +++ b/common/buildcraft/transport/triggers/ActionPipeColor.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionPipeDirection.java b/common/buildcraft/transport/triggers/ActionPipeDirection.java index 43ec6ade..602a0f1a 100644 --- a/common/buildcraft/transport/triggers/ActionPipeDirection.java +++ b/common/buildcraft/transport/triggers/ActionPipeDirection.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionPowerLimiter.java b/common/buildcraft/transport/triggers/ActionPowerLimiter.java index d8aa0068..63887870 100644 --- a/common/buildcraft/transport/triggers/ActionPowerLimiter.java +++ b/common/buildcraft/transport/triggers/ActionPowerLimiter.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java b/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java index bf73bd72..291422db 100644 --- a/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java +++ b/common/buildcraft/transport/triggers/ActionRedstoneFaderOutput.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionSignalOutput.java b/common/buildcraft/transport/triggers/ActionSignalOutput.java index 1efb4df9..45c093e5 100644 --- a/common/buildcraft/transport/triggers/ActionSignalOutput.java +++ b/common/buildcraft/transport/triggers/ActionSignalOutput.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java b/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java index cd4725d9..673ce0b5 100644 --- a/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java +++ b/common/buildcraft/transport/triggers/ActionSingleEnergyPulse.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.triggers; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/common/buildcraft/transport/triggers/TriggerClockTimer.java b/common/buildcraft/transport/triggers/TriggerClockTimer.java index 05579388..88b35f03 100644 --- a/common/buildcraft/transport/triggers/TriggerClockTimer.java +++ b/common/buildcraft/transport/triggers/TriggerClockTimer.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.triggers; import java.util.Locale; diff --git a/common/buildcraft/transport/triggers/TriggerPipeContents.java b/common/buildcraft/transport/triggers/TriggerPipeContents.java index 93ce2926..af0d66d8 100644 --- a/common/buildcraft/transport/triggers/TriggerPipeContents.java +++ b/common/buildcraft/transport/triggers/TriggerPipeContents.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/TriggerPipeSignal.java b/common/buildcraft/transport/triggers/TriggerPipeSignal.java index 146a2903..01744b82 100644 --- a/common/buildcraft/transport/triggers/TriggerPipeSignal.java +++ b/common/buildcraft/transport/triggers/TriggerPipeSignal.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java b/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java index f3560a5b..580c1b94 100644 --- a/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java +++ b/common/buildcraft/transport/triggers/TriggerRedstoneFaderInput.java @@ -1,8 +1,9 @@ /** - * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public License - * 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.transport.triggers; diff --git a/common/buildcraft/transport/utils/BitSetCodec.java b/common/buildcraft/transport/utils/BitSetCodec.java index c843c565..f22977fb 100644 --- a/common/buildcraft/transport/utils/BitSetCodec.java +++ b/common/buildcraft/transport/utils/BitSetCodec.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.utils; import java.util.BitSet; diff --git a/common/buildcraft/transport/utils/ConnectionMatrix.java b/common/buildcraft/transport/utils/ConnectionMatrix.java index 5502ffa2..e7b0c97c 100644 --- a/common/buildcraft/transport/utils/ConnectionMatrix.java +++ b/common/buildcraft/transport/utils/ConnectionMatrix.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.utils; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/transport/utils/FacadeMatrix.java b/common/buildcraft/transport/utils/FacadeMatrix.java index 387c1db8..7083ec9d 100644 --- a/common/buildcraft/transport/utils/FacadeMatrix.java +++ b/common/buildcraft/transport/utils/FacadeMatrix.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.utils; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/transport/utils/TextureMatrix.java b/common/buildcraft/transport/utils/TextureMatrix.java index 4ca1fc37..5fee384d 100644 --- a/common/buildcraft/transport/utils/TextureMatrix.java +++ b/common/buildcraft/transport/utils/TextureMatrix.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.utils; import io.netty.buffer.ByteBuf; diff --git a/common/buildcraft/transport/utils/TransportUtils.java b/common/buildcraft/transport/utils/TransportUtils.java index fb601108..20924920 100644 --- a/common/buildcraft/transport/utils/TransportUtils.java +++ b/common/buildcraft/transport/utils/TransportUtils.java @@ -1,7 +1,7 @@ -/* - * Copyright (c) SpaceToad, 2011-2012 +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team * http://www.mod-buildcraft.com - * + * * BuildCraft is distributed under the terms of the Minecraft Mod Public * License 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt @@ -11,10 +11,6 @@ package buildcraft.transport.utils; import buildcraft.core.CoreConstants; import net.minecraft.item.ItemStack; -/** - * - * @author CovertJaguar - */ public class TransportUtils { /** diff --git a/common/buildcraft/transport/utils/WireMatrix.java b/common/buildcraft/transport/utils/WireMatrix.java index bd850430..1e2c5ad0 100644 --- a/common/buildcraft/transport/utils/WireMatrix.java +++ b/common/buildcraft/transport/utils/WireMatrix.java @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ package buildcraft.transport.utils; import buildcraft.transport.Pipe; From 88bb117094e7ba63ef80715a104574441ac7f724 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 15 Feb 2014 09:57:27 +0100 Subject: [PATCH 29/31] added more gate options in creative --- .../buildcraft/transport/gates/ItemGate.java | 68 ++++++++++++++----- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/common/buildcraft/transport/gates/ItemGate.java b/common/buildcraft/transport/gates/ItemGate.java index f119db70..ccec07d8 100644 --- a/common/buildcraft/transport/gates/ItemGate.java +++ b/common/buildcraft/transport/gates/ItemGate.java @@ -54,9 +54,11 @@ public class ItemGate extends ItemBuildCraft { } private static NBTTagCompound getNBT(ItemStack stack) { - if (stack == null || !(stack.getItem() instanceof ItemGate)) + if (stack == null || !(stack.getItem() instanceof ItemGate)) { return null; - return InvUtils.getItemData(stack); + } else { + return InvUtils.getItemData(stack); + } } public static void setMaterial(ItemStack stack, GateMaterial material) { @@ -66,16 +68,22 @@ public class ItemGate extends ItemBuildCraft { public static GateMaterial getMaterial(ItemStack stack) { NBTTagCompound nbt = getNBT(stack); - if (nbt == null) + + if (nbt == null) { return GateMaterial.REDSTONE; - return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT)); + } else { + return GateMaterial.fromOrdinal(nbt.getByte(NBT_TAG_MAT)); + } } public static GateLogic getLogic(ItemStack stack) { NBTTagCompound nbt = getNBT(stack); - if (nbt == null) + + if (nbt == null) { return GateLogic.AND; - return GateLogic.fromOrdinal(nbt.getByte(NBT_TAG_LOGIC)); + } else { + return GateLogic.fromOrdinal(nbt.getByte(NBT_TAG_LOGIC)); + } } public static void setLogic(ItemStack stack, GateLogic logic) { @@ -85,8 +93,11 @@ public class ItemGate extends ItemBuildCraft { public static void addGateExpansion(ItemStack stack, IGateExpansion expansion) { NBTTagCompound nbt = getNBT(stack); - if (nbt == null) + + if (nbt == null) { return; + } + NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); expansionList.appendTag(new NBTTagString(expansion.getUniqueIdentifier())); nbt.setTag(NBT_TAG_EX, expansionList); @@ -94,25 +105,35 @@ public class ItemGate extends ItemBuildCraft { public static boolean hasGateExpansion(ItemStack stack, IGateExpansion expansion) { NBTTagCompound nbt = getNBT(stack); - if (nbt == null) + + if (nbt == null) { return false; + } + try { NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); + for (int i = 0; i < expansionList.tagCount(); i++) { String ex = expansionList.getStringTagAt(i); - if (ex.equals(expansion.getUniqueIdentifier())) + + if (ex.equals(expansion.getUniqueIdentifier())) { return true; + } } } catch (RuntimeException error) { } + return false; } public static Set getInstalledExpansions(ItemStack stack) { Set expansions = new HashSet(); NBTTagCompound nbt = getNBT(stack); - if (nbt == null) + + if (nbt == null) { return expansions; + } + try { NBTTagList expansionList = nbt.getTagList(NBT_TAG_EX, Utils.NBTTag_Types.NBTTagString.ordinal()); for (int i = 0; i < expansionList.tagCount(); i++) { @@ -123,6 +144,7 @@ public class ItemGate extends ItemBuildCraft { } } catch (RuntimeException error) { } + return expansions; } @@ -131,6 +153,7 @@ public class ItemGate extends ItemBuildCraft { NBTTagCompound nbt = InvUtils.getItemData(stack); nbt.setByte(NBT_TAG_MAT, (byte) material.ordinal()); nbt.setByte(NBT_TAG_LOGIC, (byte) logic.ordinal()); + return stack; } @@ -139,9 +162,11 @@ public class ItemGate extends ItemBuildCraft { NBTTagCompound nbt = InvUtils.getItemData(stack); nbt.setByte(NBT_TAG_MAT, (byte) gate.material.ordinal()); nbt.setByte(NBT_TAG_LOGIC, (byte) gate.logic.ordinal()); + for (IGateExpansion expansion : gate.expansions.keySet()) { addGateExpansion(stack, expansion); } + return stack; } @@ -156,37 +181,48 @@ public class ItemGate extends ItemBuildCraft { public void getSubItems(Item item, CreativeTabs tab, List itemList) { for (GateMaterial material : GateMaterial.VALUES) { for (GateLogic logic : GateLogic.VALUES) { - if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) + if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) { continue; - ItemStack stack = makeGateItem(material, logic); - for (IGateExpansion exp : GateExpansions.getExpansions()) { - addGateExpansion(stack, exp); } - itemList.add(stack); + + itemList.add(makeGateItem(material, logic)); + + for (IGateExpansion exp : GateExpansions.getExpansions()) { + ItemStack stackExpansion = makeGateItem(material, logic); + addGateExpansion(stackExpansion, exp); + itemList.add(stackExpansion); + } } } } public static ItemStack[] getGateVarients() { ArrayList gates = new ArrayList(); + for (GateMaterial material : GateMaterial.VALUES) { for (GateLogic logic : GateLogic.VALUES) { - if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) + if (material == GateMaterial.REDSTONE && logic == GateLogic.OR) { continue; + } + gates.add(makeGateItem(material, logic)); } } + return gates.toArray(new ItemStack[gates.size()]); } @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) { super.addInformation(stack, player, list, adv); + list.add("§9§o" + Localization.get("tip.gate.wires")); list.add(Localization.get("tip.gate.wires." + getMaterial(stack).getTag())); Set expansions = getInstalledExpansions(stack); + if (!expansions.isEmpty()) { list.add("§9§o" + Localization.get("tip.gate.expansions")); + for (IGateExpansion expansion : expansions) { list.add(expansion.getDisplayName()); } From 6b21bdd9018ab049e79472e008bc646cf71d0432 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 15 Feb 2014 14:16:23 +0100 Subject: [PATCH 30/31] more fixes following last pull --- common/buildcraft/transport/ItemFacade.java | 24 ++++++++++--------- .../transport/gates/GateDefinition.java | 4 ++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 8bb50c7e..815f0fde 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -130,19 +130,21 @@ public class ItemFacade extends ItemBuildCraft { || b.getRenderType() != 0) { continue; } - } - - Item base = Item.getItemFromBlock(b); + } - if (base != null) { - List stackList = new ArrayList (); - if ( FMLCommonHandler.instance().getSide() == Side.CLIENT ) { - base.getSubItems(base, null, stackList); - } + ItemStack base = new ItemStack(b, 1); + + if (base.getHasSubtypes()) { + Set names = Sets.newHashSet(); - for (ItemStack s : stackList) { - ItemFacade.addFacade(s); - } + for (int meta = 0; meta <= 15; meta++) { + ItemStack is = new ItemStack(b, 1, meta); + if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) && names.add(is.getUnlocalizedName())) { + ItemFacade.addFacade(is); + } + } + } else { + ItemFacade.addFacade(base); } } } diff --git a/common/buildcraft/transport/gates/GateDefinition.java b/common/buildcraft/transport/gates/GateDefinition.java index 8898d3ad..18535e20 100644 --- a/common/buildcraft/transport/gates/GateDefinition.java +++ b/common/buildcraft/transport/gates/GateDefinition.java @@ -10,7 +10,11 @@ package buildcraft.transport.gates; import buildcraft.core.DefaultProps; import buildcraft.core.utils.StringUtils; + import java.util.Locale; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; From ce432eaa76d9e125674733fda066cd18c83d3b62 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sat, 15 Feb 2014 14:45:22 +0100 Subject: [PATCH 31/31] further fixes in facades --- common/buildcraft/transport/ItemFacade.java | 26 +++++++++++++-------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index 815f0fde..bdccd182 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -132,19 +132,25 @@ public class ItemFacade extends ItemBuildCraft { } } - ItemStack base = new ItemStack(b, 1); + Item item = Item.getItemFromBlock(b); - if (base.getHasSubtypes()) { - Set names = Sets.newHashSet(); - - for (int meta = 0; meta <= 15; meta++) { - ItemStack is = new ItemStack(b, 1, meta); - if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) && names.add(is.getUnlocalizedName())) { - ItemFacade.addFacade(is); + if (item != null) { + ItemStack base = new ItemStack(item, 1); + + if (base.getHasSubtypes()) { + Set names = Sets.newHashSet(); + + for (int meta = 0; meta <= 15; meta++) { + ItemStack is = new ItemStack(item, 1, meta); + + if (!Strings.isNullOrEmpty(is.getUnlocalizedName()) + && names.add(is.getUnlocalizedName())) { + ItemFacade.addFacade(is); + } } + } else { + ItemFacade.addFacade(base); } - } else { - ItemFacade.addFacade(base); } } }