mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Indicate support for 1.12.12x, update Bedrock protocol library, bump Bedrock network dependency
This commit is contained in:
@@ -72,7 +72,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
@@ -142,7 +142,7 @@ public class Entity implements GeyserEntity {
|
||||
* think they are set to false.
|
||||
*/
|
||||
@Getter(AccessLevel.NONE)
|
||||
protected final EnumSet<EntityFlag> flags = EnumSet.noneOf(EntityFlag.class);
|
||||
protected final EnumMap<EntityFlag, Boolean> flags = new EnumMap<>(EntityFlag.class);
|
||||
/**
|
||||
* Indicates if flags have been updated and need to be sent to the client.
|
||||
*/
|
||||
@@ -362,14 +362,19 @@ public class Entity implements GeyserEntity {
|
||||
}
|
||||
|
||||
public final boolean getFlag(EntityFlag flag) {
|
||||
return this.flags.contains(flag);
|
||||
Boolean value = this.flags.get(flag);
|
||||
return value != null && value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a flag value and determines if the flags would need synced with the Bedrock client.
|
||||
*/
|
||||
public final void setFlag(EntityFlag flag, boolean value) {
|
||||
flagsDirty |= value ? this.flags.add(flag) : this.flags.remove(flag);
|
||||
Boolean previous = this.flags.get(flag);
|
||||
if (previous == null || value != previous) {
|
||||
flagsDirty = true;
|
||||
}
|
||||
this.flags.put(flag, value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -353,7 +353,7 @@ public class ArmorStandEntity extends LivingEntity {
|
||||
secondEntity.positionRequiresOffset = true; // Offset should always be applied
|
||||
secondEntity.getDirtyMetadata().put(EntityDataTypes.NAME, nametag);
|
||||
secondEntity.getDirtyMetadata().put(EntityDataTypes.NAMETAG_ALWAYS_SHOW, isNameTagVisible ? (byte) 1 : (byte) 0);
|
||||
secondEntity.flags.addAll(this.flags);
|
||||
secondEntity.flags.putAll(this.flags);
|
||||
// Guarantee this copy is NOT invisible
|
||||
secondEntity.setFlag(EntityFlag.INVISIBLE, false);
|
||||
// Scale to 0 to show nametag
|
||||
|
||||
@@ -334,7 +334,7 @@ public class AvatarEntity extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void setPitch(float pitch) {
|
||||
super.setPitch(getFlag(EntityFlag.CRAWLING) && !(this instanceof SessionPlayerEntity) ? 0 : pitch);
|
||||
super.setPitch(getFlag(EntityFlag.CRAWLING) ? 0 : pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -276,6 +276,11 @@ public class SessionPlayerEntity extends PlayerEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPitch(float pitch) {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
|
||||
public float getMaxHealth() {
|
||||
return maxHealth;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public final class GameProtocol {
|
||||
register(Bedrock_v819.CODEC, "1.21.93", "1.21.94");
|
||||
register(Bedrock_v827.CODEC, "1.21.100", "1.21.101");
|
||||
register(Bedrock_v844.CODEC, "1.21.111", "1.21.112", "1.21.113", "1.21.114");
|
||||
register(Bedrock_v859.CODEC, "1.21.120");
|
||||
register(Bedrock_v859.CODEC, "1.21.120", "1.21.121", "1.21.122", "1.21.123");
|
||||
|
||||
MinecraftVersion latestBedrock = SUPPORTED_BEDROCK_VERSIONS.get(SUPPORTED_BEDROCK_VERSIONS.size() - 1);
|
||||
DEFAULT_BEDROCK_VERSION = latestBedrock.versionString();
|
||||
|
||||
@@ -12,10 +12,10 @@ guava = "29.0-jre"
|
||||
gson = "2.3.1" # Provided by Spigot 1.8.8 TODO bump to 2.8.1 or similar (Spigot 1.16.5 version) after Merge
|
||||
gson-runtime = "2.10.1"
|
||||
websocket = "1.5.1"
|
||||
protocol-connection = "3.0.0.Beta10-20251014.180344-2"
|
||||
protocol-common = "3.0.0.Beta10-20251014.180344-2"
|
||||
protocol-codec = "3.0.0.Beta10-20251014.180344-2"
|
||||
raknet = "1.0.0.CR3-20250811.214335-20"
|
||||
protocol-connection = "3.0.0.Beta11-20251105.180808-3"
|
||||
protocol-common = "3.0.0.Beta11-20251105.180808-2"
|
||||
protocol-codec = "3.0.0.Beta11-20251105.180808-3"
|
||||
raknet = "1.0.0.CR3-20251031.125212-22"
|
||||
minecraftauth = "5.0.0"
|
||||
mcprotocollib = "1.21.9-20251029.184056-18"
|
||||
adventure = "4.25.0"
|
||||
|
||||
Reference in New Issue
Block a user