Add hasCollision methods to various places

== AT ==
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
This commit is contained in:
Jake Potrebic 2021-11-04 11:50:40 -07:00
parent 310d8c53aa
commit 26d0751f8e
3 changed files with 19 additions and 0 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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
}