mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Move getItemInUse up to LivingEntity
By: md_5 <git@md-5.net>
This commit is contained in:
parent
dd0e55721d
commit
3f9e7c4e39
2 changed files with 6 additions and 6 deletions
|
@ -456,12 +456,6 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||
return getHandle().isUsingItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemInUse() {
|
||||
net.minecraft.world.item.ItemStack item = getHandle().getUseItem();
|
||||
return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setWindowProperty(InventoryView.Property prop, int value) {
|
||||
return false;
|
||||
|
|
|
@ -258,6 +258,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
getHandle().maxAirTicks = ticks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemInUse() {
|
||||
net.minecraft.world.item.ItemStack item = getHandle().getUseItem();
|
||||
return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemInUseTicks() {
|
||||
return getHandle().getUseItemRemainingTicks();
|
||||
|
|
Loading…
Reference in a new issue