diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index bf96c4a7..92d5ed31 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -275,6 +275,7 @@ LavaTank.Window.name=Seared Window block.drawbridge.name=Drawbridge block.firestarter.name=Igniter +block.advdrawbridge.name=Advanced Drawbridge tile.landmine.name=Landmine tile.trap.punji.name=Punji Stick diff --git a/src/tconstruct/blocks/RedstoneMachine.java b/src/tconstruct/blocks/RedstoneMachine.java index c539bf91..96181edc 100644 --- a/src/tconstruct/blocks/RedstoneMachine.java +++ b/src/tconstruct/blocks/RedstoneMachine.java @@ -255,7 +255,7 @@ public class RedstoneMachine extends InventoryBlock @Override public void getSubBlocks (int id, CreativeTabs tab, List list) { - for (int iter = 0; iter < 2; iter++) + for (int iter = 0; iter < 3; iter++) { list.add(new ItemStack(id, 1, iter)); } diff --git a/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java b/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java index 721e8548..9f17b15c 100644 --- a/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java +++ b/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java @@ -260,18 +260,18 @@ public class AdvancedDrawbridgeLogic extends InventoryLogic implements IFacingLo Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos) || block.isBlockReplaceable(worldObj, xPos, yPos, zPos)) { // tryExtend(worldObj, xPos, yPos, zPos, direction); - int blockToItem = getStackInBufferSlot(extension) != null ? TConstructRegistry.blockToItemMapping[getStackInBufferSlot(extension).itemID] : 0; + int blockToItem = getStackInBufferSlot(extension - 1) != null ? TConstructRegistry.blockToItemMapping[getStackInBufferSlot(extension - 1).itemID] : 0; if (blockToItem == 0) { - if (getStackInSlot(extension) == null || getStackInSlot(extension).itemID >= 4096 || Block.blocksList[getStackInSlot(extension).itemID] == null) + if (getStackInSlot(extension - 1) == null || getStackInSlot(extension - 1).itemID >= 4096 || Block.blocksList[getStackInSlot(extension - 1).itemID] == null) return; - Block placeBlock = Block.blocksList[getStackInBufferSlot(extension).itemID]; - placeBlockAt(getStackInSlot(extension), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension).getItemDamage(), placeBlock); + Block placeBlock = Block.blocksList[getStackInBufferSlot(extension - 1).itemID]; + placeBlockAt(getStackInSlot(extension - 1), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension - 1).getItemDamage(), placeBlock); } else { Block placeBlock = Block.blocksList[blockToItem]; - placeBlockAt(getStackInSlot(extension), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension).getItemDamage(), placeBlock); + placeBlockAt(getStackInSlot(extension - 1), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension - 1).getItemDamage(), placeBlock); } worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.out", 0.25F, worldObj.rand.nextFloat() * 0.25F + 0.6F); - decrStackSize(extension, 1); + decrStackSize(extension - 1, 1); } else { extension--; working = false; @@ -311,13 +311,13 @@ public class AdvancedDrawbridgeLogic extends InventoryLogic implements IFacingLo Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; if (block != null) { int meta = worldObj.getBlockMetadata(xPos, yPos, zPos); - if (getStackInBufferSlot(extension) != null && validBlock(extension, block) && validMetadata(extension, block.blockID, meta)) { + if (getStackInBufferSlot(extension - 1) != null && validBlock(extension - 1, block) && validMetadata(extension - 1, block.blockID, meta)) { worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.in", 0.25F, worldObj.rand.nextFloat() * 0.15F + 0.6F); if (worldObj.setBlock(xPos, yPos, zPos, 0)) - if (getStackInSlot(extension) == null) { - setInventorySlotContents(extension, getStackInBufferSlot(extension).copy()); + if (getStackInSlot(extension - 1) == null) { + setInventorySlotContents(extension - 1, getStackInBufferSlot(extension - 1).copy()); } else { - getStackInSlot(extension).stackSize++; + getStackInSlot(extension - 1).stackSize++; } } else { working = false; diff --git a/src/tconstruct/common/TContent.java b/src/tconstruct/common/TContent.java index 81f9b727..45d3e149 100644 --- a/src/tconstruct/common/TContent.java +++ b/src/tconstruct/common/TContent.java @@ -1521,7 +1521,10 @@ public class TContent implements IFuelHandler GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 1), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(largePlate, 1, 7), 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Item.flintAndSteel))); //Igniter - + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 2), " c ", "rdr", " a ", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 1), 'r', new ItemStack(Item.redstone), 'd', new ItemStack(redstoneMachine, 1, 0))); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 2), " c ", "rdr", " a ", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 2), 'r', new ItemStack(Item.redstone), 'd', new ItemStack(redstoneMachine, 1, 0))); + /* Crafting */ GameRegistry.addRecipe(new ItemStack(toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.workbench); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "crafterWood"));