Hey guys Im looking for solutions/suggestions to improve very old code that doesn't work how I would expect it to anymore.
First Code problem
This code is used when the tent block has been clicked it builds a tent then re-clicked it destroys all blocks and drops the tent block depending which block to drop.
When the tent drops the tent block at the moment it's running this code twice causing two blocks to drop but only one is pickable.
Was wondering if anyone had a solution to make this code only run once when activated or an alternative code.
Code
Console message to show the code is running twice
2012-10-19 15:05:00 [iNFO] [sTDOUT] testTentBlock 1
2012-10-19 15:05:00 [iNFO] [sTDOUT] testTentBlock 1
2012-10-19 15:05:14 [iNFO] [sTDOUT] testTentBlock 2
2012-10-19 15:05:14 [iNFO] [sTDOUT] testTentBlock 2
2012-10-19 15:05:33 [iNFO] [sTDOUT] testTentBlock 3
2012-10-19 15:05:34 [iNFO] [sTDOUT] testTentBlock 3
Second Code problem
This code is used in my tileEntityAnvil, in 1.2.5 I had my tileEntity abstract "public abstract class TileEntityAnvil extends TileEntity implements IInventory, ISidedInventory" but in 1.3.2 having my tileEntity abstract caused a duplication glitch when placing items in the slots.
Changing the tileEntity to "public class TileEntityAnvil extends TileEntity implements IInventory, ISidedInventory" fixed the duplication error but every time the anvil repairs an item it destroys the iron hammer instead of causing damage to the hammer.
Wondering if anyone had a solution or suggestion on a way to cause the anvil hammer to take damage after every repair instead of being destroyed.
Code