Skip to content

Commit

Permalink
Update JEI and Zeta
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Sep 7, 2024
1 parent fe1dc53 commit 3612d5d
Show file tree
Hide file tree
Showing 44 changed files with 85 additions and 90 deletions.
28 changes: 24 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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")
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions dependencies.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockEntityType<? extends ChestBlockEntity>> supplier, Properties props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockEntityType<? extends ChestBlockEntity>> supplier, Properties props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 3612d5d

Please sign in to comment.