Working in part placement

This commit is contained in:
Sebastian Hartte
2020-07-01 21:27:37 +02:00
parent 8e031ca8d6
commit f2e3d81fd7
134 changed files with 1553 additions and 1494 deletions
@@ -339,7 +339,7 @@ public final class MeteoritePlacer {
// TODO reconsider
if (state.getMaterial().isReplaceable()) {
if (!world.isAirBlock(blockPosUp)) {
if (!world.isAir(blockPosUp)) {
final BlockState stateUp = world.getBlockState(blockPosUp);
world.setBlockState(blockPos, stateUp, 3);
} else if (randomShit < 100 * this.crater) {
@@ -362,7 +362,7 @@ public final class MeteoritePlacer {
}
} else {
// decay.
if (world.isAirBlock(blockPosUp)) {
if (world.isAir(blockPosUp)) {
if (Math.random() > 0.4) {
final double dx = i - x;
final double dy = j - y;
@@ -26,8 +26,8 @@ import appeng.worldgen.meteorite.fallout.FalloutMode;
public class MeteoriteStructureStart extends StructureStart {
private final Tag<Block> sandTag = BlockTags.getCollection().getOrCreate(new Identifier("minecraft:sand"));
private final Tag<Block> terracottaTag = BlockTags.getCollection()
private final Tag<Block> sandTag = BlockTags.getContainer().getOrCreate(new Identifier("minecraft:sand"));
private final Tag<Block> terracottaTag = BlockTags.getContainer()
.getOrCreate(new Identifier("forge:terracotta"));
public MeteoriteStructureStart(Structure<?> p_i225815_1_, int p_i225815_2_, int p_i225815_3_,
@@ -83,7 +83,7 @@ public class MeteoriteSpawner {
BlockPos.Mutable testPos = new BlockPos.Mutable(pos);
for (int j = pos.getY() - 15; j < pos.getY() - 1; j++) {
testPos.setY(j);
if (w.isAirBlock(testPos)) {
if (w.isAir(testPos)) {
return true;
}
}