WUVIV5MW5PX6CPRFYL6G2F5NTWX6W6UHMTEA55PS3GIUW3DVCAUAC
24VTF56EDQFXVSBOMUNHGUJWXLWCBNTZRKZJ6SWVBHXE4X7FCSNQC
L4SDHBC3HKDTU7IDCN3ZBDAHGTBWSHKD7Y5RAJDH7OCBXJ6ILJMAC
C7DCAFONCSK5UGE6DJGOEGZORIUSHGBOVLCOYI223IHDHNCXV34AC
KRWUVYCNZAFEF6PIT3RBX64SGQCR5HJNN5NFVQJOKE3SQNKUNHQQC
WZDPQH7HT32TS2SANLKAHMDWAD7TJRODADM5IL3UENMQPFTLBCZAC
GCUTAZNWBOUHNP4FJH2FA2KRC7GP5WER4TT2V6BLDCIEFQWGRGLAC
23Q76KZFANOOOY6G4LF7WSQW7ME6N3UYFKTOMYR63UA4BXHQSGZAC
TIIF4XCJZOH2HTF2BUCEPKY5VPL4BHESCVLQQGGX3L4V4YIO5U4QC
TYAKLNHVG66RHRVN53OOF4FVPAY2P3D4GSMMUSWLY2XA6A5I6PQAC
* Simple system that keeps track of activity on unmodified generated chunks,
* and removes them if it meets criteria of "not so often visited chunk" (later laƶy chunk).
* Always triggers at server shutdown, if enabled.
* Simple system that keeps track of activity on an unmodified, generated chunks,
* and removes them if it meets criteria of "not so often visited chunk" (later, laƶy chunk).
* Always triggers at server shutdown, if enabled (disabled by default).
{/*
private boolean worldCleanEnabled = false; // read from config, leave false as default. also WIP.
public final int latestWorkingVersion = "1.20";
{
private static boolean enabled;
public static final String latestWorkingVersion;
enabled = false;
getLogger().warning(i18n("All ChunkDegenerator instances are disabled. Request testing and patching from others, to return this functionality." + "\n" +
i18n("This is a protection against world corrupting from implementation changes, feel free to ignore this, if you're not a user of World Cleaners."));
enabled = false; // Read enabled value from config or a command (WIP)
latestWorkingVersion = "1.20.1";
if (!getVersion().contains(latestWorkingVersion))
{
enabled = false;
getLogger().warning(format("{0} {1}", i18n("All ChunkDegenerator instances are disabled. Request testing and patching from others, to return this functionality.",
i18n("This is a protection against world corrupting from implementation changes, feel free to ignore this, if you're not a user of World Cleaners."))));
}
private byte[] readChunkAt(final int x, final int z) throws FileNotFoundException, SecurityException
/**
* Conclude given chunk's activity by how many players visit it.
* @param x chunk longitude
* @param z chunk latitude
*/
private void getChunkActivity(final int x, final int z)
throw new FileNotFoundException(MessageFormat.format(i18n("{0} is not a directory or does not exist. World path is probably wrong."), new Object[] { worldRegions.getAbsolute() }));
getLogger().severe(format(i18n("{0} is not a directory or does not exist. World path is probably wrong."), new Object[] { regionsDir.getAbsolutePath() }));
if (!f.getName().matches("r\\.[0-9]+\\.[0-9]+\\.mca")) continue;
if (!(f.exists() && f.isFile()))
if (!f.getName().matches("r\\.-?[0-9]+\\.-?[0-9]+\\.mca")) continue;
if (!f.exists() || !f.isFile())
throw new SecurityException(MessageFormat.format(i18n("{0} is not writable for me. Cannot operate further."), new Object[] { f.getAbsolute() }));
getLogger().warning(format(i18n("{0} is not writable for me. Cannot operate further."), new Object[] { f.getAbsolutePath() }));