use of gregtech.api.unification.material.type.DustMaterial in project GregTech by GregTechCE.
the class MetaBlocks method createCompressedBlock.
private static void createCompressedBlock(Material[] materials, int index) {
BlockCompressed block = new BlockCompressed(materials);
block.setRegistryName("compressed_" + index);
for (Material material : materials) {
if (material instanceof DustMaterial)
COMPRESSED.put((DustMaterial) material, block);
}
}
use of gregtech.api.unification.material.type.DustMaterial in project GregTech by GregTechCE.
the class ProcessingDirtyDust method registerOre.
// @Override
public void registerOre(UnificationEntry entry, String modName, SimpleItemStack itemStack) {
if (entry.material instanceof DustMaterial) {
DustMaterial material = (DustMaterial) entry.material;
ItemStack stack = itemStack.asItemStack();
ItemStack dustStack = OreDictUnifier.get(OrePrefix.dust, material);
if (entry.orePrefix == OrePrefix.dustPure && material.separatedOnto != null) {
ItemStack separatedStack = OreDictUnifier.get(OrePrefix.dustSmall, material.separatedOnto);
RecipeMap.ELECTROMAGNETIC_SEPARATOR_RECIPES.recipeBuilder().inputs(stack).outputs(dustStack).chancedOutput(separatedStack, 4000).duration((int) material.separatedOnto.getMass()).EUt(24).buildAndRegister();
}
int byProductIndex;
if (entry.orePrefix == OrePrefix.dustRefined) {
byProductIndex = 2;
} else if (entry.orePrefix == OrePrefix.dustPure) {
byProductIndex = 1;
} else
byProductIndex = 0;
FluidMaterial byproduct = GTUtility.selectItemInList(byProductIndex, material, material.oreByProducts, FluidMaterial.class);
RecipeBuilder builder = RecipeMap.CENTRIFUGE_RECIPES.recipeBuilder().inputs(stack).outputs(dustStack).duration((int) (material.getMass() * 4)).EUt(24);
if (byproduct instanceof DustMaterial) {
builder.outputs(OreDictUnifier.get(OrePrefix.dustTiny, byproduct));
} else {
builder.fluidOutputs(byproduct.getFluid(GTValues.L / 9));
}
builder.buildAndRegister();
}
}
Aggregations