Jump to content

1.6.2 addPotionEffect not working


Recommended Posts

For some reason, I cannot get addPotionEffect to work correctly.


The method that I had working in 1.5.2:


    public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player,

            Entity entity) {

        if (entity instanceof EntityLiving) {

            EntityLiving entityLiving = (EntityLiving) entity;



        return false;


And this is the code for the item.
        thoriumSword = new ItemPotionSword(ItemIds.THORIUM_SWORD_ID, TOOL_THORIUM, Strings.THORIUM_SWORD_NAME, new PotionEffect(Potion.wither.id, 1000, 1, true), Strings.TEXTURE_FOLDER + ":" + Strings.THORIUM_SWORD_NAME);



I stepped through it and nothing went wrong, it just didn't work for some reason.  Also, it will occasionally work, but other times it won't work.




Edit: Now it started working properly again.


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.

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.


  • Create New...

Important Information

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