Search in sources :

Example 1 with PacketSyncEntry

use of amerifrance.guideapi.network.PacketSyncEntry in project Guide-API by TeamAmeriFrance.

the class GuiEntry method onGuiClosed.

@Override
public void onGuiClosed() {
    super.onGuiClosed();
    ResourceLocation key = null;
    for (Map.Entry<ResourceLocation, EntryAbstract> mapEntry : category.entries.entrySet()) if (mapEntry.getValue().equals(entry))
        key = mapEntry.getKey();
    if (key != null)
        PacketHandler.INSTANCE.sendToServer(new PacketSyncEntry(book.getCategoryList().indexOf(category), key, pageNumber));
}
Also used : EntryAbstract(amerifrance.guideapi.api.impl.abstraction.EntryAbstract) ResourceLocation(net.minecraft.util.ResourceLocation) PacketSyncEntry(amerifrance.guideapi.network.PacketSyncEntry) Map(java.util.Map)

Aggregations

EntryAbstract (amerifrance.guideapi.api.impl.abstraction.EntryAbstract)1 PacketSyncEntry (amerifrance.guideapi.network.PacketSyncEntry)1 Map (java.util.Map)1 ResourceLocation (net.minecraft.util.ResourceLocation)1