Cubitect / cubiomes-viewer

An efficient graphical Minecraft seed finder and map viewer.
GNU General Public License v3.0
1.03k stars 61 forks source link

Forwarding Feature request from reddit (coordinates in the Analysis Tab of search results) #160

Closed mooing-cowmilk closed 1 year ago

mooing-cowmilk commented 2 years ago

https://www.reddit.com/r/minecraftseeds/comments/x6cz92/using_cubiomes_viewer_on_a_predefined_seed/

Copy-pasted here: Hi there gamers,

I've been running a Minecraft server on a 1.19 Survival world with some friends, and I've been looking around for tools that could help me find 2 or 3 Witch Hut structures within 128 blocks of each other (so I can make a cool Witch farm). Our world has the seed -7210895780912637179.

After some searching, I found the Cubiomes Viewer, and have been trying a bunch of different options and settings to help me find such a structure layout. Despite having tried for hours, I just can't seem to get it working!

I noticed there's a "Scan seed for Quad-Structures..." option in the Map menu, which is almost exactly what I'm looking for -- but it doesn't allow you to search for 2 or 3 structures in the same location, only 4! It's so close to being exactly what I'm looking for, but it's just off!!

My approach so far has been using the "seed list from a file..." option where the file is just a .txt file with my seed in it (since inputting my seed at the top didn't seem to work). Then, I add the relevant conditions (see the 2nd link below), and use the Analysis tab to find areas that match these conditions.

The issues I appear to be running into are:

When using Conditions to find structures, I don't receive any coordinates in the Analysis tab. It appears to find a structure matching the conditions given, but I'm unable to find where the structure actually is in the world. Here's an example on a seed which I know 100% has a Quad-Hut right next to the world spawn. I'm using the search conditions of a 4x cluster of Swamp Hut structures, searching 100k blocks around the world spawn. Even though it's right there on the map, I can't get coordinates to the area that matches the conditions I enter. This makes it pretty hard to check whether what I'm doing is right!

I'm unsure whether the actual conditions I'm using are effective. I've tried a number of different ways to look for multiple Swamp Huts that are nearby each other, however I can't be certain that what I'm doing is correct. Here are a few different conditions I've tried out, along with the results of said conditions. If you notice something I'm doing wrong, please let me know!

Quick note, I do know for certain that this seed contains 2 Swamp Huts within 128 blocks of each other (after having looked on Chunkbase). I'd use this location for my farm, but I'd love to use Cubiomes to find three witch huts that are all bundled up together, or to find an area more easily accessible/closer to our world spawn - without having to use the Witch Hut Finder on Chunkbase and drag my mouse around for 1000 years to find something good.

I understand that Cubiomes is more geared towards finding a NEW seed, rather than searching through an existing one, but I was wondering if anyone had any tips or pointers that could help me along my way?

pastelneigh commented 2 years ago

omg that's me!!! hi <3 i'd really appreciate this!

pastelneigh commented 2 years ago

sorry to keep replying!! but since we're in the feature request section -- could we also get the ability to change the number of structures in the "Scan seed for Quad-Structures" option? it'd be really handy for me (and others i'm sure!!) i don't know whether this would even be possible, but just in case it is, i thought i'd bring it up!! the way the program searches for quad-structures might make this impossible

also i just wanted to thank you for all your hard work with making this program!! it's super neat and cool :3

Cubitect commented 2 years ago

I should probably explain the current state of the analysis function and how you might go ahead searching for dual and tri witch huts.

The analysis of the condition trigger in particular is meant to give some insight into how the conditions are evaluated. As you have already found, this can be used to find the position of certain features in a given seed.

If you do this, you may get positions which are marked as "incomplete", which means the condition is satisfied, but there was no need for the algorithm to actually determine the full position of the trigger (finding the position can sometimes be significantly more expensive to find). In these situations you can add a dummy condition that references the feature whose position you would like to know. This forces the algorithm to determine the proper location. A good candidate for a dummy condition is an OR gate with no children, since that won't affect the logic and has minimal overhead.

To find a Dual-Swamp-Hut it is sufficient to look for two huts that are less than 244 blocks apart (128 blocks to each hut from the center position and accounting for the size of the hut). This can be done with two conditions. 1) The first condition should look for any single swamp hut in the desired area. 2) The second condition should be a structure cluster, looking for two huts within 244 blocks from one another at the location of the first hut.

Here is dual-hut example filter: dual_swamp_hut.txt.

Properly finding Tri-Swamp-Huts is a bit more complicated, but can be done with three conditions. 1) Like before, the first condition just looks for a single hut in the desired are, which will be the anchor point for our actual tri-hut check. 2) The second condition should look for a cluster of three huts within 256 blocks located at the anchor. This gives us the average location of those three huts. 3) Finally, we need to check that the three huts are in range of the center point between them. This can be done with a third condition that checked again for a three hut cluster, but this time it is relative to the center provided by the second condition and we limit the range to 128 blocks (or 116 to account for the size of the huts).

Here is a tri-hut example filter: tri_swamp_hut.txt.

The thing to be aware of when designing filters like this is that structure clusters will average the location of every structure instance in the specified area. A condition with a single instance on the other hand will check each instance individually. This is also the reason why you need the first condition to look for a single swamp hut first.

I plan to revisit the development of the analysis tab in the nearish future. The current idea is to dedicate the analysis tab to the condition trigger and split off the biome and structure analysis into their own dialog.

mooing-cowmilk commented 1 year ago

I beleive the reramp of the analysis tab addressed all the issues so I'm going to close this

VaibhavVerma21 commented 3 months ago

I know the post is 2 years old, but i wanted to ask that why did you go with the number 244 and 216 when considering the distance between the blocks and huts while accounting for the size of it.