mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 01:17:47 +01:00
Rename destroySpeed to hardness
This commit is contained in:
parent
1ba1a336b1
commit
77ef11ef30
@ -48,7 +48,7 @@ public class PlayerDiggingListener {
|
|||||||
|
|
||||||
final boolean instantBreak = player.isCreative() ||
|
final boolean instantBreak = player.isCreative() ||
|
||||||
player.isInstantBreak() ||
|
player.isInstantBreak() ||
|
||||||
block.registry().destroySpeed() == 0;
|
block.registry().hardness() == 0;
|
||||||
|
|
||||||
if (instantBreak) {
|
if (instantBreak) {
|
||||||
// No need to check custom block
|
// No need to check custom block
|
||||||
|
@ -41,7 +41,7 @@ public class Registry {
|
|||||||
private final NamespaceID namespace;
|
private final NamespaceID namespace;
|
||||||
private final int id;
|
private final int id;
|
||||||
private final int stateId;
|
private final int stateId;
|
||||||
private final double destroySpeed;
|
private final double hardness;
|
||||||
private final double explosionResistance;
|
private final double explosionResistance;
|
||||||
private final double friction;
|
private final double friction;
|
||||||
private final double speedFactor;
|
private final double speedFactor;
|
||||||
@ -56,7 +56,7 @@ public class Registry {
|
|||||||
this.namespace = NamespaceID.from(getString("namespaceId"));
|
this.namespace = NamespaceID.from(getString("namespaceId"));
|
||||||
this.id = getInt("id");
|
this.id = getInt("id");
|
||||||
this.stateId = getInt("stateId");
|
this.stateId = getInt("stateId");
|
||||||
this.destroySpeed = getDouble("hardness");
|
this.hardness = getDouble("hardness");
|
||||||
this.explosionResistance = getDouble("explosionResistance");
|
this.explosionResistance = getDouble("explosionResistance");
|
||||||
this.friction = getDouble("friction");
|
this.friction = getDouble("friction");
|
||||||
this.speedFactor = getDouble("speedFactor");
|
this.speedFactor = getDouble("speedFactor");
|
||||||
@ -79,8 +79,8 @@ public class Registry {
|
|||||||
return stateId;
|
return stateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double destroySpeed() {
|
public double hardness() {
|
||||||
return destroySpeed;
|
return hardness;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double explosionResistance() {
|
public double explosionResistance() {
|
||||||
|
Loading…
Reference in New Issue
Block a user