Closed AutomaticalEchoes closed 1 year ago
Target method is added by forge,it doesn‘t work ,what should i do. it will crash if remap = true base to the doc , and exactly it happened
> @Inject(method = "getCapability",at = {@At("HEAD")},remap = false) > public void getCapability(net.minecraftforge.common.capabilities.Capability<?> capability, @Nullable Direction facing , CallbackInfoReturnable<net.minecraftforge.common.util.LazyOptional<?>> callbackInfoReturnable){ > if (this.isAlive() && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { > if (facing == null){ > callbackInfoReturnable.setReturnValue(playerJoinedHandler.cast()); > } else if (facing.getAxis().isVertical()) { > callbackInfoReturnable.setReturnValue(playerMainHandler.cast()); > } else if (facing.getAxis().isHorizontal()){ > callbackInfoReturnable.setReturnValue(playerEquipmentHandler.cast()); > } > } > callbackInfoReturnable.setReturnValue(super.getCapability(capability, facing)) ; > }
This issue tracker is for bugs and feature requests for mixin. For support questions please use the discord channel as mentioned in the README.
Target method is added by forge,it doesn‘t work ,what should i do. it will crash if remap = true base to the doc , and exactly it happened