-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix block entity set #241
base: master
Are you sure you want to change the base?
fix block entity set #241
Conversation
If it's an exposed API there should definitely be a test, even if it's used by anvil-provider |
hm, but how do you suggest testing it without prismarine-provider-anvil? Should I just hardcode arguments in a function call in a test? eg like column.loadBlockEntities([
{
GlowingText: {
type: "byte",
value: 0,
},
keepPacked: {
type: "byte",
value: 0,
},
Color: {
type: "string",
value: "black",
},
Text4: {
type: "string",
value: "{\"text\":\"\"}",
},
x: {
type: "int",
value: 6,
},
Text3: {
type: "string",
value: "{\"text\":\"\"}",
},
y: {
type: "int",
value: -63,
},
Text2: {
type: "string",
value: "{\"text\":\"\"}",
},
z: {
type: "int",
value: 136,
},
Text1: {
type: "string",
value: "{\"text\":\"te\"}",
},
id: {
type: "string",
value: "minecraft:sign",
},
},
]) |
@@ -53,7 +53,6 @@ class CommonChunkColumn { | |||
} | |||
|
|||
setBlockEntity (pos, tag) { | |||
// Note: `pos` is relative to the chunk, not the world, tag's XYZ is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the removal of this comment? The blockEntities object is supposed to indeed hold entities relative to the current chunk. The chunk is not necessarily bounded to any world hence it's not supposed to hold global coordinates.
this change seems incorrect since coordinates should be relative. Probably the issue is not here |
yes, now I see, making I also wonder if block entities also need to be dumped (using the |
It never worked correctly.
not adding a test here as it's supposed to be used prismarine-provider-anvil obviously