Added 1.7.10 NPC interaction support (for #10).
This commit is contained in:
+4
-1
@@ -6,6 +6,7 @@ package net.jitse.npclib.nms.v1_13_R1.packets;
|
||||
|
||||
import com.comphenix.tinyprotocol.Reflection;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.jitse.npclib.api.wrapper.GameProfileWrapper;
|
||||
import net.minecraft.server.v1_13_R1.EnumGamemode;
|
||||
import net.minecraft.server.v1_13_R1.IChatBaseComponent;
|
||||
import net.minecraft.server.v1_13_R1.PacketPlayOutPlayerInfo;
|
||||
@@ -23,7 +24,9 @@ public class PacketPlayOutPlayerInfoWrapper {
|
||||
private final Reflection.ConstructorInvoker playerInfoDataConstructor = Reflection.getConstructor(playerInfoDataClazz,
|
||||
packetPlayOutPlayerInfoClazz, GameProfile.class, int.class, EnumGamemode.class, IChatBaseComponent.class);
|
||||
|
||||
public PacketPlayOutPlayerInfo create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction action, GameProfile gameProfile, String name) {
|
||||
public PacketPlayOutPlayerInfo create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction action, GameProfileWrapper gameProfileWrapper, String name) {
|
||||
GameProfile gameProfile = (GameProfile) gameProfileWrapper.getGameProfile();
|
||||
|
||||
PacketPlayOutPlayerInfo packetPlayOutPlayerInfo = new PacketPlayOutPlayerInfo();
|
||||
Reflection.getField(packetPlayOutPlayerInfo.getClass(), "a", PacketPlayOutPlayerInfo.EnumPlayerInfoAction.class)
|
||||
.set(packetPlayOutPlayerInfo, action);
|
||||
|
||||
Reference in New Issue
Block a user