Search in sources :

Example 1 with ItemBunny

use of sanandreasp.mods.ClaySoldiersMod.item.ItemBunny in project ClaySoldiersMod by SanAndreasP.

the class EntityClayNexus method isMaxSpawningReached.

private boolean isMaxSpawningReached() {
    List<Entity> el = worldObj.loadedEntityList;
    int count = 0;
    for (Entity entity : el) {
        if (entity instanceof EntityClayMan) {
            if (((EntityClayMan) entity).getClayTeam() == getColor() && ((EntityClayMan) entity).spawnedFromNexus())
                count++;
        } else if (getSpawnMount() && (entity instanceof IMount) && ((IMount) entity).getType() == nexusIS[1].getItemDamage()) {
            if (entity instanceof EntityPegasus && nexusIS[1].getItem() instanceof ItemHorses && ((ItemHorses) nexusIS[1].getItem()).horseType == 1) {
                count++;
            } else if (entity instanceof EntityHorse && nexusIS[1].getItem() instanceof ItemHorses && ((ItemHorses) nexusIS[1].getItem()).horseType == 0) {
                count++;
            } else if (entity instanceof EntityTurtle && nexusIS[1].getItem() instanceof ItemTurtle) {
                count++;
            } else if (entity instanceof EntityBunny && nexusIS[1].getItem() instanceof ItemBunny) {
                count++;
            } else if (entity instanceof EntityGecko && nexusIS[1].getItem() instanceof ItemGecko) {
                count++;
            }
        }
    }
    return count >= getMaxLvngSoldiers();
}
Also used : Entity(net.minecraft.entity.Entity) ItemTurtle(sanandreasp.mods.ClaySoldiersMod.item.ItemTurtle) EntityPegasus(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityPegasus) ItemHorses(sanandreasp.mods.ClaySoldiersMod.item.ItemHorses) EntityTurtle(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityTurtle) ItemBunny(sanandreasp.mods.ClaySoldiersMod.item.ItemBunny) ItemGecko(sanandreasp.mods.ClaySoldiersMod.item.ItemGecko) EntityHorse(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityHorse) IMount(sanandreasp.mods.ClaySoldiersMod.entity.mount.IMount) EntityGecko(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityGecko) EntityBunny(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityBunny)

Example 2 with ItemBunny

use of sanandreasp.mods.ClaySoldiersMod.item.ItemBunny in project ClaySoldiersMod by SanAndreasP.

