Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.diffplug.gradle.spotless.BaseKotlinExtension

plugins {
id("maven-publish")
id("dev.architectury.loom") version "1.5-SNAPSHOT" apply false
id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false
// TODO: the preprocessor doesn't yet work with Kotlin 1.9
// https://github.com/ReplayMod/remap/pull/17
kotlin("jvm") version "1.8.22" apply false
Expand Down
15 changes: 9 additions & 6 deletions common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ repositories {
maven("https://maven.theillusivec4.top/")
}

// Mixin
maven("https://repo.spongepowered.org/maven/")
// Cloth Config
maven("https://maven.shedaniel.me/")
// Conditional Mixin
maven("https://jitpack.io")
maven("https://maven.fallenbreath.me/releases")
// Other mods from Modrinth
maven("https://api.modrinth.com/maven")
}
Expand All @@ -186,14 +189,14 @@ dependencies {
modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${props.cloth_version}") {
exclude(group = "net.fabricmc.fabric-api")
}
modCompileOnly("com.github.Fallen-Breath.conditional-mixin:conditional-mixin-common:${props.conditional_mixin_version}")
modCompileOnly("me.fallenbreath:conditional-mixin-common:${props.conditional_mixin_version}")
}
Loader.FABRIC -> {
modLocalRuntime("maven.modrinth:early-loading-screen:${props.early_loading_screen_version}")

modImplementation("net.fabricmc.fabric-api:fabric-api:${props.fabric_api_version}")

include(modImplementation("com.github.Fallen-Breath.conditional-mixin:conditional-mixin-fabric:${props.conditional_mixin_version}")!!)
include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${props.conditional_mixin_version}")!!)

modImplementation("net.fabricmc:fabric-language-kotlin:${props.fabric_kotlin_version}")
modImplementation("com.terraformersmc:modmenu:${props.modmenu_version}")
Expand All @@ -213,13 +216,13 @@ dependencies {
Loader.FORGE -> {
"forge"("net.minecraftforge:forge:${props.forge_version}")

include(modImplementation("com.github.Fallen-Breath.conditional-mixin:conditional-mixin-forge:${props.conditional_mixin_version}")!!)
include(modImplementation("me.fallenbreath:conditional-mixin-forge:${props.conditional_mixin_version}")!!)

implementation("thedarkcolour:kotlinforforge:${props.forge_kotlin_version}")
modImplementation("me.shedaniel.cloth:cloth-config-forge:${props.cloth_version}")

compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5")!!)
implementation(include("io.github.llamalad7:mixinextras-forge:0.3.5")!!)
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1")!!)
implementation(include("io.github.llamalad7:mixinextras-forge:0.4.1")!!)

// other mods we do integration with
// - Curios API
Expand All @@ -228,7 +231,7 @@ dependencies {
Loader.NEOFORGE -> {
"neoForge"("net.neoforged:neoforge:${props.neoforge_version}")

include(modImplementation("com.github.Fallen-Breath.conditional-mixin:conditional-mixin-neoforge:${props.conditional_mixin_version}")!!)
include(modImplementation("me.fallenbreath:conditional-mixin-neoforge:${props.conditional_mixin_version}")!!)

implementation("thedarkcolour:kotlinforforge-neoforge:${props.forge_kotlin_version}")
modImplementation("me.shedaniel.cloth:cloth-config-neoforge:${props.cloth_version}")
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# Mod Properties
mod_id=inventorio
mod_name=Inventorio
mod_authors=RubixDev,LizardOfOz
mod_version=1.10.3
mod_authors=RubixDev,LizardOfOz,Favorlock
mod_version=1.10.4
mod_description=My vision of the Inventory Update. Includes Deep Pockets Enchantment, Tool Belt, Utility Belt and more.
maven_group=de.rubixdev.inventorio
archives_base_name=inventorio
Expand All @@ -27,7 +27,7 @@
# https://mvnrepository.com/artifact/io.github.llamalad7/mixinextras-common
mixinextras_version=0.3.5
# https://github.com/Fallen-Breath/conditional-mixin/tags
conditional_mixin_version=0.6.2
conditional_mixin_version=0.6.4

# Other
run_with_compat_mods=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion versions/1.20.1-forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@

# (Neo)Forge Dependencies
# https://maven.theillusivec4.top/top/theillusivec4/curios/curios-forge/
curios_version=5.7.2+1.20.1
curios_version=5.14.1+1.20.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package de.rubixdev.inventorio.mixin.forge.curios;

import de.rubixdev.inventorio.integration.curios.ICuriosContainer;
import de.rubixdev.inventorio.util.CuriosTester;
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import org.objectweb.asm.Opcodes;
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.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import top.theillusivec4.curios.api.type.capability.ICuriosItemHandler;
import top.theillusivec4.curios.common.network.server.sync.SPacketSyncModifiers;

@Restriction(
require = {
@Condition(value = "curios", versionPredicates = "(,5.11)"),
@Condition(type = Condition.Type.TESTER, tester = CuriosTester.class) }
)
@Mixin(SPacketSyncModifiers.class)
public class SPacketSyncModifiersMixinV1 {
@Inject(
method = "lambda$handle$0(Ltop/theillusivec4/curios/common/network/server/sync/SPacketSyncModifiers;Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/world/entity/Entity;Ltop/theillusivec4/curios/api/type/capability/ICuriosItemHandler;)V",
at = @At(value = "JUMP", opcode = Opcodes.IFEQ, shift = At.Shift.BEFORE, ordinal = 0),
slice = @Slice(
from = @At(
value = "INVOKE",
target = "Lnet/minecraftforge/eventbus/api/IEventBus;post(Lnet/minecraftforge/eventbus/api/Event;)Z"
)
)
)
private static void inventorioResetSlots(
SPacketSyncModifiers data,
LivingEntity livingEntity,
Entity entity,
ICuriosItemHandler handler,
CallbackInfo ci
) {
if (
entity instanceof ClientPlayerEntity player
&& player.currentScreenHandler instanceof ICuriosContainer curiosContainer
) {
curiosContainer.inventorio$resetSlots();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import de.rubixdev.inventorio.util.CuriosTester;
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
Expand All @@ -16,9 +17,13 @@
import top.theillusivec4.curios.api.type.capability.ICuriosItemHandler;
import top.theillusivec4.curios.common.network.server.sync.SPacketSyncModifiers;

@Restriction(require = { @Condition("curios"), @Condition(type = Condition.Type.TESTER, tester = CuriosTester.class) })
@Restriction(
require = {
@Condition(value = "curios", versionPredicates = "[5.11,)"),
@Condition(type = Condition.Type.TESTER, tester = CuriosTester.class) }
)
@Mixin(SPacketSyncModifiers.class)
public class SPacketSyncModifiersMixin {
public class SPacketSyncModifiersMixinV2 {
@Inject(
method = "lambda$handle$0",
at = @At(value = "JUMP", opcode = Opcodes.IFEQ, shift = At.Shift.BEFORE, ordinal = 0),
Expand All @@ -33,6 +38,7 @@ private static void inventorioResetSlots(
SPacketSyncModifiers data,
LivingEntity livingEntity,
Entity entity,
MinecraftClient client,
ICuriosItemHandler handler,
CallbackInfo ci
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"curios.InventorioScreenMixin_alternative",
"curios.SPacketScrollMixin",
"curios.SPacketSyncCuriosMixin",
"curios.SPacketSyncModifiersMixin"
"curios.SPacketSyncModifiersMixinV1",
"curios.SPacketSyncModifiersMixinV2"
],
"injectors": {
"defaultRequire": 1
Expand Down