Enforce bukkit mixin injection
This commit is contained in:
parent
36d01d1a16
commit
1d797fdfb8
|
@ -41,7 +41,8 @@ public abstract class CraftItemStackMixin {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "setItemMeta(Lnet/minecraft/item/ItemStack;Lorg/bukkit/inventory/meta/ItemMeta;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/ItemStack;convertStack(I)V"))
|
||||
// check when update
|
||||
@Inject(method = "setItemMeta(Lnet/minecraft/item/ItemStack;Lorg/bukkit/inventory/meta/ItemMeta;)Z", at = @At(value = "INVOKE", ordinal = 1, target = "Lnet/minecraft/item/ItemStack;func_77973_b()Lnet/minecraft/item/Item;"))
|
||||
private static void arclight$setCaps(ItemStack item, ItemMeta itemMeta, CallbackInfoReturnable<Boolean> cir) {
|
||||
CompoundNBT forgeCaps = ((ItemMetaBridge) itemMeta).bridge$getForgeCaps();
|
||||
if (forgeCaps != null) {
|
||||
|
|
|
@ -143,8 +143,8 @@ public class CraftMetaItemMixin implements ItemMetaBridge {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "<init>*", locals = LocalCapture.CAPTURE_FAILSOFT, at = @At("RETURN"))
|
||||
private void arclight$copyForgeCaps(CallbackInfo ci, CraftMetaItem meta) {
|
||||
@Inject(method = "<init>*", at = @At("RETURN"))
|
||||
private void arclight$copyForgeCaps( CraftMetaItem meta, CallbackInfo ci) {
|
||||
CompoundNBT forgeCaps = ((ItemMetaBridge) meta).bridge$getForgeCaps();
|
||||
if (forgeCaps != null) {
|
||||
this.forgeCaps = forgeCaps.copy();
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
"refmap": "mixins.arclight.refmap.json",
|
||||
"setSourceFile": true,
|
||||
"plugin": "io.izzel.arclight.common.mod.ArclightMixinPlugin",
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"mixins": [
|
||||
"BukkitCommandWrapperMixin",
|
||||
"ColouredConsoleSenderMixin",
|
||||
|
|
Loading…
Reference in New Issue
Block a user