Fallen-Breath / Fallen-Breath/litematica-server-paster

1.20.1告示牌粘贴与预期不符

Open
#15 3 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
Java
Stars
42
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### Bug description

1.20.1粘贴告示牌方块时,如果告示牌文本过长或双面都有字,则文字直接消失。

### Steps to reproduce

在1.20.1中,使用投影保存任意两面都至少有8个字的告示牌(确保nbt足够长),然后在服务器中粘贴。

### Expected behavior

预期应该正常粘贴出告示牌内容,而不是丢失。

### Actual behavior

发现告示牌内容无法正确粘贴,双面都为空。

### Relevant logs

_No response_

### Minecraft version

1.20.1

### Litematica Server Paster version

litematica-server-paster-v1.3.13-mc1.20.1

### Other information

可能的修复方式(已测试可用):

Image

粘贴代码以便使用:
在路径
```Text
versions\1.18.2\src\main\java\me\fallenbreath\lmspaster\mixins\TaskPasteSchematicSetblockMixin.java
```
代码
```Java
//#if MC >= 12000
//$$ @Inject(method = "useSpecialPasting", at = @At("HEAD"), remap = false, cancellable = true)
//$$ private void disableVanillaSpecialSignPasting(BlockState state, CallbackInfoReturnable ci)
//$$ {
//$$ if (ClientNetworkHandler.isServerPasterAvailable() &&
//$$ Configs.Generic.PASTE_NBT_BEHAVIOR.getOptionListValue() == PasteNbtBehavior.NONE)
//$$ {
//$$ ci.setReturnValue(false);
//$$ ci.cancel();
//$$ }
//$$ }
//#endif
```

### Check list

- [x] I have verified that the issue persists in the latest version of the mod.
- [x] I have searched the existing issues and confirmed that this is not a duplicate.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with versions\1.18.2\src\main\java\me\fallenbreath\lmspaster\mixins\TaskPasteSchematicSetblockMixin.java and reproduce the issue using a sign with at least 8 characters on both sides in Minecraft 1.20.1. Review the reported paste behavior and the provided tested workaround, then verify that both sides of the sign retain their text when pasted with the affected NBT setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.