celsiusqc / TowersOfTheWildModded

0 stars 2 forks source link

How to avoid tower without top with data pack? #17

Open SettingDust opened 2 months ago

SettingDust commented 2 months ago

Seems like the template pool has only one top. Don't know how to avoid generation without top

johalun commented 2 weeks ago

Do you mean the ones where the top is on the ground next to the tower? I use kubejs to remove biome tags from the derelict towers.

celsiusqc commented 1 week ago

Please explain the issue better and provide logs + screenshots

SettingDust commented 1 week ago

https://github.com/TwelveIterationMods/Waystones/blob/1.20.1/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java#L51

after research. Waystone will block the generating since https://github.com/TwelveIterationMods/Waystones/blob/1.20.1/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java#L34 the path containing the string.

It's for only one in every village from the comment. But the logic is terrible

Need to blocking the mixin injecting the wayston into village with https://github.com/Bawnorton/MixinSquared And reinject the waystone element into the pool with https://modrinth.com/mod/lithostitched. Maybe I'll create a standalone mod for that XD

johalun commented 1 week ago

Is this the same issues as https://github.com/celsiusqc/TowersOfTheWildModded/issues/19 where towers sometimes generate without the top? (not the top laying on the ground next to the tower which is the derelict type towers)

celsiusqc commented 1 week ago

https://github.com/TwelveIterationMods/Waystones/blob/1.20.1/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java#L51

after research. Waystone will block the generating since https://github.com/TwelveIterationMods/Waystones/blob/1.20.1/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java#L34 the path containing the string.

It's for only one in every village from the comment. But the logic is terrible

Need to blocking the mixin injecting the wayston into village with https://github.com/Bawnorton/MixinSquared And reinject the waystone element into the pool with https://modrinth.com/mod/lithostitched. Maybe I'll create a standalone mod for that XD

So this issue is not on my end, but on Waystone's end?

johalun commented 2 days ago

@SettingDust Did you find a solution or workaround for this we can use until a permanent fix is available?

johalun commented 2 days ago

In worst case, would it perhaps help to just disable waystones from generating in the towers? The idea would be to instead add one to the loot chest.

Edit: Well removing the waystones mod definitely solves the problem so that's the last resort. I rather have complete towers than waystones. The question still stands though, is there a way to prevent waystones from generating in the towers via datapack?

SettingDust commented 2 days ago

@johalun Publishing on https://modrinth.com/mod/blay-waystone-placement-bug-fix

johalun commented 2 days ago

@SettingDust Awesome! Is this a bug in waystones? Has it been reported to them?

SettingDust commented 2 days ago

@SettingDust Awesome! Is this a bug in waystones? Has it been reported to them?

  1. Told
  2. Have not
johalun commented 1 day ago

Seems the bug is fixed in waystones mod, pending release. Feel free to close related tickets.

SettingDust commented 1 day ago

@johalun He is narrowed the path to match the village as well. But it will cause the same problem if a structure path match village/***/waystone. Prefer my mod since the Lithostitched and Patched won't causing compatibility issues.

For test: https://cdn.modrinth.com/data/kQsinDU9/versions/f40QMXPN/BlayWaystoneStructurePlacementBugFix-0.1.0.jar The project is under review.

johalun commented 1 day ago

Thanks, but we decided to make our own towers since we only use a small subset of the ToTW ones anyway.

BlayTheNinth commented 1 day ago

By targeting village/***/waystone, the mixin targets what it's supposed to - its whole purpose is preventing multiple waystones spawning within villages. The expectation that someone would be using a village/<type>/waystone structure path outside of villages while also spawning additional village/<otherType>/waystone pieces in the same structure seems rather unrealistic (and even if it does end up happening - it's not like the fix is eternally set in stone - can always adjust to accommodate edge cases later).

@SettingDust Publishing a mod that hacks into mine without ever even submitting an issue report to me is extremely poor modding etiquette and usually leads to a growing amount of confusing issue reports by users on my side (as witnessed with e.g. Waystones Teleports Pets in the past).

I would recommend people following this issue to avoid using third party "bugfixes" and instead report issues directly to me, as I will not be able to offer support on instances where other mods knowingly make invasive changes to mine.

SettingDust commented 1 day ago

@BlayTheNinth

My motivation for developing a standalone mod was as follows

  1. I incorrectly assumed that you would no longer maintain version 1.20.1. It's the reason for no reports.
  2. I thought the original method wasn't good for me, so I chose to use a more compatible way of injecting structures.

For "modding etiquette". There is no such thing in my world. Apologize for offending you.


For anyone following this issue.

The Waystones will check all the structure pieces' paths(matching "/village/*/waystone") and recording them if generated. Waystone will avoid the piece from generating if it in a hard-coded distance([100 100](https://github.com/TwelveIterationMods/Waystones/blob/1.20.1/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java#L60C70-L60C79)) with generated Waystones.

What's the point for my mod? It's powered by Lithostitched and Patched. Which means the waystone injection is data-driven. You can modify the weight, count by datapack. In addition, you can decide which template pool to inject into instead of all the "/houses"(hard-coded). Only the vanilla villages are confirmed to use this suffix, other villages added in the pack are free to choose the name they want to use.