Advertisement
Transformator

java006

Apr 28th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package de.Phantom6208.keepalive.events;
  2.  
  3. import ibxm.Player;
  4. import cpw.mods.fml.common.eventhandler.SubscribeEvent;
  5. import net.minecraft.entity.Entity;
  6. import net.minecraft.entity.EntityLivingBase;
  7. import net.minecraft.entity.item.EntityTNTPrimed;
  8. import net.minecraft.entity.player.EntityPlayer;
  9. import net.minecraft.util.DamageSource;
  10. import net.minecraft.world.World;
  11. import net.minecraftforge.event.entity.living.LivingDeathEvent;
  12.  
  13. public class IfAPlayerDie {
  14. @SubscribeEvent
  15. public void onLivingDeathEvent(LivingDeathEvent event) {
  16. EntityPlayer player = (EntityPlayer) event.entity;
  17. World world = player.getEntityWorld();
  18.  
  19. world.spawnEntityInWorld(new EntityTNTPrimed(world));
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement