Fix NPE copying forge caps
This commit is contained in:
parent
1d797fdfb8
commit
242055daed
|
@ -144,10 +144,12 @@ public class CraftMetaItemMixin implements ItemMetaBridge {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "<init>*", at = @At("RETURN"))
|
@Inject(method = "<init>*", at = @At("RETURN"))
|
||||||
private void arclight$copyForgeCaps( CraftMetaItem meta, CallbackInfo ci) {
|
private void arclight$copyForgeCaps(CraftMetaItem meta, CallbackInfo ci) {
|
||||||
CompoundNBT forgeCaps = ((ItemMetaBridge) meta).bridge$getForgeCaps();
|
if (meta != null) {
|
||||||
if (forgeCaps != null) {
|
CompoundNBT forgeCaps = ((ItemMetaBridge) meta).bridge$getForgeCaps();
|
||||||
this.forgeCaps = forgeCaps.copy();
|
if (forgeCaps != null) {
|
||||||
|
this.forgeCaps = forgeCaps.copy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user