Jump to content

[1.10] getCurrentEquippedItem() ERROR [SOLVED]


averysumner

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.