forked from CloudburstMC/Nukkit
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cb068a
commit e9bcc8d
Showing
19 changed files
with
319 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/cn/nukkit/network/protocol/types/AbilityLayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package cn.nukkit.network.protocol.types; | ||
|
||
import lombok.ToString; | ||
|
||
import java.util.EnumSet; | ||
import java.util.Set; | ||
|
||
@ToString | ||
public class AbilityLayer { | ||
public static final int TYPE_CACHE = 0; | ||
public static final int TYPE_BASE = 1; | ||
public static final int TYPE_SPECTATOR = 2; | ||
public static final int TYPE_COMMANDS = 3; | ||
/** | ||
* @since 1.19.40 | ||
*/ | ||
public static final int TYPE_EDITOR = 4; | ||
/** | ||
* @since 1.21.20 | ||
*/ | ||
public static final int TYPE_LOADING_SCREEN = 5; | ||
|
||
public int type = TYPE_BASE; | ||
public Set<PlayerAbility> abilitiesSet = EnumSet.allOf(PlayerAbility.class); | ||
public Set<PlayerAbility> abilityValues = EnumSet.noneOf(PlayerAbility.class); | ||
public float flySpeed = 0.05f; | ||
/** | ||
* @since 1.21.60 | ||
*/ | ||
public float verticalFlySpeed = 1; | ||
public float walkSpeed = 0.1f; | ||
|
||
public AbilityLayer() { | ||
} | ||
|
||
public AbilityLayer(int type, Set<PlayerAbility> abilitiesSet, Set<PlayerAbility> abilityValues, float flySpeed, float verticalFlySpeed, float walkSpeed) { | ||
this.type = type; | ||
this.abilitiesSet = abilitiesSet; | ||
this.abilityValues = abilityValues; | ||
this.flySpeed = flySpeed; | ||
this.verticalFlySpeed = verticalFlySpeed; | ||
this.walkSpeed = walkSpeed; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.