diff --git a/src/main/java/vazkii/botania/common/block/BlockSparkChanger.java b/src/main/java/vazkii/botania/common/block/BlockSparkChanger.java index ed6ef2969..3ea16cdda 100644 --- a/src/main/java/vazkii/botania/common/block/BlockSparkChanger.java +++ b/src/main/java/vazkii/botania/common/block/BlockSparkChanger.java @@ -95,12 +95,14 @@ public class BlockSparkChanger extends BlockModContainer implements ILexiconable ItemStack pstack = player.getCurrentEquippedItem(); if(cstack != null) { changer.setInventorySlotContents(0, null); + world.func_147453_f(x, y, z, this); changer.markDirty(); if(!player.inventory.addItemStackToInventory(cstack)) player.dropPlayerItemWithRandomChoice(cstack, false); return true; } else if(pstack != null && pstack.getItem() == ModItems.sparkUpgrade) { changer.setInventorySlotContents(0, pstack.copy().splitStack(1)); + world.func_147453_f(x, y, z, this); changer.markDirty(); pstack.stackSize--; @@ -150,7 +152,21 @@ public class BlockSparkChanger extends BlockModContainer implements ILexiconable super.breakBlock(par1World, par2, par3, par4, par5, par6); } - + + @Override + public boolean hasComparatorInputOverride() { + return true; + } + + @Override + public int getComparatorInputOverride(World world, int x, int y, int z, int s) { + TileSparkChanger changer = (TileSparkChanger) world.getTileEntity(x, y, z); + ItemStack stack = changer.getStackInSlot(0); + if(stack == null) + return 0; + return stack.getItemDamage() + 1; + } + @Override public TileEntity createNewTileEntity(World world, int meta) { return new TileSparkChanger(); diff --git a/src/main/java/vazkii/botania/common/block/tile/TileSparkChanger.java b/src/main/java/vazkii/botania/common/block/tile/TileSparkChanger.java index 508282818..8b37e9c67 100644 --- a/src/main/java/vazkii/botania/common/block/tile/TileSparkChanger.java +++ b/src/main/java/vazkii/botania/common/block/tile/TileSparkChanger.java @@ -57,6 +57,7 @@ public class TileSparkChanger extends TileSimpleInventory { if(transfers != null) transfers.clear(); setInventorySlotContents(0, sparkStack); + worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord)); markDirty(); } } diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 1a868f5ec..7df82252b 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2142,7 +2142,7 @@ botania.page.poolCart4=This is not a pipe # -- SPARK TINKERER botania.entry.sparkChanger=Spark Tinkerer botania.page.sparkChanger0=The &1Spark Tinkerer&0 is a block with the ability to modify the &1Augments&0 placed on &1Sparks&0. Placing it adjacent to &1Mana Pools&0 or other blocks with a &1Spark&0 attached will connect it to those blocks.
Right clicking the &1Spark Tinkerer&0 with a &1Spark Augment&0 will put the augment in the block, it can be removed by right clicking again. -botania.page.sparkChanger1=When the &1Spark Tinkerer&0 gets a redstone signal it'll randomly pick a &1Spark&0, between all of those it's connected to that have a different augment from the one stored in it, and swap the augment in that &1Spark&0 with the one stored in the block.
The stored augment can be withdrawn or deposited with &1Hoppers&0 or other automation methods. +botania.page.sparkChanger1=When the &1Spark Tinkerer&0 gets a redstone signal it'll randomly pick a &1Spark&0, between all of those it's connected to that have a different augment from the one stored in it, and swap the augment in that &1Spark&0 with the one stored in the block.
The stored augment can be withdrawn or deposited with &1Hoppers&0 or other automation methods. &1Comparators&0 can read what augment is stored. botania.page.sparkChanger2=Hahahaha, water fire... # -- MANATIDE BELLOWS