Closed walksanatora closed 3 months ago
the attempt to access client is here:
I have no other way of accessing my cooldown handler, nor can I check the logical side with the data minecraft provides; computercraft shouldn't use methods that are just used for rendering otherwise to get info on an item server-side. guess that mod is just is incompatible then
the function is supposed to be used as a "does this item have durability". a simple fix would be to add a @WrapOperation mixin to computercraft
you can check if running on physical server by eg: in mod's init
try {
Class.forName("net.minecraft.class_310");
this.physicalServer=false
} catch(ClassNotFoundException e) {
this.physicalServer=true
}
that's.. a fucked up way of checking, but kind of a cool solution ngl.
the function is supposed to be used as a "does this item have durability"
I don't fully get that one; just before this check, they're checking if the item is damageable at all, and if so, get the damage value and max damage. That's already getting the data they're trying to get from the check causing errors-
ah well, I may not understand it, but I'll still fix the issue using the solution you suggested
I just made a quick mod as a intermediary to @Overwrite mixin the function you could add a mixin to your mod to apply on server that does the same afterall all the mixin is
@Overwrite()
public boolean isItemBarVisible(ItemStack stack) {
return false;
}
(sorry for mentioning you random person. the nature of annotations is a pain)
it cannot load the
MinecraftClient
class when callingItem#isBarVisible
on the AbstractWeaponItem