Class CollisionRules
CollisionRule
s.
The behavior of these values can be somewhat counter-intuitive. Since CollisionRule
s
are used on the client, this behavior cannot be changed by Sponge.
The following truth table shows whether or not two entities will collide, given the collision rules for their respective teams.
For example, two entities on different teams will not collide if one team's CollisionRule
is set to ALWAYS
and the other is set to PUSH_OWN_TEAM
.
Same team - ALWAYS
- Yes
Same team - PUSH_OWN_TEAM
- Yes
Same team - PUSH_OTHER_TEAMS
- No
Same team - NEVER
- No
Different teams - NEVER
- *any* - No
Different teams - ALWAYS
- PUSH_OWN_TEAM
- No
Different teams - ALWAYS
- PUSH_OTHER_TEAMS
- Yes
Different teams - ALWAYS
- ALWAYS
- Yes
Different teams - PUSH_OWN_TEAM
- PUSH_OTHER_TEAMS
- No
Different teams - PUSH_OWN_TEAM
- PUSH_OWN_TEAM
- No
Different teams - PUSH_OTHER_TEAMS
- PUSH_OTHER_TEAMS
- Yes
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DefaultedRegistryReference
<CollisionRule> Members will always collide with other entities.static final DefaultedRegistryReference
<CollisionRule> Members will never collide.static final DefaultedRegistryReference
<CollisionRule> Members will only push members on opposing teams.static final DefaultedRegistryReference
<CollisionRule> Members will only push other members on their team and mobs. -
Method Summary
-
Field Details
-
ALWAYS
Members will always collide with other entities.This is the default value.
-
NEVER
Members will never collide. -
PUSH_OTHER_TEAMS
Members will only push members on opposing teams. -
PUSH_OWN_TEAM
Members will only push other members on their team and mobs.
-
-
Method Details
-
registry
-