mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Fix some whitespacing; fix some tests
This commit is contained in:
parent
79e03aa37d
commit
02781ed56c
3 changed files with 5 additions and 3 deletions
|
@ -118,6 +118,7 @@ public class MagicValues {
|
||||||
register(AttributeType.GENERIC_KNOCKBACK_RESISTANCE, "generic.knockback_resistance");
|
register(AttributeType.GENERIC_KNOCKBACK_RESISTANCE, "generic.knockback_resistance");
|
||||||
register(AttributeType.GENERIC_MOVEMENT_SPEED, "generic.movement_speed");
|
register(AttributeType.GENERIC_MOVEMENT_SPEED, "generic.movement_speed");
|
||||||
register(AttributeType.GENERIC_ATTACK_DAMAGE, "generic.attack_damage");
|
register(AttributeType.GENERIC_ATTACK_DAMAGE, "generic.attack_damage");
|
||||||
|
register(AttributeType.GENERIC_ATTACK_KNOCKBACK, "generic.attack_knockback");
|
||||||
register(AttributeType.GENERIC_ATTACK_SPEED, "generic.attack_speed");
|
register(AttributeType.GENERIC_ATTACK_SPEED, "generic.attack_speed");
|
||||||
register(AttributeType.GENERIC_ARMOR, "generic.armor");
|
register(AttributeType.GENERIC_ARMOR, "generic.armor");
|
||||||
register(AttributeType.GENERIC_ARMOR_TOUGHNESS, "generic.armor_toughness");
|
register(AttributeType.GENERIC_ARMOR_TOUGHNESS, "generic.armor_toughness");
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class Chunk {
|
||||||
int bitsPerEntry = in.readUnsignedByte();
|
int bitsPerEntry = in.readUnsignedByte();
|
||||||
|
|
||||||
List<Integer> states = new ArrayList<>();
|
List<Integer> states = new ArrayList<>();
|
||||||
int stateCount = bitsPerEntry > 8 || bitsPerEntry == 0 ? 0 : in.readVarInt();
|
int stateCount = bitsPerEntry > 8 || bitsPerEntry == 0 ? 0 : in.readVarInt();
|
||||||
for(int i = 0; i < stateCount; i++) {
|
for(int i = 0; i < stateCount; i++) {
|
||||||
states.add(in.readVarInt());
|
states.add(in.readVarInt());
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,9 @@ public class ServerJoinGamePacket implements Packet {
|
||||||
this.gameMode = MagicValues.key(GameMode.class, gameMode & GAMEMODE_MASK);
|
this.gameMode = MagicValues.key(GameMode.class, gameMode & GAMEMODE_MASK);
|
||||||
this.gameMode2 = MagicValues.key(GameMode.class, in.readUnsignedByte());
|
this.gameMode2 = MagicValues.key(GameMode.class, in.readUnsignedByte());
|
||||||
this.worldCount = in.readVarInt();
|
this.worldCount = in.readVarInt();
|
||||||
|
this.worldNames = new String[this.worldCount];
|
||||||
for (int i = 0; i < this.worldCount; i++) {
|
for (int i = 0; i < this.worldCount; i++) {
|
||||||
in.readString();
|
this.worldNames[i] = in.readString();
|
||||||
}
|
}
|
||||||
this.dimensionCodec = NBT.read(in);
|
this.dimensionCodec = NBT.read(in);
|
||||||
this.dimension = in.readString();
|
this.dimension = in.readString();
|
||||||
|
@ -70,7 +71,7 @@ public class ServerJoinGamePacket implements Packet {
|
||||||
out.writeInt(this.entityId);
|
out.writeInt(this.entityId);
|
||||||
|
|
||||||
int gameMode = MagicValues.value(Integer.class, this.gameMode) & GAMEMODE_MASK;
|
int gameMode = MagicValues.value(Integer.class, this.gameMode) & GAMEMODE_MASK;
|
||||||
if(this.hardcore) {
|
if (this.hardcore) {
|
||||||
gameMode |= GAMEMODE_FLAG_HARDCORE;
|
gameMode |= GAMEMODE_FLAG_HARDCORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue