gregtech.api.enums.OrePrefixes Java Examples

The following examples show how to use gregtech.api.enums.OrePrefixes. 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: BW_MetaGenerated_Items.java    From bartworks with MIT License 6 votes vote down vote up
@Override
    @SuppressWarnings("unchecked")
    protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
//        String tooltip = GT_LanguageManager.getTranslation(this.getUnlocalizedName(aStack) + ".tooltip");
//        if (!tooltip.isEmpty())
//            aList.add(tooltip);
        if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure) {
            aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.purify"));
        }
        if (this.orePrefixes == OrePrefixes.crushed)
            aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.purify.2"));

        if (aStack != null && aStack.getItem() instanceof BW_MetaGenerated_Items && aStack.getItemDamage() == WerkstoffLoader.Tiberium.getmID())
            aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.nqgen"));

        aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks");
    }
 
Example #2
Source File: PrefixTextureLinker.java    From bartworks with MIT License 6 votes vote down vote up
private static void fillItemTexMap() {
    Arrays.stream(OrePrefixes.values())
            .filter(prefixes -> prefixes != OrePrefixes.rod
                    && prefixes.mTextureIndex == -1 && Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes) != 0)
            .forEach(prefixes -> {
                HashMap<TextureSet, Textures.ItemIcons.CustomIcon> curr = new HashMap<>();
                Arrays.stream(TextureSet.class.getFields())
                        .filter(field -> field.getName().contains("SET"))
                        .forEach(SET -> {
                            try {
                                curr.put((TextureSet) SET.get(null),
                                        new Textures.ItemIcons.CustomIcon(
                                                "materialicons/" + SET.getName().substring(4) + "/" + prefixes)
                                );
                            } catch (IllegalAccessException e) {
                                e.printStackTrace();
                            }
                        });
                texMap.put(prefixes, curr);
            });
}
 
Example #3
Source File: LuVTierEnhancer.java    From bartworks with MIT License 6 votes vote down vote up
private static void replaceAllRecipes(Collection<ItemStack> LuVMachines, OrePrefixes[] LuVMaterialsGenerated, List<IRecipe> bufferedRecipeList){
    LuVTierEnhancer.replaceOsmiridiumInLuVRecipes();
    LuVMachines.stream().forEach(stack -> {

                Predicate recipeFilter = obj -> obj instanceof GT_Shaped_Recipe && GT_Utility.areStacksEqual(((GT_Shaped_Recipe) obj).getRecipeOutput(), stack, true);

                GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.forEach(
                        recipe -> rewriteAsslineRecipes(stack, LuVMaterialsGenerated, recipe));

                GT_Recipe.GT_Recipe_Map.sMappings.forEach(
                        map -> map.mRecipeList.forEach(
                                recipe -> rewriteMachineRecipes(stack, LuVMaterialsGenerated, recipe)));

                rewriteCraftingRecipes(bufferedRecipeList, LuVMaterialsGenerated, recipeFilter);
            }
    );
}
 
Example #4
Source File: LuVTierEnhancer.java    From bartworks with MIT License 6 votes vote down vote up
private static void rewriteMachineRecipes(ItemStack stack, OrePrefixes[] LuVMaterialsGenerated, GT_Recipe recipe){
        for (OrePrefixes prefixes : LuVMaterialsGenerated) {
            if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) {
                LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
                LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
            }
            if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, stack, false)) {
                LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
                LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
            }
        }
        if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) {
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidOutputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
        }
        if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, stack, false)) {
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidOutputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
        }
}
 
Example #5
Source File: CircuitImprintLoader.java    From bartworks with MIT License 6 votes vote down vote up
private static void makeAndAddCraftingRecipes(NBTTagCompound tag) {
    ItemStack circuit = BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag,0,1);
    Object[] imprintRecipe = {
            " X ",
            "GPG",
            " X ",
            'P', BW_Meta_Items.getNEWCIRCUITS().getStackWithNBT(tag,1,1),
            'G', WerkstoffLoader.Prasiolite.get(OrePrefixes.gemExquisite,1),
            'X', BW_Meta_Items.getNEWCIRCUITS().getStack(3)
    };

    IRecipe bwrecipe = new BWRecipes.BWNBTDependantCraftingRecipe(circuit,imprintRecipe);
    ShapedOreRecipe gtrecipe = BW_Util.createGTCraftingRecipe(circuit, GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.BUFFERED, imprintRecipe);

    //Adds the actual recipe
    recipeWorldCache.add(bwrecipe);
    GameRegistry.addRecipe(bwrecipe);
    //Adds the NEI visual recipe
    recipeWorldCache.add(gtrecipe);
    GameRegistry.addRecipe(gtrecipe);
}
 
