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("RETURN"), remap = false, cancellable = true)
|
||||||
@Inject(method = "encodePattern", at = @At("TAIL"), remap = false, cancellable = true)
|
private void onEncodePatternReturn(CallbackInfoReturnable<ItemStack> cir) {
|
||||||
private void eap$writeEncodePlayerToPattern(CallbackInfoReturnable<ItemStack> cir) {
|
|
||||||
ItemStack itemStack = cir.getReturnValue();
|
ItemStack itemStack = cir.getReturnValue();
|
||||||
itemStack.getOrCreateTag().putString("encodePlayer", this.epp$player.getGameProfile().getName());
|
if (itemStack != null && !itemStack.isEmpty()) {
|
||||||
cir.setReturnValue(itemStack);
|
itemStack.getOrCreateTag().putString("encodePlayer", this.epp$player.getGameProfile().getName());
|
||||||
|
cir.setReturnValue(itemStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"ae2.AEProcessingPatternMixin",
|
"ae2.AEProcessingPatternMixin",
|
||||||
"ae2.CraftingCPUClusterMixin",
|
"ae2.CraftingCPUClusterMixin",
|
||||||
|
"ae2.EncodedPatternItemMixin",
|
||||||
"ae2.accessor.MEStorageMenuAccessor",
|
"ae2.accessor.MEStorageMenuAccessor",
|
||||||
"ae2.accessor.PatternEncodingTermMenuAccessor",
|
"ae2.accessor.PatternEncodingTermMenuAccessor",
|
||||||
"ae2.accessor.PatternProviderLogicAccessor",
|
"ae2.accessor.PatternProviderLogicAccessor",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user