Merge pull request #400 from SteveKunG/patch-4
Fix dandelion right click in creative mode
This commit is contained in:
commit
e966a5d8e3
1 changed files with 2 additions and 11 deletions
|
@ -92,7 +92,6 @@ public class ItemBlockFlower extends ItemBlock
|
|||
if (par1ItemStack.getItemDamage() == 15)
|
||||
{
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
|
||||
--par1ItemStack.stackSize;
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
|
@ -110,17 +109,9 @@ public class ItemBlockFlower extends ItemBlock
|
|||
BiomesOPlenty.proxy.spawnParticle("dandelion", player.posX + vec.xCoord + pos, player.posY + vec.yCoord + player.getEyeHeight() + pos, player.posZ + vec.zCoord + pos);
|
||||
}
|
||||
|
||||
if (count < 10) {
|
||||
if (count < 10 && !player.capabilities.isCreativeMode) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode && !par2World.isRemote)
|
||||
{
|
||||
--par1ItemStack.stackSize;
|
||||
--stack.stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue