thaumcraft.common.config.ConfigItems Java Examples

The following examples show how to use thaumcraft.common.config.ConfigItems. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ItemRenderRemoteJar.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack stack, Object... data) {
    GL11.glEnable(GL11.GL_ALPHA_TEST);

    AspectList aspects = ((ItemJarFilled)ConfigItems.itemJarFilled).getAspects(stack);
    if(aspects != null) {
        tile.aspect = aspects.getAspects()[0];
        tile.amount = aspects.getAmount(tile.aspect);
    } else {
        tile.aspect = null;
        tile.amount = 0;
    }

    if(stack.hasTagCompound()) {
        tile.networkId = NBTHelper.getUUID(stack.getTagCompound(), "networkId");
    }

    super.renderItem(type, stack, data);

    GL11.glPushMatrix();
    GL11.glTranslatef(0.5f, 0.5f, 0.5f);

    RenderingRegistry.instance().renderInventoryBlock(RenderBlocks.getInstance(), RegisteredBlocks.blockRemoteJar, 0, RegisteredBlocks.blockRemoteJar.getRenderType());
    GL11.glPopMatrix();
}
 
Example #2
Source File: SubTileEuclidaisy.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 6 votes vote down vote up
@Override
public void onUpdate(){
    super.onUpdate();

    if(redstoneSignal > 0)
        return;

    if(mana >= cost && !supertile.getWorldObj().isRemote && this.ticksExisted % 400 == 0) {
        Thaumcraft.proxy.burst(supertile.getWorldObj(), (double)supertile.xCoord + 0.5D, (double)supertile.yCoord + 0.5D, (double)supertile.zCoord + 0.5D, 1.0F);
        AspectList aspect;
        if(supertile.getWorldObj().rand.nextInt(10) < 4)
            aspect = (new AspectList()).add(Aspect.AURA, 2);
        else {
            Aspect[] aspects = Aspect.aspects.values().toArray(new Aspect[0]);
            aspect = (new AspectList()).add(aspects[supertile.getWorldObj().rand.nextInt(aspects.length)], 2);
        }
        ItemStack ess = new ItemStack(ConfigItems.itemWispEssence);
        ((ItemWispEssence)ess.getItem()).setAspects(ess, aspect);
        dropItem(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, ess);
        mana -= cost;
        sync();
    }
}
 
Example #3
Source File: FMEventHandler.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 6 votes vote down vote up
@SubscribeEvent
public void onCrafting(ItemCraftedEvent event) {
    if(event.crafting.getItem() == ForbiddenItems.primewell) {
        for(int x = 0; x < 9; ++x) {
            ItemStack item = event.craftMatrix.getStackInSlot(x);
            if(item != null && item.getItem() == ConfigItems.itemEldritchObject) {
                ++item.stackSize;
                event.craftMatrix.setInventorySlotContents(x, item);
            }
        }
    }
    if(Compat.bm && event.crafting.getItem() == ForbiddenItems.bloodOrb){
        EntityItem ent = event.player.entityDropItem(new ItemStack(ConfigItems.itemEldritchObject, 1, 3), 0);
        ent.motionY += randy.nextFloat() * 0.05F;
        ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
        ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
    }
}
 
Example #4
Source File: ItemBlockRemoteJar.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
    boolean placed = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
    if (placed && stack.hasTagCompound()) {
        TileRemoteJar tile = (TileRemoteJar) world.getTileEntity(x, y, z);

        AspectList aspects = ((ItemJarFilled) ConfigItems.itemJarFilled).getAspects(stack);
        if(aspects != null) {
            tile.aspect = aspects.getAspects()[0];
            tile.amount = aspects.getAmount(tile.aspect);
        }

        if(!world.isRemote) {
            tile.networkId = NBTHelper.getUUID(stack.getTagCompound(), "networkId");
            tile.markForUpdate();
        }
    }
    return placed;
}
 
Example #5
Source File: BlockRemoteJar.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
    ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);

    for(ItemStack drop : drops) {
        if(drop.getItem() == ConfigItems.itemJarFilled || drop.getItem() == Item.getItemFromBlock(this)) {
            drop.func_150996_a(Item.getItemFromBlock(this));

            TileRemoteJar tile = getJarTile(world, x, y, z);
            if(tile.networkId != null) {
                NBTHelper.setUUID(NBTHelper.getData(drop), "networkId", tile.networkId);
            }
        }
    }
    return drops;
}
 
Example #6
Source File: RenderTileInfusionClaw.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void renderWand(ItemStack wandStack, float ticks) {
    GL11.glRotatef(((ticks/3) / 20.0F) * (180F / (float)Math.PI), 0, 1f, 0);

    renderTopPart();

    if (wandStack != null && wandStack.stackSize > 0) {
        GL11.glPushMatrix();

        ItemWandCasting item = (ItemWandCasting) ConfigItems.itemWandCasting;
        ItemStack wandFocusStack = wandStack.copy();
        item.setFocus(wandFocusStack, new ItemStack(ConfigItems.itemFocusPrimal));

        GL11.glRotatef(180, 1, 0, 0);
        GL11.glScalef(0.5f, 0.5f, 0.5f);
        GL11.glTranslatef(0, MathHelper.sin((ticks / 3) / 10.0F) * 0.08F + 0.08F, 0);

        GL11.glTranslatef(0, -1.4924f, 0);
        if(item.isStaff(wandFocusStack)) {
            GL11.glTranslatef(0, -0.5f, 0);

            STAFF_RENDERER.renderItem(IItemRenderer.ItemRenderType.ENTITY, wandFocusStack);
        } else {
            WAND_RENDERER.renderItem(IItemRenderer.ItemRenderType.ENTITY, wandFocusStack);
        }
        GL11.glPopMatrix();
    }
}
 
Example #7
Source File: BlockRemoteJar.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float these, float are, float variables) {
    ItemStack heldItem = player.getHeldItem();
    if (heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) {
        if(!world.isRemote) {
            BlockStickyJar.handlePhial(world, x, y, z, player, heldItem, (TileJarFillable) world.getTileEntity(x, y, z));
        }
        return true;
    }
    return super.onBlockActivated(world, x, y, z, player, side, these, are, variables);
}
 
Example #8
Source File: BlockKnowledgeBook.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
    ItemStack thaumonomicon = new ItemStack(ConfigItems.itemThaumonomicon);
    ConfigItems.itemThaumonomicon.onItemRightClick(thaumonomicon, world, player);
    /*if(world.isRemote) {
        try {
            player.openGui(Thaumcraft.instance, 12, world, x, y, z);
            Minecraft.getMinecraft().theWorld.playSound(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ, "thaumcraft:page", 0.66F, 1.0F, false);
        } catch (Throwable tr) {
            Gadomancy.log.warn("Error on opening Thaumcraft Thaumonomicon via KnowledgeBook at world " + world.getWorldInfo().getWorldName() + ", x=" + x + ", y=" + y + ", z=" + z);
        }
    }*/
    return true;
}
 
Example #9
Source File: VillagerHereticManager.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 5 votes vote down vote up
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
    if(villager.getProfession() == Config.hereticID) {
        /*recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 20 + random.nextInt(3), 18), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 9)));
        recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 4 + random.nextInt(3), 3), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 4 + random.nextInt(3), 6), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 1)));
        recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemNuggetChicken, 24 + random.nextInt(8), 0), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.book, 4 + random.nextInt(3), 0), new ItemStack(ConfigItems.itemResource, 1, 9)));
        recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemNuggetBeef, 24 + random.nextInt(8), 0), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemShard, 2 + random.nextInt(2), random.nextInt(6))));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemManaBean, 1 + random.nextInt(2), 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemBathSalts, 1, 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemRingRunic, 1, 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemAmuletVis, 1, 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 3 + random.nextInt(6))));
        */
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(2)), new ItemStack(ForbiddenItems.deadlyShards, 3 + random.nextInt(2), 6)));
        if(!Config.noLust)
            recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 2 + random.nextInt(4), 4), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.gluttonyShard, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(3)), new ItemStack(Items.skull, 1, 0)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(4)), new ItemStack(Items.ghast_tear, 1)));
        recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1), new ItemStack(Items.glowstone_dust, 8 + random.nextInt(9))));

        ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36);
        ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron"));
        ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane"));
        ((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000).add(Aspect.AIR, 5000).add(Aspect.ORDER, 5000).add(Aspect.ENTROPY, 5000));
        MerchantRecipe profane = new MerchantRecipe(new ItemStack(Items.emerald, 8 + random.nextInt(5)), new ItemStack(Items.stick), wand);
        profane.func_82783_a(-6);
        recipeList.add(profane);
        MerchantRecipe fire = new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(5)), new ItemStack(Items.diamond, 1), new ItemStack(ConfigItems.itemFocusFire, 1));
        fire.func_82783_a(-6);
        recipeList.add(fire);
    }

}
 
Example #10
Source File: IC2RecipeRegistry.java    From Electro-Magic-Tools with GNU General Public License v3.0 5 votes vote down vote up
private static void registerShapedRecipes() {

        /** Crafting Recipes **/
        ironOmnitool = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.ironOmnitool), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron"));
        diamondChainsaw = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.diamondChainsaw), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE));
        ductTape = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper));
        featherMesh = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 9));
        featherWing = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 7), 'Y', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 8), 'Z', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 11));
        featherWings = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.featherWing), "XX", 'X', new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 12));
        taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 14), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather));

        if (!Loader.isModLoaded("gregtech_addon")) {
            GameRegistry.addShapedRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', new ItemStack(Items.diamond), 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE));
        } else {
            ElectroMagicTools.logger.info(TextHelper.localize("console.EMT.modLoaded.GT"));
        }

        GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE));
        GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));
        GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace));

        /** OreDict Crafting Recipes **/
        for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) {
            cardboard = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i));
        }
        for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) {
            rubberBall = GameRegistry.addShapedRecipe(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 10), "XX", "XX", 'X', OreDictionary.getOres("itemRubber").get(i));
        }

        /** Smelting Recipes **/
        GameRegistry.addSmelting(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
        GameRegistry.addSmelting(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F);
        GameRegistry.addSmelting(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
        GameRegistry.addSmelting(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F);
        GameRegistry.addSmelting(new ItemStack(IC2ItemRegistry.itemEMTItems, 1, 10), new ItemStack(IC2ItemRegistry.itemEMTItems, 2, 8), 0.0F);
    }
 
Example #11
Source File: TileEntityEtherealMacerator.java    From Electro-Magic-Tools with GNU General Public License v3.0 5 votes vote down vote up
public void addBonus() {
    if (this.canSmelt()) {
        if (this.worldObj.rand.nextInt(ConfigHandler.etherealProcessorBonus) == 0) {
            if (this.slots[1] == null) {
                this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6));
            } else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) {
                slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
            }
        }
    }
}
 
Example #12
Source File: ItemBlockRemoteJar.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advancedItemTooltips) {
    if (stack.hasTagCompound()) {
        UUID networkId = NBTHelper.getUUID(stack.getTagCompound(), "networkId");
        if(networkId != null) {
            list.add(String.format(StatCollector.translateToLocal("gadomancy.lore.remotejar"), generateName(networkId)));
        }
    }
    ConfigItems.itemJarFilled.addInformation(stack, player, list, advancedItemTooltips);
}
 
Example #13
Source File: EventHandlerGolem.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SubscribeEvent(priority = EventPriority.LOWEST)
public void on(AttackEntityEvent event) {
    ItemStack heldItem = event.entityPlayer.getHeldItem();
    if(heldItem != null && heldItem.getItem() == ConfigItems.itemGolemBell && event.target instanceof EntityGolemBase
            && !event.target.worldObj.isRemote && !event.target.isDead) {
        event.target.captureDrops = true;
        markedGolems.put((EntityGolemBase) event.target, event.entityPlayer);
    }
}
 
Example #14
Source File: EventHandlerGolem.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SubscribeEvent(priority = EventPriority.LOWEST, receiveCanceled = true)
public void on(EntityJoinWorldEvent event) {
    if(!event.entity.worldObj.isRemote && event.entity instanceof EntityGolemBase) {
        EntityGolemBase golem = (EntityGolemBase) event.entity;
        ExtendedGolemProperties props = (ExtendedGolemProperties) golem.getExtendedProperties(Gadomancy.MODID);
        if(props != null) {
            props.setWrapperIfNeeded();
        }
    }

    if (event.entity instanceof EntityItem) {
        EntityItem item = (EntityItem) event.entity;
        ItemStack stack = item.getEntityItem();

        if (stack.getItem() == ConfigItems.itemGolemPlacer) {
            AdditionalGolemType type = GadomancyApi.getAdditionalGolemType(EnumGolemType.getType(stack.getItemDamage()));
            if (type != null) {
                ItemStack fakePlacer = new ItemStack(type.getPlacerItem());
                fakePlacer.setTagCompound(stack.getTagCompound());
                fakePlacer.setItemDamage(stack.getItemDamage());

                item.setEntityItemStack(fakePlacer);
            }
        }
    }

    if(!event.world.isRemote && event.entity instanceof EntityLivingBase) {
        if(((EntityLivingBase) event.entity).isPotionActive(RegisteredPotions.ACHROMATIC)) {
            ((DataAchromatic) SyncDataHolder.getDataServer("AchromaticData")).handleApplication((EntityLivingBase) event.entity);
        }
    }
}
 
Example #15
Source File: RegisteredItems.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static void registerDefaultStickyJars() {
    registerStickyJar(ConfigItems.itemJarFilled, 0);
    registerStickyJar(ConfigItems.itemJarFilled, 3);

    Item itemBlockJar = Item.getItemFromBlock(ConfigBlocks.blockJar);
    registerStickyJar(itemBlockJar, 0, new ItemStack(itemBlockJar, 1, 0), "JARLABEL");
    registerStickyJar(itemBlockJar, 3, new ItemStack(itemBlockJar, 1, 3), "JARVOID");

    Item itemRemoteJar = Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar);
    registerStickyJar(itemRemoteJar, 0, new ItemStack(itemRemoteJar), SimpleResearchItem.getFullName("REMOTEJAR"));
}
 
Example #16
Source File: RegisteredRecipes.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static List[] createAuraCoreRecipes() {
    List[] recipes = new List[7];
    for(int i = 0; i < 7; i++) {
        AspectList cost = new AspectList();
        switch (i) {
            case 0: cost.add(Aspect.AIR, 84); break;
            case 1: cost.add(Aspect.FIRE, 84); break;
            case 2: cost.add(Aspect.WATER, 84); break;
            case 3: cost.add(Aspect.EARTH, 84); break;
            case 4: cost.add(Aspect.ORDER, 84); break;
            case 5: cost.add(Aspect.ENTROPY, 84); break;
            case 6: cost.add(Aspect.AIR, 14).add(Aspect.FIRE, 14).add(Aspect.WATER, 14)
                    .add(Aspect.EARTH, 14).add(Aspect.ORDER, 14).add(Aspect.ENTROPY, 14);
        }

        ItemWandCasting item = (ItemWandCasting) ConfigItems.itemWandCasting;
        ItemStack wand = new ItemStack(item);
        item.setRod(wand, ConfigItems.WAND_ROD_GREATWOOD);
        item.setCap(wand, ConfigItems.WAND_CAP_GOLD);

        recipes[i] = Arrays.asList(cost, 3, 2, 3,
                Arrays.asList(
                        null, null, null, null, wand, null, null, null, null,
                        null, null, null, null, new ItemStack(ConfigBlocks.blockCrystal, 1, i),
                        new ItemStack(RegisteredItems.itemAuraCore), null, null, null
                ));
    }
    return recipes;
}
 
Example #17
Source File: DeprecationItemPaybacks.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static ItemStack getPhialStack(Aspect aspect, int aspectAmount) {
    ItemEssence phial = (ItemEssence) ConfigItems.itemEssence;
    ItemStack phialStack = new ItemStack(phial, getPhialAmount(aspectAmount), 1);
    if(phialStack.stackSize > 0) {
        phial.setAspects(phialStack, new AspectList().add(aspect, 8));
        return phialStack;
    }
    return null;
}
 
Example #18
Source File: InfusionUpgradeRecipe.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static InfusionUpgradeRecipe[] createRecipes(String research, GolemUpgrade upgrade, int inst, AspectList aspects, ItemStack[] recipe) {
    InfusionUpgradeRecipe[] recipes = new InfusionUpgradeRecipe[EnumGolemType.values().length];

    for(int i = 0; i < EnumGolemType.values().length ; i++) {
        EnumGolemType type = EnumGolemType.values()[i];
        if(type.health > 0) {
            AdditionalGolemType addType = GadomancyApi.getAdditionalGolemType(type);
            Item input = addType == null ? ConfigItems.itemGolemPlacer : addType.getPlacerItem();
            recipes[i] = new InfusionUpgradeRecipe(research, upgrade, inst, aspects, new ItemStack(input, 1, type.ordinal()), recipe);
        }
    }
    return recipes;
}
 
Example #19
Source File: BlockStickyJar.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float these, float are, float variables) {
    TileEntity tile = world.getTileEntity(x, y, z);
    if (tile instanceof TileStickyJar) {
        TileStickyJar tileStickyJar = (TileStickyJar) tile;

        StickyJarInfo info = RegisteredBlocks.getStickyJarInfo(tileStickyJar.getParentBlock(), world.getBlockMetadata(x, y, z));

        ItemStack heldItem = player.getHeldItem();

        if (info.needsPhialHandling() && heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) {
            if(!world.isRemote) {
                handlePhial(world, x, y, z, player, heldItem, tileStickyJar);
            }
            return true;
        }

        boolean handleAspectFilter = info.needsLabelHandling() && heldItem != null && heldItem.getItem() == ConfigItems.itemResource
                && heldItem.getItemDamage() == 13 && tileStickyJar.aspectFilter == null
                && (((IEssentiaContainerItem) heldItem.getItem()).getAspects(heldItem) != null || tileStickyJar.amount != 0);

        ForgeDirection newDir = tileStickyJar.changeDirection(ForgeDirection.getOrientation(side));
        boolean result = ((TileStickyJar) tile).getParentBlock().onBlockActivated(world, x, y, z, player, newDir.ordinal(), these, are, variables);

        if (handleAspectFilter) {
            tileStickyJar.facing = newDir.ordinal();
            tileStickyJar.markDirty();
        }

        return result;
    }
    return false;
}
 
