How to update the hitbox after changing the blockstate? #539
Answered
by
ChiefArug
Frost-ZX
asked this question in
Script-related questions
-
I've made a orientable block by using the Game version: 1.18.2 onEvent('block.registry', (ev) => {
const block = ev.create('example_block', 'basic');
const facing = BlockProperties.HORIZONTAL_FACING;
block.box(4, 0, 6, 12, 31, 10, true);
block.property(facing);
block.defaultState((ev) => {
ev.set(facing, 'north');
});
block.placementState((ev) => {
const d = ev.getHorizontalDirection().getOpposite().toString();
ev.set(facing, d);
});
}); |
Beta Was this translation helpful? Give feedback.
Answered by
ChiefArug
Nov 13, 2022
Replies: 1 comment 1 reply
-
You cannot. You would need to use the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Frost-ZX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You cannot. You would need to use the
cardinal
type, however that is only 1.19.2+.