Спавн айтема

Версия Minecraft
1.12.2
API
Forge
183
8
16
Да, я знаю что задолбал всех своими вопросами, но всё же. Мне нужно, чтобы при убийстве эндермэна с определённым шансом спавнился предмет. Делал вот так:
EventHandler.java:
@SubscribeEvent
    public static void onDeath(LivingDeathEvent e) {
        if (e.getEntity() instanceof EntityEnderman) {
            Entity entity = e.getEntity();
            int x = (int) entity.posX;
            int y = (int) entity.posY;
            int z = (int) entity.posZ;
            World world = entity.world;
            if ((Math.random() < 0.2)) {
                    if (!world.isRemote) {
                        EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemsRegistry.SOME_ITEM, 1));
                        entityToSpawn.setPickupDelay(10);
                        world.spawnEntity(entityToSpawn);
                    }
                }
компилятор не ругается, но почему-то сколько эндерменов бы я не убил, айтем не появляется...
 
183
8
16
Вот EventHandler и CommonProxy:
CommonProxy.java:
package com.kirik.optmod.proxy;
import com.kirik.optmod.blocks.BlocksRegister;
import com.kirik.optmod.event.EventHandler;
import com.kirik.optmod.world.generate.Generator;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod.EventBusSubscriber
public class CommonProxy {
    public void preInit(FMLPreInitializationEvent event) {
        BlocksRegister.register();
        MinecraftForge.EVENT_BUS.register(new EventHandler());
    }

    public void init(FMLInitializationEvent event) {
        GameRegistry.registerWorldGenerator(new Generator(), 0);
    }

    public void postInit(FMLPostInitializationEvent event) {

    }

}
EventHandler.java:
package com.kirik.optmod.event;

import com.kirik.optmod.config.ConfigHandler;
import com.kirik.optmod.items.ItemsRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class EventHandler {
    @SubscribeEvent
    public static void onDeath(LivingDeathEvent e) {
        MinecraftServer mcserv = FMLCommonHandler.instance().getMinecraftServerInstance();
        if (mcserv != null) {
            mcserv.getPlayerList().sendMessage(new TextComponentString("Somebody Died!"));
        }
        if (e.getEntity() instanceof EntityEnderman) {
            MinecraftServer mcserver = FMLCommonHandler.instance().getMinecraftServerInstance();
            if (mcserver != null)
                mcserver.getPlayerList().sendMessage(new TextComponentString("Enderman!"));
            Entity entity = e.getEntity();
            int x = (int) entity.posX;
            int y = (int) entity.posY;
            int z = (int) entity.posZ;
            World world = entity.world;


                if ((Math.random() < 0.2)) {
                    if (!world.isRemote) {
                        EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemsRegistry.INFINITY_PART, 1));
                        entityToSpawn.setPickupDelay(10);
                        world.spawnEntity(entityToSpawn);
                        if (mcserv != null)
                            mcserv.getPlayerList().sendMessage(new TextComponentString("Part!"));
                    }
                }
        }
        if (e.getEntity() instanceof EntityPlayer) {
            EntityPlayer player = (EntityPlayer) e.getEntity();
            player.dropItem(new ItemStack(Items.GOLDEN_APPLE, 64, 1), false);
        }
    }
    @SubscribeEvent
    public static void blockBreaked(BlockEvent.BreakEvent event) {
        World world = event.getWorld();
        int x = event.getPos().getX();
        int y = event.getPos().getY();
        int z = event.getPos().getZ();
        if ((Blocks.STONE.getStateFromMeta(0).getBlock() == (world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock())) {
            if (!world.isRemote) {
                EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(Blocks.SLIME_BLOCK, (int) (1)));
                entityToSpawn.setPickupDelay(10);
                world.spawnEntity(entityToSpawn);
            }
        }
    }
@SubscribeEvent
    public static void onJoin(EntityJoinWorldEvent e)
{
    MinecraftServer mcserv = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (mcserv != null)
        mcserv.getPlayerList().sendMessage(new TextComponentString("Part!"));
}

}
и оно не работает(
 
Сверху