Example #20
Source File: EventHandlerGolem.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true)
public void on(PlaySoundAtEntityEvent event) {
    if(!event.entity.worldObj.isRemote && event.entity instanceof EntityGolemBase
            && event.name.equals("thaumcraft:zap") && event.volume == 0.5F && event.pitch == 1.0F) {
        EntityGolemBase golem = (EntityGolemBase) event.entity;
        if(markedGolems.containsKey(golem)) {
            EntityPlayer player = markedGolems.get(golem);
            markedGolems.remove(golem);

            AdditionalGolemCore core = GadomancyApi.getAdditionalGolemCore(golem);

            boolean movedPlacer = false;
            boolean movedCore = core == null || !player.isSneaking();

            for(EntityItem entityItem : golem.capturedDrops) {
                ItemStack item = entityItem.getEntityItem();

                if(!movedCore && item.getItem() == ConfigItems.itemGolemCore) {
                    entityItem.setEntityItemStack(core.getItem());
                }

                if(!movedPlacer && item.getItem() instanceof ItemGolemPlacer
                        || item.getItem() instanceof ItemAdditionalGolemPlacer) {
                    //move persistent data to item
                    NBTTagCompound persistent = (NBTTagCompound) NBTHelper.getPersistentData(golem).copy();
                    if(player.isSneaking()) {
                        persistent.removeTag("Core");
                    }
                    NBTHelper.getData(item).setTag(Gadomancy.MODID, persistent);
                    event.entity.setDead();
                    entityItem.setEntityItemStack(item);

                    MinecraftForge.EVENT_BUS.post(new GolemDropPlacerEvent(player, entityItem, golem));

                    movedPlacer = true;
                }
                event.entity.worldObj.spawnEntityInWorld(entityItem);
            }
            golem.capturedDrops.clear();
            golem.captureDrops = false;
        }
    }
}
 
Example #21
Source File: ItemExtendedNodeJar.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IIcon getIcon(ItemStack stack, int pass) {
    return ((ItemJarNode) ConfigItems.itemJarNode).icon;
}
 
Example #22
Source File: ItemExtendedNodeJar.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IIcon getIconFromDamage(int dmg) {
    return ((ItemJarNode) ConfigItems.itemJarNode).icon;
}
 
