13
0
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:
Jake Potrebic 2021-11-04 11:50:40 -07:00
Ursprung 310d8c53aa
Commit 26d0751f8e
3 geänderte Dateien mit 19 neuen und 0 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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