prismarine-chunk icon indicating copy to clipboard operation
prismarine-chunk copied to clipboard

fix block entity set

Open zardoy opened this issue 1 year ago • 4 comments

It never worked correctly. not adding a test here as it's supposed to be used prismarine-provider-anvil obviously

zardoy avatar Jun 12 '24 21:06 zardoy

If it's an exposed API there should definitely be a test, even if it's used by anvil-provider

extremeheat avatar Jun 12 '24 22:06 extremeheat

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",
    },
  },
])

zardoy avatar Jun 12 '24 22:06 zardoy

this change seems incorrect since coordinates should be relative. Probably the issue is not here

rom1504 avatar Jun 16 '24 21:06 rom1504

this change seems incorrect since coordinates should be relative. Probably the issue is not here

yes, now I see, making coordinates be relative actually makes sense so they are linked to the chunk and not the actual world holding the chunk. I will make sure to fix it properly.

I also wonder if block entities also need to be dumped (using the dump method)?

zardoy avatar Jun 16 '24 21:06 zardoy

closing as agreed above this is not necessary

rom1504 avatar Jan 04 '25 17:01 rom1504