3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-09-08 20:43:04 +02:00

Use correct type for entity metadata

Dieser Commit ist enthalten in:
Camotoy 2022-05-29 21:11:10 -04:00
Ursprung e43a143bf4
Commit a3cdfc5306
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -141,7 +141,7 @@ public class Entity {
*/ */
protected void initializeMetadata() { protected void initializeMetadata() {
dirtyMetadata.put(EntityData.SCALE, 1f); dirtyMetadata.put(EntityData.SCALE, 1f);
dirtyMetadata.put(EntityData.COLOR, 0); dirtyMetadata.put(EntityData.COLOR, (byte) 0);
dirtyMetadata.put(EntityData.MAX_AIR_SUPPLY, getMaxAir()); dirtyMetadata.put(EntityData.MAX_AIR_SUPPLY, getMaxAir());
setDimensions(Pose.STANDING); setDimensions(Pose.STANDING);
setFlag(EntityFlag.HAS_GRAVITY, true); setFlag(EntityFlag.HAS_GRAVITY, true);
@ -351,7 +351,7 @@ public class Entity {
dirtyMetadata.put(EntityData.AIR_SUPPLY, (short) MathUtils.constrain(amount, 0, getMaxAir())); dirtyMetadata.put(EntityData.AIR_SUPPLY, (short) MathUtils.constrain(amount, 0, getMaxAir()));
} }
protected int getMaxAir() { protected short getMaxAir() {
return 300; return 300;
} }

Datei anzeigen

@ -65,7 +65,7 @@ public class AxolotlEntity extends AnimalEntity {
} }
@Override @Override
protected int getMaxAir() { protected short getMaxAir() {
return 6000; return 6000;
} }