Search in sources :

Example 1 with Material

use of slimeknights.tconstruct.library.materials.Material in project BaseMetals by MinecraftModDevelopmentMods.

the class TinkersConstructRegistry method integrationsInit.

/**
 * @param forMod
 */
public void integrationsInit(@Nonnull final String forMod) {
    final String curMod = forMod;
    for (final Entry<String, TCMaterial> entry : registry.get(curMod).entrySet()) {
        final TCMaterial work = entry.getValue();
        final MMDMaterial curMMDMat = work.getMMDMaterial();
        final Material curMat = work.getMaterial();
        final Item rI = curMMDMat.getItem(Names.INGOT);
        curMat.addItem(rI, 1, 144);
        curMat.setRepresentativeItem(rI);
        curMat.addCommonItems(curMMDMat.getCapitalizedName());
        addTraits(work);
    }
}
Also used : Item(net.minecraft.item.Item) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) Material(slimeknights.tconstruct.library.materials.Material)

Example 2 with Material

use of slimeknights.tconstruct.library.materials.Material in project EnderIO by SleepyTrousers.

the class Metal method createFluid.

public static void createFluid(@Nonnull final Alloy alloy) {
    TicMaterials.setFluid(alloy, new Fluid(alloy.getFluidName(), TEX_FLOWING, TEX_STILL) {

        @Override
        public int getColor() {
            return 0xFF000000 | alloy.getColor();
        }
    }.setDensity(9000).setLuminosity(6).setTemperature(alloy.getMeltingPoint() + 273).setViscosity(3000));
    FluidRegistry.registerFluid(TicMaterials.getFluid(alloy));
    FluidRegistry.addBucketForFluid(TicMaterials.getFluid(alloy));
    TicMaterials.setMaterial(alloy, new Material(alloy.getBaseName(), alloy.getColor()));
    TicMaterials.getMaterial(alloy).addCommonItems(alloy.getOreName());
    TinkerRegistry.integrate(new MaterialIntegration(TicMaterials.getMaterial(alloy), TicMaterials.getFluid(alloy), alloy.getOreName()) {

        @Override
        public void registerFluidBlock(IForgeRegistry<Block> registry) {
        }
    }.toolforge()).preInit();
    TicMaterials.getData(alloy).stats(TicMaterials.getMaterial(alloy));
}
Also used : Fluid(net.minecraftforge.fluids.Fluid) MaterialIntegration(slimeknights.tconstruct.library.MaterialIntegration) Block(net.minecraft.block.Block) Material(slimeknights.tconstruct.library.materials.Material)

Example 3 with Material

use of slimeknights.tconstruct.library.materials.Material in project EnderIO by SleepyTrousers.

the class TicModifiers method register.

public static void register() {
    Material material = TinkerRegistry.getMaterial(Alloy.VIBRANT_ALLOY.getBaseName());
    ItemStack itemstackWithMaterial = TinkerTools.largePlate.getItemstackWithMaterial(material);
    TraitPickup.instance.addRecipeMatch(new RecipeMatch.ItemCombination(1, itemstackWithMaterial));
}
Also used : Material(slimeknights.tconstruct.library.materials.Material) ItemStack(net.minecraft.item.ItemStack) RecipeMatch(slimeknights.mantle.util.RecipeMatch)

Example 4 with Material

use of slimeknights.tconstruct.library.materials.Material in project BaseMetals by MinecraftModDevelopmentMods.

the class TCMaterial method getMaterial.

/**
 * @return
 */
public Material getMaterial() {
    if (this.tinkersMaterial == null) {
        final String posName = this.material != null ? this.material.getName() : "i_is_b0rken";
        final String workingName = this.name != null ? this.name : posName;
        final int posCol = this.material != null ? this.material.getTintColor() : 0xFFFFFFFF;
        final int color = this.tintColor != 0 ? this.tintColor : posCol;
        this.tinkersMaterial = new Material(workingName, color, false);
        if (this.name == null) {
            this.name = workingName;
        }
    }
    return this.tinkersMaterial;
}
Also used : MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) Material(slimeknights.tconstruct.library.materials.Material)

Example 5 with Material

use of slimeknights.tconstruct.library.materials.Material in project BaseMetals by MinecraftModDevelopmentMods.

the class TinkersConstructRegistry method addMaterialStats.

/**
 */
public void addMaterialStats() {
    final String curMod = Loader.instance().activeModContainer().getModId();
    for (final Entry<String, TCMaterial> entry : registry.get(curMod).entrySet()) {
        // be double sure!
        entry.getValue().settle();
        final HeadMaterialStats headStats = entry.getValue().getHeadStats();
        final HandleMaterialStats handleStats = entry.getValue().getHandleStats();
        final ExtraMaterialStats extraStats = entry.getValue().getExtraStats();
        final BowMaterialStats bowStats = entry.getValue().getBowStats();
        final ArrowShaftMaterialStats arrowStats = entry.getValue().getArrowStats();
        final FletchingMaterialStats fletchingStats = entry.getValue().getFletchingStats();
        if (TinkerRegistry.getMaterial(entry.getKey()) == entry.getValue().getMaterial()) {
            // the material was properly registered
            final Material work = entry.getValue().getMaterial();
            TinkerRegistry.addMaterialStats(work, headStats, handleStats, extraStats);
            TinkerRegistry.addMaterialStats(work, bowStats);
            TinkerRegistry.addMaterialStats(work, arrowStats);
            TinkerRegistry.addMaterialStats(work, fletchingStats);
        }
    }
}
Also used : BowMaterialStats(slimeknights.tconstruct.library.materials.BowMaterialStats) FletchingMaterialStats(slimeknights.tconstruct.library.materials.FletchingMaterialStats) HandleMaterialStats(slimeknights.tconstruct.library.materials.HandleMaterialStats) HeadMaterialStats(slimeknights.tconstruct.library.materials.HeadMaterialStats) ExtraMaterialStats(slimeknights.tconstruct.library.materials.ExtraMaterialStats) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) Material(slimeknights.tconstruct.library.materials.Material) ArrowShaftMaterialStats(slimeknights.tconstruct.library.materials.ArrowShaftMaterialStats)

Aggregations

Material (slimeknights.tconstruct.library.materials.Material)6 MMDMaterial (com.mcmoddev.lib.material.MMDMaterial)3 MaterialIntegration (slimeknights.tconstruct.library.MaterialIntegration)2 Block (net.minecraft.block.Block)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1 Fluid (net.minecraftforge.fluids.Fluid)1 IForgeRegistry (net.minecraftforge.registries.IForgeRegistry)1 RecipeMatch (slimeknights.mantle.util.RecipeMatch)1 ArrowShaftMaterialStats (slimeknights.tconstruct.library.materials.ArrowShaftMaterialStats)1 BowMaterialStats (slimeknights.tconstruct.library.materials.BowMaterialStats)1 ExtraMaterialStats (slimeknights.tconstruct.library.materials.ExtraMaterialStats)1 FletchingMaterialStats (slimeknights.tconstruct.library.materials.FletchingMaterialStats)1 HandleMaterialStats (slimeknights.tconstruct.library.materials.HandleMaterialStats)1 HeadMaterialStats (slimeknights.tconstruct.library.materials.HeadMaterialStats)1