@Override public void invalidate() { if (Platform.isClient()) { return; } AELog.info("Released Ticket " + this.ct.toString()); ForgeChunkManager.releaseTicket(this.ct); }
@Override public ItemStack getDisplayStack() { if (Platform.isClient()) { final ItemStack is = super.getStack(); if (is != null && is.getItem() instanceof ItemEncodedPattern) { final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem(); final ItemStack out = iep.getOutput(is); if (out != null) { return out; } } } return super.getStack(); }
void initTicket() { if (Platform.isClient()) { return; } this.ct = ForgeChunkManager.requestTicket(AppEng.instance(), this.worldObj, Type.NORMAL); if (this.ct == null) { MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); if (server != null) { List<EntityPlayerMP> pl = server.getConfigurationManager().playerEntityList; for (EntityPlayerMP p : pl) { p.addChatMessage(new ChatComponentText("Can't chunk load..")); } } return; } AELog.info("New Ticket " + this.ct.toString()); ForgeChunkManager.forceChunk( this.ct, new ChunkCoordIntPair(this.xCoord >> 4, this.zCoord >> 4)); }