addition of cloth config, removal of fiber
This commit is contained in:
parent
0ab7da3ff0
commit
5d10610a1d
|
@ -16,6 +16,7 @@ repositories {
|
||||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
// for more information about repositories.
|
// for more information about repositories.
|
||||||
|
maven{url "https://maven.shedaniel.me/"}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -28,7 +29,9 @@ dependencies {
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
// Custom API's
|
// Custom API's
|
||||||
implementation "me.zeroeightsix:fiber:${project.fiber_version}"
|
modApi ("me.shedaniel.cloth:cloth-config-fabric:4.11.26") {
|
||||||
|
exclude(group: "net.fabricmc.fabric-api")
|
||||||
|
}
|
||||||
|
|
||||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||||
// You may need to force-disable transitiveness on them.
|
// You may need to force-disable transitiveness on them.
|
||||||
|
|
|
@ -15,4 +15,3 @@ org.gradle.jvmargs=-Xmx1G
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.32.5+1.16
|
fabric_version=0.32.5+1.16
|
||||||
fiber_version =0.23.0-2
|
|
||||||
|
|
|
@ -2,13 +2,19 @@ package me.parsell.glowstonewire;
|
||||||
|
|
||||||
import me.parsell.glowstonewire.core.glowBlocks;
|
import me.parsell.glowstonewire.core.glowBlocks;
|
||||||
import me.parsell.glowstonewire.core.glowItems;
|
import me.parsell.glowstonewire.core.glowItems;
|
||||||
|
import me.shedaniel.autoconfig.AutoConfig;
|
||||||
|
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
|
||||||
public class GlowstoneWire implements ModInitializer {
|
public class GlowstoneWire implements ModInitializer {
|
||||||
public static final String MODID = "glowstonewire";
|
public static final String MODID = "glowstonewire";
|
||||||
|
public static GlowstoneWireConfig CONFIG;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
AutoConfig.register(GlowstoneWireConfig.class, GsonConfigSerializer::new);
|
||||||
|
CONFIG = AutoConfig.getConfigHolder(GlowstoneWireConfig.class).getConfig();
|
||||||
|
|
||||||
glowBlocks.init();
|
glowBlocks.init();
|
||||||
glowItems.init();
|
glowItems.init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package me.parsell.glowstonewire;
|
||||||
|
|
||||||
|
import me.shedaniel.autoconfig.ConfigData;
|
||||||
|
import me.shedaniel.autoconfig.annotation.Config;
|
||||||
|
|
||||||
|
@Config(name = "GlowstoneWire")
|
||||||
|
public class GlowstoneWireConfig implements ConfigData{
|
||||||
|
public boolean addPotionRecipes = true;
|
||||||
|
public boolean replaceGlowstoneDrop = true;
|
||||||
|
public boolean addConversionRecipe = true;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package me.parsell.glowstonewire.core;
|
package me.parsell.glowstonewire.core;
|
||||||
|
|
||||||
import me.parsell.glowstonewire.GlowstoneWire;
|
import me.parsell.glowstonewire.GlowstoneWire;
|
||||||
import me.parsell.glowstonewire.mixin.BrewingRecipeRegistryAccessor;
|
import me.parsell.glowstonewire.mixin.BrewingRecipeRegistryInvoker;
|
||||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
|
@ -20,24 +20,22 @@ public class glowItems {
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Registry.register(Registry.ITEM, new Identifier(GlowstoneWire.MODID, "glowstone_dust"), GLOWSTONE_DUST);
|
Registry.register(Registry.ITEM, new Identifier(GlowstoneWire.MODID, "glowstone_dust"), GLOWSTONE_DUST);
|
||||||
|
|
||||||
// Modded Glowstone Potion Recipes
|
if (GlowstoneWire.CONFIG.addPotionRecipes) {
|
||||||
// TODO: IF "replace" or "both" config is set
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.WATER, GLOWSTONE_DUST, Potions.THICK);
|
||||||
if (true) {
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.LEAPING, GLOWSTONE_DUST, Potions.STRONG_LEAPING);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.WATER, GLOWSTONE_DUST, Potions.THICK);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.SLOWNESS, GLOWSTONE_DUST, Potions.STRONG_SLOWNESS);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.LEAPING, GLOWSTONE_DUST, Potions.STRONG_LEAPING);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.TURTLE_MASTER, GLOWSTONE_DUST, Potions.STRONG_TURTLE_MASTER);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.SLOWNESS, GLOWSTONE_DUST, Potions.STRONG_SLOWNESS);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.SWIFTNESS, GLOWSTONE_DUST, Potions.STRONG_SWIFTNESS);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.TURTLE_MASTER, GLOWSTONE_DUST, Potions.STRONG_TURTLE_MASTER);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.HEALING, GLOWSTONE_DUST, Potions.STRONG_HEALING);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.SWIFTNESS, GLOWSTONE_DUST, Potions.STRONG_SWIFTNESS);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.HARMING, GLOWSTONE_DUST, Potions.STRONG_HARMING);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.HEALING, GLOWSTONE_DUST, Potions.STRONG_HEALING);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.POISON, GLOWSTONE_DUST, Potions.STRONG_POISON);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.HARMING, GLOWSTONE_DUST, Potions.STRONG_HARMING);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.REGENERATION, GLOWSTONE_DUST, Potions.STRONG_REGENERATION);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.POISON, GLOWSTONE_DUST, Potions.STRONG_POISON);
|
BrewingRecipeRegistryInvoker.registerPotionRecipe(Potions.STRENGTH, GLOWSTONE_DUST, Potions.STRONG_STRENGTH);
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.REGENERATION, GLOWSTONE_DUST, Potions.STRONG_REGENERATION);
|
|
||||||
BrewingRecipeRegistryAccessor.registerPotionRecipe(Potions.STRENGTH, GLOWSTONE_DUST, Potions.STRONG_STRENGTH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vanilla Glowstone -> Modded Glowstone
|
// Vanilla Glowstone -> Modded Glowstone
|
||||||
// TODO: IF "convert" or "both" config is set
|
// TODO: IF "convert" or "both" config is set
|
||||||
if(true) {
|
if(GlowstoneWire.CONFIG.addConversionRecipe) {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.recipe.BrewingRecipeRegistry;
|
import net.minecraft.recipe.BrewingRecipeRegistry;
|
||||||
|
|
||||||
@Mixin(BrewingRecipeRegistry.class)
|
@Mixin(BrewingRecipeRegistry.class)
|
||||||
public interface BrewingRecipeRegistryAccessor {
|
public interface BrewingRecipeRegistryInvoker {
|
||||||
@Invoker("registerPotionRecipe")
|
@Invoker("registerPotionRecipe")
|
||||||
public static void registerPotionRecipe(Potion input, Item item, Potion output) {
|
public static void registerPotionRecipe(Potion input, Item item, Potion output) {
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
|
@ -26,6 +26,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"glowstonewire.mixins.json"
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"minVersion": "0.8",
|
||||||
|
"package": "me.parsell.glowstonewire.mixin",
|
||||||
|
"compatibilityLevel": "JAVA_8",
|
||||||
|
"mixins": [
|
||||||
|
],
|
||||||
|
"client": [
|
||||||
|
"BrewingRecipeRegistryInvoker"
|
||||||
|
],
|
||||||
|
"injectors": {
|
||||||
|
"defaultRequire": 1
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue