fixes to attribute snapshot

This commit is contained in:
retrooper committed 2024-06-03 05:20:22 +02:00
1 parent 80408424dd
commit f04a3c75a9
1 file changed
+4
@@ -56,6 +56,10 @@ public class AttributeSnapshotWrapper extends WrappedPacket {
public static AttributeSnapshotWrapper create(String key, double value, Collection<AttributeModifierWrapper> modifiers) {
Object nmsAttributeSnapshot = null;
holderClass = NMSUtils.getNMClassWithoutException("core.Holder");
if (holderClass != null) {
hasHolder = Reflection.getField(PacketTypeClasses.Play.Server.ENTITY_EFFECT, holderClass, 0) != null;
}
if (attributeSnapshotClass == null) {
attributeSnapshotClass = NMSUtils.getNMSClassWithoutException("AttributeSnapshot");
if (attributeSnapshotClass == null) {