KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
679 stars 104 forks source link

Incorrect JSONOptions.BY_DATA_VERSION construction or incorrect option defaults #1015

Closed Spottedleaf closed 5 months ago

Spottedleaf commented 6 months ago

The option fields default to the modern version (1.20.3+), however the builder does not set EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY and VALIDATE_STRICT_EVENTS for VERSION_1_16.

The default values may be wrong, as the builder for VERSION_1_20_3 sets the values to their defaults. Whichever case it is, the result is that VERSION_1_16 is emitting compact components, UUIDs as 4 int arrays, and validating strict events.

zml2008 commented 6 months ago

I am unable to reproduce this based on the following test:

  @Test
  void testNonCompactOn116() {
    assertFalse(JSONOptions.byDataVersion().at(2586 /* 1.16.5 data version */).value(JSONOptions.EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY));
  }

Do you have a test case that can reproduce this issue?

zml2008 commented 5 months ago

Closing due to lack of a response.