#Setting blocks in box

4 messages · Page 1 of 1 (latest)

obsidian yoke
#
@Override
    public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
        Box b = new Box(pos);
        b = b.expand(boxSize.getX() - 1, boxSize.getY() - 1, boxSize.getZ() - 1);
        BlockPos.stream(b).forEach(p -> {
            if (!p.equals(pos)) {
                System.out.println(p);
                world.setBlockState(p, ModBlocks.FILLER.getDefaultState());
                world.addBlockEntity(new FillerBlockEntity(p, world.getBlockState(p)));
            }
        });
    }

boxSize = [2, 2, 2]
this should create a 2x2x2 box and fill it with the filler blocks, but instead its all broken,
is there any instant reason why is that?

fossil jasper
#

can you elaborate on "all broken"? does anything get filled? does the game crash?

obsidian yoke
obsidian yoke
#

Well the multiblock gets placed actually, but doesnt have hitboxes and goin through it lags your character