diff --git a/build.gradle b/build.gradle index 1dcc7087a7..ad66386245 100644 --- a/build.gradle +++ b/build.gradle @@ -85,6 +85,10 @@ repositories { // for Zeta name "blamejared" url "https://maven.blamejared.com" + content { + includeGroup("org.violetmoon.zeta") + includeGroup("mezz.jei") + } } maven { name "TerraformersMC" @@ -102,12 +106,24 @@ repositories { } maven { // Curios api url = "https://maven.theillusivec4.top/" + content { + includeGroup("top.theillusivec4.curios") + } } maven { name "jitpack" url "https://jitpack.io" } + maven { + // mirrors many mavens, useful as a backup in case one goes down for a bit + name = "ModMaven" + url = "https://modmaven.dev" + content { + includeGroup("org.violetmoon.zeta") + includeGroup("mezz.jei") + } + } } dependencies { @@ -124,13 +140,11 @@ dependencies { //runtimeOnly fg.deobf("dev.emi:emi-forge:${deps.emi}") runtimeOnly fg.deobf("curse.maven:spark-361579:${deps.spark}") - //implementation fg.deobf("org.violetmoon.zeta:Zeta:1.0-24f") - implementation fg.deobf("curse.maven:zeta-968868:5597406") + implementation fg.deobf("org.violetmoon.zeta:Zeta:${deps.zeta}") implementation fg.deobf("com.github.glitchfiend:TerraBlender-forge:${deps.terrablender}") - implementation fg.deobf("curse.maven:jei-238222:${deps.jei}") implementation fg.deobf("curse.maven:flan-forge-493246:${deps.flan}") implementation fg.deobf("curse.maven:lootr-361276:${deps.lootr}") - implementation fg.deobf("curse.maven:just-enough-resources-jer-240630:4689010") + runtimeOnly fg.deobf("curse.maven:just-enough-resources-jer-240630:4689010") runtimeOnly fg.deobf("curse.maven:nofog-296468:4601446") runtimeOnly fg.deobf("curse.maven:woodworks-543610:5292418") @@ -139,6 +153,12 @@ dependencies { runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${deps.curios}") compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${deps.curios}:api") + + // compile against the JEI API but do not include it at runtime + compileOnly fg.deobf("mezz.jei:jei-${config.mc_version}-common-api:${deps.jei}") + compileOnly fg.deobf("mezz.jei:jei-${config.mc_version}-forge-api:${deps.jei}") + // at runtime, use the full JEI jar for Forge + runtimeOnly fg.deobf("mezz.jei:jei-${config.mc_version}-forge:${deps.jei}") } spotless { diff --git a/dependencies.properties b/dependencies.properties index e848e6e457..763d682494 100644 --- a/dependencies.properties +++ b/dependencies.properties @@ -1,6 +1,6 @@ forge=47.1.3 -zeta=1.0-19 -jei=4712868 +zeta=1.0-25.116 +jei=15.17.0.76 terrablender=1.20.1-3.0.0.169 flan=5290172 lootr=4608503 diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java index 5496d119c4..620a78ece1 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/MagnetBlock.java @@ -50,7 +50,7 @@ public MagnetBlock(@Nullable ZetaModule module) { return; setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java index ee31dbc1bf..868b17b90f 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/MatrixEnchantingTableBlock.java @@ -47,7 +47,7 @@ public MatrixEnchantingTableBlock(ZetaModule module) { super(Block.Properties.copy(Blocks.ENCHANTING_TABLE)); this.module = module; - module.zeta.registry.registerBlock(this, "matrix_enchanter", true); + module.zeta().registry.registerBlock(this, "matrix_enchanter", true); if(!MatrixEnchantingModule.automaticallyConvert) setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.ENCHANTING_TABLE, false); diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java index 893d3cde27..19532eb693 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/pipe/BasePipeBlock.java @@ -73,7 +73,7 @@ protected BasePipeBlock(String name, @Nullable ZetaModule module, BlockBehaviou return; setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } public BlockState getDefaultPipeState() { diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/item/BackpackItem.java b/src/main/java/org/violetmoon/quark/addons/oddities/item/BackpackItem.java index 0a71ceeb6f..cd8bfb0fc1 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/item/BackpackItem.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/item/BackpackItem.java @@ -64,7 +64,7 @@ public BackpackItem(@Nullable ZetaModule module) { if (module == null)return; - module.zeta.registry.registerItem(this, "backpack"); + module.zeta().registry.registerItem(this, "backpack"); CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.TOOLS_AND_UTILITIES, this, Items.SADDLE, true); } diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/module/MatrixEnchantingModule.java b/src/main/java/org/violetmoon/quark/addons/oddities/module/MatrixEnchantingModule.java index f7eb944cab..b93940b99f 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/module/MatrixEnchantingModule.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/module/MatrixEnchantingModule.java @@ -38,7 +38,7 @@ import org.violetmoon.zeta.event.play.ZBlock; import org.violetmoon.zeta.event.play.ZItemTooltip; import org.violetmoon.zeta.event.play.entity.player.ZPlayerInteract; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.ItemNBTHelper; @@ -184,7 +184,7 @@ public final void register(ZRegister event) { influenceTrigger = event.getAdvancementModifierRegistry().registerManualTrigger("influence"); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { MutableComponent comp = Component.translatable("quark.jei.hint.matrix_enchanting"); if(allowInfluencing) diff --git a/src/main/java/org/violetmoon/quark/base/client/handler/InventoryButtonHandler.java b/src/main/java/org/violetmoon/quark/base/client/handler/InventoryButtonHandler.java index 190e4aa49c..facc4fe10a 100644 --- a/src/main/java/org/violetmoon/quark/base/client/handler/InventoryButtonHandler.java +++ b/src/main/java/org/violetmoon/quark/base/client/handler/InventoryButtonHandler.java @@ -222,7 +222,7 @@ public int compareTo(@NotNull ButtonProviderHolder o) { } public MiniInventoryButton getButton(AbstractContainerScreen parent, int x, int y) { - MiniInventoryButton b = (module.enabled && (enableCond == null || enableCond.getAsBoolean())) + MiniInventoryButton b = (module.isEnabled() && (enableCond == null || enableCond.getAsBoolean())) ? provider.provide(parent, x, y) : null; if(b != null) diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java index b1a6cb2b38..fada696cc4 100755 --- a/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/ChuteBlock.java @@ -47,7 +47,7 @@ public ChuteBlock(String regname, @Nullable ZetaModule module, Properties proper if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS); } diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java index 5b6c818343..1a8d6edb1f 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/IronRodBlock.java @@ -41,10 +41,10 @@ public IronRodBlock(ZetaModule module) { .noOcclusion() .forceSolidOn()); - module.zeta.registry.registerBlock(this, "iron_rod", true); + module.zeta().registry.registerBlock(this, "iron_rod", true); CreativeTabManager.addToCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS, this); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); this.module = module; } diff --git a/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java b/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java index d76b036985..0dcb06420d 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java +++ b/src/main/java/org/violetmoon/quark/content/automation/block/RedstoneRandomizerBlock.java @@ -56,7 +56,7 @@ public RedstoneRandomizerBlock(String regname, @Nullable ZetaModule module, Prop if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.REDSTONE_BLOCKS, Blocks.COMPARATOR, false); } diff --git a/src/main/java/org/violetmoon/quark/content/automation/module/PistonsMoveTileEntitiesModule.java b/src/main/java/org/violetmoon/quark/content/automation/module/PistonsMoveTileEntitiesModule.java index 6480876116..7c35ef2f57 100644 --- a/src/main/java/org/violetmoon/quark/content/automation/module/PistonsMoveTileEntitiesModule.java +++ b/src/main/java/org/violetmoon/quark/content/automation/module/PistonsMoveTileEntitiesModule.java @@ -33,7 +33,7 @@ import org.violetmoon.zeta.event.load.ZConfigChanged; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.event.play.ZLevelTick; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.piston.ZetaPistonStructureResolver; @@ -90,7 +90,7 @@ public void onWorldTick(ZLevelTick.End event) { delays.clear(); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { MutableComponent comp = Component.translatable("quark.jei.hint.piston_te"); diff --git a/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java index 3d4e34b105..de429741ba 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/GrateBlock.java @@ -63,7 +63,7 @@ public GrateBlock(@Nullable ZetaModule module) { if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.CHAIN, false); } diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java index a29d775283..ed3ca47ce5 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HedgeBlock.java @@ -66,7 +66,7 @@ public HedgeBlock(String regname, @Nullable ZetaModule module, Block fence, Bloc return; CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.NATURAL_BLOCKS, this, leaf, false); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } @Deprecated(forRemoval = true) //for bin compat; requires early registry-name-retrieval of blocks, which isn't composable with other mods etc. diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java index 56f2563527..2f0b39b542 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowLogBlock.java @@ -33,7 +33,7 @@ public HollowLogBlock(String name, Block sourceLog, @Nullable ZetaModule module, if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, sourceLog, false); } diff --git a/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java index de0c755752..f288cd6c30 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/HollowWoodBlock.java @@ -54,7 +54,7 @@ public HollowWoodBlock(String name, Block sourceLog, @Nullable ZetaModule module if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); } @Override diff --git a/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java index b17e62a661..146ae9b1b4 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/LeafCarpetBlock.java @@ -43,7 +43,7 @@ public LeafCarpetBlock(String name, Block base, @Nullable ZetaModule module) { if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT_MIPPED); setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, base, false); } diff --git a/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java index c19d47ffa2..1d25e3fbc3 100755 --- a/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/RopeBlock.java @@ -66,7 +66,7 @@ public RopeBlock(String regname, @Nullable ZetaModule module, Properties propert if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.FUNCTIONAL_BLOCKS, Blocks.CHAIN, true); } diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java index 634fb31d78..53b2fc7418 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantChestBlock.java @@ -37,7 +37,7 @@ public VariantChestBlock(String prefix, String type, ZetaModule module, Supplier return; String resloc = (prefix != null ? prefix + "_" : "") + type + "_chest"; - module.zeta.registry.registerBlock(this, resloc, true); + module.zeta().registry.registerBlock(this, resloc, true); } public VariantChestBlock(String type, ZetaModule module, Supplier> supplier, Properties props) { diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java index 980cc90877..8a2a4d5e6d 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantFurnaceBlock.java @@ -30,7 +30,7 @@ public class VariantFurnaceBlock extends FurnaceBlock implements IZetaBlock { public VariantFurnaceBlock(String type, ZetaModule module, Properties props) { super(props); - module.zeta.registry.registerBlock(this, type + "_furnace", true); + module.zeta().registry.registerBlock(this, type + "_furnace", true); CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.FUNCTIONAL_BLOCKS, this, Blocks.FURNACE, false); this.module = module; diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java index 6b0947ce4f..51bc6df9be 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantLadderBlock.java @@ -35,9 +35,9 @@ public VariantLadderBlock(String type, @Nullable ZetaModule module, Block.Proper if(module == null) //auto registration below this line return; - module.zeta.registry.registerBlock(this, type + "_ladder", true); + module.zeta().registry.registerBlock(this, type + "_ladder", true); CreativeTabManager.addToCreativeTabNextTo(CreativeModeTabs.FUNCTIONAL_BLOCKS, this, Blocks.LADDER, false); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } @Override diff --git a/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java index 0817caeb44..ae82f95f26 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/VariantTrappedChestBlock.java @@ -42,7 +42,7 @@ public VariantTrappedChestBlock(String prefix, String type, @Nullable ZetaModule return; String resloc = (prefix != null ? prefix + "_" : "") + type + "_trapped_chest"; - module.zeta.registry.registerBlock(this, resloc, true); + module.zeta().registry.registerBlock(this, resloc, true); } public VariantTrappedChestBlock(String type, ZetaModule module, Supplier> supplier, Properties props) { diff --git a/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java b/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java index a019a0d2d9..86e3975daa 100644 --- a/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java +++ b/src/main/java/org/violetmoon/quark/content/building/block/WoodPostBlock.java @@ -83,7 +83,7 @@ public WoodPostBlock(@Nullable ZetaModule module, Block parent, String prefix, S if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.BUILDING_BLOCKS, parent, true); } diff --git a/src/main/java/org/violetmoon/quark/content/client/module/CameraModule.java b/src/main/java/org/violetmoon/quark/content/client/module/CameraModule.java index 294746f446..ebb2747088 100644 --- a/src/main/java/org/violetmoon/quark/content/client/module/CameraModule.java +++ b/src/main/java/org/violetmoon/quark/content/client/module/CameraModule.java @@ -400,7 +400,7 @@ private static void refreshShader() { } } else { OverlayShaderModule shaderModule = Quark.ZETA.modules.get(OverlayShaderModule.class); - if(shaderModule != null && shaderModule.enabled) { + if(shaderModule != null && shaderModule.isEnabled()) { for(ResourceLocation l : SHADERS) { if(l != null && l.getPath().contains(shaderModule.shader + ".json")) { render.loadEffect(l); diff --git a/src/main/java/org/violetmoon/quark/content/experimental/config/VariantsConfig.java b/src/main/java/org/violetmoon/quark/content/experimental/config/VariantsConfig.java index 49db0a8961..7698e71ab1 100644 --- a/src/main/java/org/violetmoon/quark/content/experimental/config/VariantsConfig.java +++ b/src/main/java/org/violetmoon/quark/content/experimental/config/VariantsConfig.java @@ -74,7 +74,7 @@ public void onReload(ZetaModule module, ConfigFlagManager flagManager) { manualVariantMap.clear(); sortedSuffixes.clear(); - if(module != null && !module.enabled) + if(module != null && !module.isEnabled()) return; for(String s : variantTypes) diff --git a/src/main/java/org/violetmoon/quark/content/tools/module/BeaconRedirectionModule.java b/src/main/java/org/violetmoon/quark/content/tools/module/BeaconRedirectionModule.java index ff66e751f3..90867867f5 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/module/BeaconRedirectionModule.java +++ b/src/main/java/org/violetmoon/quark/content/tools/module/BeaconRedirectionModule.java @@ -26,10 +26,9 @@ import org.violetmoon.zeta.advancement.ManualTrigger; import org.violetmoon.zeta.config.Config; import org.violetmoon.zeta.event.bus.LoadEvent; -import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZConfigChanged; import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; @@ -66,13 +65,13 @@ public final void configChanged(ZConfigChanged event) { staticEnabled = enabled; } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { final String redirectHint = "beacon_redirect_item"; String type = "amethyst"; if(!Quark.ZETA.modules.isEnabled(CorundumModule.class)) - event.hintItem(zeta, Items.AMETHYST_CLUSTER, redirectHint); + event.hintItem(Items.AMETHYST_CLUSTER, redirectHint); else type = "corundum"; diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/block/WaterPetalBlock.java b/src/main/java/org/violetmoon/quark/content/tweaks/block/WaterPetalBlock.java index 7832b7d16e..55971408db 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/block/WaterPetalBlock.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/block/WaterPetalBlock.java @@ -32,9 +32,9 @@ public WaterPetalBlock(Item base, String regname, @Nullable ZetaModule module, P if(module == null) //auto registration below this line return; - module.zeta.registry.registerBlock(this, regname, false); + module.zeta().registry.registerBlock(this, regname, false); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } @Override diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/CompassesWorkEverywhereModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/CompassesWorkEverywhereModule.java index 740e67a784..73ffccc662 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/CompassesWorkEverywhereModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/CompassesWorkEverywhereModule.java @@ -20,7 +20,7 @@ import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.play.entity.player.ZPlayerTick; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; @@ -42,7 +42,7 @@ public class CompassesWorkEverywhereModule extends ZetaModule { @Hint("clock_nerf") Item clock = Items.CLOCK; - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { if(!enableNether && !enableEnd && !enableCompassNerf) return; diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/DiamondRepairModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/DiamondRepairModule.java index 2a57d367ee..455b9df609 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/DiamondRepairModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/DiamondRepairModule.java @@ -14,7 +14,7 @@ import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZConfigChanged; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.RegistryUtil; @@ -84,7 +84,7 @@ public final void configChanged(ZConfigChanged event) { unrepairableItems = RegistryUtil.massRegistryGet(unrepairableItemsList, BuiltInRegistries.ITEM); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { if(!enableJeiHints) return; diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/EnhancedLaddersModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/EnhancedLaddersModule.java index f37ceb0166..7cc5542838 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/EnhancedLaddersModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/EnhancedLaddersModule.java @@ -3,7 +3,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.player.Input; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; @@ -40,7 +39,7 @@ import org.violetmoon.zeta.event.load.ZConfigChanged; import org.violetmoon.zeta.event.play.entity.player.ZPlayerTick; import org.violetmoon.zeta.event.play.entity.player.ZRightClickBlock; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.RegistryUtil; @@ -80,7 +79,7 @@ public final void configChanged(ZConfigChanged event) { staticEnabled = enabled; } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { if(!allowFreestanding && !allowDroppingDown && !allowSliding && !allowInventorySneak) return; @@ -226,7 +225,7 @@ public void onPlayerTick(ZPlayerTick.Start event) { } protected boolean isScaffolding(BlockState state, LivingEntity entity) { - return zeta.blockExtensions.get(state).isScaffoldingZeta(state, entity.level(), entity.blockPosition(), entity); + return zeta().blockExtensions.get(state).isScaffoldingZeta(state, entity.level(), entity.blockPosition(), entity); } } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java index 3197ad76b8..b544b303e3 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/ChorusVegetationBlock.java @@ -65,7 +65,7 @@ public ChorusVegetationBlock(String regname, @Nullable ZetaModule module, boolea if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, Blocks.CHORUS_PLANT, true); } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java index 581e143873..13f27689eb 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/CorundumClusterBlock.java @@ -70,7 +70,7 @@ public CorundumClusterBlock(CorundumBlock base) { if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); setCreativeTab(CreativeModeTabs.COLORED_BLOCKS); } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java index 4edc617232..42625d7d59 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/GlowShroomRingBlock.java @@ -62,7 +62,7 @@ public GlowShroomRingBlock(@Nullable ZetaModule module) { if(module == null) //auto registration below this line return; - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); CreativeTabManager.addToCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, this); setCreativeTab(CreativeModeTabs.NATURAL_BLOCKS); } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java index 7b972fac95..77944dd7f3 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/HugeGlowShroomBlock.java @@ -37,7 +37,7 @@ public HugeGlowShroomBlock(String name, ZetaModule module, final boolean glowing this.module = module; this.glowing = glowing; - module.zeta.registry.registerBlock(this, name, true); + module.zeta().registry.registerBlock(this, name, true); CreativeTabManager.addToCreativeTab(CreativeModeTabs.NATURAL_BLOCKS, this); } diff --git a/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java b/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java index 7242b3d47b..0c54b50da1 100644 --- a/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java +++ b/src/main/java/org/violetmoon/quark/content/world/block/MonsterBoxBlock.java @@ -39,7 +39,7 @@ public MonsterBoxBlock(@Nullable ZetaModule module) { if(module == null) //auto registration below this line return; setCreativeTab(CreativeModeTabs.SPAWN_EGGS, Blocks.SPAWNER, false); - module.zeta.renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); + module.zeta().renderLayerRegistry.put(this, RenderLayerRegistry.Layer.CUTOUT); } @Override diff --git a/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java b/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java index 5fe4d7362c..541e22a577 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/AncientWoodModule.java @@ -78,7 +78,7 @@ public void setup(ZCommonSetup e) { ComposterBlock.COMPOSTABLES.put(ancient_leaves.asItem(), 0.3F); ComposterBlock.COMPOSTABLES.put(ancient_fruit.asItem(), 0.65F); - zeta.fuel.addFuel(ancient_sapling, 100); + zeta().fuel.addFuel(ancient_sapling, 100); }); } diff --git a/src/main/java/org/violetmoon/quark/content/world/module/BigStoneClustersModule.java b/src/main/java/org/violetmoon/quark/content/world/module/BigStoneClustersModule.java index 8e0b2944ad..1fd09b2576 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/BigStoneClustersModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/BigStoneClustersModule.java @@ -23,7 +23,7 @@ import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.event.load.ZConfigChanged; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.BooleanSuppliers; @@ -92,10 +92,10 @@ public final void setup(ZCommonSetup event) { add(myalite, NewStoneTypesModule.myaliteBlock, () -> NewStoneTypesModule.enabledWithMyalite); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { if(calcite.enabled) - event.hintItem(zeta, Items.CALCITE); + event.hintItem(Items.CALCITE); } private void add(BigStoneClusterConfig config, Block block, BooleanSupplier condition) { diff --git a/src/main/java/org/violetmoon/quark/content/world/module/BlossomTreesModule.java b/src/main/java/org/violetmoon/quark/content/world/module/BlossomTreesModule.java index 3752c408b2..e607d427b9 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/BlossomTreesModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/BlossomTreesModule.java @@ -24,7 +24,7 @@ import org.violetmoon.zeta.event.bus.PlayEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.world.PassthroughTreeGrower; @@ -93,7 +93,7 @@ private BlossomTree make(ZRegister event, String regname, MapColor color, Blosso tree.grower = new PassthroughTreeGrower(configuredFeatureKey); tree.sapling = new ZetaSaplingBlock(regname, this, tree.grower); - event.getVariantRegistry().addFlowerPot(tree.sapling, zeta.registry.getRegistryName(tree.sapling, BuiltInRegistries.BLOCK).getPath(), Functions.identity()); //sure + event.getVariantRegistry().addFlowerPot(tree.sapling, zeta().registry.getRegistryName(tree.sapling, BuiltInRegistries.BLOCK).getPath(), Functions.identity()); //sure return tree; } @@ -107,15 +107,15 @@ public void setup(ZCommonSetup e) { ComposterBlock.COMPOSTABLES.put(tree.leaves.asItem(), 0.3F); ComposterBlock.COMPOSTABLES.put(tree.sapling.asItem(), 0.3F); - zeta.fuel.addFuel(tree.sapling, 100); + zeta().fuel.addFuel(tree.sapling, 100); } }); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { for(BlossomTree tree : blossomTrees) - event.hintItem(zeta, tree.sapling); + event.hintItem(tree.sapling); } private static ResourceKey> registerKey(String name) { diff --git a/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java b/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java index 4cdf002415..f4bac2938a 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/CorundumModule.java @@ -20,7 +20,7 @@ import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.event.load.ZConfigChanged; import org.violetmoon.zeta.event.load.ZRegister; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; @@ -113,7 +113,7 @@ public final void setup(ZCommonSetup event) { ); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { MutableComponent comp = Component.translatable("quark.jei.hint.corundum_cluster_grow"); diff --git a/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java b/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java index 33aac82e41..c3489d9d54 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/SpiralSpiresModule.java @@ -34,7 +34,7 @@ import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.event.load.ZRegister; import org.violetmoon.zeta.event.play.entity.ZEntityTeleport; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; +import org.violetmoon.zeta.event.load.ZGatherHints; import org.violetmoon.zeta.module.ZetaLoadModule; import org.violetmoon.zeta.module.ZetaModule; import org.violetmoon.zeta.util.Hint; @@ -93,7 +93,7 @@ public final void setup(ZCommonSetup event) { WorldGenHandler.addGenerator(this, new SpiralSpireGenerator(dimensions), Decoration.SURFACE_STRUCTURES, QuarkWorldGenWeights.SPIRAL_SPIRES); } - @PlayEvent + @LoadEvent public void addAdditionalHints(ZGatherHints event) { MutableComponent comp = Component.translatable("quark.jei.hint.myalite_crystal_get"); diff --git a/src/main/java/org/violetmoon/quark/integration/jei/InfluenceCategory.java b/src/main/java/org/violetmoon/quark/integration/jei/InfluenceCategory.java index 9c12e386cd..d8be5a322c 100644 --- a/src/main/java/org/violetmoon/quark/integration/jei/InfluenceCategory.java +++ b/src/main/java/org/violetmoon/quark/integration/jei/InfluenceCategory.java @@ -21,8 +21,6 @@ public class InfluenceCategory implements IRecipeCategory { - public static final ResourceLocation UID = new ResourceLocation(Quark.MOD_ID, "influence"); - public static final ResourceLocation TEXTURE = new ResourceLocation(Quark.MOD_ID, "textures/gui/jei_influence.png"); private final IDrawable icon; diff --git a/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java b/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java index 06a0d0358c..1f10605e63 100644 --- a/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java +++ b/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java @@ -4,7 +4,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -15,7 +14,6 @@ import org.violetmoon.quark.addons.oddities.module.MatrixEnchantingModule; import org.violetmoon.quark.addons.oddities.util.Influence; import org.violetmoon.quark.base.Quark; -import org.violetmoon.quark.base.QuarkClient; import org.violetmoon.quark.content.building.module.VariantFurnacesModule; import org.violetmoon.quark.content.tools.item.AncientTomeItem; import org.violetmoon.quark.content.tools.module.AncientTomesModule; @@ -23,17 +21,10 @@ import org.violetmoon.quark.content.tweaks.module.DiamondRepairModule; import org.violetmoon.quark.content.tweaks.recipe.ElytraDuplicationRecipe; import org.violetmoon.quark.content.tweaks.recipe.SlabToBlockRecipe; -import org.violetmoon.zeta.config.ZetaGeneralConfig; -import org.violetmoon.zeta.event.play.loading.ZGatherHints; -import org.violetmoon.zeta.module.IDisableable; -import org.violetmoon.zeta.util.RegistryUtil; - -import com.google.common.collect.Sets; import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; import mezz.jei.api.constants.RecipeTypes; -import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.gui.handlers.IGuiContainerHandler; import mezz.jei.api.recipe.IRecipeManager; import mezz.jei.api.recipe.RecipeType; @@ -46,27 +37,15 @@ import mezz.jei.api.registration.IRecipeTransferRegistration; import mezz.jei.api.registration.ISubtypeRegistration; import mezz.jei.api.registration.IVanillaCategoryExtensionRegistration; -import mezz.jei.api.runtime.IJeiRuntime; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Rect2i; -import net.minecraft.core.NonNullList; -import net.minecraft.core.RegistryAccess; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.EnchantedBookItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraft.world.item.PotionItem; -import net.minecraft.world.item.TippedArrowItem; -import net.minecraft.world.item.alchemy.Potion; -import net.minecraft.world.item.alchemy.PotionUtils; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentInstance; -import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; diff --git a/src/main/java/org/violetmoon/quark/integration/terrablender/AbstractUndergroundBiomeHandler.java b/src/main/java/org/violetmoon/quark/integration/terrablender/AbstractUndergroundBiomeHandler.java index a472a77d23..3a1eb09385 100644 --- a/src/main/java/org/violetmoon/quark/integration/terrablender/AbstractUndergroundBiomeHandler.java +++ b/src/main/java/org/violetmoon/quark/integration/terrablender/AbstractUndergroundBiomeHandler.java @@ -29,7 +29,7 @@ public void registerUndergroundBiome(UndergroundBiomeDesc desc) { protected void addUndergroundBiomesTo(Consumer>> consumer) { for(UndergroundBiomeDesc desc : undergroundBiomeDescs) - if(desc.module().enabled) + if(desc.module().isEnabled()) consumer.accept(Pair.of(desc.climateParameterPoint(), desc.resourceKey())); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 1594f602db..5e1eb4b4e7 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -20,7 +20,7 @@ description='''Small things, improving Minecraft bit by bit.''' [[dependencies.quark]] modId="zeta" mandatory=true - versionRange="[1.0-20,2.0)" + versionRange="[1.0-25,2.0)" ordering="AFTER" side="BOTH"