Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different values ​​for minecraft:collision_box and minecraft:selection_box #105

Open
DavyCraft648 opened this issue Sep 24, 2023 · 1 comment

Comments

@DavyCraft648
Copy link
Contributor

minecraft:selection_box is a Boolean or JSON Object component that defines the area of the block that is selected by the player's cursor.

minecraft:collision_box is a boolean or JSON Object that defines the area of the block that collides with entities.

I want to make the player able to pass through the block by setting the origin and size in the Model to Vector3::zero(), but I still want the player to be able to interact with the block

@xSuperr
Copy link

xSuperr commented Sep 25, 2023

You can do this with permutations

->withComponent('minecraft:selection_box', CompoundTag::create()
                    ->setByte('enabled', 1)
                    ->setTag('origin', new ListTag([
                        new FloatTag(-4.0),
                        new FloatTag(0.0),
                        new FloatTag(-4.0)
                    ]))
                    ->setTag('size', new ListTag([
                        new FloatTag(8.0),
                        new FloatTag(13.0),
                        new FloatTag(8.0)
                    ]))),``` 

DavyCraft648 added a commit to DavyCraft648/Customies-NG that referenced this issue Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants