stargate-rewritten / Stargate-Bukkit

The original, and still the best, survival-friendly portal plugin.
https://sgrewritten.org/paper
GNU Lesser General Public License v3.0
28 stars 13 forks source link

Deterministic control material choice. #328

Open Pheotis opened 3 months ago

Pheotis commented 3 months ago

Currently, activators and control surfaces (signs) are selected randomly. This is confusing.

Suggestion:

Choose materials based on biomes.

If in oak forest, use oak. If in dark oak forest, use dark oak. If in savannah, use accacia. If underground, use stone. If deep underground, use deepslate.

Related to, but not a duplicate of, #327

Thorinwasher commented 3 months ago

About biomes, there's like yeah, this many biomes. And that list will probably grow on each update.

Thorinwasher commented 3 months ago

A thought just crossed my mind. Could actually make a scanner which uses NMS, reads data about each biome and stores it into a file which we can save as an internal file in Stargate. This would make everything automatic, which would decrease the need for maintenance for this feature. We can call the scanner StargateMiner or something.

There's also multiple different tree types for each biome, so should there be multiple button types, representing each tree type. Or do you think that we should have only one button type per biome?

Pheotis commented 3 months ago

I like the idea of doing this automatically, although needing to do it manually wouldn't be the end of the world; in fact, doing this for the forseeable future it would probably be quicker than needing to make some sort of nms tool.

While there are a load of biomes, the have more or less been gradually added (it's only specific, infrequent, updates that add a whole load of them). For now, I think I'll go ahead and manually make a table of these; if maintaining it becomes a pain, we can make a proper tool to automate this at a later date.

The other thing to consider is what to do for custom biomes. Mojang added support for it 3 years ago, and paper has stated an intention to eventually support it. For now, when an unknown biome is encountered, the easiest solution is probably to just default to something and complain to console.

Thorinwasher commented 3 months ago

For custom biomes, we can just resort to stone buttons