// Path: src/main/java/p455w0rdslib/util/ChunkUtils.java
// public static class TicketHandler {
// 
// 	private static final TicketHandler INSTANCE = new TicketHandler();
// 
// 	private TicketHandler() {
// 	}
// 
// 	public static TicketHandler getInstance() {
// 		return INSTANCE;
// 	}
// 
// 	public Ticket getTicket(Object modInstnace, World world) {
// 		return ForgeChunkManager.requestTicket(modInstnace, world, ForgeChunkManager.Type.NORMAL);
// 	}
// 
// 	public void load(World world, BlockPos pos, Ticket ticket) {
// 		if (world != null && !world.isRemote && pos != null) {
// 			if (!ForgeChunkManager.getPersistentChunksFor(world).containsKey(ChunkUtils.getChunkPos(world, pos))) {
// 				ticket.getModData().setInteger("xCoord", pos.getX());
// 				ticket.getModData().setInteger("yCoord", pos.getY());
// 				ticket.getModData().setInteger("zCoord", pos.getZ());
// 				ForgeChunkManager.forceChunk(ticket, ChunkUtils.getChunkPos(world, pos));
// 			}
// 		}
// 	}
// 
// 	public void unload(World world, BlockPos pos, Ticket ticket) {
// 		if (world != null && !world.isRemote && pos != null) {
// 			if (ForgeChunkManager.getPersistentChunksFor(world).containsKey(ChunkUtils.getChunkPos(world, pos))) {
// 				ForgeChunkManager.unforceChunk(ticket, ChunkUtils.getChunkPos(world, pos));
// 				ForgeChunkManager.releaseTicket(ticket);
// 			}
// 		}
// 	}
// }


import java.util.ArrayList;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.fml.common.FMLCommonHandler;
import p455w0rdslib.util.ChunkUtils.TicketHandler;
		/**
		 * Removes a {@link net.minecraft.util.math.BlockPos BlockPos} entry
		 * specifying a Chunk Loader owned by the player
		 *
		 * @param pos
		 */
		void remove(BlockPos pos);

		/**
		 * sets a full list to a player-mainly used for persisting data after
		 * death
		 *
		 * @param list
		 */
		void set(ArrayList<BlockPos> list);

		/**
		 *
		 * @return total number of chunkloaders placed in world by the player
		 */
		int total();

	}

	public static class DefaultCLTEHandler implements ICLTEHandler {

		TileEntity tile;

		@Override
		public void setTileEntity(TileEntity te) {
// Path: src/main/java/p455w0rdslib/util/ChunkUtils.java
// public static class TicketHandler {
// 
// 	private static final TicketHandler INSTANCE = new TicketHandler();
// 
// 	private TicketHandler() {
// 	}
// 
// 	public static TicketHandler getInstance() {
// 		return INSTANCE;
// 	}
// 
// 	public Ticket getTicket(Object modInstnace, World world) {
// 		return ForgeChunkManager.requestTicket(modInstnace, world, ForgeChunkManager.Type.NORMAL);
// 	}
// 
// 	public void load(World world, BlockPos pos, Ticket ticket) {
// 		if (world != null && !world.isRemote && pos != null) {
// 			if (!ForgeChunkManager.getPersistentChunksFor(world).containsKey(ChunkUtils.getChunkPos(world, pos))) {
// 				ticket.getModData().setInteger("xCoord", pos.getX());
// 				ticket.getModData().setInteger("yCoord", pos.getY());
// 				ticket.getModData().setInteger("zCoord", pos.getZ());
// 				ForgeChunkManager.forceChunk(ticket, ChunkUtils.getChunkPos(world, pos));
// 			}
// 		}
// 	}
// 
// 	public void unload(World world, BlockPos pos, Ticket ticket) {
// 		if (world != null && !world.isRemote && pos != null) {
// 			if (ForgeChunkManager.getPersistentChunksFor(world).containsKey(ChunkUtils.getChunkPos(world, pos))) {
// 				ForgeChunkManager.unforceChunk(ticket, ChunkUtils.getChunkPos(world, pos));
// 				ForgeChunkManager.releaseTicket(ticket);
// 			}
// 		}
// 	}
// }


// Path: src/main/java/p455w0rdslib/capabilities/CapabilityChunkLoader.java
import java.util.ArrayList;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.fml.common.FMLCommonHandler;
import p455w0rdslib.util.ChunkUtils.TicketHandler;

		/**
		 * Removes a {@link net.minecraft.util.math.BlockPos BlockPos} entry
		 * specifying a Chunk Loader owned by the player
		 *
		 * @param pos
		 */
		void remove(BlockPos pos);

		/**
		 * sets a full list to a player-mainly used for persisting data after
		 * death
		 *
		 * @param list
		 */
		void set(ArrayList<BlockPos> list);

		/**
		 *
		 * @return total number of chunkloaders placed in world by the player
		 */
		int total();

	}

	public static class DefaultCLTEHandler implements ICLTEHandler {

		TileEntity tile;

		@Override
		public void setTileEntity(TileEntity te) {
			tile = te;