"is_stackable" blocks "pushable" from working properly.
Partner Rank: 3
Partner Team Reporting: Noxcrew
Verification builds and Platforms: Minecraft.Windows_1.14.2000.0_x64_UAP.Publish_Test Minecraft - Publish_3624217
Summary:
Using "minecraft:is_stackable" to give entities a "solid" hitbox breaks using "minecraft:pushable": {"is_pushable": false} to cause other entities with "minecraft:is_stackable" to be unable to push it.
The example comes from an upcoming release, DestructoBot vs. Dinosaurs. In this map, we have a mode where the player needs to defend a Generator from waves of attacking dinosaurs. Some of the dinosaurs attack the Generator with melee.
In the use example, we'd like our _G_enerator __ entity to be unmovable, but to also have "is_stackable" so the player can jump on top of the entity, and the dinosaur attackers cannot go inside it. The issue is that "is_stackable" only works when both entities have the component, which means the dinosaurs also need to have the component. When both entities have this component, the dinosaur will push the generator entity away from it's designated spot. We added "minecraft:pushable": {"is_pushable": false} to the generators, which keeps dinosaurs without stackable from pushing them, but does not block dinosaurs with stackable from pushing them.
Impact:
We cannot make the generator unmovable and keep the dinosaurs from entering it.
Repro Steps:
**In the provided world, I've set up 4 entities to test the scenarios:
summon noxcrew:dd.generator_green ~ ~ ~
– is stackable
summon noxcrew:dd.generator_red ~ ~ ~
– NOT stackable
summon noxcrew:dd.velociraptor ~ ~ ~ "noxcrew:to_city_mode"– is stackable
summon noxcrew:dd.amargasaurus ~ ~ ~ "noxcrew:to_city_mode"– NOT stackable
You can use combinations of these two generators and two dinosaurs to test the scenarios.
- Get the provided world from @greggo on slack and open it.
- Spawn a green generator per the above command
- Move 10 blocks away and spawn a velociraptor with the above command
- Notice the velociraptor pushes the generator when it attacks.
- Kill both entities
- Spawn a red generator
- Move 10 blocks away and spawn a velociraptor with the above command
- Notice the velociraptor does NOT push the generator, but goes inside of it
- Kill both entities
- Spawn a green generator
- Move 10 blocks away and spawn an amargasaurus with the above command
- Notice the amargasaurus does not push the generator, and goes inside it
- Kill both entities
- Spawn a red generator
- Move 10 blocks away and spawn an amargasaurus with the above command
- Notice the amargasaurus does not push the generator, and goes inside it
Observed Results:
Noted in the repro steps. The velociraptor pushes the green generator despite the green generator having knockback resistance and pushable false.
Expected Results:
Stackable shouldn't override pushable.
Screenshots/Videos attached:
None