Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ-Ferguson committed Apr 14, 2024
1 parent 9cc6b07 commit 1bd5958
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.cloudburstmc.protocol.bedrock.packet.UpdateAttributesPacket;
import org.geysermc.geyser.api.entity.type.player.GeyserPlayerEntity;
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.LivingEntity;
import org.geysermc.geyser.entity.type.living.animal.tameable.ParrotEntity;
Expand Down Expand Up @@ -283,7 +284,7 @@ public void setAbsorptionHearts(FloatEntityMetadata entityMetadata) {
attributesPacket.setRuntimeEntityId(geyserId);
// Setting to a higher maximum since plugins/datapacks can probably extend the Bedrock soft limit
attributesPacket.setAttributes(Collections.singletonList(
new AttributeData("minecraft:absorption", 0.0f, 1024f, entityMetadata.getPrimitiveValue(), 0.0f)));
GeyserAttributeType.ABSORPTION.getAttribute(entityMetadata.getPrimitiveValue(), 1024f)));
session.sendUpstreamPacket(attributesPacket);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,14 @@ public void resetMetadata() {
UpdateAttributesPacket attributesPacket = new UpdateAttributesPacket();
attributesPacket.setRuntimeEntityId(geyserId);
attributesPacket.setAttributes(Collections.singletonList(
new AttributeData("minecraft:absorption", 0.0f, 1024f, 0.0f, 0.0f)));
GeyserAttributeType.ABSORPTION.getAttribute(0f, 1024f)));
session.sendUpstreamPacket(attributesPacket);

dirtyMetadata.put(EntityDataTypes.EFFECT_COLOR, 0);
dirtyMetadata.put(EntityDataTypes.EFFECT_AMBIENCE, (byte) 0);
dirtyMetadata.put(EntityDataTypes.FREEZING_EFFECT_STRENGTH, 0f);

silent = false;

dirtyMetadata.put(EntityDataTypes.FREEZING_EFFECT_STRENGTH, 0f);
}

public void resetAir() {
Expand Down

0 comments on commit 1bd5958

Please sign in to comment.