gnembon / fabric-carpet

Fabric Carpet
MIT License
1.73k stars 275 forks source link

Structure Y value is incorrect after they have been located #1699

Open MeeniMc opened 1 year ago

MeeniMc commented 1 year ago

Issue description

In some cases (in particular after a structure is found in a new chunk with /locate structure), the structure boundaries, as identified by carpet are not correct. In particular, the Y position for the structure is wrong (looks like the 0 of the structure is always at 62). This manifests with

  1. the /overlay script shows the structure to be offset in the Y direction.
  2. the /spawn list command when used in conjunction with structure specific spawn conditions (e.g., carpet-extra creeperSpawningInJungleTemples) report that spawning conditions are not enforced correctly (they are indeed not enforced).
  3. the overlay from carpet and MiniHud disagree, with the MiniHud overlay being correct.

Image: The /overlay bounding box is wildly inaccurate for this jungle temple 2023-04-11_23 16 31

Image: The MiniHud bounding box (orange) does not align with the Carpet `/overlay` box (teal) ![2023-04-11_23 24 35](https://user-images.githubusercontent.com/68366846/231343652-36f943a0-6313-44a7-b789-6628ee7fe4b3.png)

Workaround

Quitting the game and reloading the game fixes the problem for the affected structure, but locating another structure and tp-ing to it may result in that new structure being Y offset again.

Image: After a game reload the MiniHud and Carpet overlay are both aligned with the structure ![2023-04-11_23 25 20](https://user-images.githubusercontent.com/68366846/231343775-5e8d2034-0579-447c-a094-d64ffe8701d0.png)

Replication steps

  1. Single player world
  2. Have Fabric, Carpet, Carpet-extra, MiniHud
  3. Create a new world
  4. /locate structure jungle_pyramid
  5. /tp x y z
  6. /script load overlay
  7. /overlay structure jungle_pyramid
  8. The structure is probably Y offset w.r.t. the overlay
  9. /carpet creeperSpawningInJungleTemples true
  10. use /spawn list ~ ~ ~ to confirm that the spawn rule is applied within the boundaries of the overlay, but not necessarily in the real structure
  11. quit world
  12. reload world
  13. overlay and spawn rules are now correctly aligned with the structure

Versions/log

``` [23:16:43] [main/INFO]: Loading Minecraft 1.19.4 with Fabric Loader 0.14.19 [23:16:43] [main/INFO]: Loading 97 mods: - betterf3 6.0.0 - carpet 1.4.101+v230319 - carpet-extra 1.4.100 - citresewn 1.1.3+1.19.4 \-- citresewn-defaults 1.1.3+1.19.4 - cloth-config 10.0.96 \-- cloth-basic-math 0.6.1 - continuity 3.0.0-beta.2+1.19.3 - creativeonepunch 1.3 - entity_model_features 0.2.5 - entity_texture_features 4.3.5 \-- org_apache_httpcomponents_httpmime 4.5.10 - fabric-api 0.78.0+1.19.4 |-- fabric-api-base 0.4.23+9ff28bcef4 |-- fabric-api-lookup-api-v1 1.6.24+49abcf7ef4 |-- fabric-biome-api-v1 13.0.6+348a9c64f4 |-- fabric-block-api-v1 1.0.5+e022e5d1f4 |-- fabric-blockrenderlayer-v1 1.1.33+c2e6f674f4 |-- fabric-client-tags-api-v1 1.0.14+1134c5b8f4 |-- fabric-command-api-v1 1.2.26+f71b366ff4 |-- fabric-command-api-v2 2.2.5+e719b857f4 |-- fabric-commands-v0 0.2.43+df3654b3f4 |-- fabric-containers-v0 0.1.53+df3654b3f4 |-- fabric-content-registries-v0 3.5.8+ae0966baf4 |-- fabric-convention-tags-v1 1.4.0+9a7c5daaf4 |-- fabric-crash-report-info-v1 0.2.14+aeb40ebef4 |-- fabric-data-generation-api-v1 11.3.7+5da15ca1f4 |-- fabric-dimensions-v1 2.1.44+7f87f8faf4 |-- fabric-entity-events-v1 1.5.12+e45f7c65f4 |-- fabric-events-interaction-v0 0.4.42+a1ccd7bff4 |-- fabric-events-lifecycle-v0 0.2.51+df3654b3f4 |-- fabric-game-rule-api-v1 1.0.32+a1ccd7bff4 |-- fabric-item-api-v1 2.1.16+09a3510cf4 |-- fabric-item-group-api-v1 3.0.4+043f9acff4 |-- fabric-key-binding-api-v1 1.0.32+c477957ef4 |-- fabric-keybindings-v0 0.2.30+df3654b3f4 |-- fabric-lifecycle-events-v1 2.2.14+5da15ca1f4 |-- fabric-loot-api-v2 1.1.26+75e98211f4 |-- fabric-loot-tables-v1 1.1.30+9e7660c6f4 |-- fabric-message-api-v1 5.1.0+1ee8be40f4 |-- fabric-mining-level-api-v1 2.1.38+49abcf7ef4 |-- fabric-models-v0 0.3.29+11ba9c3bf4 |-- fabric-networking-api-v1 1.3.0+a6f3ccfaf4 |-- fabric-networking-v0 0.3.40+df3654b3f4 |-- fabric-object-builder-api-v1 7.0.2+63b515f4f4 |-- fabric-particles-v1 1.0.22+f1e4495bf4 |-- fabric-recipe-api-v1 1.0.7+a1ccd7bff4 |-- fabric-registry-sync-v0 2.1.3+a383ab97f4 |-- fabric-renderer-api-v1 2.2.4+81e8c576f4 |-- fabric-renderer-indigo 1.1.0+81e8c576f4 |-- fabric-renderer-registries-v1 3.2.37+df3654b3f4 |-- fabric-rendering-data-attachment-v1 0.3.27+afca2f3ef4 |-- fabric-rendering-fluids-v1 3.0.20+f1e4495bf4 |-- fabric-rendering-v0 1.1.40+df3654b3f4 |-- fabric-rendering-v1 2.1.0+8f878217f4 |-- fabric-resource-conditions-api-v1 2.3.0+e6c7d4eef4 |-- fabric-resource-loader-v0 0.11.1+1e1fb126f4 |-- fabric-screen-api-v1 1.0.44+8c25edb4f4 |-- fabric-screen-handler-api-v1 1.3.19+5da15ca1f4 |-- fabric-sound-api-v1 1.0.8+75e98211f4 |-- fabric-transfer-api-v1 3.1.0+d51205dbf4 \-- fabric-transitive-access-wideners-v1 3.0.2+63b515f4f4 - fabric-language-kotlin 1.9.3+kotlin.1.8.20 |-- org_jetbrains_kotlin_kotlin-reflect 1.8.20 |-- org_jetbrains_kotlin_kotlin-stdlib 1.8.20 |-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.8.20 |-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.8.20 |-- org_jetbrains_kotlinx_atomicfu-jvm 0.20.1 |-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.6.4 |-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.6.4 |-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.4.0 |-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.5.0 |-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.5.0 \-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.5.0 - fabricloader 0.14.19 - ferritecore 5.2.0 - immediatelyfast 1.1.12 |-- com_github_llamalad7_mixinextras 0.1.1 \-- net_lenni0451_reflect 1.1.0 - indium 1.0.15+mc1.19.4 - itemscroller 0.19.2 - java 19 - lithium 0.11.1 - malilib 0.15.2 - minecraft 1.19.4 - minihud 0.26.2 - modmenu 6.1.0-rc.4 - not-that-cc 1.0 - reeses-sodium-options 1.5.0+mc1.19.4-build.72 - sodium 0.4.10+build.24 - sodium-extra 0.4.18+mc1.19.4-build.100 |-- caffeineconfig 1.1.0+1.17 \-- crowdin-translate 1.4+1.19.3 - spark 1.10.34 \-- fabric-permissions-api-v0 0.1-SNAPSHOT - starlight 1.1.1+fabric.ae22326 - yet-another-config-lib 2.4.0 ```
NoSignalBeep commented 1 year ago

Thank you for the response. I did end up making a farm using the minihud bounding box and it was successful. I apologize, I got distracted and forgot to update. I actually built a really cool structure around it as well. Spawn proofing the area would provide better rates, but honestly it even produces gunpowder when I'm not in the afk position. It's also not my only source of gunpowder, I just love the carpet mod and wanted to do something fun.

2023-06-14_18 22 42

NoSignalBeep commented 1 year ago

I ended up just making the farm at the minihud y-level, but I may try to lower it in the future with these fixes. Thanks again.