Class CollisionRules
- java.lang.Object
-
- org.spongepowered.api.scoreboard.CollisionRules
-
public final class CollisionRules extends Object
An enumeration of vanillaCollisionRule
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 toALWAYS
and the other is set toPUSH_OWN_TEAM
.Same team -
ALWAYS
- Yes Same team -PUSH_OWN_TEAM
- Yes Same team -PUSH_OTHER_TEAMS
- No Same team -NEVER
- NoDifferent teams -
NEVER
- *any* - NoDifferent 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
Fields Modifier and Type Field Description static DefaultedRegistryReference<CollisionRule>
ALWAYS
Members will always collide with other entities.static DefaultedRegistryReference<CollisionRule>
NEVER
Members will never collide.static DefaultedRegistryReference<CollisionRule>
PUSH_OTHER_TEAMS
Members will only push members on opposing teams.static DefaultedRegistryReference<CollisionRule>
PUSH_OWN_TEAM
Members will only push other members on their team and mobs.
-
-
-
Field Detail
-
ALWAYS
public static final DefaultedRegistryReference<CollisionRule> ALWAYS
Members will always collide with other entities.This is the default value.
-
NEVER
public static final DefaultedRegistryReference<CollisionRule> NEVER
Members will never collide.
-
PUSH_OTHER_TEAMS
public static final DefaultedRegistryReference<CollisionRule> PUSH_OTHER_TEAMS
Members will only push members on opposing teams.
-
PUSH_OWN_TEAM
public static final DefaultedRegistryReference<CollisionRule> PUSH_OWN_TEAM
Members will only push other members on their team and mobs.
-
-
Method Detail
-
registry
public static Registry<CollisionRule> registry()
-
-