Fix item NPE handling forge caps
This commit is contained in:
parent
abf9928a7b
commit
7294713cbe
|
@ -30,6 +30,7 @@ public abstract class CraftItemStackMixin implements CraftItemStackBridge {
|
||||||
|
|
||||||
@Inject(method = "getItemMeta(Lnet/minecraft/item/ItemStack;)Lorg/bukkit/inventory/meta/ItemMeta;", at = @At("RETURN"))
|
@Inject(method = "getItemMeta(Lnet/minecraft/item/ItemStack;)Lorg/bukkit/inventory/meta/ItemMeta;", at = @At("RETURN"))
|
||||||
private static void arclight$offerCaps(ItemStack item, CallbackInfoReturnable<ItemMeta> cir) {
|
private static void arclight$offerCaps(ItemStack item, CallbackInfoReturnable<ItemMeta> cir) {
|
||||||
|
if (item == null) return;
|
||||||
ItemMeta meta = cir.getReturnValue();
|
ItemMeta meta = cir.getReturnValue();
|
||||||
CompoundNBT tag = item.getTag();
|
CompoundNBT tag = item.getTag();
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
allprojects {
|
allprojects {
|
||||||
group 'io.izzel.arclight'
|
group 'io.izzel.arclight'
|
||||||
version '1.0.19'
|
version '1.0.20-SNAPSHOT'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
agpVersion = '1.17'
|
agpVersion = '1.17'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user