mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Minor edits
This commit is contained in:
parent
9cc6b07108
commit
1bd595826b
2 changed files with 4 additions and 4 deletions
|
@ -55,6 +55,7 @@ import org.cloudburstmc.protocol.bedrock.packet.SetEntityLinkPacket;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.UpdateAttributesPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.UpdateAttributesPacket;
|
||||||
import org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity;
|
import org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity;
|
||||||
import org.geysermc.geyser.entity.EntityDefinitions;
|
import org.geysermc.geyser.entity.EntityDefinitions;
|
||||||
|
import org.geysermc.geyser.entity.attribute.GeyserAttributeType;
|
||||||
import org.geysermc.geyser.entity.type.Entity;
|
import org.geysermc.geyser.entity.type.Entity;
|
||||||
import org.geysermc.geyser.entity.type.LivingEntity;
|
import org.geysermc.geyser.entity.type.LivingEntity;
|
||||||
import org.geysermc.geyser.entity.type.living.animal.tameable.ParrotEntity;
|
import org.geysermc.geyser.entity.type.living.animal.tameable.ParrotEntity;
|
||||||
|
@ -283,7 +284,7 @@ public class PlayerEntity extends LivingEntity implements GeyserPlayerEntity {
|
||||||
attributesPacket.setRuntimeEntityId(geyserId);
|
attributesPacket.setRuntimeEntityId(geyserId);
|
||||||
// Setting to a higher maximum since plugins/datapacks can probably extend the Bedrock soft limit
|
// Setting to a higher maximum since plugins/datapacks can probably extend the Bedrock soft limit
|
||||||
attributesPacket.setAttributes(Collections.singletonList(
|
attributesPacket.setAttributes(Collections.singletonList(
|
||||||
new AttributeData("minecraft:absorption", 0.0f, 1024f, entityMetadata.getPrimitiveValue(), 0.0f)));
|
GeyserAttributeType.ABSORPTION.getAttribute(entityMetadata.getPrimitiveValue(), 1024f)));
|
||||||
session.sendUpstreamPacket(attributesPacket);
|
session.sendUpstreamPacket(attributesPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,15 +271,14 @@ public class SessionPlayerEntity extends PlayerEntity {
|
||||||
UpdateAttributesPacket attributesPacket = new UpdateAttributesPacket();
|
UpdateAttributesPacket attributesPacket = new UpdateAttributesPacket();
|
||||||
attributesPacket.setRuntimeEntityId(geyserId);
|
attributesPacket.setRuntimeEntityId(geyserId);
|
||||||
attributesPacket.setAttributes(Collections.singletonList(
|
attributesPacket.setAttributes(Collections.singletonList(
|
||||||
new AttributeData("minecraft:absorption", 0.0f, 1024f, 0.0f, 0.0f)));
|
GeyserAttributeType.ABSORPTION.getAttribute(0f, 1024f)));
|
||||||
session.sendUpstreamPacket(attributesPacket);
|
session.sendUpstreamPacket(attributesPacket);
|
||||||
|
|
||||||
dirtyMetadata.put(EntityDataTypes.EFFECT_COLOR, 0);
|
dirtyMetadata.put(EntityDataTypes.EFFECT_COLOR, 0);
|
||||||
dirtyMetadata.put(EntityDataTypes.EFFECT_AMBIENCE, (byte) 0);
|
dirtyMetadata.put(EntityDataTypes.EFFECT_AMBIENCE, (byte) 0);
|
||||||
|
dirtyMetadata.put(EntityDataTypes.FREEZING_EFFECT_STRENGTH, 0f);
|
||||||
|
|
||||||
silent = false;
|
silent = false;
|
||||||
|
|
||||||
dirtyMetadata.put(EntityDataTypes.FREEZING_EFFECT_STRENGTH, 0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetAir() {
|
public void resetAir() {
|
||||||
|
|
Loading…
Reference in a new issue