Example #6
Source File: CircuitImprintLoader.java    From bartworks with MIT License 6 votes vote down vote up
@SuppressWarnings("deprecation")
private static void replaceComponents(ItemStack[] in, GT_Recipe original, int index) throws ArrayIndexOutOfBoundsException {
    if (original.mInputs[index] != null && in[index] == null) {
        //big wires
        if (BW_Util.checkStackAndPrefix(original.mInputs[index]) && GT_OreDictUnificator.getAssociation(original.mInputs[index]).mPrefix == OrePrefixes.wireGt01) {
            in[index] = GT_OreDictUnificator.get(OrePrefixes.wireGt16, GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial, original.mInputs[index].stackSize);
        //fine wires
        } else if (BW_Util.checkStackAndPrefix(original.mInputs[index]) && GT_OreDictUnificator.getAssociation(original.mInputs[index]).mPrefix == OrePrefixes.wireFine) {
            in[index] = GT_OreDictUnificator.get(OrePrefixes.wireGt04, GT_OreDictUnificator.getAssociation(original.mInputs[index]).mMaterial.mMaterial, original.mInputs[index].stackSize);
        //other components
        } else {
            in[index] = original.mInputs[index].copy();
            in[index].stackSize *= 16;
            if (in[index].stackSize > in[index].getItem().getItemStackLimit() || in[index].stackSize > in[index].getMaxStackSize())
                in[index].stackSize = in[index].getMaxStackSize();
        }
    }
}
 
Example #7
Source File: LuVTierEnhancer.java    From bartworks with MIT License 6 votes vote down vote up
private static void rewriteAsslineRecipes(ItemStack stack, OrePrefixes[] LuVMaterialsGenerated, GT_Recipe.GT_Recipe_AssemblyLine recipe){
    for (OrePrefixes prefixes : LuVMaterialsGenerated) {
        if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) {
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
            LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
        }
        if (LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, stack, false)) {
            LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
            LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes));
        }
    }
    if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) {
        LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
    }
    if (LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, stack, false)) {
        LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid());
    }
}
 
Example #8
Source File: BW_MetaGeneratedBlocks_Casing_TE.java    From bartworks with MIT License 6 votes vote down vote up
@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
    if (SideReference.Side.Client) {
        Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
        if ((aMaterial != null)) {
            TextureSet set = aMaterial.getTexSet();
            GT_RenderedTexture aIconSet = new GT_RenderedTexture(
                    PrefixTextureLinker.texMapBlocks
                            .get(WerkstoffLoader.blockCasing)
                            .getOrDefault(set, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]),
                    aMaterial.getRGBA()
            );
            return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), aIconSet};
        }
    }
    return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])};
}
 
Example #9
Source File: BW_MetaGeneratedBlocks_CasingAdvanced_TE.java    From bartworks with MIT License 6 votes vote down vote up
@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
    if (SideReference.Side.Client) {
        Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
        if ((aMaterial != null)) {
            TextureSet set = aMaterial.getTexSet();
            GT_RenderedTexture aIconSet = new GT_RenderedTexture(
                    PrefixTextureLinker.texMapBlocks
                            .get(WerkstoffLoader.blockCasingAdvanced)
                            .getOrDefault(set, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex]),
                    aMaterial.getRGBA()
            );
            return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), aIconSet};
        }
    }
    return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])};
}
 
Example #10
Source File: EnumUtils.java    From bartworks with MIT License 6 votes vote down vote up
public static OrePrefixes addNewOrePrefix(String enumName, String aRegularLocalName, String aLocalizedMaterialPre, String aLocalizedMaterialPost,
                                          boolean aIsUnificatable, boolean aIsMaterialBased, boolean aIsSelfReferencing,
                                          boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks,
                                          boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable,
                                          boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount,
                                          int aDefaultStackSize, int aTextureindex) {
    return EnumHelper.addEnum(OrePrefixes.class, enumName, new Class<?>[]{
            String.class, String.class, String.class,
            boolean.class, boolean.class, boolean.class,
            boolean.class, boolean.class, boolean.class,
            boolean.class, boolean.class, boolean.class,
            boolean.class, int.class, long.class,
            int.class, int.class
    }, new Object[]{
            aRegularLocalName, aLocalizedMaterialPre, aLocalizedMaterialPost,
            aIsUnificatable, aIsMaterialBased, aIsSelfReferencing,
            aIsContainer, aDontUnificateActively, aIsUsedForBlocks,
            aAllowNormalRecycling, aGenerateDefaultItem, aIsEnchantable,
            aIsUsedForOreProcessing, aMaterialGenerationBits, aMaterialAmount,
            aDefaultStackSize, aTextureindex
    });
}
 
