my code to generate a oval isnt working

Started by Cookie King on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
my code to generate a oval isnt working

im trying to generate a oval with each block 16 away from each other but my code dosent work and just expands infinitly and crashes your game can

someone explain why it isnt working
first code screenshotsecond screenshotthird screenshot

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the screenshots wont work so…
Wed, 08/17/2022 - 02:49

the screenshots wont work so here is the code

package net.mcreator.morecookie.procedures;

/* imports omitted */

public class DungeonspawnerUpdateTickProcedure {
    public static void execute(LevelAccessor world, double x, double y, double z) {
        double xx = 0;
        double yy = 0;
        double zz = 0;
        if (!world.getEntitiesOfClass(Player.class, AABB.ofSize(new Vec3(x, y, z), 100, 100, 100), e -> true).isEmpty()) {
            if (new Object() {
                public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                    BlockEntity blockEntity = world.getBlockEntity(pos);
                    if (blockEntity != null)
                        return blockEntity.getTileData().getDouble(tag);
                    return -1;
                }
            }.getValue(world, new BlockPos(x, y, z), "first") == -1) {
                if (true) {
                    xx = x + 16;
                    yy = y + 0;
                    zz = z + 0;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                if (true) {
                    xx = x - 16;
                    yy = y + 0;
                    zz = z + 0;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 16;
                    zz = z + 0;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y - 16;
                    zz = z + 0;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 0;
                    zz = z + 16;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 0;
                    zz = z - 16;
                    if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                            || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                        world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingx", x);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingy", y);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("startingz", z);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                        if (!world.isClientSide()) {
                            BlockPos _bp = new BlockPos(xx, yy, zz);
                            BlockEntity _blockEntity = world.getBlockEntity(_bp);
                            BlockState _bs = world.getBlockState(_bp);
                            if (_blockEntity != null)
                                _blockEntity.getTileData().putDouble("first", 1);
                            if (world instanceof Level _level)
                                _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                        }
                    }
                }
                world.setBlock(new BlockPos(x, y, z), Blocks.DIRT.defaultBlockState(), 3);
            } else {
                if (true) {
                    xx = x + 16;
                    yy = y + 0;
                    zz = z + 0;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                if (true) {
                    xx = x - 16;
                    yy = y + 0;
                    zz = z + 0;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 16;
                    zz = z + 0;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y - 16;
                    zz = z + 0;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 0;
                    zz = z + 16;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                if (true) {
                    xx = x + 0;
                    yy = y + 0;
                    zz = z - 16;
                    if (Math.random() <= 1 + (-0.5) * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) - Math.abs(xx) + 2 * (Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) - Math.abs(yy)) + Math.abs(new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) - Math.abs(zz))) {
                        if (!((world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == Blocks.DIRT
                                || (world.getBlockState(new BlockPos(xx, yy, zz))).getBlock() == MoreCookieModBlocks.DUNGEONSPAWNER.get())) {
                            world.setBlock(new BlockPos(xx, yy, zz), MoreCookieModBlocks.DUNGEONSPAWNER.get().defaultBlockState(), 3);
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingx", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingx")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingy", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingy")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("startingz", (new Object() {
                                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                                            BlockEntity blockEntity = world.getBlockEntity(pos);
                                            if (blockEntity != null)
                                                return blockEntity.getTileData().getDouble(tag);
                                            return -1;
                                        }
                                    }.getValue(world, new BlockPos(x, y, z), "startingz")));
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                            if (!world.isClientSide()) {
                                BlockPos _bp = new BlockPos(xx, yy, zz);
                                BlockEntity _blockEntity = world.getBlockEntity(_bp);
                                BlockState _bs = world.getBlockState(_bp);
                                if (_blockEntity != null)
                                    _blockEntity.getTileData().putDouble("first", 1);
                                if (world instanceof Level _level)
                                    _level.sendBlockUpdated(_bp, _bs, _bs, 3);
                            }
                        }
                    }
                }
                world.setBlock(new BlockPos(x, y, z), Blocks.DIRT.defaultBlockState(), 3);
            }
            if (!world.isClientSide()) {
                MinecraftServer _mcserv = ServerLifecycleHooks.getCurrentServer();
                if (_mcserv != null)
                    _mcserv.getPlayerList().broadcastMessage(new TextComponent(((new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingx")) + "," + (new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingy")) + "," + (new Object() {
                        public double getValue(LevelAccessor world, BlockPos pos, String tag) {
                            BlockEntity blockEntity = world.getBlockEntity(pos);
                            if (blockEntity != null)
                                return blockEntity.getTileData().getDouble(tag);
                            return -1;
                        }
                    }.getValue(world, new BlockPos(x, y, z), "startingz")) + ",")), ChatType.SYSTEM, Util.NIL_UUID);
            }
        }
    }
}
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
btw what is the diffrence…
Wed, 08/17/2022 - 03:41

btw what is the diffrence between block nbt data and entity nbt data because i think this may be causing it