diff options
author | NotNite <hi@notnite.com> | 2023-06-26 15:52:05 -0400 |
---|---|---|
committer | NotNite <hi@notnite.com> | 2023-06-26 15:52:05 -0400 |
commit | 4cbe83614ad0d035c1d0ce11385335cec63a0ed8 (patch) | |
tree | 871610cecc66f71a27e20057925eedd75628ab98 /src | |
parent | 490d368baea7a5281ca2378d8ed812ff9d49dfc7 (diff) | |
download | gloppers-4cbe83614ad0d035c1d0ce11385335cec63a0ed8.tar.gz gloppers-4cbe83614ad0d035c1d0ce11385335cec63a0ed8.tar.bz2 gloppers-4cbe83614ad0d035c1d0ce11385335cec63a0ed8.zip |
Fix singleplayer
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/notnite/gloppers/mixin/HopperBlockEntityMixin.java | 3 | ||||
-rw-r--r-- | src/main/kotlin/com/notnite/gloppers/Gloppers.kt | 5 | ||||
-rw-r--r-- | src/main/resources/fabric.mod.json | 15 | ||||
-rw-r--r-- | src/main/resources/gloppers.mixins.json | 2 |
4 files changed, 4 insertions, 21 deletions
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": { |