Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-04 23:30:17 +01:00
Improve 1.19.50 flags (#3422)
Dieser Commit ist enthalten in:
Ursprung
49d3254ea9
Commit
c7e79299b6
@ -355,14 +355,11 @@ public class Entity {
|
||||
public void setFlags(ByteEntityMetadata entityMetadata) {
|
||||
byte xd = entityMetadata.getPrimitiveValue();
|
||||
setFlag(EntityFlag.ON_FIRE, ((xd & 0x01) == 0x01) && !getFlag(EntityFlag.FIRE_IMMUNE)); // Otherwise immune entities sometimes flicker onfire
|
||||
// As of 1.19.50, the client does not want the sprinting, sneaking or gliding set on itself
|
||||
if (!GameProtocol.supports1_19_50(session) || !(this instanceof SessionPlayerEntity)) {
|
||||
setFlag(EntityFlag.SNEAKING, (xd & 0x02) == 0x02);
|
||||
setFlag(EntityFlag.SPRINTING, (xd & 0x08) == 0x08);
|
||||
setFlag(EntityFlag.SNEAKING, (xd & 0x02) == 0x02);
|
||||
setFlag(EntityFlag.SPRINTING, (xd & 0x08) == 0x08);
|
||||
|
||||
// Swimming is ignored here and instead we rely on the pose
|
||||
setFlag(EntityFlag.GLIDING, (xd & 0x80) == 0x80);
|
||||
}
|
||||
// Swimming is ignored here and instead we rely on the pose
|
||||
setFlag(EntityFlag.GLIDING, (xd & 0x80) == 0x80);
|
||||
|
||||
setInvisible((xd & 0x20) == 0x20);
|
||||
}
|
||||
|
@ -116,9 +116,7 @@ public class SessionPlayerEntity extends PlayerEntity {
|
||||
@Override
|
||||
public void setFlags(ByteEntityMetadata entityMetadata) {
|
||||
super.setFlags(entityMetadata);
|
||||
|
||||
byte flags = entityMetadata.getPrimitiveValue();
|
||||
session.setSwimmingInWater((flags & 0x10) == 0x10 && (flags & 0x08) == 0x08);
|
||||
session.setSwimmingInWater((entityMetadata.getPrimitiveValue() & 0x10) == 0x10 && getFlag(EntityFlag.SPRINTING));
|
||||
refreshSpeed = true;
|
||||
}
|
||||
|
||||
|
@ -1284,11 +1284,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
this.pose = Pose.SNEAKING;
|
||||
playerEntity.setBoundingBoxHeight(1.5f);
|
||||
}
|
||||
|
||||
// As of 1.19.50, the client does not want sneaking set on itself
|
||||
if (!GameProtocol.supports1_19_50(this)) {
|
||||
playerEntity.setFlag(EntityFlag.SNEAKING, sneaking);
|
||||
}
|
||||
playerEntity.setFlag(EntityFlag.SNEAKING, sneaking);
|
||||
}
|
||||
|
||||
public void setSwimming(boolean swimming) {
|
||||
|
@ -5,7 +5,7 @@ netty = "4.1.80.Final"
|
||||
guava = "29.0-jre"
|
||||
gson = "2.3.1" # Provided by Spigot 1.8.8
|
||||
websocket = "1.5.1"
|
||||
protocol = "2.9.15-20221129.032348-1"
|
||||
protocol = "2.9.15-20221129.204554-2"
|
||||
raknet = "1.6.28-20220125.214016-6"
|
||||
mcauthlib = "d9d773e"
|
||||
mcprotocollib = "9f78bd5"
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren