Attachments are not synced on player creation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
The issue includes a Fabric mod initializer and attachment setup, but names no ForgifiedFabricAPI source files or tests. Start by tracing attachment synchronization during player creation and compare it with the working setAttached/removeAttached path. Done means the client receives the attachment after join, respawn, and dimension changes on NeoForge with Connector and FFAPI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Minecraft version
1.21.1
Describe the bug
When a new player is created, e.g. upon join, dimension change, or respawn, attachments are not synced. Attachments do sync properly when setAttached/removeAttached is called.
Steps to reproduce
- Create a fabric mod with the following mod initializer
@SuppressWarnings("UnstableApiUsage")
public class BugDemo implements ModInitializer {
public static final String MOD_ID = "bugdemo";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static final AttachmentType<Unit> TEST = AttachmentRegistry.create(ResourceLocation.fromNamespaceAndPath(MOD_ID, "test"), builder -> builder
.persistent(Unit.CODEC)
.syncWith(StreamCodec.unit(Unit.INSTANCE), AttachmentSyncPredicate.targetOnly())
.copyOnDeath()
);
@Override
public void onInitialize() {
UseItemCallback.EVENT.register((player, world, hand) -> {
var stack = player.getItemInHand(hand);
if (stack.is(Items.BLAZE_ROD)) {
if (world.isClientSide()) return InteractionResultHolder.success(stack);
player.setAttached(TEST, Unit.INSTANCE);
return InteractionResultHolder.success(stack);
}
if (stack.is(Items.STICK)) {
LOGGER.info(
"{} {} attachment",
world.isClientSide() ? "client" : "server",
player.hasAttached(TEST) ? "has" : "does not have"
);
return InteractionResultHolder.success(stack);
}
return InteractionResultHolder.pass(stack);
});
}
}
- Run the mod on fabric.
- Use the blaze rod to set the attachment.
- Recreate the player by relogging, respawning, or changing dimensions.
- Use the stick. The log will show
[17:06:29] [Render thread/INFO] (bugdemo) client has attachment
[17:06:29] [Server thread/INFO] (bugdemo) server has attachment
- Run the mod on neoforge with connector & ffapi.
- Repeat steps 3-5. The log will show
[17:13:56] [Render thread/INFO] [bugdemo/]: client does not have attachment
[17:13:56] [Server thread/INFO] [bugdemo/]: server has attachment
- Use the blaze rod to re-set the attachment, then use the stick. The log will show
[17:18:53] [Render thread/INFO] [bugdemo/]: client has attachment
[17:18:53] [Server thread/INFO] [bugdemo/]: server has attachment
The expected behavior is that when the player is recreated, the server and client will both see the attachment.
Logs
No response
Additional context
Possibly related to FFAPI 2.2.0 using neoforge api for attachment sync.
- Ngôn ngữ chính
- Java
- Star
- 181
- Fork
- 41
- Merge trung bình
- 10 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Sinytra/ForgifiedFabricAPI
-
Missing mixin in fabric-registry-sync-v0 suspected to break modded registry loadingCó thể làm lại được @Su5eD đã nhận 91 ngày trước và không có pull request nào đang mở. Đang mở26.1.x bug
Sinytra/ForgifiedFabricAPI#280 · 6 bình luận · 1 người được giao ·
-
1.21.x bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Sinytra/ForgifiedFabricAPI#276 ·
-
1.21.x bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Sinytra/ForgifiedFabricAPI#269 ·
-
1.21.x bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 53/100
Sinytra/ForgifiedFabricAPI#267 ·
-
1.21.x bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Sinytra/ForgifiedFabricAPI#265 · 6 bình luận ·
Tất cả issue của Sinytra/ForgifiedFabricAPI
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NationalSecurityAgency/ghidra#9884 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Status: Pending Review Type: Feature Request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OpenRefine/OpenRefine#8019 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`timer` rule rejects dates the engine acceptsCó thể đã có người làm @MFA-G đã nhận hôm nay. Đang mởbug ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
camunda/bpmnlint-plugin-camunda-compat#281 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100