Skip to content

Commit

Permalink
restore previous ticks config options (messed them up somehow)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Dec 5, 2024
1 parent f383740 commit f35fa76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void loadChunks(WorldServer world) {
Integer ticksWaited = coordMap.get(coords);

// Wait at least one second (= 20 ticks) before loading forced chunks.
if (ticksWaited >= ConfigAutoUnloadDimensions.ticksBeforeLoadChunk) {
if (ticksWaited >= ConfigBetterChunkloading.ticksBeforeLoadChunk) {
IChunkProvider provider = world.getChunkProvider();
if (!provider.chunkExists(coords.chunkXPos, coords.chunkZPos)) {
provider.loadChunk(coords.chunkXPos, coords.chunkZPos);
Expand All @@ -165,7 +165,7 @@ private void unloadDimension(WorldServer world) {

if (ticksWaited == -1) {
checkDimensionToUnload(world);
} else if (ticksWaited >= ConfigAutoUnloadDimensions.ticksBeforeLoadChunk) {
} else if (ticksWaited >= ConfigAutoUnloadDimensions.ticksBeforeUnloadDimension) {
// Unload dimension
pendingUnloadDimensions.remove(world);
DimensionManager.unloadWorld(world.provider.dimensionId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class ConfigAutoUnloadDimensions {
public static boolean enabled;

@Config.Comment("Ticks before a chunk should be loaded or unloaded after a chunkload ticket as been created or removed. Only has affect if \"enabled\" is active.")
@Config.DefaultInt(20)
public static int ticksBeforeLoadChunk;
@Config.DefaultInt(1200)
public static int ticksBeforeUnloadDimension;

@Config.Comment("Dimensions that should be ignored.")
@Config.DefaultIntList({ 1, -1 })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public class ConfigBetterChunkloading {
@Config.DefaultBoolean(true)
public static boolean autoLoadChunksOnTicketCreation;

@Config.Comment("Ticks before a chunk should be loaded or unloaded after a chunkload ticket as been created or removed. Only has affect if \"autoLoadChunksOnTicketCreation\" is active.")
@Config.DefaultInt(20)
public static int ticksBeforeLoadChunk;

@Config.Comment("Dimension that should be ignored. Write down the id of the dimension.")
@Config.DefaultIntList({})
public static int[] dimensionBlacklist;
Expand Down

0 comments on commit f35fa76

Please sign in to comment.