mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 11:59:26 +00:00
Cache Animation Packet
This commit is contained in:
1 parent
bd783a2e98
commit
7366b11077
4 files changed
+8
-3
No files matched your search
@@ -13,6 +13,7 @@ import kamkeel.npcs.network.packets.data.gui.*;
|
||||
import kamkeel.npcs.network.packets.data.large.*;
|
||||
import kamkeel.npcs.network.packets.data.npc.*;
|
||||
import kamkeel.npcs.network.packets.data.script.*;
|
||||
import kamkeel.npcs.network.packets.request.AnimationCachePacket;
|
||||
import kamkeel.npcs.network.packets.request.DimensionsGetPacket;
|
||||
import kamkeel.npcs.network.packets.request.GuiRequestPacket;
|
||||
import kamkeel.npcs.network.packets.request.bank.BankGetPacket;
|
||||
@@ -199,6 +200,7 @@ public class PacketHandler {
|
||||
// Other
|
||||
REQUEST_PACKET.registerPacket(new GuiRequestPacket());
|
||||
REQUEST_PACKET.registerPacket(new DimensionsGetPacket());
|
||||
REQUEST_PACKET.registerPacket(new AnimationCachePacket());
|
||||
}
|
||||
|
||||
public void registerDataPackets(){
|
||||
|
||||
@@ -5,8 +5,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.network.AbstractPacket;
|
||||
import kamkeel.npcs.network.PacketChannel;
|
||||
import kamkeel.npcs.network.PacketClient;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.enums.EnumDataPacket;
|
||||
import kamkeel.npcs.network.packets.request.AnimationCachePacket;
|
||||
import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -85,6 +87,7 @@ public final class UpdateAnimationsPacket extends AbstractPacket {
|
||||
|
||||
animationData.setAnimation(ClientCacheHandler.animationCache.get(animationId));
|
||||
animationData.readFromNBT(nbt);
|
||||
PacketClient.sendClient(new AnimationCachePacket(animationId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -485,7 +485,7 @@ public class GuiCustom extends GuiScreen implements ICustomScrollListener, IGuiD
|
||||
PacketClient.sendClient(new CustomGuiUnfocusedPacket(textField.getID(), this.updateGui().toNBT()));
|
||||
}
|
||||
|
||||
ScriptGui updateGui() {
|
||||
public ScriptGui updateGui() {
|
||||
Iterator var1 = this.dataHolders.iterator();
|
||||
|
||||
while(var1.hasNext()) {
|
||||
@@ -496,7 +496,7 @@ public class GuiCustom extends GuiScreen implements ICustomScrollListener, IGuiD
|
||||
return this.gui;
|
||||
}
|
||||
|
||||
NBTTagCompound getScrollSelection(CustomGuiScrollComponent scroll) {
|
||||
public NBTTagCompound getScrollSelection(CustomGuiScrollComponent scroll) {
|
||||
NBTTagList list = new NBTTagList();
|
||||
if (scroll.multiSelect) {
|
||||
Iterator var3 = scroll.getSelectedList().iterator();
|
||||
|
||||
@@ -67,7 +67,7 @@ public enum EnumPacketServer {
|
||||
|
||||
QuestGet, QuestCategoryGet,
|
||||
SaveTileEntity, MailOpenSetup,
|
||||
DimensionTeleport, GetTileEntity, IsGuiOpen, CacheAnimation,
|
||||
DimensionTeleport, GetTileEntity, IsGuiOpen,
|
||||
|
||||
SavePartyData, CreateParty, GetPartyData, DisbandParty, KickPlayer, LeavePlayer, PartyInvite, GetPartyInviteList, AcceptInvite,
|
||||
IgnoreInvite, SetPartyLeader, SetPartyQuest,
|
||||
|
||||
Reference in new issue
Block a user