geforkt von Mirrors/Paper
Add hasCollision methods to various places
== AT == public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
Dieser Commit ist enthalten in:
Ursprung
310d8c53aa
Commit
26d0751f8e
@ -457,6 +457,11 @@ public class CraftBlock implements Block {
|
|||||||
public boolean isSolid() {
|
public boolean isSolid() {
|
||||||
return this.getNMS().blocksMotion();
|
return this.getNMS().blocksMotion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCollidable() {
|
||||||
|
return getNMS().getBlock().hasCollision;
|
||||||
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -341,4 +341,11 @@ public class CraftBlockState implements BlockState {
|
|||||||
public BlockState copy(Location location) {
|
public BlockState copy(Location location) {
|
||||||
return new CraftBlockState(this, location);
|
return new CraftBlockState(this, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
@Override
|
||||||
|
public boolean isCollidable() {
|
||||||
|
return this.data.getBlock().hasCollision;
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
}
|
}
|
||||||
|
@ -241,4 +241,11 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
|
|||||||
return this.block.getDescriptionId();
|
return this.block.getDescriptionId();
|
||||||
}
|
}
|
||||||
// Paper end - add Translatable
|
// Paper end - add Translatable
|
||||||
|
|
||||||
|
// Paper start - hasCollision API
|
||||||
|
@Override
|
||||||
|
public boolean hasCollision() {
|
||||||
|
return this.block.hasCollision;
|
||||||
|
}
|
||||||
|
// Paper end - hasCollision API
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren