geforkt von Mirrors/Paper
#1331: Add access to current item's remaining ticks
By: gIsForGravity <gavin.f.tantleff@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
064114e718
Commit
dd0e55721d
@ -33,6 +33,15 @@
|
||||
public abstract class EntityLiving extends Entity implements Attackable {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -214,7 +240,7 @@
|
||||
private int noJumpDelay;
|
||||
private float absorptionAmount;
|
||||
protected ItemStack useItem;
|
||||
- protected int useItemRemaining;
|
||||
+ public int useItemRemaining;
|
||||
protected int fallFlyTicks;
|
||||
private BlockPosition lastPos;
|
||||
private Optional<BlockPosition> lastClimbablePos;
|
||||
@@ -225,7 +251,21 @@
|
||||
private float swimAmount;
|
||||
private float swimAmountO;
|
||||
|
@ -258,6 +258,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
getHandle().maxAirTicks = ticks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemInUseTicks() {
|
||||
return getHandle().getUseItemRemainingTicks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemInUseTicks(int ticks) {
|
||||
getHandle().useItemRemaining = ticks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArrowCooldown() {
|
||||
return getHandle().removeArrowTime;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren