diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 7ee80b9..0ac65fa 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -36,6 +36,7 @@ object deps { val owo = "io.wispforest:owo-lib:0.7.3+1.19" val create = "com.simibubi:Create:mc1.18.2_v0.4.1+628" val modernDynamics = "curse.maven:modern-dynamics-552758:3875277" + val luggage = "curse.maven:luggage-594709:3870828" object lba { val core = "alexiil.mc.lib:libblockattributes-core:0.10.2" diff --git a/module-compat/luggage/build.gradle.kts b/module-compat/luggage/build.gradle.kts new file mode 100644 index 0000000..2b7908c --- /dev/null +++ b/module-compat/luggage/build.gradle.kts @@ -0,0 +1,4 @@ +dependencies { + modImpl(deps.luggage) + modImpl(deps.fabricApi) +} diff --git a/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/MeganeLuggage.java b/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/MeganeLuggage.java new file mode 100644 index 0000000..cb1d282 --- /dev/null +++ b/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/MeganeLuggage.java @@ -0,0 +1,16 @@ +package lol.bai.megane.module.luggage; + +import com.gizmo.luggage.entity.LuggageEntity; +import lol.bai.megane.api.MeganeModule; +import lol.bai.megane.api.registry.CommonRegistrar; +import lol.bai.megane.module.luggage.provider.LuggageItemProvider; + +@SuppressWarnings("unused") +public class MeganeLuggage implements MeganeModule { + + @Override + public void registerCommon(CommonRegistrar registrar) { + registrar.addItem(LuggageEntity.class, new LuggageItemProvider()); + } + +} diff --git a/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/provider/LuggageItemProvider.java b/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/provider/LuggageItemProvider.java new file mode 100644 index 0000000..6cce2e5 --- /dev/null +++ b/module-compat/luggage/src/main/java/lol/bai/megane/module/luggage/provider/LuggageItemProvider.java @@ -0,0 +1,15 @@ +package lol.bai.megane.module.luggage.provider; + +import com.gizmo.luggage.entity.LuggageEntity; +import lol.bai.megane.api.provider.base.InventoryItemProvider; +import net.minecraft.inventory.Inventory; +import org.jetbrains.annotations.Nullable; + +public class LuggageItemProvider extends InventoryItemProvider { + + @Override + protected @Nullable Inventory getInventory() { + return getObject().getInventory(); + } + +} diff --git a/module-compat/luggage/src/main/resources/fabric.mod.json b/module-compat/luggage/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..13055a9 --- /dev/null +++ b/module-compat/luggage/src/main/resources/fabric.mod.json @@ -0,0 +1,20 @@ +{ + "schemaVersion": 1, + "id" : "megane-luggage", + "version" : "${version}", + "authors" : ["deirn"], + "license" : "MIT", + "icon" : "assets/megane/icon.png", + "depends" : { + "megane-api": "*", + "luggage" : "*" + }, + "custom" : { + "megane:modules": [ + "lol.bai.megane.module.luggage.MeganeLuggage" + ], + "modmenu" : { + "parent": "megane" + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 868243a..d269632 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,6 +23,7 @@ compat("fabric-transfer") //compat("industrial-revolution") compat("kibe") //compat("lib-block-attributes") +compat("luggage") compat("modern-dynamics") compat("reborn-core") compat("reborn-energy")