mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
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:
parent
fa25cbf7b0
commit
1e817c3fa9
3 changed files with 18 additions and 9 deletions
18
build.gradle
18
build.gradle
|
@ -23,9 +23,9 @@ if(hasProperty('buildnumber')){
|
|||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.12-14.21.1.2426"
|
||||
version = "1.12.1-14.22.0.2460"
|
||||
runDir = "run"
|
||||
mappings = "snapshot_20170625"
|
||||
mappings = "snapshot_20170821"
|
||||
replaceIn "ModUtil.java"
|
||||
replace "@VERSION@", project.version.toString()
|
||||
}
|
||||
|
@ -37,14 +37,24 @@ repositories {
|
|||
maven {
|
||||
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 {
|
||||
url "https://dl.bintray.com/cyclopsmc/dev/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "net.darkhax.tesla:Tesla-1.12:1.0.59"
|
||||
deobfCompile "mezz.jei:jei_1.12:4.7.0.68"
|
||||
deobfCompile "mezz.jei:jei_1.12.1:+"
|
||||
deobfCompile "mcp.mobius.waila:Hwyla:+"
|
||||
compile "net.darkhax.tesla:Tesla-1.12:+"
|
||||
deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.12-1.3.3+"
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,10 +18,10 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
|||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public final class CrusherRecipeRegistry{
|
||||
|
@ -31,7 +31,6 @@ public final class CrusherRecipeRegistry{
|
|||
public static void registerFinally(){
|
||||
ArrayList<String> oresNoResult = new ArrayList<String>();
|
||||
int recipeStartedAt = ActuallyAdditionsAPI.CRUSHER_RECIPES.size();
|
||||
final NonNullList<ItemStack> LIST = NonNullList.withSize(1, StackUtil.getNull());
|
||||
|
||||
for(String ore : OreDictionary.getOreNames()){
|
||||
if(!hasException(ore)){
|
||||
|
@ -39,8 +38,8 @@ public final class CrusherRecipeRegistry{
|
|||
if(ore.length() > theCase.theCase.length()){
|
||||
if(ore.substring(0, theCase.theCase.length()).equals(theCase.theCase)){
|
||||
String output = theCase.resultPreString+ore.substring(theCase.theCase.length());
|
||||
|
||||
if(!ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres(ore, false), OreDictionary.getOres(output, false), theCase.resultAmount, LIST, 0, 0)){
|
||||
List<ItemStack> outputs = OreDictionary.getOres(output, false);
|
||||
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)){
|
||||
oresNoResult.add(ore);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue