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);
}
}
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));
}
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));
}
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;
}
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);
}
}
}
Aggregations