the class CSMModRegistry method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    manHelper.checkManPack(event.getModMetadata().name);
    if (!manHelper.loading)
        return;
    manHelper.initMan(new SAPConfigManager("ClaySoldiersMod", "ClaySoldiers.txt", "/sanandreasp/"), new SAPLanguageManager("/sanandreasp/ClaySoldiers/", "1.0", "Clay Soldiers Mod"), new SAPUpdateManager("Clay Soldiers Mod", 2, 0, 0, "http://dl.dropbox.com/u/56920617/ClaySoldiersMod2_latest.txt", "http://www.minecraftforum.net/topic/964897-"));
    claySoldierTab = new CreativeTabs("ClaySoldiers") {

        @Override
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex() {
            return CSMModRegistry.greyDoll.itemID;
        }
    };
    setIDs();
    SoldierTeams.initDefTeams();
    // Items
    clayDisruptor = (new ItemClayDisruptor(itemIDs[0] - 256)).setUnlocalizedName("claydisruptor").setCreativeTab(this.claySoldierTab);
    greyDoll = (new ItemClayMan(itemIDs[1] - 256, 0)).setUnlocalizedName("claydoll").setCreativeTab(this.claySoldierTab);
    horseDoll = (new ItemHorses(itemIDs[2] - 256, 0)).setUnlocalizedName("horsedoll").setCreativeTab(this.claySoldierTab);
    pegasusDoll = (new ItemHorses(itemIDs[3] - 256, 1)).setUnlocalizedName("pegasusdoll").setCreativeTab(this.claySoldierTab);
    bunnyDoll = (new ItemBunny(itemIDs[4] - 256)).setUnlocalizedName("bunnydoll").setCreativeTab(this.claySoldierTab);
    geckoDoll = (new ItemGecko(itemIDs[5] - 256)).setUnlocalizedName("geckodoll").setCreativeTab(this.claySoldierTab);
    brickDoll = (new ItemGlobal(itemIDs[6] - 256)).setIconFile("ClaySoldiersMod:dollBrick").setUnlocalizedName("brickDoll").setCreativeTab(this.claySoldierTab);
    clayCookie = (new ItemGlobal(itemIDs[7] - 256)).setIconFile("ClaySoldiersMod:noms").setUnlocalizedName("clayCookie").setCreativeTab(this.claySoldierTab);
    turtleDoll = (new ItemTurtle(itemIDs[8] - 256)).setUnlocalizedName("clayturtle").setCreativeTab(this.claySoldierTab);
    shield = (new ItemDebugShield(itemIDs[9] - 256)).setUnlocalizedName("clayshield");
    nexus = (new ItemNexus(itemIDs[10] - 256)).setUnlocalizedName("claynexus").setCreativeTab(this.claySoldierTab);
    shearBlade = (new ItemGlobal(itemIDs[11] - 256)).setIconFile("ClaySoldiersMod:shearBlade").setUnlocalizedName("clayShearBlade").setCreativeTab(this.claySoldierTab);
    brickLump = (new ItemGlobal(itemIDs[12] - 256)).setIconFile("ClaySoldiersMod:brickLump").setUnlocalizedName("brickLump").setCreativeTab(this.claySoldierTab);
    arenaPlacer = (new ItemArenaPlacer(itemIDs[13] - 256)).setUnlocalizedName("arenaPlacer").setCreativeTab(this.claySoldierTab);
}
Also used : ItemDebugShield(sanandreasp.mods.ClaySoldiersMod.item.ItemDebugShield) ItemTurtle(sanandreasp.mods.ClaySoldiersMod.item.ItemTurtle) ItemClayDisruptor(sanandreasp.mods.ClaySoldiersMod.item.ItemClayDisruptor) SAPLanguageManager(sanandreasp.core.manpack.managers.SAPLanguageManager) ItemHorses(sanandreasp.mods.ClaySoldiersMod.item.ItemHorses) ItemBunny(sanandreasp.mods.ClaySoldiersMod.item.ItemBunny) ItemGlobal(sanandreasp.mods.ClaySoldiersMod.item.ItemGlobal) SideOnly(cpw.mods.fml.relauncher.SideOnly) CreativeTabs(net.minecraft.creativetab.CreativeTabs) SAPUpdateManager(sanandreasp.core.manpack.managers.SAPUpdateManager) ItemGecko(sanandreasp.mods.ClaySoldiersMod.item.ItemGecko) ItemNexus(sanandreasp.mods.ClaySoldiersMod.item.ItemNexus) ItemArenaPlacer(sanandreasp.mods.ClaySoldiersMod.item.ItemArenaPlacer) SAPConfigManager(sanandreasp.core.manpack.managers.SAPConfigManager) ItemClayMan(sanandreasp.mods.ClaySoldiersMod.item.ItemClayMan)

Example 3 with ItemBunny

use of sanandreasp.mods.ClaySoldiersMod.item.ItemBunny in project ClaySoldiersMod by SanAndreasP.

the class Handler_BehaviorDispenseItem method getLivingFromItem.

