Posted June 30, 20169 yr I may just be being stupid, but I don't think this is supposed to happen. In this code it tells me that "getCurrectEquippedItem" is undefined for EntityPlayer: package com.averysumner.randomstuff; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; import net.minecraft.util.SoundCategory; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.GameRegistry; public class ThrowableSlimeball extends Item { public ThrowableSlimeball(String registryName, String unlocalizedName) { setRegistryName(registryName); setUnlocalizedName(unlocalizedName); GameRegistry.register(this); } @SubscribeEvent public void playerRightClickSlime(PlayerInteractEvent.RightClickItem e){ if (e.getEntityPlayer().getCurrentEquippedItem().getItem() == Items.SLIME_BALL) { } } } There are 10 types of people in this world. Those who know binary and those who don't.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.