Started thinking about the implemtation of #11

This commit is contained in:
Jitse Boonstra
2019-10-21 09:49:23 +02:00
parent 6d5895870b
commit 4d2140d24c
24 changed files with 377 additions and 254 deletions
@@ -6,9 +6,9 @@ package net.jitse.npclib.nms.v1_9_R2;
import net.jitse.npclib.NPCLib;
import net.jitse.npclib.api.state.NPCSlot;
import net.jitse.npclib.hologram.Hologram;
import net.jitse.npclib.hologram._Hologram;
import net.jitse.npclib.internal.MinecraftVersion;
import net.jitse.npclib.internal.SimpleNPC;
import net.jitse.npclib.internal.NPCBase;
import net.jitse.npclib.nms.v1_9_R2.packets.*;
import net.minecraft.server.v1_9_R2.*;
import org.bukkit.Bukkit;
@@ -25,9 +25,9 @@ import java.util.UUID;
/**
* @author Jitse Boonstra
*/
public class NPC_v1_9_R2 extends SimpleNPC {
public class NPC_v1_9_R2 extends NPCBase {
private Hologram hologram;
private _Hologram hologram;
private PacketPlayOutNamedEntitySpawn packetPlayOutNamedEntitySpawn;
private PacketPlayOutScoreboardTeam packetPlayOutScoreboardTeamRegister;
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
@@ -41,7 +41,7 @@ public class NPC_v1_9_R2 extends SimpleNPC {
@Override
public void createPackets() {
this.hologram = new Hologram(location.clone().subtract(0, 0.5, 0), lines);
this.hologram = new _Hologram(location.clone().subtract(0, 0.5, 0), text);
hologram.generatePackets(MinecraftVersion.V1_9_R2);
PacketPlayOutPlayerInfoWrapper packetPlayOutPlayerInfoWrapper = new PacketPlayOutPlayerInfoWrapper();