mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
Added scale packets
This commit is contained in:
@@ -27,6 +27,8 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.PositionMoveRotation;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.decoration.ArmorStand;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.level.GameType;
|
||||
@@ -330,6 +332,18 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
|
||||
for (Player p : sendTo) sendPacket(p, packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendEntityScalePacket(int entityId, double scale, List<Player> sendTo) {
|
||||
AttributeInstance attribute = new AttributeInstance(
|
||||
Attributes.SCALE,
|
||||
(ignored) -> {}
|
||||
);
|
||||
attribute.setBaseValue(scale);
|
||||
|
||||
ClientboundUpdateAttributesPacket packet = new ClientboundUpdateAttributesPacket(entityId, List.of(attribute));
|
||||
for (Player p : sendTo) sendPacket(p, packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendItemDisplayMetadata(int entityId,
|
||||
Vector3f translation,
|
||||
|
||||
Reference in New Issue
Block a user