Add config for node max size

Nexus bees can be limited in their influence, if you so choose
This commit is contained in:
KryptonCaptain committed 2019-08-24 11:03:36 +10:00
1 parent bff3c669bf
commit 451f183e83
4 files changed
+12 -3

No files matched your search

+5 -1
View File
@@ -87,6 +87,7 @@ public class Config
public static boolean logHiveSpawns;
public static double thaumcraftSaplingDroprate;
public static int aromaticLumpSwarmerRate;
public static int thaumcraftNodeMaxSize;
public static boolean arsMagicaActive;
public static boolean bloodMagicActive;
@@ -313,8 +314,11 @@ public class Config
p.comment = "Set to true to make Thaumium Grafter & Scoop require impregnated sticks in the recipe.";
useImpregnatedStickInTools = p.getBoolean(false);
p = configuration.get(CATEGORY_GENERAL, "thaumCraftSaplingDroprate", 0.1, "The chance for thaumcraft saplings using the thaumium grafter", 0.0, 1.0);
p = configuration.get(CATEGORY_GENERAL, "thaumcraftSaplingDroprate", 0.1, "The chance for thaumcraft saplings using the thaumium grafter", 0.0, 1.0);
thaumcraftSaplingDroprate = p.getDouble(0.1);
p = configuration.get(CATEGORY_GENERAL, "thaumcraftNodeMaxSize", 256, "The maximum aspect amount Nexus bees can grow a node to", 64, 32767);
thaumcraftNodeMaxSize = p.getInt(256);
p = configuration.get(CATEGORY_GENERAL, "moonDialShowText", false);
p.comment = "set to true to show the current moon phase in mouse-over text.";
@@ -7,6 +7,7 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import magicbees.main.Config;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.ChunkPosition;
@@ -110,7 +111,7 @@ public class NodeHelper {
aspectToAdd = getWeightedRandomAspect(world.rand);
++rollAttempts;
}
while (aspectsBase.getAmount(aspectToAdd) > 255 && rollAttempts < 20);
while (aspectsBase.getAmount(aspectToAdd) > (Config.thaumcraftNodeMaxSize -1) && rollAttempts < 20);
if (20 <= rollAttempts) {
return false;