From d9d93e6103bd7cf73427304e569ad3633bd67a08 Mon Sep 17 00:00:00 2001 From: Brian Ricketts Date: Sat, 9 Feb 2013 18:41:44 -0600 Subject: [PATCH] Renamed "Crane Parts" to "Crane Rail" Removed ItemCraneParts; we don't need a custom ItemBlock --- .../assemblyline/common/AssemblyLine.java | 11 ++++------- .../common/machine/crane/BlockCraneController.java | 3 ++- .../{BlockCraneParts.java => BlockCraneRail.java} | 4 ++-- .../common/machine/crane/CraneManager.java | 2 +- .../common/machine/crane/ItemCraneParts.java | 14 -------------- 5 files changed, 9 insertions(+), 25 deletions(-) rename src/minecraft/assemblyline/common/machine/crane/{BlockCraneParts.java => BlockCraneRail.java} (77%) delete mode 100644 src/minecraft/assemblyline/common/machine/crane/ItemCraneParts.java diff --git a/src/minecraft/assemblyline/common/AssemblyLine.java b/src/minecraft/assemblyline/common/AssemblyLine.java index f6d8db7dd..1870be6a9 100644 --- a/src/minecraft/assemblyline/common/AssemblyLine.java +++ b/src/minecraft/assemblyline/common/AssemblyLine.java @@ -22,8 +22,7 @@ import assemblyline.common.machine.BlockRejector; import assemblyline.common.machine.armbot.BlockArmbot; import assemblyline.common.machine.belt.BlockConveyorBelt; import assemblyline.common.machine.crane.BlockCraneController; -import assemblyline.common.machine.crane.BlockCraneParts; -import assemblyline.common.machine.crane.ItemCraneParts; +import assemblyline.common.machine.crane.BlockCraneRail; import assemblyline.common.machine.detector.BlockDetector; import assemblyline.common.machine.encoder.BlockEncoder; import assemblyline.common.machine.encoder.ItemDisk; @@ -36,11 +35,9 @@ import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PreInit; -import cpw.mods.fml.common.Mod.ServerStarted; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartedEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; @@ -84,7 +81,7 @@ public class AssemblyLine public static Block blockRejector; public static Block blockArmbot; public static Block blockCraneController; - public static Block blockCraneParts; + public static Block blockCraneRail; public static Block blockTurntable; public static BlockMulti blockMulti; @@ -114,7 +111,7 @@ public class AssemblyLine blockArmbot = new BlockArmbot(CONFIGURATION.getBlock("Armbot", BLOCK_ID_PREFIX + 8).getInt()); blockMulti = new BlockMulti(CONFIGURATION.getBlock("Multiblock", BLOCK_ID_PREFIX + 9).getInt()); blockCraneController = new BlockCraneController(CONFIGURATION.getBlock("CraneController", BLOCK_ID_PREFIX + 10).getInt()); - blockCraneParts = new BlockCraneParts(CONFIGURATION.getBlock("CraneParts", BLOCK_ID_PREFIX + 11).getInt()); + blockCraneRail = new BlockCraneRail(CONFIGURATION.getBlock("CraneParts", BLOCK_ID_PREFIX + 11).getInt()); blockTurntable = new BlockTurntable(CONFIGURATION.getBlock("Turntable", BLOCK_ID_PREFIX + 12).getInt(), 10); itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt()); @@ -132,7 +129,7 @@ public class AssemblyLine GameRegistry.registerBlock(blockArmbot, "Armbot"); GameRegistry.registerBlock(blockTurntable, "Turntable"); GameRegistry.registerBlock(blockCraneController, "Crane Controller"); - GameRegistry.registerBlock(blockCraneParts, ItemCraneParts.class, "Crane Parts"); + GameRegistry.registerBlock(blockCraneRail, "Crane Rail"); TabAssemblyLine.itemStack = new ItemStack(AssemblyLine.blockConveyorBelt); UpdateNotifier.INSTANCE.checkUpdate(NAME, VERSION, "http://calclavia.com/downloads/al/recommendedversion.txt"); diff --git a/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java b/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java index 774bd2136..22db999aa 100644 --- a/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java +++ b/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java @@ -7,6 +7,7 @@ import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.UniversalElectricity; import universalelectricity.prefab.BlockMachine; import assemblyline.client.render.BlockRenderingHandler; +import assemblyline.common.TabAssemblyLine; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +19,7 @@ public class BlockCraneController extends BlockMachine super("cranecontroller", id, UniversalElectricity.machine); this.setResistance(5.0f); this.setHardness(5.0f); - // this.setCreativeTab(TabAssemblyLine.INSTANCE); + this.setCreativeTab(TabAssemblyLine.INSTANCE); } @Override diff --git a/src/minecraft/assemblyline/common/machine/crane/BlockCraneParts.java b/src/minecraft/assemblyline/common/machine/crane/BlockCraneRail.java similarity index 77% rename from src/minecraft/assemblyline/common/machine/crane/BlockCraneParts.java rename to src/minecraft/assemblyline/common/machine/crane/BlockCraneRail.java index e92ebc389..c0ee11815 100644 --- a/src/minecraft/assemblyline/common/machine/crane/BlockCraneParts.java +++ b/src/minecraft/assemblyline/common/machine/crane/BlockCraneRail.java @@ -3,11 +3,11 @@ package assemblyline.common.machine.crane; import net.minecraft.block.material.Material; import universalelectricity.prefab.BlockMachine; -public class BlockCraneParts extends BlockMachine +public class BlockCraneRail extends BlockMachine { public static final int RAIL_META = 0; - public BlockCraneParts(int id) + public BlockCraneRail(int id) { super("CraneParts", id, Material.iron); // this.setCreativeTab(TabAssemblyLine.INSTANCE); diff --git a/src/minecraft/assemblyline/common/machine/crane/CraneManager.java b/src/minecraft/assemblyline/common/machine/crane/CraneManager.java index b5c609b77..ad506af1e 100644 --- a/src/minecraft/assemblyline/common/machine/crane/CraneManager.java +++ b/src/minecraft/assemblyline/common/machine/crane/CraneManager.java @@ -42,7 +42,7 @@ public class CraneManager //might have to change this meta later if i go with a more complex render that will connect to walls ForgeDirection facing = ForgeDirection.getOrientation(meta); - if (id == AssemblyLine.blockCraneParts.blockID && (dir == facing || dir == facing.getOpposite())) + if (id == AssemblyLine.blockCraneRail.blockID && (dir == facing || dir == facing.getOpposite())) { return true; } diff --git a/src/minecraft/assemblyline/common/machine/crane/ItemCraneParts.java b/src/minecraft/assemblyline/common/machine/crane/ItemCraneParts.java deleted file mode 100644 index 832fd93fc..000000000 --- a/src/minecraft/assemblyline/common/machine/crane/ItemCraneParts.java +++ /dev/null @@ -1,14 +0,0 @@ -package assemblyline.common.machine.crane; - -import net.minecraft.item.ItemBlock; - -public class ItemCraneParts extends ItemBlock -{ - - public ItemCraneParts(int par1) - { - super(par1); - this.setHasSubtypes(true); - } - -}