Example #11
Source File: GT_Loader_Wires.java    From NewHorizonsCoreMod with GNU General Public License v3.0 6 votes vote down vote up
private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated)
{
  String displayName = GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName;
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.mName.toLowerCase() + ".01", "1x " + displayName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.mName.toLowerCase() + ".02", "2x " + displayName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.mName.toLowerCase() + ".04", "4x " + displayName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.mName.toLowerCase() + ".08", "8x " + displayName + " Wire", 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.mName.toLowerCase() + ".12", "12x " + displayName + " Wire", 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.mName.toLowerCase() + ".16", "16x " + displayName + " Wire", 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
  if (aInsulatable)
  {
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.mName.toLowerCase() + ".01", "1x " + displayName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L));
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.mName.toLowerCase() + ".02", "2x " + displayName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L));
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.mName.toLowerCase() + ".04", "4x " + displayName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L));
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.mName.toLowerCase() + ".08", "8x " + displayName + " Cable", 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L));
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.mName.toLowerCase() + ".12", "12x " + displayName + " Cable", 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L));
      GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.mName.toLowerCase() + ".16", "16x " + displayName + " Cable", 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false).getStackForm(1L));      }
}
 
Example #12
Source File: GT_Container_RadioHatch.java    From bartworks with MIT License 6 votes vote down vote up
@Override
public boolean isItemValid(ItemStack p_75214_1_) {
    if (BioVatLogicAdder.RadioHatch.getIsSv()
            .keySet()
            .stream()
            .anyMatch(
                    stack -> GT_Utility.areStacksEqual(stack, p_75214_1_,true)
            ))
        return true;

    if (!BW_Util.checkStackAndPrefix(p_75214_1_))
        return false;

    ItemData ass = GT_OreDictUnificator.getAssociation(p_75214_1_);
    return IRadMaterial.class.isAssignableFrom(p_75214_1_.getItem().getClass()) ||
            ass.mPrefix == OrePrefixes.rod ||
            ass.mPrefix == OrePrefixes.stick ||
            ass.mPrefix == OrePrefixes.stickLong;
}
 
Example #13
Source File: BW_MetaGeneratedOreTE.java    From bartworks with MIT License 5 votes vote down vote up
@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
    Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
    if ((aMaterial != null)) {
        GT_RenderedTexture aIconSet = new GT_RenderedTexture(aMaterial.getTexSet().mTextures[OrePrefixes.ore.mTextureIndex], aMaterial.getRGBA());
        return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet};
    }
    return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
}
 
Example #14
Source File: GT5OreSmallHelper.java    From GTNEIOrePlugin with MIT License 5 votes vote down vote up
public GT5OreSmallHelper() {
    checkExtraSupport();
    ItemStack stack;
    Materials material;
    short meta;
    for (GT_Worldgen worldGen : GregTech_API.sWorldgenList)
        if (worldGen.mWorldGenName.startsWith("ore.small.") && worldGen instanceof GT_Worldgen_GT_Ore_SmallPieces) {
            GT_Worldgen_GT_Ore_SmallPieces worldGenSmallPieces = (GT_Worldgen_GT_Ore_SmallPieces)worldGen;
            meta = worldGenSmallPieces.mMeta;
            material = GregTech_API.sGeneratedMaterials[meta];
            mapOreSmallWrapper.put(worldGen.mWorldGenName, new OreSmallWrapper(worldGenSmallPieces));
            if (!mapOreMetaToOreDrops.keySet().contains(meta)) {
                List<ItemStack> stackList = new ArrayList<ItemStack>();
                stack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, material, GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L), 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, material, GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L), 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                stack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L);
                if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
                oreSmallList.add(new ItemStack(GregTech_API.sBlockOres1, 1, meta+16000));
                mapOreMetaToOreDrops.put(meta, stackList);
            }
        }
}
 
