Building Gadgets

Building Gadgets

109M Downloads

Edit max amount of blocks

KimSchehl opened this issue ยท 1 comments

commented

Hello,

is there a way to change the max numbers of blocks for "copy/paste, build, destroy" ?
So for example in the config?

In BuildingGadgets1 i found something pormessing, but it does not work in V.2.

//
I found this in the config.java but the command "/buildinggadgets OverrideCopySize []" is not working.
MC cant find the "/buildinggadgets OverrideCopySize"

maxCopySize = SERVER_BUILDER
.comment("Maximum dimensions (x, y and z) that can be copied by a Template without requiring special permission.",
"Permission can be granted using the '/buildinggadgets OverrideCopySize []' command.")
.defineInRange("Max Copy Dimensions", 256, - 1, Integer.MAX_VALUE);
//

Is there something similar in V.2?
or some commands to change the max build/copy size?

Thanks for your feedback in advance. You make a great job coding and progressing with this mod.
Kind regards
Kim

commented

I'm a dummy who knows nothing about coding. But I've got a distantly related problem with Building Gadgets 1 (incompatible with Cubic Chunks mod's negative depth values).
I've been using a notepad editor called "Sublime", it lets me do an advanced version of Ctrl+F called "find in files", letting me search multiple files at once. By doing this I think I've found the Building Gadgets 2 code that handles the "maxCopySize" stuff.

This is from the "Copy.java" file found in "BuildingGadgets2-main\src\main\java\com\direwolf20\buildinggadgets2\util\modes":
Image
In game, if you copy an area too large, an error will tell you that's the case. This error is brought up by the code in green
"buildinggadgets2.messages.axistoolarge"
The code in green is brought up by exceeding of the white code variable
"maxAxis"
The variable "maxAxis" is declared a little above those 4 lines containing the green code.
"int maxAxis = 500; //Todo Config?"
And that comment suggests the config file you need is on the backburner!

A fix for you could be to learn how to compile the mod's source code, then edit the "Copy,java" file so that "int maxAxis = 500; //Todo Config?" is a much bigger number, then compile the whole source code into the mod's jar file. I've no idea if this will cause issues. Good luck! :)