Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

protobuf format mismatch between this and current worldengine?

Đang mở
#2 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với WorldFileLoaderTest.java và tái hiện lỗi bằng cách sử dụng seed_17824.world cùng với seed_1534.world. So sánh cách loader xử lý hai định dạng protobuf và xác định ranh giới tương thích. Được xem là hoàn tất khi tệp thế giới WorldEngine hiện tại tải được mà không gặp lỗi thiếu các trường bắt buộc và bài kiểm thử liên quan chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I've tried to use this project to import information from a world file into a Java program (to paint a more detailed river map and a lake map, for example).
But even replacing

public void loadWorld() throws IOException {
    InputStream is = WorldFileLoaderTest.class.getClassLoader().getResourceAsStream("seed_1534.world");
    WorldFile.World worldFile = WorldFileLoader.fromInputStream(is);
    assertEquals("seed_1534", worldFile.getName());
}

with

public void loadWorld() throws IOException {
    InputStream is = WorldFileLoaderTest.class.getClassLoader().getResourceAsStream("seed_17824.world");
    WorldFile.World worldFile = WorldFileLoader.fromInputStream(is);
    //assertEquals("seed_17824", worldFile.getName());
}

in WorldFileLoaderTest.java (after placing the freshly generated seed_17824.world next to seed_1534.world in the filesystem) results in

Tests in error: 
  loadWorld(org.worldengine.world.WorldPainter): Message missing required fields: name, height, heightMapData, heightMapTh_sea, ...

A quick look with ghex into both seed_17824.world and seed_1534.world reveals that they look quite different (obviously only showing the first couple of bytes):

0A 09  s  e  e  d  _  1  5  3  4 10 80 08 18 80 08  " 80 98 C0 04 0A 80
 H 09 00 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 09 00 00 00 00

vs.

08 EE CA BD BB 05 10 80 80  L 1A 0A  s  e  e  d  _  1  7  8  2  4 20 D5
0E  ( F3 06  2 F3 D2 8E 07 0A FD 83 01 09 C2 F5  (  \ 8F C2 D5  ? 09 C2
F5  (  \ 8F C2 D5  ?
Ngôn ngữ chính
Protocol Buffer
Star
7
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.