Fixes #904 finally, probably for the last time

Also deduplicates multiple entries of say 1 iron ore to LITERALLY EVERY
IRON DUST because that was stupid and just clutter.
This commit is contained in:
Shadows_of_Fire 2017-08-24 01:00:33 -04:00
parent fa25cbf7b0
commit 1e817c3fa9
3 changed files with 18 additions and 9 deletions

View file

@ -23,9 +23,9 @@ if(hasProperty('buildnumber')){
} }
minecraft { minecraft {
version = "1.12-14.21.1.2426" version = "1.12.1-14.22.0.2460"
runDir = "run" runDir = "run"
mappings = "snapshot_20170625" mappings = "snapshot_20170821"
replaceIn "ModUtil.java" replaceIn "ModUtil.java"
replace "@VERSION@", project.version.toString() replace "@VERSION@", project.version.toString()
} }
@ -37,14 +37,24 @@ repositories {
maven { maven {
url "http://maven.epoxide.xyz" url "http://maven.epoxide.xyz"
} }
maven {
url "http://maven.amadornes.com/"
}
maven {
url "http://tehnut.info/maven"
}
maven {
url "http://maven.ic2.player.to"
}
maven { maven {
url "https://dl.bintray.com/cyclopsmc/dev/" url "https://dl.bintray.com/cyclopsmc/dev/"
} }
} }
dependencies { dependencies {
compile "net.darkhax.tesla:Tesla-1.12:1.0.59" deobfCompile "mezz.jei:jei_1.12.1:+"
deobfCompile "mezz.jei:jei_1.12:4.7.0.68" deobfCompile "mcp.mobius.waila:Hwyla:+"
compile "net.darkhax.tesla:Tesla-1.12:+"
deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.12-1.3.3+" deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.12-1.3.3+"
} }

View file

@ -126,7 +126,7 @@ public final class ActuallyAdditionsAPI{
* @param outputTwoChance The chance of the second output (0 won't occur at all, 100 will all the time) * @param outputTwoChance The chance of the second output (0 won't occur at all, 100 will all the time)
*/ */
public static void addCrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance){ public static void addCrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputTwoChance){
CRUSHER_RECIPES.add(new CrusherRecipe(input, outputOne, outputTwo == null ? ItemStack.EMPTY : outputTwo, outputTwoChance)); CRUSHER_RECIPES.add(new CrusherRecipe(input, outputOne, outputTwo.isEmpty() ? ItemStack.EMPTY : outputTwo, outputTwoChance));
} }
/** /**

View file

@ -18,10 +18,10 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
public final class CrusherRecipeRegistry{ public final class CrusherRecipeRegistry{
@ -31,7 +31,6 @@ public final class CrusherRecipeRegistry{
public static void registerFinally(){ public static void registerFinally(){
ArrayList<String> oresNoResult = new ArrayList<String>(); ArrayList<String> oresNoResult = new ArrayList<String>();
int recipeStartedAt = ActuallyAdditionsAPI.CRUSHER_RECIPES.size(); int recipeStartedAt = ActuallyAdditionsAPI.CRUSHER_RECIPES.size();
final NonNullList<ItemStack> LIST = NonNullList.withSize(1, StackUtil.getNull());
for(String ore : OreDictionary.getOreNames()){ for(String ore : OreDictionary.getOreNames()){
if(!hasException(ore)){ if(!hasException(ore)){
@ -39,8 +38,8 @@ public final class CrusherRecipeRegistry{
if(ore.length() > theCase.theCase.length()){ if(ore.length() > theCase.theCase.length()){
if(ore.substring(0, theCase.theCase.length()).equals(theCase.theCase)){ if(ore.substring(0, theCase.theCase.length()).equals(theCase.theCase)){
String output = theCase.resultPreString+ore.substring(theCase.theCase.length()); String output = theCase.resultPreString+ore.substring(theCase.theCase.length());
List<ItemStack> outputs = OreDictionary.getOres(output, false);
if(!ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres(ore, false), OreDictionary.getOres(output, false), theCase.resultAmount, LIST, 0, 0)){ if(!ActuallyAdditionsAPI.methodHandler.addCrusherRecipes(OreDictionary.getOres(ore, false), outputs.isEmpty() ? StackUtil.getNull() : outputs.get(0), theCase.resultAmount, StackUtil.getNull(), 0, 0)){
if(!oresNoResult.contains(ore)){ if(!oresNoResult.contains(ore)){
oresNoResult.add(ore); oresNoResult.add(ore);
} }