Example #15
Source File: BW_MetaGenerated_WerkstoffBlocks.java    From bartworks with MIT License 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public void getSubBlocks(Item aItem, CreativeTabs p_149666_2_, List aList) {
    Werkstoff.werkstoffHashSet.stream()
            .filter(tMaterial -> tMaterial.hasItemType(OrePrefixes.gem) || tMaterial.hasItemType(OrePrefixes.ingot))
            .map(tMaterial -> new ItemStack(aItem, 1, tMaterial.getmID()))
            .forEach(aList::add);
}
 
Example #16
Source File: BW_MetaGenerated_Items.java    From bartworks with MIT License 5 votes vote down vote up
public boolean onEntityItemUpdate(EntityItem aItemEntity) {
    if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure || this.orePrefixes == OrePrefixes.crushed) {
        int aDamage = aItemEntity.getEntityItem().getItemDamage();
        if ((aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) {
            Werkstoff aMaterial = werkstoffHashMap.get((short) aDamage);
            if ((aMaterial != null) && (aMaterial != Werkstoff.default_null_Werkstoff)) {
                int tX = MathHelper.floor_double(aItemEntity.posX);
                int tY = MathHelper.floor_double(aItemEntity.posY);
                int tZ = MathHelper.floor_double(aItemEntity.posZ);
                Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
                byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
                if ((this.orePrefixes == OrePrefixes.dustImpure) || (this.orePrefixes == OrePrefixes.dustPure)) {
                    if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
                        aItemEntity.setEntityItemStack(WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize));
                        aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
                        return true;
                    }
                } else {
                    if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
                        aItemEntity.setEntityItemStack(WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize));
                        aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
 
Example #17
Source File: BW_MetaGenerated_Items.java    From bartworks with MIT License 5 votes vote down vote up
public BW_MetaGenerated_Items(OrePrefixes orePrefixes) {
    super("bwMetaGenerated" + orePrefixes.name(), (short) 32766, (short) 0);
    this.orePrefixes = orePrefixes;
    this.setCreativeTab(BW_MetaGenerated_Items.metaTab);
    for (Werkstoff w : werkstoffHashSet) {
        ItemStack tStack = new ItemStack(this, 1, w.getmID());
        if (!w.hasItemType(this.orePrefixes))
            continue;
        GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", this.getDefaultLocalization(w));
        GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", w.getToolTip());
        GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.getVarName(), tStack);
    }
}
 
Example #18
Source File: GT_Loader_ItemPipes.java    From NewHorizonsCoreMod with GNU General Public License v3.0 5 votes vote down vote up
private static void generateItemPipes(Materials aMaterial, String name, String displayName, int startID, int baseInvSlots){
	GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(aMaterial), 				new GT_MetaPipeEntity_Item(startID,		"GT_Pipe_" + name + "_Tiny", 			"Tiny " 	+ displayName + " Item Pipe", 			0.25F, aMaterial, baseInvSlots / 4, 131072  / baseInvSlots, false).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(aMaterial), 				new GT_MetaPipeEntity_Item(startID + 1, "GT_Pipe_" + name + "_Small", 			"Small "	+ displayName + " Item Pipe",			0.375F,aMaterial, baseInvSlots / 2,	65536   / baseInvSlots, false).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(aMaterial), 			new GT_MetaPipeEntity_Item(startID + 2,	"GT_Pipe_" + name, 									  displayName + " Item Pipe", 			0.50F, aMaterial, baseInvSlots, 	32768   / baseInvSlots, false).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), 				new GT_MetaPipeEntity_Item(startID + 3, "GT_Pipe_" + name + "_Large", 			"Large " 	+ displayName + " Item Pipe", 			0.75F, aMaterial, baseInvSlots * 2, 16384   / baseInvSlots, false).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), 				new GT_MetaPipeEntity_Item(startID + 4, "GT_Pipe_" + name + "_Huge", 			"Huge " 	+ displayName + " Item Pipe", 			0.875F,aMaterial, baseInvSlots * 4,	8192    / baseInvSlots, false).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveTiny.get(aMaterial), 	new GT_MetaPipeEntity_Item(startID + 5, "GT_Pipe_Restrictive_" + name + "_Tiny", "Tiny Restrictive "  + displayName + " Item Pipe", 	0.25F, aMaterial, baseInvSlots / 4, 13107200/ baseInvSlots, true ).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveSmall.get(aMaterial), 	new GT_MetaPipeEntity_Item(startID + 6, "GT_Pipe_Restrictive_" + name + "_Small","Small Restrictive " + displayName + " Item Pipe", 	0.375F,aMaterial, baseInvSlots / 2,	6553600 / baseInvSlots, true ).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(aMaterial), 	new GT_MetaPipeEntity_Item(startID + 7, "GT_Pipe_Restrictive_" + name, 			"Restrictive "       + displayName + " Item Pipe", 	0.50F, aMaterial, baseInvSlots, 	3276800 / baseInvSlots, true ).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(aMaterial), 	new GT_MetaPipeEntity_Item(startID + 8, "GT_Pipe_Restrictive_" + name + "_Large","Large Restrictive " + displayName + " Item Pipe", 	0.75F, aMaterial, baseInvSlots * 2, 1638400 / baseInvSlots, true ).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(aMaterial), 	new GT_MetaPipeEntity_Item(startID + 9, "GT_Pipe_Restrictive_" + name + "_Huge", "Huge Restrictive "  + displayName + " Item Pipe", 	0.875F,aMaterial, baseInvSlots * 4,	819200  / baseInvSlots, true ).getStackForm(1L));
}
 
