fix: 修复编码终端中空白配方无法覆盖样板
This commit is contained in:
parent
46cbb107df
commit
3f6b8d7e55
|
|
@ -113,11 +113,12 @@ public abstract class ContainerPatternEncodingTermMenuMixin implements IActionHo
|
|||
}
|
||||
}
|
||||
|
||||
// 服务器端:在构造样板返回前插入编码玩家的名称
|
||||
@Inject(method = "encodePattern", at = @At("TAIL"), remap = false, cancellable = true)
|
||||
private void eap$writeEncodePlayerToPattern(CallbackInfoReturnable<ItemStack> cir) {
|
||||
@Inject(method = "encodePattern", at = @At("RETURN"), remap = false, cancellable = true)
|
||||
private void onEncodePatternReturn(CallbackInfoReturnable<ItemStack> cir) {
|
||||
ItemStack itemStack = cir.getReturnValue();
|
||||
itemStack.getOrCreateTag().putString("encodePlayer", this.epp$player.getGameProfile().getName());
|
||||
cir.setReturnValue(itemStack);
|
||||
if (itemStack != null && !itemStack.isEmpty()) {
|
||||
itemStack.getOrCreateTag().putString("encodePlayer", this.epp$player.getGameProfile().getName());
|
||||
cir.setReturnValue(itemStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"mixins": [
|
||||
"ae2.AEProcessingPatternMixin",
|
||||
"ae2.CraftingCPUClusterMixin",
|
||||
"ae2.EncodedPatternItemMixin",
|
||||
"ae2.accessor.MEStorageMenuAccessor",
|
||||
"ae2.accessor.PatternEncodingTermMenuAccessor",
|
||||
"ae2.accessor.PatternProviderLogicAccessor",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user