Posted March 30, 201411 yr I have a conditional that checks for a certain value, then I want it to switch the item with a different one? Any help on this problem will be appreciated. Not new to java >> New to modding.
March 30, 201411 yr Author public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if(par1ItemStack.getItemDamage() < 2) { //Change Item here. } } Not new to java >> New to modding.
March 30, 201411 yr Use something like: player.inventory.setInventorySlotContents(slot, new ItemStack(item)) Make sure you do it is the server. If I helped then you help, hit that Thank You button or Applaud.
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.