private static EntityLiving getLivingFromItem(World world, double x, double y, double z, ItemStack item) {
    if (item.getItem() instanceof ItemClayMan) {
        EntityClayMan entityclayman = new EntityClayMan(world, x, y, z, item.getItemDamage());
        world.playSoundEffect(x, y, z, "step.gravel", 1.0F, 1.0F / 0.4F + 0.8F);
        return entityclayman;
    } else if (item.getItem() instanceof ItemHorses) {
        EntityHorse entityhorse = new EntityHorse(world, x, y, z, item.getItemDamage());
        if (item.getItem() == CSMModRegistry.pegasusDoll) {
            entityhorse = new EntityPegasus(world, x, y, z, item.getItemDamage());
        }
        world.playSoundEffect(x, y, z, "step.gravel", 1.0F, 1.0F / 0.4F + 1.2F);
        return entityhorse;
    } else if (item.getItem() instanceof ItemTurtle) {
        EntityTurtle entityturtle = new EntityTurtle(world, x, y, z, item.getItemDamage());
        world.playSoundEffect(x, y, z, "step.stone", 1.0F, 1.0F / 0.4F + 0.8F);
        return entityturtle;
    } else if (item.getItem() instanceof ItemBunny) {
        EntityBunny entitybunny = new EntityBunny(world, x, y, z, item.getItemDamage());
        world.playSoundEffect(x, y, z, "step.stone", 1.0F, 1.0F / 0.4F + 0.8F);
        return entitybunny;
    } else if (item.getItem() instanceof ItemGecko) {
        EntityGecko entitygecko = new EntityGecko(world, x, y, z, item.getItemDamage());
        world.playSoundEffect(x, y, z, "step.gravel", 1.0F, 1.0F / 0.4F + 1.2F);
        return entitygecko;
    }
    return null;
}
Also used : ItemTurtle(sanandreasp.mods.ClaySoldiersMod.item.ItemTurtle) EntityHorse(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityHorse) EntityGecko(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityGecko) EntityClayMan(sanandreasp.mods.ClaySoldiersMod.entity.EntityClayMan) EntityPegasus(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityPegasus) EntityBunny(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityBunny) ItemHorses(sanandreasp.mods.ClaySoldiersMod.item.ItemHorses) EntityTurtle(sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityTurtle) ItemBunny(sanandreasp.mods.ClaySoldiersMod.item.ItemBunny) ItemClayMan(sanandreasp.mods.ClaySoldiersMod.item.ItemClayMan) ItemGecko(sanandreasp.mods.ClaySoldiersMod.item.ItemGecko)

Aggregations

ItemBunny (sanandreasp.mods.ClaySoldiersMod.item.ItemBunny)3 ItemGecko (sanandreasp.mods.ClaySoldiersMod.item.ItemGecko)3 ItemHorses (sanandreasp.mods.ClaySoldiersMod.item.ItemHorses)3 ItemTurtle (sanandreasp.mods.ClaySoldiersMod.item.ItemTurtle)3 EntityBunny (sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityBunny)2 EntityGecko (sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityGecko)2 EntityHorse (sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityHorse)2 EntityPegasus (sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityPegasus)2 EntityTurtle (sanandreasp.mods.ClaySoldiersMod.entity.mount.EntityTurtle)2 ItemClayMan (sanandreasp.mods.ClaySoldiersMod.item.ItemClayMan)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 CreativeTabs (net.minecraft.creativetab.CreativeTabs)1 Entity (net.minecraft.entity.Entity)1 SAPConfigManager (sanandreasp.core.manpack.managers.SAPConfigManager)1 SAPLanguageManager (sanandreasp.core.manpack.managers.SAPLanguageManager)1 SAPUpdateManager (sanandreasp.core.manpack.managers.SAPUpdateManager)1 EntityClayMan (sanandreasp.mods.ClaySoldiersMod.entity.EntityClayMan)1 IMount (sanandreasp.mods.ClaySoldiersMod.entity.mount.IMount)1 ItemArenaPlacer (sanandreasp.mods.ClaySoldiersMod.item.ItemArenaPlacer)1 ItemClayDisruptor (sanandreasp.mods.ClaySoldiersMod.item.ItemClayDisruptor)1