    001    package cpw.mods.fml.common.modloader;
    002
    003    import java.util.concurrent.Callable;
    004
    005    import net.minecraft.entity.Entity;
    006
    007    import com.google.common.base.Function;
    008
    009    import cpw.mods.fml.client.FMLClientHandler;
    010    import cpw.mods.fml.common.network.EntitySpawnPacket;
    011    import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
    012
    013    public class ModLoaderEntitySpawnCallback implements Function<EntitySpawnPacket, Entity>
    014    {
    015
    016        private BaseModProxy mod;
    017        private EntityRegistration registration;
    018        private boolean isAnimal;
    019
    020        public ModLoaderEntitySpawnCallback(BaseModProxy mod, EntityRegistration er)
    021        {
    022            this.mod = mod;
    023            this.registration = er;
    024        }
    025
    026        @Override
    027        public Entity apply(EntitySpawnPacket input)
    028        {
    029            return ModLoaderHelper.sidedHelper.spawnEntity(mod, input, registration);
    030        }
    031    }