Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Rare building ID not compatible with some vanilla mechanics

kasamikona opened this issue ยท 2 comments

commented

The structure ID for type RARE_BUILDING is changed to "OTGTemple" rather than "Temple", this breaks some vanilla mechanics that depend on the structure ID, like witches spawning in swamp huts instead of normal mobs (doesn't affect the single witch always generated with the hut).
In my opinion, the ID should stay as "OTGTemple" in the save file but get translated to "Temple" internally when the structure is loaded. An alternative would be patching vanilla mechanics to work with the new ID.

commented

Hey, thanks for reporting. I took a look, am I right in thinking this should only affect Spigot? I don't see the structure name being used anywhere significant for Forge except when registering it.

commented

Just found some hardcoded strings, looks like this would have affected Forge too (if it's a thing, not sure). I've changed the findNearestMapFeature (Spigot), getNearesStructurePos (Forge) and isInsideStructure (Forge) methods to recognise "Temple" and "Village" as OTG's temple and village. Not sure if those methods were ever called with "Temple" or "Village" as parameters though.

For the rest, I don't want to register or save the structures under the vanilla names, so I won't change the remaining methods. Hopefully this will fix something. Will be in v7_r25