Fix max durability NPE (#783)
This commit is contained in:
parent
48d07a2fdd
commit
704a9080a1
@ -222,7 +222,7 @@ public abstract class MaterialMixin implements MaterialBridge {
|
||||
|
||||
@Inject(method = "getMaxDurability", cancellable = true, at = @At("HEAD"))
|
||||
private void arclight$getMaxDurability(CallbackInfoReturnable<Short> cir) {
|
||||
if (arclight$spec != null) {
|
||||
if (arclight$spec != null && arclight$spec.maxDurability != null) {
|
||||
cir.setReturnValue(arclight$spec.maxDurability.shortValue());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user