mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Add hasCollision methods to various places
== AT == public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
This commit is contained in:
parent
310d8c53aa
commit
26d0751f8e
3 changed files with 19 additions and 0 deletions
|
@ -457,6 +457,11 @@ public class CraftBlock implements Block {
|
|||
public boolean isSolid() {
|
||||
return this.getNMS().blocksMotion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCollidable() {
|
||||
return getNMS().getBlock().hasCollision;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Override
|
||||
|
|
|
@ -341,4 +341,11 @@ public class CraftBlockState implements BlockState {
|
|||
public BlockState copy(Location 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();
|
||||
}
|
||||
// Paper end - add Translatable
|
||||
|
||||
// Paper start - hasCollision API
|
||||
@Override
|
||||
public boolean hasCollision() {
|
||||
return this.block.hasCollision;
|
||||
}
|
||||
// Paper end - hasCollision API
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue