Skip to content

Commit

Permalink
a bit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HZZcode committed Mar 6, 2025
1 parent a0f61a4 commit e6d3356
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
10 changes: 8 additions & 2 deletions src/main/java/random_toys/zz_404/MazeCoreBlockEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.entity.decoration.EndCrystalEntity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
Expand Down Expand Up @@ -46,8 +47,13 @@ public void tick(@NotNull World world, @NotNull BlockPos pos, BlockState ignored
300, 2, false, false));
}
if (!world.getEntitiesByClass(PlayerEntity.class, new Box(pos).expand(10, 4, 10),
player -> !player.isCreative() && !player.isSpectator()).isEmpty())
world.setBlockState(pos, Blocks.AIR.getDefaultState());
player -> !player.isCreative() && !player.isSpectator()).isEmpty()) {
world.setBlockState(pos, Blocks.BEACON.getDefaultState());
for (int i = -1; i <= 1; i++)
for (int j = -1; j <= 1; j++)
world.setBlockState(pos.add(i, -1, j), Blocks.NETHERITE_BLOCK.getDefaultState());
world.spawnEntity(new EndCrystalEntity(world, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5));
}
}
else {
generator.generate();
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/random_toys/zz_404/MazeGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ private void placeCornerFeatures() {
setBlock(corner.add(-li, 0, -lj), Blocks.WATER.getDefaultState());
setBlock(corner.add(-li, -1, -lj), Blocks.BLUE_STAINED_GLASS.getDefaultState());
setBlock(corner.add(-li, -2, -lj), Blocks.BEACON.getDefaultState());
setBlock(corner.add(-li, -3, -lj), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li, -3, -lj - 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li, -3, -lj + 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj - 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj + 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj - 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj + 1), Blocks.NETHERITE_BLOCK.getDefaultState());
setBlock(corner.add(-li, -3, -lj), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li, -3, -lj - 1), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li, -3, -lj + 1), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj - 1), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li - 1, -3, -lj + 1), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj - 1), Blocks.GOLD_BLOCK.getDefaultState());
setBlock(corner.add(-li + 1, -3, -lj + 1), Blocks.GOLD_BLOCK.getDefaultState());

setBlock(corner.add(-2 * li, 0, -lj),
Blocks.POLISHED_BLACKSTONE_BRICK_SLAB.getDefaultState());
Expand Down

0 comments on commit e6d3356

Please sign in to comment.