Closed PCRGaming closed 4 months ago
Does this happen with only this mod installed?
I'm experiencing the same error, so I've implemented a temporary fix for myself. This is probably not the best solution, but it's a temporary workaround for me.
diff --git a/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java b/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java
index ff93fa6..618e6d2 100644
--- a/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java
+++ b/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java
@@ -1,5 +1,7 @@
package draylar.tiered.mixin.client;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import draylar.tiered.Tiered;
@@ -41,6 +43,7 @@ import java.util.Map;
@Environment(EnvType.CLIENT)
@Mixin(ItemStack.class)
public abstract class ItemStackClientMixin {
+ private static final Logger logger = LoggerFactory.getLogger(ItemStackClientMixin.class);
@Shadow
public abstract NbtCompound getOrCreateSubNbt(String key);
@@ -201,7 +204,11 @@ public abstract class ItemStackClientMixin {
int var8, EquipmentSlot equipmentSlot, Multimap multimap) {
if (this.isTiered && !multimap.isEmpty() && equipmentSlot == EquipmentSlot.OFFHAND && this.getAttributeModifiers(EquipmentSlot.MAINHAND) != null
&& !this.getAttributeModifiers(EquipmentSlot.MAINHAND).isEmpty()) {
- multimap.clear();
+ try {
+ multimap.clear();
+ } catch (UnsupportedOperationException e) {
+ logger.warn("Tried to clear multimap with contents {}, but could not modify multimap.", multimap, e);
+ }
}
}
Does it happen with only this mod installed?
I have not yet attempted to reproduce without any other mods, however I will do so later.
I know which item in particular is causing this (is fully reproducible), and will do a binary search for the minimum set of mods later.
I have not yet attempted to reproduce without any other mods, however I will do so later.
I know which item in particular is causing this
The crash happens when hovering over specific items, I havent been able to know what the item's NBT tags are and whether they cause the crash
main issue I have is when trying to view the tooltips of bows/crossbows and it immediately crashes
I'm experiencing the same error, so I've implemented a temporary fix for myself. This is probably not the best solution, but it's a temporary workaround for me.
diff --git a/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java b/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java index ff93fa6..618e6d2 100644 --- a/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java +++ b/src/main/java/draylar/tiered/mixin/client/ItemStackClientMixin.java @@ -1,5 +1,7 @@ package draylar.tiered.mixin.client; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.Multimap; import draylar.tiered.Tiered; @@ -41,6 +43,7 @@ import java.util.Map; @Environment(EnvType.CLIENT) @Mixin(ItemStack.class) public abstract class ItemStackClientMixin { + private static final Logger logger = LoggerFactory.getLogger(ItemStackClientMixin.class); @Shadow public abstract NbtCompound getOrCreateSubNbt(String key); @@ -201,7 +204,11 @@ public abstract class ItemStackClientMixin { int var8, EquipmentSlot equipmentSlot, Multimap multimap) { if (this.isTiered && !multimap.isEmpty() && equipmentSlot == EquipmentSlot.OFFHAND && this.getAttributeModifiers(EquipmentSlot.MAINHAND) != null && !this.getAttributeModifiers(EquipmentSlot.MAINHAND).isEmpty()) { - multimap.clear(); + try { + multimap.clear(); + } catch (UnsupportedOperationException e) { + logger.warn("Tried to clear multimap with contents {}, but could not modify multimap.", multimap, e); + } } }
I'd love to learn how you did this I'm having the same issue. Somehow no one else in my family does
@Simiux I just cloned the repo, edit the code with that patch I sent, and then recompiled it
here is how to do that:
cd
into repo foldertiered-crash-fix.patch
in that foldergit apply tiered-crash-fix.patch
to apply itgradlew.bat build
for windows or ./gradlew build
for linux/macosbuild/libs/
into your mods folder.@solonovamax hey man dope, It took a bit of punching around, but I ended up being able to fix it, the bows don't crash me anymore. Thanks for the code, absolute machine.
If someone figures out which mod causes the incompat, let me know
I believe it may possibly be zenith, but I am unsure. I'm probably gonna investigate a bit more, later, if I don't forgor again
Having the same issue with bow-type weapons from the mod "Spellbound Weapons", the blowgun in particular. I also believe tools modified by the mod "Golden Age Combat" causes this bug as well. After disabling Golden Age Combat/TieredZ, I was able to use the tools that had been "balanced" by Golden Age Combat; However, using both mods always seems to crash when attempting to display the tooltip bar.
Ran into this issue with Zenith and confirmed by removing the durability attribute added to the items nbt data to fix the crash. Crash is the same issue in getToolTipMix method in the getItemStackMixin class under tiered/src/main/java/draylar/tiered/mixin/client
I suspected it might've been zenith but never got around to testing it lol
Fixed with the solution of @Simiux on latest version. Seems like another mod makes the multimap immutable which is not optimal, vanilla behavior is a mutable map. Which ever mod does that, it should get changed.
Fixed with the solution of @Simiux on latest version. Seems like another mod makes the multimap immutable which is not optimal, vanilla behavior is a mutable map. Which ever mod does that, it should get changed.
wdym the "solution of Simiux" ?
it was me who gave the solution lol
Oh I am sorry, not sure how I mixed this up
Minecraft Version
1.20.x
Mod Loader Version
0.14.24
Mod Version
1.3.0
Describe the Issue
Opening a chest immediately crashed the world
latest.log
crash-2023-11-21_13.56.06-client.txt
Do you use any other mods except the required ones?
Yes