public final class CollisionRules extends Object
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
Modifier and Type | Field and Description |
---|---|
static CollisionRule |
ALWAYS
Members will always collide with other entities.
|
static CollisionRule |
NEVER
Members will never collide.
|
static CollisionRule |
PUSH_OTHER_TEAMS
Members will only push members on opposing teams.
|
static CollisionRule |
PUSH_OWN_TEAM
Members will only push other members on their team and mobs.
|
public static final CollisionRule ALWAYS
This is the default value.
public static final CollisionRule NEVER
public static final CollisionRule PUSH_OTHER_TEAMS
public static final CollisionRule PUSH_OWN_TEAM