mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 04:57:31 +00:00
Allow countCorrectionBits to be tuned using the mod config
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -8,6 +8,7 @@ public class IEConfig {
|
||||
public static boolean catchUnregisteredBlocks;
|
||||
public static boolean removeInvalidBlocks;
|
||||
public static boolean extendDataWatcher;
|
||||
public static int countCorrectionBits;
|
||||
|
||||
public static void init(final File file) {
|
||||
File newFile;
|
||||
@@ -21,6 +22,7 @@ public class IEConfig {
|
||||
IEConfig.catchUnregisteredBlocks = IEConfig.config.getBoolean("CatchUnregisteredBlocks", Tags.MODNAME, false, "");
|
||||
IEConfig.removeInvalidBlocks = IEConfig.config.getBoolean("RemoveInvalidBlocks", Tags.MODNAME, false, "Remove invalid (corrupted) blocks from the game.");
|
||||
IEConfig.extendDataWatcher = IEConfig.config.getBoolean("ExtendDataWatcher", Tags.MODNAME, false, "Extend DataWatcher IDs. Vanilla limit is 31, new limit is 127.");
|
||||
IEConfig.countCorrectionBits = IEConfig.config.getInt("UnusedIDBits", Tags.MODNAME, 0, 0, 12, "Setting this value greater than 0 will reduce RAM usage, at the cost of less available IDs.");
|
||||
IEConfig.config.save();
|
||||
}
|
||||
|
||||
@@ -28,5 +30,6 @@ public class IEConfig {
|
||||
IEConfig.catchUnregisteredBlocks = false;
|
||||
IEConfig.removeInvalidBlocks = false;
|
||||
IEConfig.extendDataWatcher = false;
|
||||
IEConfig.countCorrectionBits = 0;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.falsepattern.endlessids.constants;
|
||||
|
||||
import com.falsepattern.endlessids.IEConfig;
|
||||
|
||||
public class ExtendedConstants {
|
||||
//Tunables
|
||||
public static final int bitsPerID = 24;
|
||||
public static final int bitsPerMetadata = 4;
|
||||
public static final int countCorrectionBits = 0;
|
||||
public static final int countCorrectionBits = IEConfig.countCorrectionBits;
|
||||
|
||||
public static final int watchableBits = 7;
|
||||
|
||||
|
||||
Reference in new issue
Block a user