Example #19
Source File: GT_CustomLoader.java    From NewHorizonsCoreMod with GNU General Public License v3.0 5 votes vote down vote up
AdvancedGTMaterials(Object pCircuit, Object pHeatingCoil, Materials pCable, Object pCoilWire, Object pGem, Object pPowerGem, Object glass, Materials pPlateMaterial, Materials pPipe)
{
    _mCircuit = pCircuit;
    _mHeatingCoil = pHeatingCoil;
    _mCoilWire = pCoilWire;
    _mMachineCable = OrePrefixes.cableGt01.get(pCable);
    _mMachineCable4 = OrePrefixes.cableGt04.get(pCable);
    _mGem = pGem;
    _mPowerGem = pPowerGem;
    _mPlate = OrePrefixes.plate.get(pPlateMaterial);
    _mReinfGlass = glass;
    _mPipe = OrePrefixes.pipeMedium.get(pPipe);
    _mPipeL = OrePrefixes.pipeLarge.get(pPipe);
}
 
Example #20
Source File: LuVTierEnhancer.java    From bartworks with MIT License 5 votes vote down vote up
private static void rewriteCraftingRecipes(List<IRecipe> bufferedRecipeList, OrePrefixes[] LuVMaterialsGenerated, Predicate recipeFilter){
    for (OrePrefixes prefixes : LuVMaterialsGenerated) {

        Consumer recipeAction = obj -> LuVTierEnhancer.doStacksCointainAndReplace(((GT_Shaped_Recipe) obj).getInput(),
                GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true,
                WerkstoffLoader.LuVTierMaterial.get(prefixes));

        CraftingManager.getInstance().getRecipeList().stream().filter(recipeFilter).forEach(recipeAction);
        bufferedRecipeList.stream().filter(recipeFilter).forEach(recipeAction);
    }
}
 
Example #21
Source File: GT_Loader_FluidPipes.java    From NewHorizonsCoreMod with GNU General Public License v3.0 5 votes vote down vote up
private static void generateFluidPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(aMaterial), 	new GT_MetaPipeEntity_Fluid(startID, 		"GT_Pipe_" + name + "_Tiny", 	"Tiny " + displayName + " Fluid Pipe", 	0.25F, 	aMaterial, baseCapacity / 6, 	heatCapacity, gasProof).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(aMaterial), 	new GT_MetaPipeEntity_Fluid(startID + 1, 	"GT_Pipe_" + name + "_Small", 	"Small " + displayName + " Fluid Pipe", 0.375F, aMaterial, baseCapacity / 3, 	heatCapacity, gasProof).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 2, 	"GT_Pipe_" + name, 				displayName + " Fluid Pipe", 			0.5F, 	aMaterial, baseCapacity, 		heatCapacity, gasProof).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), 	new GT_MetaPipeEntity_Fluid(startID + 3, 	"GT_Pipe_" + name + "_Large", 	"Large " + displayName + " Fluid Pipe", 0.75F, 	aMaterial, baseCapacity * 2, 	heatCapacity, gasProof).getStackForm(1L));
    GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), 	new GT_MetaPipeEntity_Fluid(startID + 4, 	"GT_Pipe_" + name + "_Huge", 	"Huge " + displayName + " Fluid Pipe", 	0.875F, 	aMaterial, baseCapacity * 4, 	heatCapacity, gasProof).getStackForm(1L));

}
 
