Friction API
This commit is contained in:
@@ -99,6 +99,18 @@ public class CraftItem extends CraftEntity implements Item {
|
||||
this.getHandle().age = willAge ? 0 : NO_AGE_TIME;
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
@Override
|
||||
public net.kyori.adventure.util.TriState getFrictionState() {
|
||||
return this.getHandle().frictionState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrictionState(@org.jetbrains.annotations.NotNull net.kyori.adventure.util.TriState state) {
|
||||
java.util.Objects.requireNonNull(state, "state may not be null");
|
||||
this.getHandle().frictionState = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHealth() {
|
||||
return this.getHandle().health;
|
||||
|
||||
@@ -1198,4 +1198,17 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
nmsStack.hurtAndBreak(amount, this.getHandle(), slot, true);
|
||||
}
|
||||
// Paper end - ItemStack damage API
|
||||
// Paper start - friction API
|
||||
@org.jetbrains.annotations.NotNull
|
||||
@Override
|
||||
public net.kyori.adventure.util.TriState getFrictionState() {
|
||||
return this.getHandle().frictionState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrictionState(@org.jetbrains.annotations.NotNull net.kyori.adventure.util.TriState state) {
|
||||
java.util.Objects.requireNonNull(state, "state may not be null");
|
||||
this.getHandle().frictionState = state;
|
||||
}
|
||||
// Paper end - friction API
|
||||
}
|
||||
|
||||
@@ -127,4 +127,18 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
public int getDisplayBlockOffset() {
|
||||
return this.getHandle().getDisplayOffset();
|
||||
}
|
||||
|
||||
// Paper start - Friction API
|
||||
@org.jetbrains.annotations.NotNull
|
||||
@Override
|
||||
public net.kyori.adventure.util.TriState getFrictionState() {
|
||||
return this.getHandle().frictionState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrictionState(@org.jetbrains.annotations.NotNull net.kyori.adventure.util.TriState state) {
|
||||
java.util.Objects.requireNonNull(state, "state may not be null");
|
||||
this.getHandle().frictionState = state;
|
||||
}
|
||||
// Paper end - Friction API
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user