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

Merge pull request #19 from OakLoaf/feat/scale

Added support for scale packet
This commit is contained in:
Logan
2025-07-05 16:10:03 -05:00
committed by GitHub
10 changed files with 133 additions and 0 deletions

View File

@@ -83,6 +83,8 @@ public interface NMSPackets {
void sendEntityDestroyPacket(IntList entityIds, List<Player> sendTo);
void sendEntityScalePacket(int entityId, double scale, List<Player> sendTo);
void sendItemDisplayMetadata(int entityId,
Vector3f translation,
Vector3f scale,

View File

@@ -37,6 +37,11 @@ public interface PacketInterface {
// Override
}
default PacketAction readPlayerScale(@NotNull Player player, @NotNull PlayerScaleWrapper wrapper) {
return PacketAction.NOTHING;
// Override
}
default PacketAction readEntityHandle(@NotNull Player player, @NotNull PlayerInteractWrapper wrapper) {
return PacketAction.NOTHING;
// Override

View File

@@ -0,0 +1,16 @@
package me.lojosho.hibiscuscommons.packets.wrapper;
import lombok.Getter;
public class PlayerScaleWrapper {
@Getter
private final int entityId;
@Getter
private final double scale;
public PlayerScaleWrapper(int entityId, double scale) {
this.entityId = entityId;
this.scale = scale;
}
}