add a Towelette plugin to blacklist our fluids, fixes the game not loading

This commit is contained in:
modmuss50 2019-08-13 16:24:24 +01:00
parent 75d9bccd6a
commit eca7aaa34f
9 changed files with 50 additions and 9 deletions

View file

@ -57,6 +57,9 @@ repositories {
name = 'curseforge' name = 'curseforge'
url = 'https://minecraft.curseforge.com/api/maven' url = 'https://minecraft.curseforge.com/api/maven'
} }
maven {
url 'https://jitpack.io'
}
} }
version = "3.0.5" version = "3.0.5"
@ -109,6 +112,10 @@ dependencies {
compile 'org.checkerframework:checker-qual:2.10.0' compile 'org.checkerframework:checker-qual:2.10.0'
compileOnly "com.google.code.findbugs:jsr305:+" compileOnly "com.google.code.findbugs:jsr305:+"
modCompile ('com.github.Virtuoel:Towelette:519538e54b') {
transitive = false
}
} }
processResources { processResources {

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.rei; package techreborn.compat.rei;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import me.shedaniel.rei.api.*; import me.shedaniel.rei.api.*;

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.rei; package techreborn.compat.rei;
import me.shedaniel.rei.api.RecipeDisplay; import me.shedaniel.rei.api.RecipeDisplay;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.rei; package techreborn.compat.rei;
import me.shedaniel.rei.api.REIPluginEntry; import me.shedaniel.rei.api.REIPluginEntry;
import me.shedaniel.rei.api.RecipeDisplay; import me.shedaniel.rei.api.RecipeDisplay;
@ -39,8 +39,8 @@ import techreborn.api.recipe.recipes.*;
import techreborn.init.ModRecipes; import techreborn.init.ModRecipes;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.init.TRContent.Machine; import techreborn.init.TRContent.Machine;
import techreborn.rei.rollingmachine.RollingMachineCategory; import techreborn.compat.rei.rollingmachine.RollingMachineCategory;
import techreborn.rei.rollingmachine.RollingMachineDisplay; import techreborn.compat.rei.rollingmachine.RollingMachineDisplay;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View file

@ -22,7 +22,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
package techreborn.rei.rollingmachine; package techreborn.compat.rei.rollingmachine;
import me.shedaniel.rei.api.Renderable; import me.shedaniel.rei.api.Renderable;
import me.shedaniel.rei.api.Renderer; import me.shedaniel.rei.api.Renderer;
@ -33,7 +33,7 @@ import net.minecraft.util.Identifier;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.util.StringUtils; import reborncore.common.util.StringUtils;
import techreborn.api.recipe.recipes.RollingMachineRecipe; import techreborn.api.recipe.recipes.RollingMachineRecipe;
import techreborn.rei.ReiPlugin; import techreborn.compat.rei.ReiPlugin;
public class RollingMachineCategory extends DefaultCraftingCategory { public class RollingMachineCategory extends DefaultCraftingCategory {

View file

@ -1,4 +1,4 @@
package techreborn.rei.rollingmachine; package techreborn.compat.rei.rollingmachine;
import me.shedaniel.rei.plugin.DefaultShapedDisplay; import me.shedaniel.rei.plugin.DefaultShapedDisplay;
import net.minecraft.recipe.ShapedRecipe; import net.minecraft.recipe.ShapedRecipe;

View file

@ -0,0 +1,27 @@
package techreborn.compat.towelette;
import net.minecraft.fluid.Fluid;
import net.minecraft.util.Identifier;
import techreborn.init.ModFluids;
import virtuoel.towelette.api.ToweletteApi;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class TowelettePlugin implements ToweletteApi {
private List<Fluid> fluids;
@Override
public boolean isFluidBlacklisted(Fluid fluid, Identifier id) {
if(fluids == null){
fluids = new ArrayList<>();
Arrays.stream(ModFluids.values()).forEach(modFluids -> {
fluids.add(modFluids.getFluid());
fluids.add(modFluids.getFlowingFluid());
});
}
return fluids.contains(fluid);
}
}

View file

@ -107,6 +107,10 @@ public enum ModFluids {
return stillFluid; return stillFluid;
} }
public RebornFluid getFlowingFluid() {
return flowingFluid;
}
public RebornFluidBlock getBlock() { public RebornFluidBlock getBlock() {
return block; return block;
} }

View file

@ -20,7 +20,10 @@
"techreborn.TechRebornClient" "techreborn.TechRebornClient"
], ],
"rei_plugins": [ "rei_plugins": [
"techreborn.rei.ReiPlugin" "techreborn.compat.rei.ReiPlugin"
],
"towelette": [
"techreborn.compat.towelette.TowelettePlugin"
] ]
}, },
"depends": { "depends": {