Using getters
This commit is contained in:
parent
2f878800ca
commit
145e6168c3
2 changed files with 5 additions and 5 deletions
|
@ -27,9 +27,9 @@ public class DestructionStructureProcessor extends StructureProcessor {
|
|||
StructurePlaceSettings structurePlacementData
|
||||
) {
|
||||
if (!BlocksHelper.isInvulnerable(
|
||||
structureBlockInfo2.state,
|
||||
structureBlockInfo2.state(),
|
||||
worldView,
|
||||
structureBlockInfo2.pos
|
||||
structureBlockInfo2.pos()
|
||||
) && MHelper.RANDOM.nextInt(chance) == 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ public class TerrainStructureProcessor extends StructureProcessor {
|
|||
StructureBlockInfo structureBlockInfo2,
|
||||
StructurePlaceSettings structurePlacementData
|
||||
) {
|
||||
BlockPos bpos = structureBlockInfo2.pos;
|
||||
if (structureBlockInfo2.state.is(defaultBlock) && worldView.isEmptyBlock(bpos.above())) {
|
||||
BlockPos bpos = structureBlockInfo2.pos();
|
||||
if (structureBlockInfo2.state().is(defaultBlock) && worldView.isEmptyBlock(bpos.above())) {
|
||||
final BlockState top = BiomeAPI.findTopMaterial(worldView.getBiome(pos))
|
||||
.orElse(defaultBlock.defaultBlockState());
|
||||
return new StructureBlockInfo(bpos, top, structureBlockInfo2.nbt);
|
||||
return new StructureBlockInfo(bpos, top, structureBlockInfo2.nbt());
|
||||
}
|
||||
return structureBlockInfo2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue