#Error

1 messages · Page 1 of 1 (latest)

wraith crystal
#

geometry.altar_heal contains 5 boxes outside the error bounds of (-0.875, -0.875, -0.875) to (1.875, 1.875, 1.875).

how do I still be able to create blocks more than 16x16x16 and I have selection_box more than 16

river lintel
#

U need to make it 2 separate blocks

#

So a bottom and top then use scripts to add the top block when bottom block is placed

river lintel
#

hmm no sorry

dark token
# wraith crystal do you have an example?

You can use a custom component for this:

// Example
const doubleBlockComponent = {
  onPlace({ block }) {
    // Place another equal block above and change the 'mc:top_block' state to true.
    if (block.above().isAir) {
      block.above().setPermutation(
        block.permutation.withState('mc:top_block', true)
      );
    } else {
      // Removes the placed block if there is no space above it.
      block.dimension.runCommand(`setblock ${block.x} ${block.y} ${block.z} air destroy`);
    }
  },
  beforeOnPlayerPlace(event) {
    // Cancels block placement if there is no space above it.
    if (!event.block.above().isAir) event.cancel = true;
  }
}

// Register the component
world.beforeEvents...

In the block file have a boolean state, change the geometry based on that state, and add the registered custom component.

river lintel
#

@dark token cane you make particles appear automatically with no scripts

river lintel
#

yeah @dark token have done it and i have put my custom blocks in place, the detect system works so only comes from leaves but i have to do it from a command block

dark token
#

You have to change the particle to appear on other blocks besides leaves, like grass block or whatever block you want.

unreal talon
# wraith crystal why?

It’s because it is constantly checking if it’s air then placing the block.

the way I handle double blocks is to check if its bottom is the same block and isn’t top block then do a return to prevent the placement that’s the simplified version that is

#

Btw you can set a block with block.settype or typeId (i forgot the extract thing)? Instead of running a command to set the block

#
block.above().setType = “minecraft:grass”

code may be wrong since im busy rn to double check

dark token
#

In the block json file, create 2 permutations, one for the top and one for the bottom, and apply the custom component to the bottom.