Skip to content

Commit 5bb882c

Browse files
committed
Fix missing serializer mixins.
1 parent b50c558 commit 5bb882c

File tree

5 files changed

+28
-8
lines changed

5 files changed

+28
-8
lines changed

Common/src/main/java/net/darkhax/bookshelf/api/serialization/SerializerBlockState.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.google.gson.JsonObject;
55
import com.google.gson.JsonParseException;
66
import com.google.gson.JsonSyntaxException;
7-
import net.darkhax.bookshelf.Bookshelf;
7+
import net.darkhax.bookshelf.Constants;
88
import net.minecraft.core.Registry;
99
import net.minecraft.nbt.CompoundTag;
1010
import net.minecraft.nbt.NbtUtils;
@@ -116,8 +116,8 @@ private BlockState readProperty(BlockState state, String propName, JsonElement p
116116

117117
catch (final Exception e) {
118118

119-
Bookshelf.LOG.error("Failed to update state for block {}. The mod that adds this block may have an issue.", Registry.BLOCK.getId(state.getBlock()));
120-
Bookshelf.LOG.catching(e);
119+
Constants.LOG.error("Failed to update state for block {}. The mod that adds this block may have an issue.", Registry.BLOCK.getId(state.getBlock()));
120+
Constants.LOG.catching(e);
121121
throw e;
122122
}
123123
}

Common/src/main/java/net/darkhax/bookshelf/api/serialization/SerializerEnum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.google.gson.JsonElement;
44
import com.google.gson.JsonPrimitive;
5-
import net.darkhax.bookshelf.util.JSONHelper;
5+
import net.darkhax.bookshelf.api.util.JSONHelper;
66
import net.minecraft.nbt.IntTag;
77
import net.minecraft.nbt.StringTag;
88
import net.minecraft.nbt.Tag;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package net.darkhax.bookshelf.mixin.effect;
2+
3+
import net.minecraft.client.renderer.EffectInstance;
4+
import net.minecraft.world.effect.MobEffectInstance;
5+
import org.spongepowered.asm.mixin.Mixin;
6+
import org.spongepowered.asm.mixin.gen.Accessor;
7+
8+
@Mixin(MobEffectInstance.class)
9+
public interface AccessorMobEffectInstance {
10+
11+
@Accessor("hiddenEffect")
12+
MobEffectInstance bookshelf$getHiddenEffect();
13+
14+
@Accessor("hiddenEffect")
15+
void bookshelf$setHiddenEffect(MobEffectInstance hiddenEffect);
16+
}

Fabric/src/main/resources/bookshelf.mixins.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"required": true,
33
"minVersion": "0.8",
44
"package": "net.darkhax.bookshelf.mixin",
5-
"compatibilityLevel": "JAVA_16",
5+
"compatibilityLevel": "JAVA_17",
66
"mixins": [
7-
"item.AccessorItem"
7+
"effect.AccessorMobEffectInstance",
8+
"item.AccessorItem",
9+
"loot.MixinLootItemKilledByPlayerCondition"
810
],
911
"injectors": {
1012
"defaultRequire": 1

Forge/src/main/resources/bookshelf.mixins.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"required": true,
33
"minVersion": "0.8",
44
"package": "net.darkhax.bookshelf.mixin",
5-
"compatibilityLevel": "JAVA_16",
5+
"compatibilityLevel": "JAVA_17",
66
"mixins": [
7-
"item.AccessorItem"
7+
"effect.AccessorMobEffectInstance",
8+
"item.AccessorItem",
9+
"loot.MixinLootItemKilledByPlayerCondition"
810
],
911
"injectors": {
1012
"defaultRequire": 1

0 commit comments

Comments
 (0)