Example #23
Source File: ForbiddenRecipes.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
public static void addRecipes() {
    ForbiddenResearch.recipes.put("TaintShovel", ThaumcraftApi.addInfusionCraftingRecipe("TAINTSHOVEL", new ItemStack(ForbiddenItems.taintShovel), 5, (new AspectList()).add(Aspect.HEAL, 8).add(Aspect.CRYSTAL, 24).add(Aspect.MINE, 12), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 4), ItemApi.getItem("itemShard", 4), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 1) }));
    ForbiddenResearch.recipes.put("TaintPick", ThaumcraftApi.addInfusionCraftingRecipe("TAINTPICK", new ItemStack(ForbiddenItems.taintPickaxe), 1, (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.MINE, 8).add(Aspect.TAINT, 12), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 5), ItemApi.getItem("itemShard", 5), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 0) }));
    ForbiddenResearch.recipes.put("WandRodTainted", ThaumcraftApi.addInfusionCraftingRecipe("ROD_tainted", new ItemStack(ForbiddenItems.wandCore, 1, 0), 5, (new AspectList()).add(Aspect.TAINT, 24).add(Aspect.MAGIC, 12).add(Aspect.ENTROPY, 12), ItemApi.getItem("itemResource", 12), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2)}));
    ForbiddenResearch.recipes.put("TaintTree", ThaumcraftApi.addCrucibleRecipe("TAINTTREE", new ItemStack(ForbiddenBlocks.taintSapling, 1, 0), new ItemStack(Blocks.sapling, 1, 0), (new AspectList()).merge(Aspect.TAINT, 10).add(Aspect.POISON, 4)));
    ForbiddenResearch.recipes.put("TaintPlank", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.taintPlanks, 4, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.taintLog, 1, 0)}));
    GameRegistry.addSmelting(ForbiddenBlocks.taintLog, new ItemStack(ForbiddenItems.taintCoal, 1), 0.15F);
    OreDictionary.registerOre("resourceTaint", new ItemStack(ConfigItems.itemResource, 1, 11));
    OreDictionary.registerOre("resourceTaint", new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
    ForbiddenResearch.recipes.put("TaintStone", ThaumcraftApi.addArcaneCraftingRecipe("TAINTSTONE", new ItemStack(ForbiddenBlocks.taintStone, 9, 0), (new AspectList()).add(Aspect.ENTROPY, 2).add(Aspect.ORDER, 1), new Object[]{"SSS", "SXS", "SSS", Character.valueOf('S'), new ItemStack(Blocks.stone, 1), Character.valueOf('X'), "resourceTaint"}));
    ForbiddenResearch.recipes.put("TaintBrick", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.taintStone, 4, 1), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.taintStone, 1, 0) }));

    ForbiddenResearch.recipes.put("SkullAxe", ThaumcraftApi.addInfusionCraftingRecipe("SKULLAXE", new ItemStack(ForbiddenItems.skullAxe), 1, (new AspectList()).add(DarkAspects.WRATH, 8).add(Aspect.WEAPON, 8).add(DarkAspects.NETHER, 8), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond), new ItemStack(Items.skull, 1, 1) }));
    if(!Config.noLust)
        ForbiddenResearch.recipes.put("SubCollar", ThaumcraftApi.addInfusionCraftingRecipe("SUBCOLLAR", new ItemStack(ForbiddenItems.subCollar), 1, (new AspectList()).add(DarkAspects.LUST, 8).add(Aspect.TRAP, 8).add(DarkAspects.NETHER, 4).add(Aspect.FLESH, 4), new ItemStack(ConfigItems.itemAmuletVis, 1, 1), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(Items.lead, 1), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 2) }));
    if(Config.gluttony == 0) {
        ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Items.cake), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(Items.egg), new ItemStack(Items.milk_bucket), new ItemStack(Items.egg), new ItemStack(ForbiddenItems.gluttonyShard), new ItemStack(ForbiddenItems.gluttonyShard)}));
        ForbiddenResearch.recipes.put("RingFood", ThaumcraftApi.addArcaneCraftingRecipe("RINGFOOD", new ItemStack(ForbiddenItems.ringFood), (new AspectList()).add(Aspect.ENTROPY, 10).add(Aspect.WATER, 20).add(Aspect.EARTH, 20), new Object[]{" D ", "SXS", " S ", Character.valueOf('S'), new ItemStack(ForbiddenItems.gluttonyShard, 1), Character.valueOf('X'), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), Character.valueOf('D'), new ItemStack(Items.diamond)}));
    }
    else if(Config.gluttony == 2){
        ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Items.cake), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenBlocks.starBlock), new ItemStack(ForbiddenBlocks.starBlock), new ItemStack(Items.egg), new ItemStack(ForbiddenItems.gluttonyShard), new ItemStack(ForbiddenItems.gluttonyShard)}));
        ForbiddenResearch.recipes.put("RingFood", ThaumcraftApi.addArcaneCraftingRecipe("RINGFOOD", new ItemStack(ForbiddenItems.ringFood), (new AspectList()).add(Aspect.ENTROPY, 10).add(Aspect.WATER, 20).add(Aspect.EARTH, 20), new Object[]{" D ", "SXS", " S ", Character.valueOf('S'), new ItemStack(ForbiddenItems.gluttonyShard, 1), Character.valueOf('X'), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), Character.valueOf('D'), new ItemStack(ForbiddenBlocks.starBlock)}));
    }
    ForbiddenResearch.recipes.put("FocusBlink", ThaumcraftApi.addInfusionCraftingRecipe("FOCUSBLINK", new ItemStack(ForbiddenItems.blinkFocus), 3, (new AspectList()).add(Aspect.TRAVEL, 25).add(DarkAspects.NETHER, 10).add(DarkAspects.SLOTH, 10).add(Aspect.ENTROPY, 25), new ItemStack(Items.ender_pearl), new ItemStack[]{new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5), new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5), new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5)}));
    ForbiddenResearch.recipes.put("MorphPick", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphPickaxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
    ForbiddenResearch.recipes.put("MorphSword", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphSword), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.WEAPON, 16), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
    ForbiddenResearch.recipes.put("MorphShovel", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphShovel), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
    ForbiddenResearch.recipes.put("MorphAxe", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphAxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
    ForbiddenResearch.recipes.put("WandRodInfernal", ThaumcraftApi.addInfusionCraftingRecipe("ROD_infernal", new ItemStack(ForbiddenItems.wandCore, 1, 1), 5, (new AspectList()).add(DarkAspects.NETHER, 32).add(Aspect.MAGIC, 12).add(DarkAspects.PRIDE, 12), new ItemStack(Items.blaze_rod), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(Blocks.soul_sand), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.quartz), new ItemStack(Items.blaze_powder) }));
    if (Config.wrathCage) {
        ForbiddenResearch.recipes.put("WrathCage", ThaumcraftApi.addInfusionCraftingRecipe("WRATHCAGE", new ItemStack(ForbiddenBlocks.wrathCage, 1, 0), 10, (new AspectList()).add(DarkAspects.WRATH, 32).add(Aspect.MAGIC, 32).add(Aspect.BEAST, 32).add(Aspect.MECHANISM, 16), ItemApi.getBlock("blockCosmeticSolid", 4), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0) }));
        ForbiddenResearch.recipes.put("MobCrystal", ThaumcraftApi.addCrucibleRecipe("WRATHCAGE", new ItemStack(ForbiddenItems.mobCrystal, 1, 0), new ItemStack(Items.diamond, 1), (new AspectList()).merge(Aspect.MIND, 10).merge(Aspect.ENERGY, 10)));
    }

    ForbiddenResearch.recipes.put("Fork", ThaumcraftApi.addInfusionCraftingRecipe("FORK", new ItemStack(ForbiddenItems.fork, 1, 0), 1, (new AspectList()).add(DarkAspects.NETHER, 8).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 8), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.redstone) }));

    if (Config.emeraldTrans)
        ForbiddenResearch.recipes.put("TransEmerald", ThaumcraftApi.addCrucibleRecipe("TRANSEMERALD", new ItemStack(ForbiddenItems.resource, 4, 0), "nuggetEmerald", (new AspectList()).merge(Aspect.CRYSTAL, 2).merge(Aspect.GREED, 2)));
    ForbiddenResearch.recipes.put("BlackFlower", ThaumcraftApi.addCrucibleRecipe("BLACKFLOWER", new ItemStack(ForbiddenBlocks.roseBush, 1, 0), new ItemStack(Blocks.double_plant, 1, 4), (new AspectList()).merge(Aspect.DARKNESS, 8).merge(Aspect.LIFE, 5)));
    ForbiddenResearch.recipes.put("BlackInk", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 2, 1), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.blackFlower, 1, 0)}));

    if(thaumcraft.common.config.Config.researchDifficulty != -1)
        ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1), new Object[] { new ItemStack(ConfigItems.itemInkwell, 1, 32767), "dyeBlack", new ItemStack(ConfigItems.itemShard, 1, 32767), new ItemStack(ConfigItems.itemShard, 1, 32767) }));
    else
        ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1), new Object[] { new ItemStack(ConfigItems.itemInkwell, 1, 32767), "dyeBlack", new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6) }));

    ForbiddenResearch.recipes.put("Primewell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("PRIMEWELL", new ItemStack(ForbiddenItems.primewell, 1, 0), (new AspectList()).add(Aspect.WATER, 50).add(Aspect.EARTH, 50).add(Aspect.FIRE, 50).add(Aspect.AIR, 50).add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50), new Object[] { new ItemStack(Items.feather, 1, 0), new ItemStack(ConfigItems.itemEldritchObject, 1, 3), new ItemStack(Items.glass_bottle, 1, 0) }));

    if(Config.enchanting) {
        if (Config.greedyEnch)
            ForbiddenResearch.recipes.put("Greedy", ThaumcraftApi.addInfusionEnchantmentRecipe("GREEDY", DarkEnchantments.greedy, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.WEAPON, 8).add(Aspect.GREED, 16), new ItemStack[]{new ItemStack(Items.golden_sword), new ItemStack(Items.diamond), new ItemStack(ForbiddenItems.deadlyShards, 1, 6), new ItemStack(ForbiddenItems.deadlyShards, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 14)}));
        ForbiddenResearch.recipes.put("Consuming", ThaumcraftApi.addInfusionEnchantmentRecipe("CONSUMING", DarkEnchantments.consuming, 3, (new AspectList()).add(Aspect.VOID, 8).add(Aspect.TOOL, 8).add(Aspect.HUNGER, 8), new ItemStack[]{new ItemStack(Items.iron_pickaxe), new ItemStack(Items.lava_bucket), ItemApi.getItem("itemResource", 14)}));
        ForbiddenResearch.recipes.put("Wrath", ThaumcraftApi.addInfusionEnchantmentRecipe("WRATH", DarkEnchantments.wrath, 8, (new AspectList()).add(DarkAspects.WRATH, 16).add(Aspect.WEAPON, 16).add(DarkAspects.NETHER, 8), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(Items.diamond_sword, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0)}));
        ForbiddenResearch.recipes.put("Educational", ThaumcraftApi.addInfusionEnchantmentRecipe("EDUCATIONAL", DarkEnchantments.educational, 3, (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 4).add(Aspect.MIND, 8), new ItemStack[]{ItemApi.getItem("itemZombieBrain", 0), new ItemStack(Items.book), ItemApi.getItem("itemResource", 14)}));
        ForbiddenResearch.recipes.put("Corrupting", ThaumcraftApi.addInfusionEnchantmentRecipe("CORRUPTING", DarkEnchantments.corrupting, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.EXCHANGE, 16).add(Aspect.CRYSTAL, 8), new ItemStack[]{new ItemStack(Items.nether_wart), new ItemStack(Blocks.soul_sand), ItemApi.getItem("itemResource", 14)}));

        ForbiddenResearch.recipes.put("Cluster", ThaumcraftApi.addInfusionEnchantmentRecipe("CLUSTER", DarkEnchantments.cluster, 3, (new AspectList()).add(Aspect.FIRE, 4).add(Aspect.METAL, 4).add(Aspect.GREED, 4), new ItemStack[]{ItemApi.getItem("itemPickElemental", 0), ItemApi.getItem("itemResource", 14)}));
        ForbiddenResearch.recipes.put("Impact", ThaumcraftApi.addInfusionEnchantmentRecipe("IMPACT", DarkEnchantments.impact, 4, (new AspectList()).add(Aspect.ENTROPY, 16).add(Aspect.MINE, 16), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ConfigItems.itemShovelElemental, 1, 0)}));
        ForbiddenResearch.recipes.put("Voidtouched", ThaumcraftApi.addInfusionEnchantmentRecipe("VOIDTOUCHED", DarkEnchantments.voidtouched, 8, (new AspectList()).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 16).add(DarkAspects.ENVY, 24).add(Aspect.ELDRITCH, 16), new ItemStack[]{ItemApi.getItem("itemResource", 14), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1)}));
    }

    CraftingManager.getInstance().addRecipe(new ItemStack(Items.emerald, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 0) });
    CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 0), new Object[] { "#", Character.valueOf('#'), new ItemStack(Items.emerald, 1, 0) });
    CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.starBlock, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(Items.nether_star, 1, 0) });
    CraftingManager.getInstance().addRecipe(new ItemStack(Items.nether_star, 9, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.starBlock, 1, 0)});
    ForbiddenResearch.recipes.put("RidingCrop", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.ridingCrop, 1, 0), new Object[]{"X", "#", "#", Character.valueOf('#'), Items.stick, Character.valueOf('X'), Items.leather}));
    ThaumcraftApi.addSmeltingBonus(new ItemStack(Items.emerald), new ItemStack(ForbiddenItems.resource, 0, 0));

    GameRegistry.registerFuelHandler(new IFuelHandler() {
        Random randy = new Random();
        @Override
        public int getBurnTime(ItemStack fuel) {

            if(fuel.getItem() == ForbiddenItems.taintCoal) {
                return 1 + randy.nextInt(2400);
            }
            return 0;
        }
    });

    OreDictionary.registerOre("logWood", new ItemStack(ConfigBlocks.blockMagicalLog, 1, OreDictionary.WILDCARD_VALUE));

}
 
Example #24
Source File: TileInfusionClaw.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void addInstability(ClickBehavior behavior) {
    int instability = 23;
    int maxVis = WAND_ITEM.getMaxVis(wandStack);

    instability += maxVis < 100 ? 3 : -2;

    instability -= Math.floor((maxVis > 300 ? 300 : maxVis) / 300f * 10f);
    instability -= WAND_ITEM.isStaff(wandStack) ? 6 : -1;

    instability += Math.floor((WAND_ITEM.getCap(wandStack).getBaseCostModifier() - 0.4) * 3);

    instability -= WAND_ITEM.getCap(wandStack) == ConfigItems.WAND_CAP_VOID ? 3 : 0;
    instability -= WAND_ITEM.getRod(wandStack) == ConfigItems.STAFF_ROD_PRIMAL ? 6 : 0;

    behavior.addInstability(instability);
}
 
Example #25
Source File: TileNodeManipulator.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
private boolean checkTile(TilePedestal te) {
    ItemStack stack = te.getStackInSlot(0);
    return !(stack == null || stack.getItem() != ConfigItems.itemEldritchObject || stack.getItemDamage() != 0);
}
 
Example #26
Source File: ItemBloodRapier.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@Override
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
    return par2ItemStack.isItemEqual(new ItemStack(ConfigItems.itemResource, 1, 15))?true:super.getIsRepairable(par1ItemStack, par2ItemStack);
}