package janluca.quidditch.items;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

/**
 * Created by Jan-Luca on 16.08.2016.
 */
public class BroomItem extends Item {
    public BroomItem(){
        setRegistryName("quidditch", "broom");
        setUnlocalizedName("broom");
        GameRegistry.register(this);


    }

    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

}

@@ -124,17 +124,359 @@
 aft.
-item.Item
+entity.monster.EntityZombie;%0Aimport net.minecraft.entity.player.EntityPlayer;%0Aimport net.minecraft.item.Item;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.ActionResult;%0Aimport net.minecraft.util.EnumActionResult;%0Aimport net.minecraft.util.EnumHand;%0Aimport net.minecraft.util.text.TextComponentString;%0Aimport net.minecraft.world.World
 ;%0Aim
@@ -684,16 +684,179 @@
 eOnly;%0A%0A
+import javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport javax.swing.plaf.ActionMapUIResource;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0A%0A
 /**%0A * C
@@ -1085,16 +1085,558 @@
 %0A    %7D%0A%0A
+    @Override%0A    @SideOnly(Side.CLIENT)%0A    public ActionResult%3CItemStack%3E onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)%0A    %7B%0A        if(!worldIn.isRemote) %7B%0A            playerIn.addChatMessage(new TextComponentString(%22Hallo%22));%0A%0A            EntityZombie z = new EntityZombie(worldIn);%0A            z.setPosition(playerIn.posX, playerIn.posY + 30, playerIn.posZ);%0A            worldIn.spawnEntityInWorld(z);%0A        %7D%0A%0A        return new ActionResult(EnumActionResult.PASS, itemStackIn);%0A    %7D%0A%0A
     @Sid

Add files via upload