Made hammer smashing a "crusher" process
This commit is contained in:
parent
50e1c192f8
commit
7d2f3ec6d2
3 changed files with 8 additions and 8 deletions
|
@ -40,7 +40,7 @@ public class ItemHammer extends ItemRI
|
|||
{
|
||||
if (!world.isRemote && world.rand.nextFloat() < 0.04)
|
||||
{
|
||||
Resource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, oreName);
|
||||
Resource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, oreName);
|
||||
|
||||
// TODO: Fix multiple outputs.
|
||||
for (Resource resource : outputs)
|
||||
|
|
|
@ -74,12 +74,8 @@ public class ResourceGenerator
|
|||
OreDictionary.registerOre("dustRefined" + name, ResonantInduction.itemRefinedDust.getStackFromDust(materialName));
|
||||
}
|
||||
|
||||
// Add rubble to crushing recipes
|
||||
// TODO: Change this to CRUSHING when the crusher is finished.
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, "ore" + name, "rubble" + name);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, "ore" + name, "rubble" + name);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, "rubble" + name, "dust" + name, "dust" + name);
|
||||
|
||||
// Add dust to mixer recipes, dummy item because mixer doesn't produce any items.
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER, "dust" + name, "dustRefined" + name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package resonantinduction.mechanical.process;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -113,14 +115,16 @@ public class TileGrinderWheel extends TileMechanical implements IRotatable
|
|||
|
||||
public boolean canGrind(ItemStack itemStack)
|
||||
{
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack) == null ? false : MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack).length > 0;
|
||||
// TODO: We don't have a crusher yet, so our grinder currently crushes ores.
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, itemStack).length > 0 || MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack).length > 0;
|
||||
}
|
||||
|
||||
private boolean doGrind(EntityItem entity)
|
||||
{
|
||||
ItemStack itemStack = entity.getEntityItem();
|
||||
|
||||
Resource[] results = MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack);
|
||||
// TODO: Remove this later on when crusher if complete.
|
||||
Resource[] results = ArrayUtils.addAll(MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, itemStack), MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack));
|
||||
|
||||
for (Resource resource : results)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue