示例#1
0
 @Override
 public void setChunkTicket(Ticket parTicket) {
   if (ticket != null && parTicket != ticket) {
     ForgeChunkManager.releaseTicket(ticket);
   }
   ticket = parTicket;
 }
  @Override
  public void invalidate() {
    if (Platform.isClient()) {
      return;
    }

    AELog.info("Released Ticket " + this.ct.toString());
    ForgeChunkManager.releaseTicket(this.ct);
  }
 @Override
 public void ticketsLoaded(List<ForgeChunkManager.Ticket> tickets, World world) {
   for (Ticket ticket : tickets) {
     NBTTagCompound nbt = ticket.getModData();
     if (nbt != null)
       if (nbt.getString("type").equals("TileEntity")) {
         int x = nbt.getInteger("xCoord");
         int y = nbt.getInteger("yCoord");
         int z = nbt.getInteger("zCoord");
         TileEntity te = world.getBlockTileEntity(x, y, z);
         if (te instanceof TileEntityChunkLoader)
           if (!((TileEntityChunkLoader) te).reinstateChunkTicket(ticket))
             ForgeChunkManager.releaseTicket(ticket);
       }
   }
 }
 public void releaseChunkTicket() {
   if (chunkTicket != null) {
     ForgeChunkManager.releaseTicket(chunkTicket);
     chunkTicket = null;
   }
 }
 public void onDestroy() {
   if (laserSat != null) {
     laserSat.deactivateLaser();
   }
   ForgeChunkManager.releaseTicket(ticket);
 }