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
|
StructurePlaceSettings structurePlacementData
|
||||||
) {
|
) {
|
||||||
if (!BlocksHelper.isInvulnerable(
|
if (!BlocksHelper.isInvulnerable(
|
||||||
structureBlockInfo2.state,
|
structureBlockInfo2.state(),
|
||||||
worldView,
|
worldView,
|
||||||
structureBlockInfo2.pos
|
structureBlockInfo2.pos()
|
||||||
) && MHelper.RANDOM.nextInt(chance) == 0) {
|
) && MHelper.RANDOM.nextInt(chance) == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,11 @@ public class TerrainStructureProcessor extends StructureProcessor {
|
||||||
StructureBlockInfo structureBlockInfo2,
|
StructureBlockInfo structureBlockInfo2,
|
||||||
StructurePlaceSettings structurePlacementData
|
StructurePlaceSettings structurePlacementData
|
||||||
) {
|
) {
|
||||||
BlockPos bpos = structureBlockInfo2.pos;
|
BlockPos bpos = structureBlockInfo2.pos();
|
||||||
if (structureBlockInfo2.state.is(defaultBlock) && worldView.isEmptyBlock(bpos.above())) {
|
if (structureBlockInfo2.state().is(defaultBlock) && worldView.isEmptyBlock(bpos.above())) {
|
||||||
final BlockState top = BiomeAPI.findTopMaterial(worldView.getBiome(pos))
|
final BlockState top = BiomeAPI.findTopMaterial(worldView.getBiome(pos))
|
||||||
.orElse(defaultBlock.defaultBlockState());
|
.orElse(defaultBlock.defaultBlockState());
|
||||||
return new StructureBlockInfo(bpos, top, structureBlockInfo2.nbt);
|
return new StructureBlockInfo(bpos, top, structureBlockInfo2.nbt());
|
||||||
}
|
}
|
||||||
return structureBlockInfo2;
|
return structureBlockInfo2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue