mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
Implemented Scripted Overlays which stay on the player's screen. Overlays persist in the client, and can be removed from the screen as well.
This commit is contained in:
1 parent
8b24dad211
commit
534f716991
25 files changed
+1105
-19
No files matched your search
@@ -26,6 +26,7 @@ import noppes.npcs.ServerEventsHandler;
|
||||
import noppes.npcs.client.ClientProxy.FontContainer;
|
||||
import noppes.npcs.client.controllers.MusicController;
|
||||
import noppes.npcs.client.gui.GuiNpcMobSpawnerAdd;
|
||||
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
|
||||
import noppes.npcs.client.gui.player.GuiBook;
|
||||
import noppes.npcs.client.gui.util.GuiContainerNPCInterface;
|
||||
import noppes.npcs.client.gui.util.GuiNPCInterface;
|
||||
@@ -259,5 +260,15 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
|
||||
NoppesUtil.isGUIOpen(isGUIOpen);
|
||||
}
|
||||
else if(type == EnumPacketClient.OVERLAY_DATA){
|
||||
OverlayCustom overlayCustom = new OverlayCustom(Minecraft.getMinecraft());
|
||||
overlayCustom.setOverlayData(Server.readNBT(buffer));
|
||||
|
||||
Client.customOverlays.put(overlayCustom.overlay.getID(),overlayCustom);
|
||||
}
|
||||
else if(type == EnumPacketClient.OVERLAY_CLOSE){
|
||||
int id = buffer.readInt();
|
||||
Client.customOverlays.remove(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user