Skip to content

Commit

Permalink
update to 1.19 proper, re-enable lithium compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
gliscowo committed Jun 9, 2022
1 parent 05c6740 commit f22a80d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
id 'io.github.juuxel.loom-quiltflower' version '1.7.1'
}

// TODO fix mc dep in fmj
version = "${project.mod_version}+${project.minecraft_base_version}"
group = project.maven_group

Expand Down Expand Up @@ -51,7 +50,7 @@ dependencies {
modImplementation "io.wispforest:owo-lib:${project.owo_version}"
include "io.wispforest:owo-sentinel:${project.owo_version}"

// modCompileOnly ("maven.modrinth:lithium:${project.lithium_version}")
modCompileOnly ("maven.modrinth:lithium:${project.lithium_version}")

modImplementation 'com.ptsmods:devlogin:1.2.1'
}
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_base_version=1.19
minecraft_version=1.19-pre4
yarn_mappings=1.19-pre4+build.1
loader_version=0.14.6
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.7
# Mod Properties
mod_version=2.0.14
maven_group=wraith
archives_base_name=wraith-alloy-forgery

# Dependencies
fabric_version=0.53.4+1.19
fabric_version=0.55.3+1.19

# https://maven.shedaniel.me/me/shedaniel/RoughlyEnoughItems-fabric/
rei_version=9.0.466
rei_version=9.0.472

# https://www.curseforge.com/minecraft/mc-mods/modmenu/files
modmenu_version=4.0.0-beta.4
modmenu_version=4.0.0

# https://maven.wispforest.io/io/wispforest/owo-lib
owo_version=0.7.3-pre9+1.19
owo_version=0.7.3+1.19

# https://modrinth.com/mod/lithium
lithium_version=mc1.18.2-0.7.9
lithium_version=mc1.19-0.8.0
26 changes: 18 additions & 8 deletions src/main/java/wraith/alloyforgery/mixin/HopperHelperMixin.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
package wraith.alloyforgery.mixin;

//@Mixin(HopperHelper.class)
import me.jellysquid.mods.lithium.common.hopper.HopperHelper;
import net.minecraft.inventory.Inventory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import wraith.alloyforgery.block.ForgeControllerBlockEntity;

@Mixin(HopperHelper.class)
public class HopperHelperMixin {

// @Inject(method = "vanillaGetBlockInventory", at = @At("RETURN"), cancellable = true)
// private static void injectPassthroughInventory(World world, BlockPos pos, CallbackInfoReturnable<Inventory> cir) {
// if (cir.getReturnValue() != null) return;
//
// if (!(world.getBlockEntity(pos.up()) instanceof ForgeControllerBlockEntity forge)) return;
// cir.setReturnValue(forge);
// }
@Inject(method = "vanillaGetBlockInventory", at = @At("RETURN"), cancellable = true)
private static void injectPassthroughInventory(World world, BlockPos pos, CallbackInfoReturnable<Inventory> cir) {
if (cir.getReturnValue() != null) return;

if (!(world.getBlockEntity(pos.up()) instanceof ForgeControllerBlockEntity forge)) return;
cir.setReturnValue(forge);
}

}
1 change: 1 addition & 0 deletions src/main/resources/alloy-forgery.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"mixins": [
"DefaultedRegistryMixin",
"HopperBlockEntityMixin",
"HopperHelperMixin",
"RecipeManagerMixin"
],
"client": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"depends": {
"fabricloader": ">=0.10",
"fabric": "*",
"minecraft": ">=1.19-beta.3",
"minecraft": ">=1.19",
"owo": ">=0.7.2"
},
"suggests": {
Expand Down

0 comments on commit f22a80d

Please sign in to comment.