aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java3
-rw-r--r--src/main/kotlin/com/notnite/gloppers/Gloppers.kt5
-rw-r--r--src/main/resources/fabric.mod.json15
-rw-r--r--src/main/resources/gloppers.mixins.json2
6 files changed, 10 insertions, 22 deletions
diff --git a/README.md b/README.md
index b6e91ce..467a5ac 100644
--- a/README.md
+++ b/README.md
@@ -35,3 +35,8 @@ Gloppers are most useful in storage systems. Instead of requiring redstone circu
![A 2x4x1 schematic of a storage system, with a top row of hoppers, and a bottom row of one glopper and one chest](https://raw.githubusercontent.com/NotNite/gloppers/main/img/storage.png)
Items will only be sucked up from the top row to the bottom glopper if the pattern is matched.
+
+## Notes with mod compatibility
+
+- Lithium conflicts with Gloppers, and you need to turn its hopper optimizations off in `lithium.properties` (`mixin.block.hopper=false`).
+
diff --git a/gradle.properties b/gradle.properties
index 1328e21..28ae9c8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,7 +7,7 @@ yarn_mappings=1.20+build.1
loader_version=0.14.21
fabric_kotlin_version=1.9.5+kotlin.1.8.22
-mod_version=1.0.0
+mod_version=1.0.1
maven_group=com.notnite
archives_base_name=gloppers
diff --git a/src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java b/src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java
index 78468ac..ce463a3 100644
--- a/src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java
+++ b/src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java
@@ -1,8 +1,6 @@
package com.notnite.gloppers.mixin;
import com.notnite.gloppers.Gloppers;
-import net.fabricmc.api.EnvType;
-import net.fabricmc.api.Environment;
import net.minecraft.block.entity.Hopper;
import net.minecraft.block.entity.HopperBlockEntity;
import net.minecraft.inventory.Inventory;
@@ -14,7 +12,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-@Environment(EnvType.SERVER)
@Mixin(HopperBlockEntity.class)
public class HopperBlockEntityMixin {
private static int dirtySlotState = 0;
diff --git a/src/main/kotlin/com/notnite/gloppers/Gloppers.kt b/src/main/kotlin/com/notnite/gloppers/Gloppers.kt
index bdea779..95596c0 100644
--- a/src/main/kotlin/com/notnite/gloppers/Gloppers.kt
+++ b/src/main/kotlin/com/notnite/gloppers/Gloppers.kt
@@ -1,13 +1,10 @@
package com.notnite.gloppers
-import net.fabricmc.api.DedicatedServerModInitializer
import net.minecraft.block.entity.HopperBlockEntity
import net.minecraft.inventory.Inventory
import net.minecraft.item.ItemStack
-object Gloppers : DedicatedServerModInitializer {
- override fun onInitializeServer() {}
-
+object Gloppers {
private fun matchesGlob(glob: String, str: String): Boolean {
val regex = glob
.replace(".", "\\.")
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 7599de5..eebc2a7 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -12,20 +12,9 @@
},
"license": "MIT",
"icon": "assets/gloppers/icon.png",
- "environment": "server",
- "entrypoints": {
- "server": [
- {
- "value": "com.notnite.gloppers.Gloppers",
- "adapter": "kotlin"
- }
- ]
- },
+ "environment": "*",
"mixins": [
- {
- "environment": "server",
- "config": "gloppers.mixins.json"
- }
+ "gloppers.mixins.json"
],
"depends": {
"fabricloader": ">=0.14.19",
diff --git a/src/main/resources/gloppers.mixins.json b/src/main/resources/gloppers.mixins.json
index 6ddce8d..551ebbc 100644
--- a/src/main/resources/gloppers.mixins.json
+++ b/src/main/resources/gloppers.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"package": "com.notnite.gloppers.mixin",
"compatibilityLevel": "JAVA_17",
- "server": [
+ "mixins": [
"HopperBlockEntityMixin"
],
"injectors": {