your directory structure should look something like.... (if you don't have a libs folder create it in the project director. Place the dependent jar file in there
Project folder
\bin
\build
\eclipse
\gradle
\libs --> create if not there, put dependent jar file there
\run
\src
Well, if it is an actual structure then you can use the chunk providers' isInsideStructure() and getNearestStructure() methods to help you.
If you just need a pattern of blocks, then you just have to write the code to look for the pattern. If the pattern is relatively simple, that shouldn't be too hard although you'll have to consider the various rotations possible and check for them all.
You use the tag compound's setTag() method to add other NBTBase objects, including NBTList to the compound. So in your case if you take the NBTCompound (like the world data compound or you can create a new NBTTagCompound depending on what exactly you're doing at the time.) and go setTag("area_claim_list", getNBTListArea()) it should add it to the compound.
First of all, we can't really tell if your code is correct. That is up to you. The general approach looks correct but you have to verify the details. Have you tried to run the code? Did it work?
If you read the documentation it already explains how the saving works. It happens automatically as part of extending the world data class and using the setData() method.
To test your code you simply need to add console statements to follow the execution. If you put console statements in the right places you will be able to easily determine whether the code runs, when it runs, and the value of any key fields during the execution.
Reflection would allow you to make it not private so you could create a new entry.
I can't seem to find the tutorial on reflection but this is one on access transformers which also links to some useful tools and examples that will help you.
https://tutorials.darkhax.net/tutorials/access_transformers/
I think both of your approaches won't work. Minecraft is built to prevent cheating. That means that the client doesn't get to decide what can be reached otherwise everyone would just put a client mod. So it is up to the server to determine the reach distance. The client can think it reached something but then the next time the server updates the client it will disallow it and things will get glitchy.
So what you need to do is have the server process an alternate reach distance.
I have a tutorial on how to do it here: http://jabelarminecraft.blogspot.com/p/minecraft-modding-extending-reach-of.html
Override
Block#getBlockLayer
to return
CUTOUT
or
TRANSPARENT
. The Grey Ghost explains each layer here.
Block#isOpaqueCube
is used by
Block#doesSideBlockRendering
/
Block#shouldSideBeRendered
to determine whether the faces of adjacent blocks should be rendered (opaque blocks block rendering, transparent blocks don't).