The Meaning of Life, the Universe, and Everything.
Location:
Toronto
Join Date:
9/5/2012
Posts:
42
Minecraft:
playing_w_blocks
Member Details
Hey folks,
So I have my own TNT block all set up, works exactly like TNT except I've set the explosion size at 40. I've also set one of my custom liquids to turn into this block when not surrounded by the appropriate custom blocks (think of the liquid as a mod-version of Nitroglycerin). My problem is that I want to make this block explode as soon as/soon after it's added to the world.
I've tried inserting the 'this.primeTNT' line (and when that failed the entire contents of that method) in "update tick" (added to the block class), and in "on block added to world" but without much luck. It just sits there until activated the way TNT normally would be. I've also tried inserting the contents of the primeTNT method into the custom liquid so that instead of setting the block to become the custom TNT, it should've just skipped right to the PrimedTNTEntity and blown up. Nothing....Any ideas?
The Meaning of Life, the Universe, and Everything.
Location:
Toronto
Join Date:
9/5/2012
Posts:
42
Minecraft:
playing_w_blocks
Member Details
*Solved.....sort of* *Workaround*
Ok, so instead of doing any fancy coding, I added a line in my liquid classes to set the block directly below the custom TNT to become a redstone-block. It's not elegant, but whatever, this is my first mod.
So I have my own TNT block all set up, works exactly like TNT except I've set the explosion size at 40. I've also set one of my custom liquids to turn into this block when not surrounded by the appropriate custom blocks (think of the liquid as a mod-version of Nitroglycerin). My problem is that I want to make this block explode as soon as/soon after it's added to the world.
I've tried inserting the 'this.primeTNT' line (and when that failed the entire contents of that method) in "update tick" (added to the block class), and in "on block added to world" but without much luck. It just sits there until activated the way TNT normally would be. I've also tried inserting the contents of the primeTNT method into the custom liquid so that instead of setting the block to become the custom TNT, it should've just skipped right to the PrimedTNTEntity and blown up. Nothing....Any ideas?
Ok, so instead of doing any fancy coding, I added a line in my liquid classes to set the block directly below the custom TNT to become a redstone-block. It's not elegant, but whatever, this is my first mod.