Example #22
Source File: LuVTierEnhancer.java    From bartworks with MIT License 5 votes vote down vote up
public void run() {

        List<IRecipe> bufferedRecipeList = null;

        try {
            bufferedRecipeList = (List<IRecipe>) FieldUtils.getDeclaredField(GT_ModHandler.class, "sBufferRecipeList", true).get(null);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        HashSet<ItemStack> LuVMachines = new HashSet<>();
        LuVMachines.add(ItemRegistry.cal);
        OrePrefixes[] LuVMaterialsGenerated = {dust, ingot, plate, stick, stickLong, rotor, plateDouble, plateDense};

        Arrays.stream(ItemList.values())
                .filter(item -> item.toString().contains("LuV") && item.hasBeenSet())
                    .forEach(item -> LuVMachines.add(item.get(1)));

        if (LoaderReference.dreamcraft) {
            addDreamcraftItemListItems(LuVMachines);
        }

        GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1),
                GT_ModHandler.RecipeBits.BUFFERED |
                         GT_ModHandler.RecipeBits.REVERSIBLE |
                         GT_ModHandler.RecipeBits.NOT_REMOVABLE |
                         GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES,
                new Object[]{
                        "PPP",
                        "PwP",
                        "PPP",
                        'P', WerkstoffLoader.LuVTierMaterial.get(plate)
                });

        replaceAllRecipes(LuVMachines,LuVMaterialsGenerated,bufferedRecipeList);

        AfterLuVTierEnhacement.run();
    }
 
Example #23
Source File: BW_MetaGeneratedBlocks_Casing.java    From bartworks with MIT License 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
    Werkstoff.werkstoffHashSet.stream()
            .filter(pMaterial ->
                    pMaterial != null
                    && (
                            pMaterial.hasItemType(OrePrefixes.plate) && pMaterial.hasItemType(OrePrefixes.screw) && pMaterial.hasItemType(OrePrefixes.plateDouble)
                    )
            )
            .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID()))
            .forEach(aList::add);
}
 
Example #24
Source File: GT_TileEntity_THTR.java    From bartworks with MIT License 5 votes vote down vote up
public static void registerTHR_Recipes(){
    GT_Values.RA.addCentrifugeRecipe(
            Materials.Thorium.getDust(1),GT_Values.NI,GT_Values.NF,GT_Values.NF,
            Materials.Thorium.getDustSmall(2),Materials.Thorium.getDustSmall(1),
            WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),
            WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),Materials.Lutetium.getDustTiny(1),
            new int[]{1600,1500,200,200,50,50},
            10000, BW_Util.getMachineVoltageFromTier(4));
    GT_Values.RA.addAssemblerRecipe(new ItemStack[]{
            GT_OreDictUnificator.get(OrePrefixes.plateDense,Materials.Lead,6),
            GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.TungstenSteel,1)
            },
            Materials.Concrete.getMolten(1296),
            new ItemStack(GregTech_API.sBlockCasings3,1,12),
            40,
            BW_Util.getMachineVoltageFromTier(5)
    );
    GT_Values.RA.addMixerRecipe(WerkstoffLoader.Thorium232.get(OrePrefixes.dust,10),Materials.Uranium235.getDust(1),GT_Utility.getIntegratedCircuit(1),null,null,null,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),400,30);
    GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),40,30);
    ItemStack[] pellets = new ItemStack[6];
    Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,1));
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,24000,30,0);
    GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),Materials.Silicon.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),40,30);
    GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),40,30);
    pellets = new ItemStack[6];
    Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,3));
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,48000,30,0);
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,6),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,8)},null,null,null,null,48000,30,0);
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,7),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,9)},null,null,null,null,48000,30,0);
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,8)},new ItemStack[]{Materials.Lutetium.getDustSmall(2)},null,null,null,null,1200,30,0);
    GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,9)},new ItemStack[]{Materials.Lutetium.getDustSmall(4)},null,null,null,null,1200,30,0);
}
 
