@SubscribeEvent
public void PlayerInteractEvent(PlayerInteractEvent event)
{
Block block = event.world.getBlock(event.x, event.y, event.z);
if ((event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) && (event.world.getBlock(event.x, event.y, event.z) == Blocks.tnt) &&
(!event.entityPlayer.isSneaking()))
{
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(event.world, (double)((float)event.x + 0.5F), (double)event.y+0.5, (double)((float)event.z + 0.5F), null);
event.world.spawnEntityInWorld(entitytntprimed);
}
}
--------------------------------------------------------
I have this code to ignite tnt when you punch it. It works, but it still drops the tnt as an item. How can I fix that? C: