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