Example #25
Source File: OreDictHandler.java    From bartworks with MIT License 5 votes vote down vote up
public static ItemStack getItemStack(String elementName, OrePrefixes prefixes, int amount){
    if (OreDictHandler.cache.get(prefixes+elementName.replaceAll(" ","")) != null){
        Pair<Integer,Short> p = OreDictHandler.cache.get(prefixes+elementName.replaceAll(" ",""));
        return new ItemStack(Item.getItemById(p.getKey()),amount,p.getValue());
    } else if (!OreDictionary.getOres(prefixes+elementName.replaceAll(" ","")).isEmpty()){
        ItemStack tmp = OreDictionary.getOres(prefixes+elementName.replaceAll(" ","")).get(0).copy();
        OreDictHandler.cache.put(prefixes+elementName.replaceAll(" ",""),new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage()));
        tmp.stackSize=amount;
        return tmp;
    }
    return null;
}
 
Example #26
Source File: BW_MetaGenerated_Ores.java    From bartworks with MIT License 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
    for (Werkstoff tMaterial : Werkstoff.werkstoffHashSet) {
        if ((tMaterial != null) && tMaterial.hasItemType(OrePrefixes.ore) && ((tMaterial.getGenerationFeatures().blacklist & 0x8) == 0)) {
            aList.add(new ItemStack(aItem, 1, tMaterial.getmID()));
        }
    }
}
 
Example #27
Source File: BW_MetaGeneratedSmallOreTE.java    From bartworks with MIT License 5 votes vote down vote up
@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
    Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
    if ((aMaterial != null)) {
        GT_RenderedTexture aIconSet = new GT_RenderedTexture(aMaterial.getTexSet().mTextures[OrePrefixes.oreSmall.mTextureIndex], aMaterial.getRGBA());
        return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet};
    }
    return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.oreSmall.mTextureIndex])};
}
 
Example #28
Source File: BW_MetaGenerated_WerkstoffBlock_TE.java    From bartworks with MIT License 5 votes vote down vote up
@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
    if (SideReference.Side.Client) {
        Werkstoff aMaterial = Werkstoff.werkstoffHashMap.get(this.mMetaData);
        if ((aMaterial != null)) {
            TextureSet set = aMaterial.getTexSet();
            GT_RenderedTexture aIconSet = new GT_RenderedTexture(
                    set.mTextures[PrefixTextureLinker.blockTexMap.getOrDefault(set, OrePrefixes.block.mTextureIndex)], aMaterial.getRGBA()
            );
            return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), aIconSet};
        }
    }
    return new ITexture[]{new GT_CopiedBlockTexture(Blocks.iron_block, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex])};
}
 
Example #29
Source File: NEIbartworksConfig.java    From bartworks with MIT License 5 votes vote down vote up
@Optional.Method(modid = "NotEnoughItems")
    @Override
    public void loadConfig() {
        API.hideItem(new ItemStack(ItemRegistry.TAB));
        API.hideItem(new ItemStack(FluidLoader.bioFluidBlock));
        API.hideItem(new ItemStack(ItemRegistry.bw_fake_glasses));
        ItemStack[] prefixesToHide = {
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustTiny, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustSmall, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushed, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedPurified, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.crushedCentrifuged, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.nugget, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemChipped, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawed, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemFlawless, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.gemExquisite, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustImpure, WerkstoffLoader.Bismutite).copy(),
                WerkstoffLoader.getCorrespondingItemStack(OrePrefixes.dustPure, WerkstoffLoader.Bismutite).copy(),
        };
        for (ItemStack stack : prefixesToHide) {
            stack.setItemDamage(Short.MAX_VALUE);
            API.hideItem(stack);
        }
//        for (int i = 0; i < Short.MAX_VALUE; i++) {
//            API.addItemListEntry(new ItemStack(WerkstoffLoader.BWOres,1,i));
//        }
    }
 
Example #30
Source File: BW_MetaGenerated_Blocks.java    From bartworks with MIT License 5 votes vote down vote up
public BW_MetaGenerated_Blocks(Material p_i45386_1_, Class<? extends TileEntity> tileEntity, String blockName, OrePrefixes types) {
    super(p_i45386_1_, tileEntity, blockName);
    this.setHardness(5.0F);
    this.setResistance(5.0F);
    this.setBlockTextureName("stone");
    this.setCreativeTab(metaTab);
    _prefixes = types;
    Werkstoff.werkstoffHashSet.forEach(this::doRegistrationStuff);
}