use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class MithrilProperty method hasEffect.
@Override
public boolean hasEffect(ItemStack stack, EntityPlayer player) {
MMDMaterial mat = Materials.getMaterialByName(MaterialNames.MITHRIL);
boolean rv = (stackIsArmorMaterial(stack, mat) && ((stack.getItem() instanceof IMMDObject) && (((IMMDObject) stack.getItem()).getMMDMaterial() == mat))) && (countArmorPieces(Materials.getMaterialByName(MaterialNames.MITHRIL), player) > 0);
return rv;
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class StarSteelProperty method hasEffect.
@Override
public boolean hasEffect(ItemStack stack, EntityPlayer player) {
MMDMaterial mat = Materials.getMaterialByName(MaterialNames.STARSTEEL);
boolean rv = (stackIsArmorMaterial(stack, mat) && ((stack.getItem() instanceof IMMDObject) && (((IMMDObject) stack.getItem()).getMMDMaterial() == mat))) && (countArmorPieces(Materials.getMaterialByName(MaterialNames.STARSTEEL), player) > 0);
return rv;
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class AdamantineProperty method hasEffect.
@Override
public boolean hasEffect(ItemStack stack, EntityPlayer player) {
MMDMaterial mat = Materials.getMaterialByName(MaterialNames.ADAMANTINE);
boolean rv = (stackIsArmorMaterial(stack, mat) && ((stack.getItem() instanceof IMMDObject) && (((IMMDObject) stack.getItem()).getMMDMaterial() == mat))) && (countArmorPieces(Materials.getMaterialByName(MaterialNames.ADAMANTINE), player) > 0);
return rv;
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class LeadProperty method hasEffect.
@Override
public boolean hasEffect(ItemStack stack, EntityPlayer player) {
MMDMaterial mat = Materials.getMaterialByName(MaterialNames.LEAD);
boolean rv = (stackIsArmorMaterial(stack, mat) && ((stack.getItem() instanceof IMMDObject) && (((IMMDObject) stack.getItem()).getMMDMaterial() == mat))) && (countArmorPieces(Materials.getMaterialByName(MaterialNames.LEAD), player) > 0);
return rv;
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class BMeIC2 method mainInteraction.
/**
* @param event The Event.
*/
@SubscribeEvent
public void mainInteraction(final RegistryEvent.Register<IRecipe> event) {
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
this.registerVanillaRecipes(materialName);
this.addMaceratorRecipes(materialName);
this.addOreWashingPlantRecipes(materialName);
this.addThermalCentrifugeRecipes(materialName);
this.addMetalFormerRecipes(materialName);
this.addCompressorRecipes(materialName);
});
if (Materials.hasMaterial(MaterialNames.DIAMOND)) {
final MMDMaterial diamond = Materials.getMaterialByName(MaterialNames.DIAMOND);
final String oreDictName = diamond.getCapitalizedName();
if (diamond.hasItem(Names.POWDER)) {
this.addMaceratorRecipe(Oredicts.ORE + oreDictName, diamond.getItemStack(Names.POWDER, 2));
}
}
if (Materials.hasMaterial(MaterialNames.EMERALD)) {
final MMDMaterial emerald = Materials.getMaterialByName(MaterialNames.EMERALD);
final String oreDictName = emerald.getCapitalizedName();
if (emerald.hasItem(Names.POWDER)) {
this.addMaceratorRecipe(Oredicts.ORE + oreDictName, emerald.getItemStack(Names.POWDER, 2));
}
}
MinecraftForge.EVENT_BUS.register(this);
}
Aggregations