mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-05 07:01:45 +01:00
Made using RAW_FISH on Ocelots when a player has the ability to instantly build not decrement the stack. Fixes BUKKIT-1439
This commit is contained in:
parent
2315fb7789
commit
0c9e1b13a0
@ -110,7 +110,7 @@ public class EntityOcelot extends EntityTameableAnimal {
|
|||||||
|
|
||||||
if (!this.isTamed()) {
|
if (!this.isTamed()) {
|
||||||
if (this.b.f() && itemstack != null && itemstack.id == Item.RAW_FISH.id && entityhuman.j(this) < 9.0D) {
|
if (this.b.f() && itemstack != null && itemstack.id == Item.RAW_FISH.id && entityhuman.j(this) < 9.0D) {
|
||||||
--itemstack.count;
|
if (!entityhuman.abilities.canInstantlyBuild) --itemstack.count; // CraftBukkit - if the player can instantly build, don't decrement the item stack
|
||||||
if (itemstack.count <= 0) {
|
if (itemstack.count <= 0) {
|
||||||
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
|
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user