9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

Added entity id to PlayerScaleWrapper

This commit is contained in:
OakLoaf
2025-07-05 18:51:16 +01:00
parent 9f824031c5
commit a16c0510bd
2 changed files with 5 additions and 2 deletions

View File

@@ -4,10 +4,13 @@ import lombok.Getter;
public class PlayerScaleWrapper {
@Getter
private final int entityId;
@Getter
private final double scale;
public PlayerScaleWrapper(double scale) {
public PlayerScaleWrapper(int entityId, double scale) {
this.entityId = entityId;
this.scale = scale;
}
}

View File

@@ -182,7 +182,7 @@ public class NMSPacketChannel extends ChannelDuplexHandler {
}
AtomicReference<PacketAction> action = new AtomicReference<>(PacketAction.NOTHING);
PlayerScaleWrapper wrapper = new PlayerScaleWrapper(nmsScaleAttribute.base());
PlayerScaleWrapper wrapper = new PlayerScaleWrapper(packet.getEntityId(), nmsScaleAttribute.base());
SubPlugins.getSubPlugins().forEach(plugin -> {
PacketAction pluginAction = plugin.getPacketInterface().readPlayerScale(player, wrapper);