    001    package cpw.mods.fml.common.modloader;
    002
    003    import java.util.concurrent.Callable;
    004
    005    import com.google.common.base.Function;
    006
    007    import cpw.mods.fml.client.FMLClientHandler;
    008    import cpw.mods.fml.common.network.EntitySpawnPacket;
    009    import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
    010
    011    import net.minecraft.src.Entity;
    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    }