Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ModSchwert extends ItemSword {
- public ModSchwert(ToolMaterial mat) {
- super(mat);
- }
- public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer EntityPlayer) {
- Vec3 look = EntityPlayer.getLookVec();
- MovingObjectPosition Coord = EntityPlayer.rayTrace(300, 1);
- if(Coord != null && Coord.typeOfHit == EnumMovingObjectType.TILE){
- EntityLightningBolt Lightning = new EntityLightningBolt(world, 1, 1, 1);
- Lightning.setPosition(Coord.blockX, Coord.blockY, Coord.blockZ);
- world.spawnEntityInWorld(Lightning);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement