Push forward
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.api.config;
|
package io.nanachiyo0721.shiroha.api.config;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.api.config;
|
package io.nanachiyo0721.shiroha.api.config;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.api.config;
|
package io.nanachiyo0721.shiroha.api.config;
|
||||||
|
|
||||||
import org.jspecify.annotations.Nullable;
|
import org.jspecify.annotations.Nullable;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ index a4d608d64b7d3477c9144d93547fd3b4f39a1b02..8cb1cfefa0deb78c1773ba9913138f31
|
|||||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ moe.monnairealms.camellia.config.ConfigManager.initConfigs(); // Shiroha - Config system framework - pre load config file
|
+ io.nanachiyo0721.shiroha.config.ConfigManager.initConfigs(); // Shiroha - Config system framework - pre load config file
|
||||||
io.papermc.paper.plugin.PluginInitializerManager.load(options); // Paper
|
io.papermc.paper.plugin.PluginInitializerManager.load(options); // Paper
|
||||||
Bootstrap.bootStrap();
|
Bootstrap.bootStrap();
|
||||||
Bootstrap.validate();
|
Bootstrap.validate();
|
||||||
@@ -24,7 +24,7 @@ index c6a4d52f76e10fcc57b2c49b07fbc2ef9bb90822..e305fd5850d333eb1a30572076b6475e
|
|||||||
ca.spottedleaf.moonrise.common.util.MoonriseCommon.haltExecutors();
|
ca.spottedleaf.moonrise.common.util.MoonriseCommon.haltExecutors();
|
||||||
}
|
}
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
+ moe.monnairealms.camellia.config.ConfigManager.saveConfigs(false); // Shiroha - Config system framework - save config file
|
+ io.nanachiyo0721.shiroha.config.ConfigManager.saveConfigs(false); // Shiroha - Config system framework - save config file
|
||||||
// Paper start - Improved watchdog support - move final shutdown items here
|
// Paper start - Improved watchdog support - move final shutdown items here
|
||||||
Util.shutdownExecutors();
|
Util.shutdownExecutors();
|
||||||
this.onServerExit();
|
this.onServerExit();
|
||||||
@@ -36,7 +36,7 @@ index cd5551c0221ad2a7b5c7d452d8d91ffc9711c3ee..17244a82d7591004a43c013748f3db05
|
|||||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// Paper end - initialize global and world-defaults configuration
|
||||||
+ moe.monnairealms.camellia.config.ConfigManager.loadConfigFiles(); // Shiroha - Config system framework - load config file
|
+ io.nanachiyo0721.shiroha.config.ConfigManager.loadConfigFiles(); // Shiroha - Config system framework - load config file
|
||||||
this.server.spark.enableEarlyIfRequested(); // Paper - spark
|
this.server.spark.enableEarlyIfRequested(); // Paper - spark
|
||||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
||||||
|
|||||||
+33
-33
@@ -13,10 +13,10 @@ index a814512fcfb85312474ae2c2c21443843bf57831..5734af81b1f88fde952f498059c79116
|
|||||||
public boolean moonrise$doesRegionFileNotExistNoIO(final int chunkX, final int chunkZ);
|
public boolean moonrise$doesRegionFileNotExistNoIO(final int chunkX, final int chunkZ);
|
||||||
|
|
||||||
- public RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ);
|
- public RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ);
|
||||||
+ public moe.monnairealms.camellia.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); // Shiroha - Configurable region file format
|
+ public io.nanachiyo0721.shiroha.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); // Shiroha - Configurable region file format
|
||||||
|
|
||||||
- public RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException;
|
- public RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException;
|
||||||
+ public moe.monnairealms.camellia.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; // Shiroha - Configurable region file format
|
+ public io.nanachiyo0721.shiroha.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; // Shiroha - Configurable region file format
|
||||||
|
|
||||||
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite(
|
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite(
|
||||||
final int chunkX, final int chunkZ, final CompoundTag compound
|
final int chunkX, final int chunkZ, final CompoundTag compound
|
||||||
@@ -29,7 +29,7 @@ index 3bb9b58ee97464687e348e23b99159226415c267..b6d4d9fac961aa4672ef2f4a19e2ae18
|
|||||||
// Paper start - flush regionfiles on save
|
// Paper start - flush regionfiles on save
|
||||||
if (this.world.paperConfig().chunks.flushRegionsOnSave) {
|
if (this.world.paperConfig().chunks.flushRegionsOnSave) {
|
||||||
- final RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ);
|
- final RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ);
|
||||||
+ final moe.monnairealms.camellia.data.RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ); // Shiroha - Configurable region file format
|
+ final io.nanachiyo0721.shiroha.data.RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ); // Shiroha - Configurable region file format
|
||||||
if (regionFile != null) {
|
if (regionFile != null) {
|
||||||
regionFile.flush();
|
regionFile.flush();
|
||||||
} // else: evicted from cache, which should have called flush
|
} // else: evicted from cache, which should have called flush
|
||||||
@@ -38,7 +38,7 @@ index 3bb9b58ee97464687e348e23b99159226415c267..b6d4d9fac961aa4672ef2f4a19e2ae18
|
|||||||
public static interface IORunnable {
|
public static interface IORunnable {
|
||||||
|
|
||||||
- public void run(final RegionFile regionFile) throws IOException;
|
- public void run(final RegionFile regionFile) throws IOException;
|
||||||
+ public void run(final moe.monnairealms.camellia.data.RegionFile regionFile) throws IOException; // Shiroha - Configurable region file format
|
+ public void run(final io.nanachiyo0721.shiroha.data.RegionFile regionFile) throws IOException; // Shiroha - Configurable region file format
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..084b64dbaa2807fa29e4ae787144fce2
|
|||||||
public void moonrise$setWriteOnClose(final boolean value);
|
public void moonrise$setWriteOnClose(final boolean value);
|
||||||
|
|
||||||
- public void moonrise$write(final RegionFile regionFile) throws IOException;
|
- public void moonrise$write(final RegionFile regionFile) throws IOException;
|
||||||
+ public void moonrise$write(final moe.monnairealms.camellia.data.RegionFile regionFile) throws IOException; // Shiroha - Configurable region file format
|
+ public void moonrise$write(final io.nanachiyo0721.shiroha.data.RegionFile regionFile) throws IOException; // Shiroha - Configurable region file format
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||||
index e305fd5850d333eb1a30572076b6475e4428f7a7..78e9cf21fb5487e5eeec04e589c2a84c1e6b06af 100644
|
index e305fd5850d333eb1a30572076b6475e4428f7a7..78e9cf21fb5487e5eeec04e589c2a84c1e6b06af 100644
|
||||||
@@ -79,7 +79,7 @@ index a7f2cfa9277c898038f6b9e0a3401db51012b64c..d6151f308e2e5864b6525409761aa6d9
|
|||||||
import net.minecraft.world.level.chunk.storage.RegionFile;
|
import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||||
|
|
||||||
-public record FileToUpgrade(RegionFile file, List<ChunkPos> chunksToUpgrade) {
|
-public record FileToUpgrade(RegionFile file, List<ChunkPos> chunksToUpgrade) {
|
||||||
+public record FileToUpgrade(moe.monnairealms.camellia.data.RegionFile file, List<ChunkPos> chunksToUpgrade) { // Shiroha - Configurable region file format
|
+public record FileToUpgrade(io.nanachiyo0721.shiroha.data.RegionFile file, List<ChunkPos> chunksToUpgrade) { // Shiroha - Configurable region file format
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/util/worldupdate/RegionStorageUpgrader.java b/net/minecraft/util/worldupdate/RegionStorageUpgrader.java
|
diff --git a/net/minecraft/util/worldupdate/RegionStorageUpgrader.java b/net/minecraft/util/worldupdate/RegionStorageUpgrader.java
|
||||||
index b228cd6c54e8c8998923ab332882d99092769c67..13ec3d38ffb6e0e87db621c9607c9dc3c6a7b31b 100644
|
index b228cd6c54e8c8998923ab332882d99092769c67..13ec3d38ffb6e0e87db621c9607c9dc3c6a7b31b 100644
|
||||||
@@ -90,7 +90,7 @@ index b228cd6c54e8c8998923ab332882d99092769c67..13ec3d38ffb6e0e87db621c9607c9dc3
|
|||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
private static final String NEW_DIRECTORY_PREFIX = "new_";
|
private static final String NEW_DIRECTORY_PREFIX = "new_";
|
||||||
- private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$");
|
- private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$");
|
||||||
+ private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\." + moe.monnairealms.camellia.config.modules.function.RegionFormatConfig.regionFormat.getArgument() + "$"); // Shiroha - Configurable region file format
|
+ private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\." + io.nanachiyo0721.shiroha.config.modules.function.RegionFormatConfig.regionFormat.getArgument() + "$"); // Shiroha - Configurable region file format
|
||||||
private final DataFixer dataFixer;
|
private final DataFixer dataFixer;
|
||||||
private final UpgradeProgress upgradeProgress;
|
private final UpgradeProgress upgradeProgress;
|
||||||
private final String type;
|
private final String type;
|
||||||
@@ -99,8 +99,8 @@ index b228cd6c54e8c8998923ab332882d99092769c67..13ec3d38ffb6e0e87db621c9607c9dc3
|
|||||||
List<ChunkPos> chunkPositions = Lists.newArrayList();
|
List<ChunkPos> chunkPositions = Lists.newArrayList();
|
||||||
|
|
||||||
- try (RegionFile regionSource = new RegionFile(info, regionFile.toPath(), regionFolder, true)) {
|
- try (RegionFile regionSource = new RegionFile(info, regionFile.toPath(), regionFolder, true)) {
|
||||||
+ var regionFileInfo = new moe.monnairealms.camellia.utils.RegionCreatorInfo(info, regionFile.toPath(), regionFolder, true); // Shiroha - Configurable region file format
|
+ var regionFileInfo = new io.nanachiyo0721.shiroha.utils.RegionCreatorInfo(info, regionFile.toPath(), regionFolder, true); // Shiroha - Configurable region file format
|
||||||
+ try (moe.monnairealms.camellia.data.RegionFile regionSource = moe.monnairealms.camellia.config.modules.function.RegionFormatConfig.regionFormat.getCreator().newFile(regionFileInfo)) { // Shiroha - Configurable region file format
|
+ try (io.nanachiyo0721.shiroha.data.RegionFile regionSource = io.nanachiyo0721.shiroha.config.modules.function.RegionFormatConfig.regionFormat.getCreator().newFile(regionFileInfo)) { // Shiroha - Configurable region file format
|
||||||
for (int x = 0; x < 32; x++) {
|
for (int x = 0; x < 32; x++) {
|
||||||
for (int z = 0; z < 32; z++) {
|
for (int z = 0; z < 32; z++) {
|
||||||
ChunkPos pos = new ChunkPos(x + xOffset, z + zOffset);
|
ChunkPos pos = new ChunkPos(x + xOffset, z + zOffset);
|
||||||
@@ -109,7 +109,7 @@ index b228cd6c54e8c8998923ab332882d99092769c67..13ec3d38ffb6e0e87db621c9607c9dc3
|
|||||||
}
|
}
|
||||||
|
|
||||||
- private void onFileFinished(final RegionFile regionFile) {
|
- private void onFileFinished(final RegionFile regionFile) {
|
||||||
+ private void onFileFinished(final moe.monnairealms.camellia.data.RegionFile regionFile) { // Shiroha - Configurable region file format
|
+ private void onFileFinished(final io.nanachiyo0721.shiroha.data.RegionFile regionFile) { // Shiroha - Configurable region file format
|
||||||
if (this.recreateRegionFiles) {
|
if (this.recreateRegionFiles) {
|
||||||
if (this.previousWriteFuture != null) {
|
if (this.previousWriteFuture != null) {
|
||||||
this.previousWriteFuture.join();
|
this.previousWriteFuture.join();
|
||||||
@@ -122,7 +122,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..476aa2af20caeb8da293bd9e6c7467e3
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
-public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile { // Paper - rewrite chunk system
|
-public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile { // Paper - rewrite chunk system
|
||||||
+public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile , moe.monnairealms.camellia.data.RegionFile{ // Paper - rewrite chunk system // Shiroha - Configurable region file format
|
+public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile , io.nanachiyo0721.shiroha.data.RegionFile{ // Paper - rewrite chunk system // Shiroha - Configurable region file format
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
public static final int MAX_CHUNK_SIZE = 500 * 1024 * 1024; // Paper - don't write garbage data to disk if writing serialization fails
|
public static final int MAX_CHUNK_SIZE = 500 * 1024 * 1024; // Paper - don't write garbage data to disk if writing serialization fails
|
||||||
private static final int SECTOR_BYTES = 4096;
|
private static final int SECTOR_BYTES = 4096;
|
||||||
@@ -149,7 +149,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..476aa2af20caeb8da293bd9e6c7467e3
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
- public final void moonrise$write(final RegionFile regionFile) throws IOException {
|
- public final void moonrise$write(final RegionFile regionFile) throws IOException {
|
||||||
+ public final void moonrise$write(final moe.monnairealms.camellia.data.RegionFile regionFile) throws IOException { // Shiroha - Configurable region file format
|
+ public final void moonrise$write(final io.nanachiyo0721.shiroha.data.RegionFile regionFile) throws IOException { // Shiroha - Configurable region file format
|
||||||
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
|
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
|
||||||
}
|
}
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
@@ -185,7 +185,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
public static final String ANVIL_EXTENSION = ".mca";
|
public static final String ANVIL_EXTENSION = ".mca";
|
||||||
private static final int MAX_CACHE_SIZE = 256;
|
private static final int MAX_CACHE_SIZE = 256;
|
||||||
- private final Long2ObjectLinkedOpenHashMap<RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>();
|
- private final Long2ObjectLinkedOpenHashMap<RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>();
|
||||||
+ private final Long2ObjectLinkedOpenHashMap<moe.monnairealms.camellia.data.RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>(); // Shiroha - Configurable region file format
|
+ private final Long2ObjectLinkedOpenHashMap<io.nanachiyo0721.shiroha.data.RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>(); // Shiroha - Configurable region file format
|
||||||
private final RegionStorageInfo info;
|
private final RegionStorageInfo info;
|
||||||
private final Path folder;
|
private final Path folder;
|
||||||
private final boolean sync;
|
private final boolean sync;
|
||||||
@@ -206,8 +206,8 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
+ return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + getExtensionName(); // Shiroha - Configurable region file format
|
+ return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + getExtensionName(); // Shiroha - Configurable region file format
|
||||||
}
|
}
|
||||||
+ // Shiroha start - Configurable region file format
|
+ // Shiroha start - Configurable region file format
|
||||||
+ public static moe.monnairealms.camellia.data.RegionFile createNew(RegionStorageInfo info, Path filePath, Path folder, boolean sync) throws IOException{
|
+ public static io.nanachiyo0721.shiroha.data.RegionFile createNew(RegionStorageInfo info, Path filePath, Path folder, boolean sync) throws IOException{
|
||||||
+ final moe.monnairealms.camellia.enums.EnumRegionFormat regionFormat = moe.monnairealms.camellia.config.modules.function.RegionFormatConfig.regionFormat;
|
+ final io.nanachiyo0721.shiroha.enums.EnumRegionFormat regionFormat = io.nanachiyo0721.shiroha.config.modules.function.RegionFormatConfig.regionFormat;
|
||||||
+ final String fullFileName = filePath.getFileName().toString();
|
+ final String fullFileName = filePath.getFileName().toString();
|
||||||
+ final String[] fullNameSplit = fullFileName.split("\\.");
|
+ final String[] fullNameSplit = fullFileName.split("\\.");
|
||||||
+ final String extensionName = fullNameSplit[fullNameSplit.length - 1];
|
+ final String extensionName = fullNameSplit[fullNameSplit.length - 1];
|
||||||
@@ -222,11 +222,11 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
+ throw new IOException("Invalid region file format: " + extensionName + " expected " + regionFormat.getArgument());
|
+ throw new IOException("Invalid region file format: " + extensionName + " expected " + regionFormat.getArgument());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return regionFormat.getCreator().newFile(new moe.monnairealms.camellia.utils.RegionCreatorInfo(info, filePath, folder, sync));
|
+ return regionFormat.getCreator().newFile(new io.nanachiyo0721.shiroha.utils.RegionCreatorInfo(info, filePath, folder, sync));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static String getExtensionName() {
|
+ public static String getExtensionName() {
|
||||||
+ return "." + moe.monnairealms.camellia.config.modules.function.RegionFormatConfig.regionFormat.getArgument();
|
+ return "." + io.nanachiyo0721.shiroha.config.modules.function.RegionFormatConfig.regionFormat.getArgument();
|
||||||
+ }
|
+ }
|
||||||
+ // Shiroha end
|
+ // Shiroha end
|
||||||
|
|
||||||
@@ -237,17 +237,17 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
- public synchronized final RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) {
|
- public synchronized final RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) {
|
||||||
+ public synchronized final moe.monnairealms.camellia.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) { // Shiroha - Configurable region file format
|
+ public synchronized final io.nanachiyo0721.shiroha.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) { // Shiroha - Configurable region file format
|
||||||
return this.regionCache.getAndMoveToFirst(ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT));
|
return this.regionCache.getAndMoveToFirst(ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
- public synchronized final RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException {
|
- public synchronized final RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException {
|
||||||
+ public synchronized final moe.monnairealms.camellia.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException { // Shiroha - Configurable region file format
|
+ public synchronized final io.nanachiyo0721.shiroha.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException { // Shiroha - Configurable region file format
|
||||||
final long key = ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT);
|
final long key = ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT);
|
||||||
|
|
||||||
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
||||||
+ moe.monnairealms.camellia.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Shiroha - Configurable region file format
|
+ io.nanachiyo0721.shiroha.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Shiroha - Configurable region file format
|
||||||
if (ret != null) {
|
if (ret != null) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
|
|
||||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||||
- final RegionFile regionFile = this.getRegionFile(pos);
|
- final RegionFile regionFile = this.getRegionFile(pos);
|
||||||
+ final moe.monnairealms.camellia.data.RegionFile regionFile = this.getRegionFile(pos); // Shiroha - Configurable region file format
|
+ final io.nanachiyo0721.shiroha.data.RegionFile regionFile = this.getRegionFile(pos); // Shiroha - Configurable region file format
|
||||||
|
|
||||||
// note: not required to keep regionfile loaded after this call, as the write param takes a regionfile as input
|
// note: not required to keep regionfile loaded after this call, as the write param takes a regionfile as input
|
||||||
// (and, the regionfile parameter is unused for writing until the write call)
|
// (and, the regionfile parameter is unused for writing until the write call)
|
||||||
@@ -274,7 +274,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||||
if (writeData.result() == ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO.RegionDataController.WriteData.WriteResult.DELETE) {
|
if (writeData.result() == ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO.RegionDataController.WriteData.WriteResult.DELETE) {
|
||||||
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
||||||
+ final moe.monnairealms.camellia.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Shiroha - Configurable region file format
|
+ final io.nanachiyo0721.shiroha.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Shiroha - Configurable region file format
|
||||||
if (regionFile != null) {
|
if (regionFile != null) {
|
||||||
regionFile.clear(pos);
|
regionFile.clear(pos);
|
||||||
} // else: didn't exist
|
} // else: didn't exist
|
||||||
@@ -283,7 +283,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
final int chunkX, final int chunkZ
|
final int chunkX, final int chunkZ
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
||||||
+ final moe.monnairealms.camellia.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Shiroha - Configurable region file format
|
+ final io.nanachiyo0721.shiroha.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Shiroha - Configurable region file format
|
||||||
|
|
||||||
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||||
final ChunkPos headerChunkPos = SerializableChunkData.getChunkCoordinate(ret);
|
final ChunkPos headerChunkPos = SerializableChunkData.getChunkCoordinate(ret);
|
||||||
- final RegionFile regionFile = this.getRegionFile(pos);
|
- final RegionFile regionFile = this.getRegionFile(pos);
|
||||||
+ final moe.monnairealms.camellia.data.RegionFile regionFile = this.getRegionFile(pos); // Shiroha - Configurable region file format
|
+ final io.nanachiyo0721.shiroha.data.RegionFile regionFile = this.getRegionFile(pos); // Shiroha - Configurable region file format
|
||||||
|
|
||||||
if (regionFile.getRecalculateCount() != readData.recalculateCount()) {
|
if (regionFile.getRecalculateCount() != readData.recalculateCount()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -301,7 +301,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
- public RegionFile getRegionFile(ChunkPos pos) throws IOException {
|
- public RegionFile getRegionFile(ChunkPos pos) throws IOException {
|
||||||
+ public moe.monnairealms.camellia.data.RegionFile getRegionFile(ChunkPos pos) throws IOException { // Shiroha - Configurable region file format
|
+ public io.nanachiyo0721.shiroha.data.RegionFile getRegionFile(ChunkPos pos) throws IOException { // Shiroha - Configurable region file format
|
||||||
return this.getRegionFile(pos, false);
|
return this.getRegionFile(pos, false);
|
||||||
}
|
}
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
@@ -310,7 +310,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
}
|
}
|
||||||
|
|
||||||
- @org.jetbrains.annotations.Contract("_, false -> !null") private @Nullable RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit
|
- @org.jetbrains.annotations.Contract("_, false -> !null") private @Nullable RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit
|
||||||
+ @org.jetbrains.annotations.Contract("_, false -> !null") private moe.monnairealms.camellia.data.RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit // Shiroha - Configurable region file format
|
+ @org.jetbrains.annotations.Contract("_, false -> !null") private io.nanachiyo0721.shiroha.data.RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit // Shiroha - Configurable region file format
|
||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
if (existingOnly) {
|
if (existingOnly) {
|
||||||
return this.moonrise$getRegionFileIfExists(pos.x(), pos.z());
|
return this.moonrise$getRegionFileIfExists(pos.x(), pos.z());
|
||||||
@@ -319,7 +319,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
final long key = ChunkPos.pack(pos.x() >> REGION_SHIFT, pos.z() >> REGION_SHIFT);
|
final long key = ChunkPos.pack(pos.x() >> REGION_SHIFT, pos.z() >> REGION_SHIFT);
|
||||||
|
|
||||||
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
||||||
+ moe.monnairealms.camellia.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Shiroha - Configurable region file format
|
+ io.nanachiyo0721.shiroha.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Shiroha - Configurable region file format
|
||||||
if (ret != null) {
|
if (ret != null) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
}
|
}
|
||||||
|
|
||||||
- private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
- private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||||
+ private static CompoundTag readOversizedChunk(moe.monnairealms.camellia.data.RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException { // Shiroha - Configurable region file format
|
+ private static CompoundTag readOversizedChunk(io.nanachiyo0721.shiroha.data.RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException { // Shiroha - Configurable region file format
|
||||||
synchronized (regionfile) {
|
synchronized (regionfile) {
|
||||||
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
|
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
|
||||||
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x(), chunkCoordinate.z());
|
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x(), chunkCoordinate.z());
|
||||||
@@ -346,7 +346,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
public @Nullable CompoundTag read(final ChunkPos pos) throws IOException {
|
public @Nullable CompoundTag read(final ChunkPos pos) throws IOException {
|
||||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||||
- RegionFile region = this.getRegionFile(pos, true);
|
- RegionFile region = this.getRegionFile(pos, true);
|
||||||
+ moe.monnairealms.camellia.data.RegionFile region = this.getRegionFile(pos, true); // Shiroha - Configurable region file format
|
+ io.nanachiyo0721.shiroha.data.RegionFile region = this.getRegionFile(pos, true); // Shiroha - Configurable region file format
|
||||||
if (region == null) {
|
if (region == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -355,7 +355,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
public void scanChunk(final ChunkPos pos, final StreamTagVisitor scanner) throws IOException {
|
public void scanChunk(final ChunkPos pos, final StreamTagVisitor scanner) throws IOException {
|
||||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||||
- RegionFile region = this.getRegionFile(pos, true);
|
- RegionFile region = this.getRegionFile(pos, true);
|
||||||
+ moe.monnairealms.camellia.data.RegionFile region = this.getRegionFile(pos, true); // Shiroha - Configurable region file format
|
+ io.nanachiyo0721.shiroha.data.RegionFile region = this.getRegionFile(pos, true); // Shiroha - Configurable region file format
|
||||||
if (region == null) {
|
if (region == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -364,7 +364,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
public void write(final ChunkPos pos, final @Nullable CompoundTag value) throws IOException {
|
public void write(final ChunkPos pos, final @Nullable CompoundTag value) throws IOException {
|
||||||
if (!SharedConstants.DEBUG_DONT_SAVE_WORLD) {
|
if (!SharedConstants.DEBUG_DONT_SAVE_WORLD) {
|
||||||
- RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system
|
- RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system
|
||||||
+ moe.monnairealms.camellia.data.RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system // Shiroha - Configurable region file format
|
+ io.nanachiyo0721.shiroha.data.RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system // Shiroha - Configurable region file format
|
||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
if (region == null) {
|
if (region == null) {
|
||||||
// if the RegionFile doesn't exist, no point in deleting from it
|
// if the RegionFile doesn't exist, no point in deleting from it
|
||||||
@@ -373,7 +373,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||||
- for (final RegionFile regionFile : this.regionCache.values()) {
|
- for (final RegionFile regionFile : this.regionCache.values()) {
|
||||||
+ for (final moe.monnairealms.camellia.data.RegionFile regionFile : this.regionCache.values()) { // Shiroha - Configurable region file format
|
+ for (final io.nanachiyo0721.shiroha.data.RegionFile regionFile : this.regionCache.values()) { // Shiroha - Configurable region file format
|
||||||
try {
|
try {
|
||||||
regionFile.close();
|
regionFile.close();
|
||||||
} catch (final IOException ex) {
|
} catch (final IOException ex) {
|
||||||
@@ -382,7 +382,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..cc9913016c6d985644f8af47986db770
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||||
- for (final RegionFile regionFile : this.regionCache.values()) {
|
- for (final RegionFile regionFile : this.regionCache.values()) {
|
||||||
+ for (final moe.monnairealms.camellia.data.RegionFile regionFile : this.regionCache.values()) { // Shiroha - Configurable region file format
|
+ for (final io.nanachiyo0721.shiroha.data.RegionFile regionFile : this.regionCache.values()) { // Shiroha - Configurable region file format
|
||||||
try {
|
try {
|
||||||
regionFile.flush();
|
regionFile.flush();
|
||||||
} catch (final IOException ex) {
|
} catch (final IOException ex) {
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ index 53131c1b8d5562f9a1b45dfab4fdbdd37b655139..f4c171c06ac2a3d45c91365781d0789e
|
|||||||
+ // we don't care if we should clear the memory of JOB_SITE
|
+ // we don't care if we should clear the memory of JOB_SITE
|
||||||
+ // as it will be automatically removed in SetWalkTargetFromBlockMemory
|
+ // as it will be automatically removed in SetWalkTargetFromBlockMemory
|
||||||
+ // so simply break down if it's not loaded
|
+ // so simply break down if it's not loaded
|
||||||
+ var poiChunk = moe.monnairealms.camellia.config.modules.fixes.POIRangeFixes.doNotCompetePOIIfUnloaded ? poiManager.get(sectionPosOfJobSite) : poiManager.getOrLoad(sectionPosOfJobSite);
|
+ var poiChunk = io.nanachiyo0721.shiroha.config.modules.fixes.POIRangeFixes.doNotCompetePOIIfUnloaded ? poiManager.get(sectionPosOfJobSite) : poiManager.getOrLoad(sectionPosOfJobSite);
|
||||||
+ poiChunk.flatMap(poiSection -> poiSection.getType(blockPosOfJobSite))
|
+ poiChunk.flatMap(poiSection -> poiSection.getType(blockPosOfJobSite))
|
||||||
+ // Shiroha end - Do not load too far poi chunk in poi compete scan
|
+ // Shiroha end - Do not load too far poi chunk in poi compete scan
|
||||||
+ /*level.getPoiManager() // Shiroha - Do not load too far poi chunk in poi compete scan
|
+ /*level.getPoiManager() // Shiroha - Do not load too far poi chunk in poi compete scan
|
||||||
|
|||||||
+5
-5
@@ -162,14 +162,14 @@ index 88a89b4c72cc99dc89d3f3cc928b2dfda4125759..af210abbe1d4b75e1c6828cb25181c4c
|
|||||||
+ final net.minecraft.world.level.Level ownerLevel = owner.level();
|
+ final net.minecraft.world.level.Level ownerLevel = owner.level();
|
||||||
+
|
+
|
||||||
+ // type: entity
|
+ // type: entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForEntity && this.value instanceof net.minecraft.world.entity.Entity entity) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForEntity && this.value instanceof net.minecraft.world.entity.Entity entity) {
|
||||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||||
+ this.clear();
|
+ this.clear();
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // type: block_pos
|
+ // type: block_pos
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForBlockPos && this.value instanceof net.minecraft.core.BlockPos blockPos) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForBlockPos && this.value instanceof net.minecraft.core.BlockPos blockPos) {
|
||||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(ownerLevel, blockPos)) {
|
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(ownerLevel, blockPos)) {
|
||||||
+ this.clear();
|
+ this.clear();
|
||||||
+ }
|
+ }
|
||||||
@@ -177,7 +177,7 @@ index 88a89b4c72cc99dc89d3f3cc928b2dfda4125759..af210abbe1d4b75e1c6828cb25181c4c
|
|||||||
+
|
+
|
||||||
+
|
+
|
||||||
+ //type: position_tracker and walk_target
|
+ //type: position_tracker and walk_target
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForPositionTracker) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.ForceCleanupEntityBrainMemoryConfig.enabledForPositionTracker) {
|
||||||
+ net.minecraft.world.entity.ai.behavior.PositionTracker tracker = null;
|
+ net.minecraft.world.entity.ai.behavior.PositionTracker tracker = null;
|
||||||
+
|
+
|
||||||
+ if (value instanceof net.minecraft.world.entity.ai.behavior.PositionTracker positionTracker) {
|
+ if (value instanceof net.minecraft.world.entity.ai.behavior.PositionTracker positionTracker) {
|
||||||
@@ -205,7 +205,7 @@ index e44814cfb6afb594456b8215bd13a92e93de2c85..e0ca242da89d06005da692172a65a373
|
|||||||
if (!this.isDone()) {
|
if (!this.isDone()) {
|
||||||
Vec3 target = this.path.getNextEntityPos(this.mob);
|
Vec3 target = this.path.getNextEntityPos(this.mob);
|
||||||
+ // Shiroha - Fix region threading with entity ai data access
|
+ // Shiroha - Fix region threading with entity ai data access
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.PathfindingFixesConfig.breakDownPathfindingWhenOutOfRegion) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.PathfindingFixesConfig.breakDownPathfindingWhenOutOfRegion) {
|
||||||
+ // we assume that:
|
+ // we assume that:
|
||||||
+ // 1. The code above doesn't touch the 'main thread context' with the position from 'this.path'
|
+ // 1. The code above doesn't touch the 'main thread context' with the position from 'this.path'
|
||||||
+ // 2. The pathfinder could correctly recompute or discard the incorrect target position and this situation is happening rarely
|
+ // 2. The pathfinder could correctly recompute or discard the incorrect target position and this situation is happening rarely
|
||||||
@@ -227,7 +227,7 @@ index 2ea1ec39a37899ae1510d0036aa670e758077537..18069d0b38ee08d798edc434875f6b5c
|
|||||||
}
|
}
|
||||||
// Paper end - EntityPathfindEvent
|
// Paper end - EntityPathfindEvent
|
||||||
+ // Shiroha start - Fix region threading with entity ai data access
|
+ // Shiroha start - Fix region threading with entity ai data access
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.PathfindingFixesConfig.doNotPathfindToNotOwnedTargets) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.PathfindingFixesConfig.doNotPathfindToNotOwnedTargets) {
|
||||||
+ // filter the targets not owned by current region
|
+ // filter the targets not owned by current region
|
||||||
+ targets = new java.util.HashSet<>(targets); // well no idea about how to determine if this should be copied to a modifiable one
|
+ targets = new java.util.HashSet<>(targets); // well no idea about how to determine if this should be copied to a modifiable one
|
||||||
+ targets.removeIf(pos -> !ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.mob.level(), pos));
|
+ targets.removeIf(pos -> !ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.mob.level(), pos));
|
||||||
|
|||||||
+4
-4
@@ -17,13 +17,13 @@ index c5a9d380f318f176a2bf5d30a10a6d528d23bb92..5f7dad51fdca3b85f8ae164b1f58241e
|
|||||||
}
|
}
|
||||||
+ // Shiroha start - Fix high velocity moving issue
|
+ // Shiroha start - Fix high velocity moving issue
|
||||||
+ // Filter the threads as it may be called by the chunk system worker thread
|
+ // Filter the threads as it may be called by the chunk system worker thread
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.FoliaEntityMovingFixConfig.enabled && ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()){
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.FoliaEntityMovingFixConfig.enabled && ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()){
|
||||||
+ var finalPosition = delta.add(this.position);
|
+ var finalPosition = delta.add(this.position);
|
||||||
+ // not NaN (Prevent incorrect checks under NaN minecarts)
|
+ // not NaN (Prevent incorrect checks under NaN minecarts)
|
||||||
+ if (!Double.isNaN(finalPosition.x) && !Double.isNaN(finalPosition.y) && !Double.isNaN(finalPosition.z)) {
|
+ if (!Double.isNaN(finalPosition.x) && !Double.isNaN(finalPosition.y) && !Double.isNaN(finalPosition.z)) {
|
||||||
+ // kill tick passively if it's moving out of region and we'll catch this exception
|
+ // kill tick passively if it's moving out of region and we'll catch this exception
|
||||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.level,finalPosition)) {
|
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.level,finalPosition)) {
|
||||||
+ throw new moe.monnairealms.camellia.utils.entity.EntityMoveOutOfRegionException(this, delta, moverType);
|
+ throw new io.nanachiyo0721.shiroha.utils.entity.EntityMoveOutOfRegionException(this, delta, moverType);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
@@ -39,13 +39,13 @@ index a0eb1f608a99301e0197ab1d1a6fbbb0a0be4ce0..52bcb87e96f7b5997559bd532481f548
|
|||||||
public <T extends Entity> void guardEntityTick(final Consumer<T> tick, final T entity) {
|
public <T extends Entity> void guardEntityTick(final Consumer<T> tick, final T entity) {
|
||||||
try {
|
try {
|
||||||
tick.accept(entity);
|
tick.accept(entity);
|
||||||
+ } catch (moe.monnairealms.camellia.utils.entity.EntityMoveOutOfRegionException moveOutOfRegionException) { // Shiroha - Fix high velocity moving issue
|
+ } catch (io.nanachiyo0721.shiroha.utils.entity.EntityMoveOutOfRegionException moveOutOfRegionException) { // Shiroha - Fix high velocity moving issue
|
||||||
+ // Shiroha start - Fix high velocity moving issue
|
+ // Shiroha start - Fix high velocity moving issue
|
||||||
+ final Entity ent = moveOutOfRegionException.getEntity();
|
+ final Entity ent = moveOutOfRegionException.getEntity();
|
||||||
+ var currPosition = ent.position();
|
+ var currPosition = ent.position();
|
||||||
+ var toPosition = moveOutOfRegionException.getMovement().add(currPosition);
|
+ var toPosition = moveOutOfRegionException.getMovement().add(currPosition);
|
||||||
+
|
+
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.FoliaEntityMovingFixConfig.warnOnDetected) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.FoliaEntityMovingFixConfig.warnOnDetected) {
|
||||||
+ MinecraftServer.LOGGER.warn("Entity {} with entityId {} has tried moving to another region!",ent, ent.getId());
|
+ MinecraftServer.LOGGER.warn("Entity {} with entityId {} has tried moving to another region!",ent, ent.getId());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ index 17244a82d7591004a43c013748f3db0507e73d7e..4d4a1475b315dd3cb855443ecd1fa75f
|
|||||||
@@ -239,7 +239,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -239,7 +239,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// Paper end - initialize global and world-defaults configuration
|
||||||
moe.monnairealms.camellia.config.ConfigManager.loadConfigFiles(); // Shiroha - Config system framework - load config file
|
io.nanachiyo0721.shiroha.config.ConfigManager.loadConfigFiles(); // Shiroha - Config system framework - load config file
|
||||||
- this.server.spark.enableEarlyIfRequested(); // Paper - spark
|
- this.server.spark.enableEarlyIfRequested(); // Paper - spark
|
||||||
+ if (false) this.server.spark.enableEarlyIfRequested(); // Paper - spark // Shiroha - Force disable builtin spark
|
+ if (false) this.server.spark.enableEarlyIfRequested(); // Paper - spark // Shiroha - Force disable builtin spark
|
||||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||||
|
|||||||
+6
-6
@@ -157,7 +157,7 @@ index efcf294b523ca6b039eb2544546bf863ba717749..343c98fb35eb4cb736d26f67a11c00ef
|
|||||||
}
|
}
|
||||||
+ // Shiroha start - Async protocol switch
|
+ // Shiroha start - Async protocol switch
|
||||||
+ };
|
+ };
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
||||||
+ this.connection.setupOutboundProtocol(GameProtocols.CLIENTBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess())));
|
+ this.connection.setupOutboundProtocol(GameProtocols.CLIENTBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess())));
|
||||||
+ afterSwitch.run(); // directly run callback as we won't process any packet this time
|
+ afterSwitch.run(); // directly run callback as we won't process any packet this time
|
||||||
+ } else {
|
+ } else {
|
||||||
@@ -178,7 +178,7 @@ index eda7e765c7c2ffee305edc81e0c7a6b1e5bfa18d..4c9ea818be83ed3c4dacc762f4d0e8c0
|
|||||||
} // Folia end - rewrite login process - move connection ownership to global region
|
} // Folia end - rewrite login process - move connection ownership to global region
|
||||||
this.waitingForSwitchToConfig = true; // Folia - rewrite login process - fix bad ordering of this field write - moved down
|
this.waitingForSwitchToConfig = true; // Folia - rewrite login process - fix bad ordering of this field write - moved down
|
||||||
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch
|
||||||
this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
||||||
+ // Shiroha start - Async protcol switch
|
+ // Shiroha start - Async protcol switch
|
||||||
+ } else {
|
+ } else {
|
||||||
@@ -192,7 +192,7 @@ index eda7e765c7c2ffee305edc81e0c7a6b1e5bfa18d..4c9ea818be83ed3c4dacc762f4d0e8c0
|
|||||||
}
|
}
|
||||||
|
|
||||||
final ServerConfigurationPacketListenerImpl listener = new ServerConfigurationPacketListenerImpl(this.server, this.connection, this.createCookie(this.player.clientInformation())); // Paper
|
final ServerConfigurationPacketListenerImpl listener = new ServerConfigurationPacketListenerImpl(this.server, this.connection, this.createCookie(this.player.clientInformation())); // Paper
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch
|
||||||
this.connection
|
this.connection
|
||||||
.setupInboundProtocol(
|
.setupInboundProtocol(
|
||||||
ConfigurationProtocols.SERVERBOUND,
|
ConfigurationProtocols.SERVERBOUND,
|
||||||
@@ -238,7 +238,7 @@ index f2329d1a9d9d4bf4c9d771e25e54f2f9ef65a76c..7de3bbecea2f11e4e1cb65408729f346
|
|||||||
+
|
+
|
||||||
+ Runnable afterSwitch = () -> io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(configPacketListener::startConfiguration); // push back to main thread
|
+ Runnable afterSwitch = () -> io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(configPacketListener::startConfiguration); // push back to main thread
|
||||||
+
|
+
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
||||||
+ this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
+ this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
||||||
+ this.connection.setupInboundProtocol(ConfigurationProtocols.SERVERBOUND, configPacketListener);
|
+ this.connection.setupInboundProtocol(ConfigurationProtocols.SERVERBOUND, configPacketListener);
|
||||||
+ afterSwitch.run();
|
+ afterSwitch.run();
|
||||||
@@ -260,7 +260,7 @@ index e7579a9873362317dd82b63306cf650af9472574..9e90197b96fcac958c5073ca8f560e77
|
|||||||
// only after setting the connection listener to game type, add the connection to this regions list
|
// only after setting the connection listener to game type, add the connection to this regions list
|
||||||
level.getCurrentWorldData().connections.add(connection);
|
level.getCurrentWorldData().connections.add(connection);
|
||||||
// Folia end - rewrite login process
|
// Folia end - rewrite login process
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch // we will run async switch once these main thread logics became done
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Shiroha - Async protocol switch // we will run async switch once these main thread logics became done
|
||||||
connection.setupInboundProtocol(
|
connection.setupInboundProtocol(
|
||||||
GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess()), playerConnection), playerConnection
|
GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess()), playerConnection), playerConnection
|
||||||
);
|
);
|
||||||
@@ -273,7 +273,7 @@ index e7579a9873362317dd82b63306cf650af9472574..9e90197b96fcac958c5073ca8f560e77
|
|||||||
}
|
}
|
||||||
// Paper end - Send empty chunk
|
// Paper end - Send empty chunk
|
||||||
+ // Shiroha start - Async protocol switch
|
+ // Shiroha start - Async protocol switch
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) {
|
||||||
+ // auto read will be enabled once the async switch is done
|
+ // auto read will be enabled once the async switch is done
|
||||||
+ connection.setupInboundProtocolAsync(
|
+ connection.setupInboundProtocolAsync(
|
||||||
+ GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess()), playerConnection),
|
+ GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess()), playerConnection),
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ index 491af2413a4e793a121fec368259ff8211ed031e..f9076b71f22b016a117a1eeb9cc4b880
|
|||||||
|
|
||||||
private ServerboundChatCommandPacket(final FriendlyByteBuf input) {
|
private ServerboundChatCommandPacket(final FriendlyByteBuf input) {
|
||||||
- this(input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs
|
- this(input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs
|
||||||
+ this(moe.monnairealms.camellia.config.modules.fixes.LongCommandSupportConfig.enabled ? input.readUtf() : input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs // Shiroha - Add config to support for long command inputs
|
+ this(io.nanachiyo0721.shiroha.config.modules.fixes.LongCommandSupportConfig.enabled ? input.readUtf() : input.readUtf(MAX_CHAT_PACKET_INPUT_SIZE)); // Paper - limit chat command inputs // Shiroha - Add config to support for long command inputs
|
||||||
}
|
}
|
||||||
|
|
||||||
private void write(final FriendlyByteBuf output) {
|
private void write(final FriendlyByteBuf output) {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ index b01e00de94d8fa45359d3d14a8481287276adb68..cdb1647146f526dc80b15a09d3a936b5
|
|||||||
|
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
|
- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
|
||||||
+ return moe.monnairealms.camellia.config.modules.misc.ServerModNameConfig.fakeVanilla ? "vanilla" : moe.monnairealms.camellia.config.modules.misc.ServerModNameConfig.serverModName; // Paper // Shiroha - Add config for server mod name
|
+ return io.nanachiyo0721.shiroha.config.modules.misc.ServerModNameConfig.fakeVanilla ? "vanilla" : io.nanachiyo0721.shiroha.config.modules.misc.ServerModNameConfig.serverModName; // Paper // Shiroha - Add config for server mod name
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerClockManager clockManager() {
|
public ServerClockManager clockManager() {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ index 5a72fa0d72bfdb927293abe921c57f6ae964a6ec..913161732b0affa70fb114dd4087a610
|
|||||||
@Override
|
@Override
|
||||||
public Thread newThread(final Runnable run) {
|
public Thread newThread(final Runnable run) {
|
||||||
- final Thread ret = new TickThreadRunner(this.threadGroup, run, "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement());
|
- final Thread ret = new TickThreadRunner(this.threadGroup, run, "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement());
|
||||||
+ final Thread ret = new TickThreadRunner(this.threadGroup, moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForTickRegion(run), "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
+ final Thread ret = new TickThreadRunner(this.threadGroup, io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForTickRegion(run), "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
||||||
ret.setUncaughtExceptionHandler(TickRegionScheduler.this::uncaughtException);
|
ret.setUncaughtExceptionHandler(TickRegionScheduler.this::uncaughtException);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ index 9544eaee7e02d00226d957ea0b79cd1a1fb0c4d0..4e138fe36aa0bc519482990b60543b17
|
|||||||
private ThreadFactory createThreadFactory() {
|
private ThreadFactory createThreadFactory() {
|
||||||
- return new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper
|
- return new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper
|
||||||
+ var origin = new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper // Shiroha - Add config for cpu affinity
|
+ var origin = new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper // Shiroha - Add config for cpu affinity
|
||||||
+ return run -> origin.newThread(moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForNettyIo(run)); // Shiroha - Add config for cpu affinity
|
+ return run -> origin.newThread(io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForNettyIo(run)); // Shiroha - Add config for cpu affinity
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract IoHandlerFactory ioHandlerFactory();
|
protected abstract IoHandlerFactory ioHandlerFactory();
|
||||||
|
|||||||
+3
-3
@@ -13,7 +13,7 @@ index 480b6b2405706fd4d7158d0e160adafd84099887..ca8207f7bf6a71ae283c6c9739563e9d
|
|||||||
public float fallDamagePerDistance = 0.0F;
|
public float fallDamagePerDistance = 0.0F;
|
||||||
public @Nullable CompoundTag blockData;
|
public @Nullable CompoundTag blockData;
|
||||||
- public boolean forceTickAfterTeleportToDuplicate;
|
- public boolean forceTickAfterTeleportToDuplicate;
|
||||||
+ public boolean forceTickAfterTeleportToDuplicate = moe.monnairealms.camellia.config.modules.fixes.UnsafeTeleportationConfig.enabled; // Shiroha - Add config for unsafe teleportation
|
+ public boolean forceTickAfterTeleportToDuplicate = io.nanachiyo0721.shiroha.config.modules.fixes.UnsafeTeleportationConfig.enabled; // Shiroha - Add config for unsafe teleportation
|
||||||
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
||||||
public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ index 480b6b2405706fd4d7158d0e160adafd84099887..ca8207f7bf6a71ae283c6c9739563e9d
|
|||||||
boolean fromOrToEnd = (oldDimension == Level.END || newDimension == Level.END) && oldDimension != newDimension;
|
boolean fromOrToEnd = (oldDimension == Level.END || newDimension == Level.END) && oldDimension != newDimension;
|
||||||
Entity newEntity = super.teleport(transition);
|
Entity newEntity = super.teleport(transition);
|
||||||
- this.forceTickAfterTeleportToDuplicate = newEntity != null && fromOrToEnd && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper
|
- this.forceTickAfterTeleportToDuplicate = newEntity != null && fromOrToEnd && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper
|
||||||
+ this.forceTickAfterTeleportToDuplicate = newEntity != null && fromOrToEnd && (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation || moe.monnairealms.camellia.config.modules.fixes.UnsafeTeleportationConfig.enabled); // Paper // Shiroha - Add config for unsafe teleportation
|
+ this.forceTickAfterTeleportToDuplicate = newEntity != null && fromOrToEnd && (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation || io.nanachiyo0721.shiroha.config.modules.fixes.UnsafeTeleportationConfig.enabled); // Paper // Shiroha - Add config for unsafe teleportation
|
||||||
return newEntity;
|
return newEntity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ index d42bb2a1721e4ab8c9956e18c3ca418b8d648c59..1bb9e32fd0f112deeec936976da0899d
|
|||||||
player.showEndCredits();
|
player.showEndCredits();
|
||||||
} else {
|
} else {
|
||||||
+ // Shiroha start - Add config for unsafe teleportation
|
+ // Shiroha start - Add config for unsafe teleportation
|
||||||
+ if (moe.monnairealms.camellia.config.modules.fixes.UnsafeTeleportationConfig.enabled && !(entity instanceof net.minecraft.world.entity.player.Player)) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.fixes.UnsafeTeleportationConfig.enabled && !(entity instanceof net.minecraft.world.entity.player.Player)) {
|
||||||
+ entity.endPortalLogicAsync(pos);
|
+ entity.endPortalLogicAsync(pos);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ index e9ca1a15049b0211d10401cb78e953b93afaf6c7..56c0cac6e6e4c86a1db3c27a2c850d65
|
|||||||
for (final RunningTick tick : ticks) {
|
for (final RunningTick tick : ticks) {
|
||||||
final long elapsed = now - tick.lastPrint;
|
final long elapsed = now - tick.lastPrint;
|
||||||
- if (elapsed <= TimeUnit.SECONDS.toNanos(5L)) {
|
- if (elapsed <= TimeUnit.SECONDS.toNanos(5L)) {
|
||||||
+ if (elapsed <= TimeUnit.MILLISECONDS.toNanos(moe.monnairealms.camellia.config.modules.misc.FoliaWatchogConfig.tickRegionTimeOutMs)) { // Shiroha - Add config for watchdog timeout
|
+ if (elapsed <= TimeUnit.MILLISECONDS.toNanos(io.nanachiyo0721.shiroha.config.modules.misc.FoliaWatchogConfig.tickRegionTimeOutMs)) { // Shiroha - Add config for watchdog timeout
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tick.lastPrint = now;
|
tick.lastPrint = now;
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ index 52bcb87e96f7b5997559bd532481f548be03e6da..41b84a84a2ae24555a065d0779957b7b
|
|||||||
));
|
));
|
||||||
// Shiroha end
|
// Shiroha end
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.experiment.DisableEntityCatchConfig.enabled) throw t; // Shiroha - Add config to disable entity tick catchers
|
+ if (io.nanachiyo0721.shiroha.config.modules.experiment.DisableEntityCatchConfig.enabled) throw t; // Shiroha - Add config to disable entity tick catchers
|
||||||
// Paper start - Prevent block entity and entity crashes
|
// Paper start - Prevent block entity and entity crashes
|
||||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", io.papermc.paper.util.MCUtil.getLevelName(entity.level()), entity.getX(), entity.getY(), entity.getZ());
|
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", io.papermc.paper.util.MCUtil.getLevelName(entity.level()), entity.getX(), entity.getY(), entity.getZ());
|
||||||
MinecraftServer.LOGGER.error(msg, t);
|
MinecraftServer.LOGGER.error(msg, t);
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ index dffa0d4859ecd7e21a9345f946083c56205145a3..8f2e4fa566cefc2089fb6f306a37939f
|
|||||||
if (rawData.length == data.length) {
|
if (rawData.length == data.length) {
|
||||||
System.arraycopy(data, 0, rawData, 0, data.length);
|
System.arraycopy(data, 0, rawData, 0, data.length);
|
||||||
} else {
|
} else {
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.misc.DisableWarningConfig.disableHeightmapWarning) // Shiroha - Add config for heightmap warning
|
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.DisableWarningConfig.disableHeightmapWarning) // Shiroha - Add config for heightmap warning
|
||||||
LOGGER.warn("Ignoring heightmap data for chunk {}, size does not match; expected: {}, got: {}", chunk.getPos(), rawData.length, data.length);
|
LOGGER.warn("Ignoring heightmap data for chunk {}, size does not match; expected: {}, got: {}", chunk.getPos(), rawData.length, data.length);
|
||||||
primeHeightmaps(chunk, EnumSet.of(type));
|
primeHeightmaps(chunk, EnumSet.of(type));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ index bc9f6cc286536b87513de81855ad0b61cf787c84..6b91eab354d8e7c93bf148bfc1f5a611
|
|||||||
//CloneCommands.register(this.dispatcher, context); // Folia - region threading - TODO
|
//CloneCommands.register(this.dispatcher, context); // Folia - region threading - TODO
|
||||||
DamageCommand.register(this.dispatcher, context);
|
DamageCommand.register(this.dispatcher, context);
|
||||||
- //DataCommands.register(this.dispatcher); // Folia - region threading - TODO
|
- //DataCommands.register(this.dispatcher); // Folia - region threading - TODO
|
||||||
+ if(moe.monnairealms.camellia.config.modules.experiment.CommandConfig.data) { // Shiroha - Add force the data command to be enabled config
|
+ if(io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.data) { // Shiroha - Add force the data command to be enabled config
|
||||||
+ DataCommands.register(this.dispatcher); // Folia - region threading - TODO // Shiroha - Add force the data command to be enabled config
|
+ DataCommands.register(this.dispatcher); // Folia - region threading - TODO // Shiroha - Add force the data command to be enabled config
|
||||||
+ } // Shiroha - Add force the data command to be enabled config
|
+ } // Shiroha - Add force the data command to be enabled config
|
||||||
//DataPackCommand.register(this.dispatcher, context); // Folia - region threading - TODO
|
//DataPackCommand.register(this.dispatcher, context); // Folia - region threading - TODO
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ index 31f1583f29eebe5e13b5a7ac5116fdafc3592e5c..bc567e04791128cc0b78a234c496cf99
|
|||||||
|
|
||||||
public boolean performCommand(final ServerLevel level) {
|
public boolean performCommand(final ServerLevel level) {
|
||||||
- if (true) return false; // Folia - region threading
|
- if (true) return false; // Folia - region threading
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.experiment.CommandConfig.commandBlock) return false; // Folia - region threading // Shiroha - Add experimental config for command block command execution
|
+ if (!io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.commandBlock) return false; // Folia - region threading // Shiroha - Add experimental config for command block command execution
|
||||||
if (level.getGameTime() == this.lastExecution) {
|
if (level.getGameTime() == this.lastExecution) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -16,7 +16,7 @@ index 8bcc8b6f83ab4d5a472741185511b5d84f4974be..7e78e67c32f5b577518fe735eaba4ce2
|
|||||||
- if (testPosState.is(Blocks.TRIPWIRE) || testPosState.is(Blocks.TRIPWIRE_HOOK)) {
|
- if (testPosState.is(Blocks.TRIPWIRE) || testPosState.is(Blocks.TRIPWIRE_HOOK)) {
|
||||||
- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !testPosState.is(Blocks.TRIPWIRE)) level.setBlock(testPos, wireData.trySetValue(ATTACHED, attached), Block.UPDATE_ALL); // Paper - prevent tripwire from updating
|
- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !testPosState.is(Blocks.TRIPWIRE)) level.setBlock(testPos, wireData.trySetValue(ATTACHED, attached), Block.UPDATE_ALL); // Paper - prevent tripwire from updating
|
||||||
+ // Shiroha start - tripwire and tripwireHook dupe
|
+ // Shiroha start - tripwire and tripwireHook dupe
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.TripwireBehaviorConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.TripwireBehaviorConfig.enabled) {
|
||||||
+ level.setBlock(testPos, wireData.trySetValue(ATTACHED, attached), 3);
|
+ level.setBlock(testPos, wireData.trySetValue(ATTACHED, attached), 3);
|
||||||
+ level.getBlockState(testPos);
|
+ level.getBlockState(testPos);
|
||||||
+ } else {
|
+ } else {
|
||||||
@@ -41,7 +41,7 @@ index b67f5f7b76037ab77548c37a83e4d0918915223a..4407333785e8e76d08bb8b18510e6db9
|
|||||||
+ // Shiroha start - tripwire behavior modifier
|
+ // Shiroha start - tripwire behavior modifier
|
||||||
+ java.util.List<BlockPos> blockList1 = new java.util.ArrayList<>();
|
+ java.util.List<BlockPos> blockList1 = new java.util.ArrayList<>();
|
||||||
+ java.util.List<BlockPos> blockList2 = new java.util.ArrayList<>();
|
+ java.util.List<BlockPos> blockList2 = new java.util.ArrayList<>();
|
||||||
+ boolean flag21 = moe.monnairealms.camellia.config.modules.function.TripwireBehaviorConfig.behaviorMode == moe.monnairealms.camellia.enums.EnumTripwireBehavior.VANILLA21; for (int dz = -2; dz <= 2; dz++) {
|
+ boolean flag21 = io.nanachiyo0721.shiroha.config.modules.function.TripwireBehaviorConfig.behaviorMode == io.nanachiyo0721.shiroha.enums.EnumTripwireBehavior.VANILLA21; for (int dz = -2; dz <= 2; dz++) {
|
||||||
for (int dx = -2; dx <= 2; dx++) {
|
for (int dx = -2; dx <= 2; dx++) {
|
||||||
for (int dy = -1; dy < 3; dy++) {
|
for (int dy = -1; dy < 3; dy++) {
|
||||||
BlockPos blockPos = pos.set(origin).move(dx, dy, dz);
|
BlockPos blockPos = pos.set(origin).move(dx, dy, dz);
|
||||||
@@ -50,12 +50,12 @@ index b67f5f7b76037ab77548c37a83e4d0918915223a..4407333785e8e76d08bb8b18510e6db9
|
|||||||
if (dropResources) {
|
if (dropResources) {
|
||||||
- blockList.destroyBlock(blockPos, true, null); // CraftBukkit
|
- blockList.destroyBlock(blockPos, true, null); // CraftBukkit
|
||||||
+ boolean flag = false;
|
+ boolean flag = false;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.TripwireBehaviorConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.TripwireBehaviorConfig.enabled) {
|
||||||
+ switch (moe.monnairealms.camellia.config.modules.function.TripwireBehaviorConfig.behaviorMode) {
|
+ switch (io.nanachiyo0721.shiroha.config.modules.function.TripwireBehaviorConfig.behaviorMode) {
|
||||||
+ case moe.monnairealms.camellia.enums.EnumTripwireBehavior.VANILLA20: {
|
+ case io.nanachiyo0721.shiroha.enums.EnumTripwireBehavior.VANILLA20: {
|
||||||
+ flag = true;
|
+ flag = true;
|
||||||
+ }
|
+ }
|
||||||
+ case moe.monnairealms.camellia.enums.EnumTripwireBehavior.MIXED: {
|
+ case io.nanachiyo0721.shiroha.enums.EnumTripwireBehavior.MIXED: {
|
||||||
+ net.minecraft.world.level.block.state.BlockState state = newLevel.getBlockState(blockPos);
|
+ net.minecraft.world.level.block.state.BlockState state = newLevel.getBlockState(blockPos);
|
||||||
+ if (state.is(Blocks.TRIPWIRE)) {
|
+ if (state.is(Blocks.TRIPWIRE)) {
|
||||||
+ if (state.getValue(net.minecraft.world.level.block.TripWireBlock.DISARMED)) {
|
+ if (state.getValue(net.minecraft.world.level.block.TripWireBlock.DISARMED)) {
|
||||||
@@ -84,7 +84,7 @@ index b67f5f7b76037ab77548c37a83e4d0918915223a..4407333785e8e76d08bb8b18510e6db9
|
|||||||
- if (dropResources) {
|
- if (dropResources) {
|
||||||
- blockList.placeBlocks(state -> newLevel.destroyBlock(state.getPosition(), true, null));
|
- blockList.placeBlocks(state -> newLevel.destroyBlock(state.getPosition(), true, null));
|
||||||
+ // Shiroha start - prevent tripwire dupe in end platform generate
|
+ // Shiroha start - prevent tripwire dupe in end platform generate
|
||||||
+ if (flag21 || !moe.monnairealms.camellia.config.modules.function.TripwireBehaviorConfig.enabled) {
|
+ if (flag21 || !io.nanachiyo0721.shiroha.config.modules.function.TripwireBehaviorConfig.enabled) {
|
||||||
+ if (dropResources) {
|
+ if (dropResources) {
|
||||||
+ blockList.placeBlocks(state -> newLevel.destroyBlock(state.getPosition(), true, null));
|
+ blockList.placeBlocks(state -> newLevel.destroyBlock(state.getPosition(), true, null));
|
||||||
+ } else {
|
+ } else {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ index 4c9ea818be83ed3c4dacc762f4d0e8c0f177cd19..9fe5ee1c5578be6f6c5ad9a58e10669a
|
|||||||
this.player.sendSpawnProtectionMessage(pos);
|
this.player.sendSpawnProtectionMessage(pos);
|
||||||
} else if (this.awaitingPositionFromClient == null && (level.mayInteract(this.player, pos) || passthroughSignInteraction)) {
|
} else if (this.awaitingPositionFromClient == null && (level.mayInteract(this.player, pos) || passthroughSignInteraction)) {
|
||||||
// Paper end - Allow using signs inside spawn protection
|
// Paper end - Allow using signs inside spawn protection
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.fixes.ItemMultitaskConfig.enabled) { // Shiroha - Add config for item multitask
|
+ if (!io.nanachiyo0721.shiroha.config.modules.fixes.ItemMultitaskConfig.enabled) { // Shiroha - Add config for item multitask
|
||||||
this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
|
this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
|
||||||
+ } // Shiroha - Add config for item multitask
|
+ } // Shiroha - Add config for item multitask
|
||||||
InteractionResult interactionResult = this.player.gameMode.useItemOn(this.player, level, itemStack, hand, blockHit);
|
InteractionResult interactionResult = this.player.gameMode.useItemOn(this.player, level, itemStack, hand, blockHit);
|
||||||
@@ -28,7 +28,7 @@ index 4c9ea818be83ed3c4dacc762f4d0e8c0f177cd19..9fe5ee1c5578be6f6c5ad9a58e10669a
|
|||||||
- if (this.player.getInventory().getSelectedSlot() != packet.getSlot() && this.player.getUsedItemHand() == InteractionHand.MAIN_HAND) {
|
- if (this.player.getInventory().getSelectedSlot() != packet.getSlot() && this.player.getUsedItemHand() == InteractionHand.MAIN_HAND) {
|
||||||
- this.player.stopUsingItem();
|
- this.player.stopUsingItem();
|
||||||
+ // Shiroha start - Add item multitask config
|
+ // Shiroha start - Add item multitask config
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.fixes.ItemMultitaskConfig.enabled) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.fixes.ItemMultitaskConfig.enabled) {
|
||||||
+ if (this.player.getInventory().getSelectedSlot() != packet.getSlot() && this.player.getUsedItemHand() == InteractionHand.MAIN_HAND) {
|
+ if (this.player.getInventory().getSelectedSlot() != packet.getSlot() && this.player.getUsedItemHand() == InteractionHand.MAIN_HAND) {
|
||||||
+ this.player.stopUsingItem();
|
+ this.player.stopUsingItem();
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
+4
-4
@@ -14,7 +14,7 @@ index aa575f3b76ef70ffb9f0410e7e5cfe7af384bfbd..a00b086962b68d6f86cfb55eee6f61af
|
|||||||
private void globalTick(final long tickCount) {
|
private void globalTick(final long tickCount) {
|
||||||
++this.tickCount;
|
++this.tickCount;
|
||||||
+ // Shiroha start - Add a config to enable tick command
|
+ // Shiroha start - Add a config to enable tick command
|
||||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.tick) {
|
||||||
+ MinecraftServer.getServer().tickRateManager().tick();
|
+ MinecraftServer.getServer().tickRateManager().tick();
|
||||||
+ }
|
+ }
|
||||||
+ // Shiroha end - Add a config to enable tick command
|
+ // Shiroha end - Add a config to enable tick command
|
||||||
@@ -26,7 +26,7 @@ index aa575f3b76ef70ffb9f0410e7e5cfe7af384bfbd..a00b086962b68d6f86cfb55eee6f61af
|
|||||||
|
|
||||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||||
- if (world.tickTime) {
|
- if (world.tickTime) {
|
||||||
+ if ((!moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Shiroha - Add a config to enable tick command
|
+ if ((!io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Shiroha - Add a config to enable tick command
|
||||||
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ index 913161732b0affa70fb114dd4087a6102b611cba..ccd86db7b384d99d290869a155792b49
|
|||||||
// next start isn't updated until the end of this tick
|
// next start isn't updated until the end of this tick
|
||||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||||
+ // Shiroha start - Add a config to enable tick command
|
+ // Shiroha start - Add a config to enable tick command
|
||||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.tick) {
|
||||||
+ MinecraftServer.getServer().tickRateManager().endTickWork();
|
+ MinecraftServer.getServer().tickRateManager().endTickWork();
|
||||||
+ }
|
+ }
|
||||||
+ // Shiroha end - Add a config to enable tick command
|
+ // Shiroha end - Add a config to enable tick command
|
||||||
@@ -56,7 +56,7 @@ index 6b91eab354d8e7c93bf148bfc1f5a611f8ffcf86..d971cc9669aca1005c026133e7e7e7f9
|
|||||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||||
- //TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
- //TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||||
+ // Shiroha start - Add a config to enable tick command
|
+ // Shiroha start - Add a config to enable tick command
|
||||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.tick) {
|
||||||
+ TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
+ TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||||
+ }
|
+ }
|
||||||
+ // Shiroha end - Add a config to enable tick command
|
+ // Shiroha end - Add a config to enable tick command
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ index 7e612e03087d63f9b500f7e9f3442b1931bae7ee..9d46c1bc0629faca4ca9e0a2f830912b
|
|||||||
public static final TicketType PLAYER_SIMULATION = register("player_simulation", NO_TIMEOUT, FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
public static final TicketType PLAYER_SIMULATION = register("player_simulation", NO_TIMEOUT, FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
||||||
public static final TicketType FORCED = register("forced", NO_TIMEOUT, FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
public static final TicketType FORCED = register("forced", NO_TIMEOUT, FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
||||||
- public static final TicketType PORTAL = register("portal", 300L, FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
- public static final TicketType PORTAL = register("portal", 300L, FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
||||||
+ public static final TicketType PORTAL = register("portal", 300L, moe.monnairealms.camellia.config.modules.misc.SavePortalTicketsConfig.doSave ? FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE : FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE); // Shiroha - Add config for whether to save portal tickets
|
+ public static final TicketType PORTAL = register("portal", 300L, io.nanachiyo0721.shiroha.config.modules.misc.SavePortalTicketsConfig.doSave ? FLAG_PERSIST | FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE : FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE); // Shiroha - Add config for whether to save portal tickets
|
||||||
public static final TicketType ENDER_PEARL = register("ender_pearl", 40L, FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
public static final TicketType ENDER_PEARL = register("ender_pearl", 40L, FLAG_LOADING | FLAG_SIMULATION | FLAG_KEEP_DIMENSION_ACTIVE);
|
||||||
public static final TicketType UNKNOWN = register("unknown", 1L, FLAG_CAN_EXPIRE_IF_UNLOADED | FLAG_LOADING);
|
public static final TicketType UNKNOWN = register("unknown", 1L, FLAG_CAN_EXPIRE_IF_UNLOADED | FLAG_LOADING);
|
||||||
public static final TicketType PLUGIN = register("plugin", NO_TIMEOUT, FLAG_LOADING | FLAG_SIMULATION); // CraftBukkit
|
public static final TicketType PLUGIN = register("plugin", NO_TIMEOUT, FLAG_LOADING | FLAG_SIMULATION); // CraftBukkit
|
||||||
|
|||||||
@@ -37,20 +37,20 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..fe17157c4c6fc9ec745c5c11f6837e71
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ // Shiroha start - Add portal rate limiter
|
+ // Shiroha start - Add portal rate limiter
|
||||||
+ public final moe.monnairealms.camellia.utils.RateThrottler portalRateThrottler = new moe.monnairealms.camellia.utils.RateThrottler();
|
+ public final io.nanachiyo0721.shiroha.utils.RateThrottler portalRateThrottler = new io.nanachiyo0721.shiroha.utils.RateThrottler();
|
||||||
+ public final net.objecthunter.exp4j.Expression portalRateCapExpression = moe.monnairealms.camellia.config.modules.function.PortalRateLimiterConfig.getExpressionIfConfigured();
|
+ public final net.objecthunter.exp4j.Expression portalRateCapExpression = io.nanachiyo0721.shiroha.config.modules.function.PortalRateLimiterConfig.getExpressionIfConfigured();
|
||||||
+
|
+
|
||||||
+ private int computePortalRateCap() {
|
+ private int computePortalRateCap() {
|
||||||
+ // expression mode is disabled
|
+ // expression mode is disabled
|
||||||
+ if (this.portalRateCapExpression == null) {
|
+ if (this.portalRateCapExpression == null) {
|
||||||
+ return moe.monnairealms.camellia.config.modules.function.PortalRateLimiterConfig.maxPortalTeleportsPerTick;
|
+ return io.nanachiyo0721.shiroha.config.modules.function.PortalRateLimiterConfig.maxPortalTeleportsPerTick;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ final int tickingEntityCount = this.entityTickList.size();
|
+ final int tickingEntityCount = this.entityTickList.size();
|
||||||
+ final int tickingChunkCount = this.tickingChunks.size();
|
+ final int tickingChunkCount = this.tickingChunks.size();
|
||||||
+ final int playerCount = this.localPlayers.size();
|
+ final int playerCount = this.localPlayers.size();
|
||||||
+
|
+
|
||||||
+ return moe.monnairealms.camellia.config.modules.function.PortalRateLimiterConfig.computeExpression(
|
+ return io.nanachiyo0721.shiroha.config.modules.function.PortalRateLimiterConfig.computeExpression(
|
||||||
+ this.portalRateCapExpression,
|
+ this.portalRateCapExpression,
|
||||||
+ tickingEntityCount,
|
+ tickingEntityCount,
|
||||||
+ tickingChunkCount,
|
+ tickingChunkCount,
|
||||||
@@ -58,7 +58,7 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..fe17157c4c6fc9ec745c5c11f6837e71
|
|||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
+ public boolean isPortalTeleportationOutOfRate() {
|
+ public boolean isPortalTeleportationOutOfRate() {
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.function.PortalRateLimiterConfig.enabled) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.function.PortalRateLimiterConfig.enabled) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ index 2eb5fc819e2e17c69de87f8aa1a99e02bc5a62d5..ab0f42c6ed9ba4f920eefba4d1449ded
|
|||||||
private ItemStack lastItemInMainHand = ItemStack.EMPTY;
|
private ItemStack lastItemInMainHand = ItemStack.EMPTY;
|
||||||
private final ItemCooldowns cooldowns = this.createItemCooldowns();
|
private final ItemCooldowns cooldowns = this.createItemCooldowns();
|
||||||
private Optional<GlobalPos> lastDeathLocation = Optional.empty();
|
private Optional<GlobalPos> lastDeathLocation = Optional.empty();
|
||||||
+ public moe.monnairealms.camellia.functions.bars.TickableStatusBarList statusBarList = new moe.monnairealms.camellia.functions.bars.TickableStatusBarList(this); // Shiroha - Add status bars
|
+ public io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList statusBarList = new io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList(this); // Shiroha - Add status bars
|
||||||
public @Nullable FishingHook fishing;
|
public @Nullable FishingHook fishing;
|
||||||
public float hurtDir;
|
public float hurtDir;
|
||||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||||
|
|||||||
+54
-54
@@ -187,7 +187,7 @@ index 08ea8107fc8cbec3742278ab5cf03ef9048720f9..e59250af5d769076578017fb880e9168
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ensureMapOwnership() {
|
private void ensureMapOwnership() {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.copyOnWrite && this.subscriber != null) this.subscriber.lithium$notify((PatchedDataComponentMap) (Object) this, 0); // Leaves - Lithium Sleeping Block Entity (only notify when actually copying, matches Lithium mixin semantics)
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.copyOnWrite && this.subscriber != null) this.subscriber.lithium$notify((PatchedDataComponentMap) (Object) this, 0); // Leaves - Lithium Sleeping Block Entity (only notify when actually copying, matches Lithium mixin semantics)
|
||||||
if (this.copyOnWrite) {
|
if (this.copyOnWrite) {
|
||||||
this.patch = new Reference2ObjectArrayMap<>(this.patch);
|
this.patch = new Reference2ObjectArrayMap<>(this.patch);
|
||||||
this.copyOnWrite = false;
|
this.copyOnWrite = false;
|
||||||
@@ -222,7 +222,7 @@ index f2c5a6ce769d8a5fdb4b836eae6a61a4da91cb3f..968cdfa8a153b892963428967fd35c61
|
|||||||
try (ProblemReporter.ScopedCollector reporter = new ProblemReporter.ScopedCollector(this.entity.problemPath(), LOGGER)) {
|
try (ProblemReporter.ScopedCollector reporter = new ProblemReporter.ScopedCollector(this.entity.problemPath(), LOGGER)) {
|
||||||
this.entity.load(TagValueInput.create(reporter, this.entity.registryAccess(), tag));
|
this.entity.load(TagValueInput.create(reporter, this.entity.registryAccess(), tag));
|
||||||
this.entity.setUUID(uuid);
|
this.entity.setUUID(uuid);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.entity instanceof net.minecraft.world.entity.item.ItemEntity itemEntity) itemEntity.levelCallback.onMove(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.entity instanceof net.minecraft.world.entity.item.ItemEntity itemEntity) itemEntity.levelCallback.onMove(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ index 18e0572fe28461e57edb13e6ed6f5a0b6b3604c9..83914a091cc8fd6ef726f2732238b164
|
|||||||
+ // Shiroha start - Region threading for lithium sleeping block entity
|
+ // Shiroha start - Region threading for lithium sleeping block entity
|
||||||
+ private void notifyLithiumTrackerIfNeeded() {
|
+ private void notifyLithiumTrackerIfNeeded() {
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) return;
|
+ if (!io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) return;
|
||||||
+ var currentWorldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData();
|
+ var currentWorldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData();
|
||||||
+ if (currentWorldData == null || currentWorldData.world != this.level) return;
|
+ if (currentWorldData == null || currentWorldData.world != this.level) return;
|
||||||
+ if (this instanceof ItemEntity) {
|
+ if (this instanceof ItemEntity) {
|
||||||
@@ -319,7 +319,7 @@ index 9a75c6b38f1cabd4415067d781f6ad49f4d8ebc8..1606bb148203d4bf7bdacb58acf1144c
|
|||||||
|
|
||||||
public void setItem(final ItemStack itemStack) {
|
public void setItem(final ItemStack itemStack) {
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.subscriber != null) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.subscriber != null) {
|
||||||
+ ItemStack oldStack = this.getItem();
|
+ ItemStack oldStack = this.getItem();
|
||||||
+ if (oldStack != itemStack) {
|
+ if (oldStack != itemStack) {
|
||||||
+ if (!oldStack.isEmpty()) {
|
+ if (!oldStack.isEmpty()) {
|
||||||
@@ -454,7 +454,7 @@ index 136e018d83c5be90894358a97b23f5fcfa6c0d38..93c94a059873993b2e3e03a47c61f90d
|
|||||||
|
|
||||||
float totalPercent = 0.0F;
|
float totalPercent = 0.0F;
|
||||||
|
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && container instanceof org.leavesmc.leaves.lithium.api.inventory.LithiumInventory optimizedInventory) return org.leavesmc.leaves.lithium.common.hopper.InventoryHelper.getLithiumStackList(optimizedInventory).getSignalStrength(container); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && container instanceof org.leavesmc.leaves.lithium.api.inventory.LithiumInventory optimizedInventory) return org.leavesmc.leaves.lithium.common.hopper.InventoryHelper.getLithiumStackList(optimizedInventory).getSignalStrength(container); // Leaves - Lithium Sleeping Block Entity
|
||||||
for (int i = 0; i < container.getContainerSize(); i++) {
|
for (int i = 0; i < container.getContainerSize(); i++) {
|
||||||
ItemStack itemStack = container.getItem(i);
|
ItemStack itemStack = container.getItem(i);
|
||||||
if (!itemStack.isEmpty()) {
|
if (!itemStack.isEmpty()) {
|
||||||
@@ -480,7 +480,7 @@ index dc1e9acce122f3ebd7bf2b03150b4045db9493df..0bd2f2da669aa1a59d0af65aea3b305d
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public <T> @Nullable T set(final DataComponentType<T> type, final @Nullable T value) {
|
public <T> @Nullable T set(final DataComponentType<T> type, final @Nullable T value) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && type == DataComponents.ENCHANTMENTS && this.subscriber instanceof ChangeSubscriber.EnchantmentSubscriber<ItemStack> enchantmentSubscriber) enchantmentSubscriber.lithium$notifyAfterEnchantmentChange(this, this.subscriberData); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && type == DataComponents.ENCHANTMENTS && this.subscriber instanceof ChangeSubscriber.EnchantmentSubscriber<ItemStack> enchantmentSubscriber) enchantmentSubscriber.lithium$notifyAfterEnchantmentChange(this, this.subscriberData); // Leaves - Lithium Sleeping Block Entity
|
||||||
return this.components.set(type, value);
|
return this.components.set(type, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,7 +489,7 @@ index dc1e9acce122f3ebd7bf2b03150b4045db9493df..0bd2f2da669aa1a59d0af65aea3b305d
|
|||||||
|
|
||||||
public void setCount(final int count) {
|
public void setCount(final int count) {
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && count != this.count) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && count != this.count) {
|
||||||
+ if (this.subscriber instanceof ChangeSubscriber.CountChangeSubscriber<ItemStack> countChangeSubscriber) {
|
+ if (this.subscriber instanceof ChangeSubscriber.CountChangeSubscriber<ItemStack> countChangeSubscriber) {
|
||||||
+ countChangeSubscriber.lithium$notifyCount(this, this.subscriberData, count);
|
+ countChangeSubscriber.lithium$notifyCount(this, this.subscriberData, count);
|
||||||
+ }
|
+ }
|
||||||
@@ -666,7 +666,7 @@ index 69e3969242ad52168e947af209e6fa72f36178ae..82f041a6c72eb09d365b5f83dd473146
|
|||||||
}
|
}
|
||||||
// Paper end - Add CompostItemEvent and EntityCompostItemEvent
|
// Paper end - Add CompostItemEvent and EntityCompostItemEvent
|
||||||
this.level.levelEvent(LevelEvent.COMPOSTER_FILL, this.pos, newState != this.state ? 1 : 0);
|
this.level.levelEvent(LevelEvent.COMPOSTER_FILL, this.pos, newState != this.state ? 1 : 0);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.changed = false; // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.changed = false; // Leaves - Lithium Sleeping Block Entity
|
||||||
this.removeItemNoUpdate(0);
|
this.removeItemNoUpdate(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -685,7 +685,7 @@ index 2339099e05af80b234e64778822b012cc6318157..d828f2535a4860d96f3ca6c95a54e00b
|
|||||||
@Override
|
@Override
|
||||||
protected void onPlace(final BlockState state, final Level level, final BlockPos pos, final BlockState oldState, final boolean movedByPiston) {
|
protected void onPlace(final BlockState state, final Level level, final BlockPos pos, final BlockState oldState, final boolean movedByPiston) {
|
||||||
this.updateNeighborsInFront(level, pos, state);
|
this.updateNeighborsInFront(level, pos, state);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this instanceof ComparatorBlock && !oldState.is(Blocks.COMPARATOR)) org.leavesmc.leaves.lithium.common.block.entity.inventory_comparator_tracking.ComparatorTracking.notifyNearbyBlockEntitiesAboutNewComparator(level, pos); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this instanceof ComparatorBlock && !oldState.is(Blocks.COMPARATOR)) org.leavesmc.leaves.lithium.common.block.entity.inventory_comparator_tracking.ComparatorTracking.notifyNearbyBlockEntitiesAboutNewComparator(level, pos); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -708,7 +708,7 @@ index 3932da81757ea0ab7a41617165f5b64dc44ea3eb..2ccabd98f9fa7f2a228c7ee320d0f8c9
|
|||||||
this.checkPoweredState(level, pos, state);
|
this.checkPoweredState(level, pos, state);
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ //invalidate caches of nearby hoppers when placing an update suppressed hopper
|
+ //invalidate caches of nearby hoppers when placing an update suppressed hopper
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && level.getBlockState(pos) != state) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && level.getBlockState(pos) != state) {
|
||||||
+ for (Direction direction : UPDATE_SHAPE_ORDER) {
|
+ for (Direction direction : UPDATE_SHAPE_ORDER) {
|
||||||
+ BlockEntity hopper = level.lithium$getLoadedExistingBlockEntity(pos.relative(direction));
|
+ BlockEntity hopper = level.lithium$getLoadedExistingBlockEntity(pos.relative(direction));
|
||||||
+ if (hopper instanceof org.leavesmc.leaves.lithium.common.hopper.UpdateReceiver updateReceiver) {
|
+ if (hopper instanceof org.leavesmc.leaves.lithium.common.hopper.UpdateReceiver updateReceiver) {
|
||||||
@@ -724,7 +724,7 @@ index 3932da81757ea0ab7a41617165f5b64dc44ea3eb..2ccabd98f9fa7f2a228c7ee320d0f8c9
|
|||||||
protected void neighborChanged(
|
protected void neighborChanged(
|
||||||
final BlockState state, final Level level, final BlockPos pos, final Block block, final @Nullable Orientation orientation, final boolean movedByPiston
|
final BlockState state, final Level level, final BlockPos pos, final Block block, final @Nullable Orientation orientation, final boolean movedByPiston
|
||||||
) {
|
) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && level.lithium$getLoadedExistingBlockEntity(pos) instanceof org.leavesmc.leaves.lithium.common.hopper.UpdateReceiver updateReceiver) updateReceiver.lithium$invalidateCacheOnUndirectedNeighborUpdate(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && level.lithium$getLoadedExistingBlockEntity(pos) instanceof org.leavesmc.leaves.lithium.common.hopper.UpdateReceiver updateReceiver) updateReceiver.lithium$invalidateCacheOnUndirectedNeighborUpdate(); // Leaves - Lithium Sleeping Block Entity
|
||||||
this.checkPoweredState(level, pos, state);
|
this.checkPoweredState(level, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -771,7 +771,7 @@ index 78dbdf43ac9095eb3cf0b0653bab2603d5527ff4..601471d7578b93f30d8033bfab4d4050
|
|||||||
this.recipesUsed.clear();
|
this.recipesUsed.clear();
|
||||||
this.recipesUsed.putAll(input.read("RecipesUsed", RECIPES_USED_CODEC).orElse(Map.of()));
|
this.recipesUsed.putAll(input.read("RecipesUsed", RECIPES_USED_CODEC).orElse(Map.of()));
|
||||||
this.cookSpeedMultiplier = input.getDoubleOr("Paper.CookSpeedMultiplier", 1); // Paper - cook speed multiplier API
|
this.cookSpeedMultiplier = input.getDoubleOr("Paper.CookSpeedMultiplier", 1); // Paper - cook speed multiplier API
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -779,7 +779,7 @@ index 78dbdf43ac9095eb3cf0b0653bab2603d5527ff4..601471d7578b93f30d8033bfab4d4050
|
|||||||
if (changed) {
|
if (changed) {
|
||||||
setChanged(level, pos, state);
|
setChanged(level, pos, state);
|
||||||
}
|
}
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(state); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(state); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void consumeFuel(final NonNullList<ItemStack> items, final ItemStack fuel) {
|
private static void consumeFuel(final NonNullList<ItemStack> items, final ItemStack fuel) {
|
||||||
@@ -854,7 +854,7 @@ index 118af4e35eec652e7eb8a484a44652cfabc1bab5..fd2c62a4c9a9dbd81c3c4d1410694e5c
|
|||||||
@Override
|
@Override
|
||||||
protected void setItems(final NonNullList<ItemStack> items) {
|
protected void setItems(final NonNullList<ItemStack> items) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -904,7 +904,7 @@ index 0e594121b60aa5a01b5bbe94b80350f2fc698b1a..f100d51275522748664592453c9c51cb
|
|||||||
super.loadAdditional(input);
|
super.loadAdditional(input);
|
||||||
this.lockKey = LockCode.fromTag(input);
|
this.lockKey = LockCode.fromTag(input);
|
||||||
this.name = parseCustomNameSafe(input, "CustomName");
|
this.name = parseCustomNameSafe(input, "CustomName");
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this instanceof InventoryChangeTracker inventoryChangeTracker) inventoryChangeTracker.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this instanceof InventoryChangeTracker inventoryChangeTracker) inventoryChangeTracker.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1042,7 +1042,7 @@ index 2887cbaa954771d0fe357d8ec8df75073e9afa91..69227ca2534a3abe3be3d5c704335bc5
|
|||||||
if (this.level != null) {
|
if (this.level != null) {
|
||||||
if (IGNORE_TILE_UPDATES.get().booleanValue()) return; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
if (IGNORE_TILE_UPDATES.get().booleanValue()) return; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
||||||
setChanged(this.level, this.worldPosition, this.blockState);
|
setChanged(this.level, this.worldPosition, this.blockState);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) lithium$handleSetChanged(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) lithium$handleSetChanged(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,7 +1052,7 @@ index 2887cbaa954771d0fe357d8ec8df75073e9afa91..69227ca2534a3abe3be3d5c704335bc5
|
|||||||
public void setRemoved() {
|
public void setRemoved() {
|
||||||
+ this.hasComparators = UNKNOWN; // Leaves - Lithium Sleeping Block Entity
|
+ this.hasComparators = UNKNOWN; // Leaves - Lithium Sleeping Block Entity
|
||||||
this.remove = true;
|
this.remove = true;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.level != null && !this.level.isClientSide() && this instanceof InventoryChangeTracker inventoryChangeTracker) inventoryChangeTracker.lithium$emitRemoved(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.level != null && !this.level.isClientSide() && this instanceof InventoryChangeTracker inventoryChangeTracker) inventoryChangeTracker.lithium$emitRemoved(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearRemoved() {
|
public void clearRemoved() {
|
||||||
@@ -1060,7 +1060,7 @@ index 2887cbaa954771d0fe357d8ec8df75073e9afa91..69227ca2534a3abe3be3d5c704335bc5
|
|||||||
public void setBlockState(final BlockState blockState) {
|
public void setBlockState(final BlockState blockState) {
|
||||||
this.validateBlockState(blockState);
|
this.validateBlockState(blockState);
|
||||||
this.blockState = blockState;
|
this.blockState = blockState;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$handleSetBlockState(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$handleSetBlockState(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void applyImplicitComponents(final DataComponentGetter components) {
|
protected void applyImplicitComponents(final DataComponentGetter components) {
|
||||||
@@ -1114,7 +1114,7 @@ index 5d26efb1feb1fd7d0f3bcc0fd7678b303518312a..bd320bcaa7964bf5532c6cb9634a5227
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void serverTick(final Level level, final BlockPos pos, final BlockState selfState, final BrewingStandBlockEntity entity) {
|
public static void serverTick(final Level level, final BlockPos pos, final BlockState selfState, final BrewingStandBlockEntity entity) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(selfState); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(selfState); // Leaves - Lithium Sleeping Block Entity
|
||||||
ItemStack fuel = entity.items.get(4);
|
ItemStack fuel = entity.items.get(4);
|
||||||
if (entity.fuel <= 0 && fuel.is(ItemTags.BREWING_FUEL)) {
|
if (entity.fuel <= 0 && fuel.is(ItemTags.BREWING_FUEL)) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -1122,7 +1122,7 @@ index 5d26efb1feb1fd7d0f3bcc0fd7678b303518312a..bd320bcaa7964bf5532c6cb9634a5227
|
|||||||
fuel.shrink(1);
|
fuel.shrink(1);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
setChanged(level, pos, selfState);
|
setChanged(level, pos, selfState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,7 +1131,7 @@ index 5d26efb1feb1fd7d0f3bcc0fd7678b303518312a..bd320bcaa7964bf5532c6cb9634a5227
|
|||||||
entity.brewTime = 0;
|
entity.brewTime = 0;
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
setChanged(level, pos, selfState);
|
setChanged(level, pos, selfState);
|
||||||
} else if (brewable && entity.fuel > 0) {
|
} else if (brewable && entity.fuel > 0) {
|
||||||
entity.fuel--;
|
entity.fuel--;
|
||||||
@@ -1139,7 +1139,7 @@ index 5d26efb1feb1fd7d0f3bcc0fd7678b303518312a..bd320bcaa7964bf5532c6cb9634a5227
|
|||||||
entity.brewTime = event.getBrewingTime(); // 400 -> event.getTotalBrewTime() // Paper - use brewing time from event
|
entity.brewTime = event.getBrewingTime(); // 400 -> event.getTotalBrewTime() // Paper - use brewing time from event
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
entity.ingredient = ingredient.getItem();
|
entity.ingredient = ingredient.getItem();
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
setChanged(level, pos, selfState);
|
setChanged(level, pos, selfState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1147,7 +1147,7 @@ index 5d26efb1feb1fd7d0f3bcc0fd7678b303518312a..bd320bcaa7964bf5532c6cb9634a5227
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.fuel = input.getByteOr("Fuel", (byte)0);
|
this.fuel = input.getByteOr("Fuel", (byte)0);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1223,7 +1223,7 @@ index 64d0d60d9025de2b5eb16b31c6437372d4c20c5e..54070ae70b1d4a6ed4fd51ba758dead4
|
|||||||
if (changed) {
|
if (changed) {
|
||||||
setChanged(level, pos, state);
|
setChanged(level, pos, state);
|
||||||
- }
|
- }
|
||||||
+ } else if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
+ } else if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void cooldownTick(final Level level, final BlockPos pos, final BlockState state, final CampfireBlockEntity entity) {
|
public static void cooldownTick(final Level level, final BlockPos pos, final BlockState state, final CampfireBlockEntity entity) {
|
||||||
@@ -1232,7 +1232,7 @@ index 64d0d60d9025de2b5eb16b31c6437372d4c20c5e..54070ae70b1d4a6ed4fd51ba758dead4
|
|||||||
if (changed) {
|
if (changed) {
|
||||||
setChanged(level, pos, state);
|
setChanged(level, pos, state);
|
||||||
- }
|
- }
|
||||||
+ } else if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
+ } else if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void particleTick(final Level level, final BlockPos pos, final BlockState state, final CampfireBlockEntity entity) {
|
public static void particleTick(final Level level, final BlockPos pos, final BlockState state, final CampfireBlockEntity entity) {
|
||||||
@@ -1240,7 +1240,7 @@ index 64d0d60d9025de2b5eb16b31c6437372d4c20c5e..54070ae70b1d4a6ed4fd51ba758dead4
|
|||||||
System.arraycopy(cookingState, 0, this.stopCooking, 0, Math.min(this.stopCooking.length, bytes.capacity()));
|
System.arraycopy(cookingState, 0, this.stopCooking, 0, Math.min(this.stopCooking.length, bytes.capacity()));
|
||||||
});
|
});
|
||||||
// Paper end - Add more Campfire API
|
// Paper end - Add more Campfire API
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1248,7 +1248,7 @@ index 64d0d60d9025de2b5eb16b31c6437372d4c20c5e..54070ae70b1d4a6ed4fd51ba758dead4
|
|||||||
this.cookingTime[slot] = event.getTotalCookTime(); // recipe.get().value().cookingTime() -> event.getTotalCookTime()
|
this.cookingTime[slot] = event.getTotalCookTime(); // recipe.get().value().cookingTime() -> event.getTotalCookTime()
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.cookingProgress[slot] = 0;
|
this.cookingProgress[slot] = 0;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
this.items.set(slot, placeItem.consumeAndReturn(1, sourceEntity));
|
this.items.set(slot, placeItem.consumeAndReturn(1, sourceEntity));
|
||||||
serverLevel.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(sourceEntity, this.getBlockState()));
|
serverLevel.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(sourceEntity, this.getBlockState()));
|
||||||
this.markUpdated();
|
this.markUpdated();
|
||||||
@@ -1300,7 +1300,7 @@ index a9273aebb5c8efe78e88158f11e1ee2af0dff3f1..c0d636ebe2fd9f2c63c1b9cb62ba257b
|
|||||||
|
|
||||||
public static void lidAnimateTick(final Level level, final BlockPos pos, final BlockState state, final ChestBlockEntity entity) {
|
public static void lidAnimateTick(final Level level, final BlockPos pos, final BlockState state, final ChestBlockEntity entity) {
|
||||||
entity.chestLidController.tickLid();
|
entity.chestLidController.tickLid();
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playSound(final Level level, final BlockPos worldPosition, final BlockState blockState, final SoundEvent event) {
|
public static void playSound(final Level level, final BlockPos worldPosition, final BlockState blockState, final SoundEvent event) {
|
||||||
@@ -1308,7 +1308,7 @@ index a9273aebb5c8efe78e88158f11e1ee2af0dff3f1..c0d636ebe2fd9f2c63c1b9cb62ba257b
|
|||||||
@Override
|
@Override
|
||||||
public boolean triggerEvent(final int b0, final int b1) {
|
public boolean triggerEvent(final int b0, final int b1) {
|
||||||
if (b0 == EVENT_SET_OPEN_COUNT) {
|
if (b0 == EVENT_SET_OPEN_COUNT) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
this.chestLidController.shouldBeOpen(b1 > 0);
|
this.chestLidController.shouldBeOpen(b1 > 0);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -1316,7 +1316,7 @@ index a9273aebb5c8efe78e88158f11e1ee2af0dff3f1..c0d636ebe2fd9f2c63c1b9cb62ba257b
|
|||||||
@Override
|
@Override
|
||||||
protected void setItems(final NonNullList<ItemStack> items) {
|
protected void setItems(final NonNullList<ItemStack> items) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1410,7 +1410,7 @@ index 02d86d0675de22546a225dd6eaac5875eba0ce54..d3aff67c70b7c69daf6c6674325b26a4
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.containerData.set(9, input.getIntOr("triggered", 0));
|
this.containerData.set(9, input.getIntOr("triggered", 0));
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1418,12 +1418,12 @@ index 02d86d0675de22546a225dd6eaac5875eba0ce54..d3aff67c70b7c69daf6c6674325b26a4
|
|||||||
level.setBlock(blockPos, blockState.setValue(CrafterBlock.CRAFTING, false), Block.UPDATE_ALL);
|
level.setBlock(blockPos, blockState.setValue(CrafterBlock.CRAFTING, false), Block.UPDATE_ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && craftingTicksRemaining < 0) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && craftingTicksRemaining < 0) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCraftingTicksRemaining(final int maxCraftingTicks) {
|
public void setCraftingTicksRemaining(final int maxCraftingTicks) {
|
||||||
this.craftingTicksRemaining = maxCraftingTicks;
|
this.craftingTicksRemaining = maxCraftingTicks;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.isSleeping() && this.level != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRedstoneSignal() {
|
public int getRedstoneSignal() {
|
||||||
@@ -1488,7 +1488,7 @@ index 736f5fd76f4a86ab16740904b5c0823413d65cd2..8995d91aed44b8c7933eaf0111332d83
|
|||||||
@Override
|
@Override
|
||||||
protected void setItems(final NonNullList<ItemStack> items) {
|
protected void setItems(final NonNullList<ItemStack> items) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1525,13 +1525,13 @@ index 6109d8da984b398bb1eb6cd6ab9a55f0511a615c..4b92beb60cb56dc35107dd2c2e7cc6a2
|
|||||||
|
|
||||||
public static void lidAnimateTick(final Level level, final BlockPos pos, final BlockState state, final EnderChestBlockEntity entity) {
|
public static void lidAnimateTick(final Level level, final BlockPos pos, final BlockState state, final EnderChestBlockEntity entity) {
|
||||||
entity.chestLidController.tickLid();
|
entity.chestLidController.tickLid();
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean triggerEvent(final int b0, final int b1) {
|
public boolean triggerEvent(final int b0, final int b1) {
|
||||||
if (b0 == ChestBlock.EVENT_SET_OPEN_COUNT) {
|
if (b0 == ChestBlock.EVENT_SET_OPEN_COUNT) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
this.chestLidController.shouldBeOpen(b1 > 0);
|
this.chestLidController.shouldBeOpen(b1 > 0);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -1633,7 +1633,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlockState(final BlockState blockState) {
|
public void setBlockState(final BlockState blockState) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.level != null && !this.level.isClientSide() && blockState.getValue(HopperBlock.FACING) != this.getBlockState().getValue(HopperBlock.FACING)) this.invalidateCachedData(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.level != null && !this.level.isClientSide() && blockState.getValue(HopperBlock.FACING) != this.getBlockState().getValue(HopperBlock.FACING)) this.invalidateCachedData(); // Leaves - Lithium Sleeping Block Entity
|
||||||
super.setBlockState(blockState);
|
super.setBlockState(blockState);
|
||||||
this.facing = blockState.getValue(HopperBlock.FACING);
|
this.facing = blockState.getValue(HopperBlock.FACING);
|
||||||
}
|
}
|
||||||
@@ -1641,7 +1641,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
entity.setCooldown(0);
|
entity.setCooldown(0);
|
||||||
// Spigot start
|
// Spigot start
|
||||||
boolean result = tryMoveItems(level, pos, state, entity, () -> suckInItems(level, entity));
|
boolean result = tryMoveItems(level, pos, state, entity, () -> suckInItems(level, entity));
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleepingConditions(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) entity.checkSleepingConditions(); // Leaves - Lithium Sleeping Block Entity
|
||||||
if (!result && entity.level.spigotConfig.hopperCheck > 1) {
|
if (!result && entity.level.spigotConfig.hopperCheck > 1) {
|
||||||
entity.setCooldown(entity.level.spigotConfig.hopperCheck);
|
entity.setCooldown(entity.level.spigotConfig.hopperCheck);
|
||||||
}
|
}
|
||||||
@@ -1650,7 +1650,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
entity.setCooldown(level.spigotConfig.hopperTransfer); // Spigot
|
entity.setCooldown(level.spigotConfig.hopperTransfer); // Spigot
|
||||||
setChanged(level, pos, state);
|
setChanged(level, pos, state);
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled
|
||||||
+ && !entity.isOnCooldown()
|
+ && !entity.isOnCooldown()
|
||||||
+ && !entity.isSleeping()
|
+ && !entity.isSleeping()
|
||||||
+ && !state.getValue(HopperBlock.ENABLED)) {
|
+ && !state.getValue(HopperBlock.ENABLED)) {
|
||||||
@@ -1673,14 +1673,14 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
|
|
||||||
private static boolean ejectItems(final Level level, final BlockPos blockPos, final HopperBlockEntity self) {
|
private static boolean ejectItems(final Level level, final BlockPos blockPos, final HopperBlockEntity self) {
|
||||||
- Container container = getAttachedContainer(level, blockPos, self);
|
- Container container = getAttachedContainer(level, blockPos, self);
|
||||||
+ Container container = moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? self.getInsertInventory(level) : getAttachedContainer(level, blockPos, self); // Leaves - Lithium Sleeping Block Entity
|
+ Container container = io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? self.getInsertInventory(level) : getAttachedContainer(level, blockPos, self); // Leaves - Lithium Sleeping Block Entity
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Direction direction = self.facing.getOpposite();
|
Direction direction = self.facing.getOpposite();
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
||||||
+ Boolean res = lithiumInsert(level, blockPos, self, container);
|
+ Boolean res = lithiumInsert(level, blockPos, self, container);
|
||||||
+ if (res != null) {
|
+ if (res != null) {
|
||||||
+ return res;
|
+ return res;
|
||||||
@@ -1696,12 +1696,12 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
BlockState blockState = level.getBlockState(blockPos);
|
BlockState blockState = level.getBlockState(blockPos);
|
||||||
- Container container = getSourceContainer(level, hopper, blockPos, blockState);
|
- Container container = getSourceContainer(level, hopper, blockPos, blockState);
|
||||||
- if (container != null) {
|
- if (container != null) {
|
||||||
+ Container sourceContainer = moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? getExtractInventory(level, hopper, blockPos, blockState) : getSourceContainer(level, hopper, blockPos, blockState); // Leaves - Lithium Sleeping Block Entity
|
+ Container sourceContainer = io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? getExtractInventory(level, hopper, blockPos, blockState) : getSourceContainer(level, hopper, blockPos, blockState); // Leaves - Lithium Sleeping Block Entity
|
||||||
+ if (sourceContainer != null) {
|
+ if (sourceContainer != null) {
|
||||||
Direction direction = Direction.DOWN;
|
Direction direction = Direction.DOWN;
|
||||||
worldData.skipPullModeEventFire = worldData.skipHopperEvents; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
worldData.skipPullModeEventFire = worldData.skipHopperEvents; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
||||||
+ Boolean res = lithiumExtract(level, hopper, sourceContainer);
|
+ Boolean res = lithiumExtract(level, hopper, sourceContainer);
|
||||||
+ if (res != null) {
|
+ if (res != null) {
|
||||||
+ return res;
|
+ return res;
|
||||||
@@ -1721,7 +1721,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
&& !blockState.is(BlockTags.DOES_NOT_BLOCK_HOPPERS);
|
&& !blockState.is(BlockTags.DOES_NOT_BLOCK_HOPPERS);
|
||||||
if (!isBlocked) {
|
if (!isBlocked) {
|
||||||
- for (ItemEntity entity : getItemsAtAndAbove(level, hopper)) {
|
- for (ItemEntity entity : getItemsAtAndAbove(level, hopper)) {
|
||||||
+ for (ItemEntity entity : moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? lithiumGetInputItemEntities(level, hopper) : getItemsAtAndAbove(level, hopper)) { // Leaves - Lithium Sleeping Block Entity
|
+ for (ItemEntity entity : io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled ? lithiumGetInputItemEntities(level, hopper) : getItemsAtAndAbove(level, hopper)) { // Leaves - Lithium Sleeping Block Entity
|
||||||
if (addItem(hopper, entity)) {
|
if (addItem(hopper, entity)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1739,7 +1739,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
|
|
||||||
public void setCooldown(final int time) {
|
public void setCooldown(final int time) {
|
||||||
+ // Leaves start - Lithium Sleeping Block Entity
|
+ // Leaves start - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) {
|
||||||
+ if (time == 7) {
|
+ if (time == 7) {
|
||||||
+ if (this.tickedGameTime == Long.MAX_VALUE) {
|
+ if (this.tickedGameTime == Long.MAX_VALUE) {
|
||||||
+ this.sleepOnlyCurrentTick();
|
+ this.sleepOnlyCurrentTick();
|
||||||
@@ -1758,7 +1758,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..fa34778b1ce7a34385c192182e521b00
|
|||||||
@Override
|
@Override
|
||||||
protected void setItems(final NonNullList<ItemStack> items) {
|
protected void setItems(final NonNullList<ItemStack> items) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void entityInside(final Level level, final BlockPos pos, final BlockState blockState, final Entity entity, final HopperBlockEntity hopper) {
|
public static void entityInside(final Level level, final BlockPos pos, final BlockState blockState, final Entity entity, final HopperBlockEntity hopper) {
|
||||||
@@ -2538,7 +2538,7 @@ index 174e39fb109bef3dd27ebc14aa13f6faabb10547..e898171acd7c4ef83d630e25c71222f4
|
|||||||
doNeighborUpdates(level, pos, blockState);
|
doNeighborUpdates(level, pos, blockState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.animationStatus == ShulkerBoxBlockEntity.AnimationStatus.CLOSED && this.progressOld == 0.0f && this.progress == 0.0f) this.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.animationStatus == ShulkerBoxBlockEntity.AnimationStatus.CLOSED && this.progressOld == 0.0f && this.progress == 0.0f) this.lithium$startSleeping(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShulkerBoxBlockEntity.AnimationStatus getAnimationStatus() {
|
public ShulkerBoxBlockEntity.AnimationStatus getAnimationStatus() {
|
||||||
@@ -2546,7 +2546,7 @@ index 174e39fb109bef3dd27ebc14aa13f6faabb10547..e898171acd7c4ef83d630e25c71222f4
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean triggerEvent(final int b0, final int b1) {
|
public boolean triggerEvent(final int b0, final int b1) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && this.sleepingTicker != null) this.wakeUpNow(); // Leaves - Lithium Sleeping Block Entity
|
||||||
if (b0 == EVENT_SET_OPEN_COUNT) {
|
if (b0 == EVENT_SET_OPEN_COUNT) {
|
||||||
this.openCount = b1;
|
this.openCount = b1;
|
||||||
if (b1 == 0) {
|
if (b1 == 0) {
|
||||||
@@ -2554,7 +2554,7 @@ index 174e39fb109bef3dd27ebc14aa13f6faabb10547..e898171acd7c4ef83d630e25c71222f4
|
|||||||
@Override
|
@Override
|
||||||
protected void setItems(final NonNullList<ItemStack> items) {
|
protected void setItems(final NonNullList<ItemStack> items) {
|
||||||
this.itemStacks = items;
|
this.itemStacks = items;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$emitStackListReplaced(); // Leaves - Lithium Sleeping Block Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2628,7 +2628,7 @@ index c78d77089e34c4bb559f173b449bfb7d91b05d5c..f4cce42ddd319cfd11cc43d68044f51b
|
|||||||
final BlockState neighbourState,
|
final BlockState neighbourState,
|
||||||
final RandomSource random
|
final RandomSource random
|
||||||
) {
|
) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$handleShapeUpdate(level, state, pos, neighbourPos, neighbourState); // Leaves - Lithium Sleeping Block Entity /* Triggers when a shape update (= update that observers can detect) is sent */
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) this.lithium$handleShapeUpdate(level, state, pos, neighbourPos, neighbourState); // Leaves - Lithium Sleeping Block Entity /* Triggers when a shape update (= update that observers can detect) is sent */
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2669,14 +2669,14 @@ index 0e84b695a677e71f443a29c78fc5025eec7ae7f4..3cb6c24a21538569d73b95803dde7e4a
|
|||||||
this.tickersInLevel.compute(blockEntity.getBlockPos(), (blockPos, existingTicker) -> {
|
this.tickersInLevel.compute(blockEntity.getBlockPos(), (blockPos, existingTicker) -> {
|
||||||
TickingBlockEntity actualTicker = this.createTicker(blockEntity, ticker);
|
TickingBlockEntity actualTicker = this.createTicker(blockEntity, ticker);
|
||||||
if (existingTicker != null) {
|
if (existingTicker != null) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(existingTicker); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(existingTicker); // Leaves - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) existingTicker.createdBy = blockEntity; // Shiroha - Region threading for lithium sleeping block entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) existingTicker.createdBy = blockEntity; // Shiroha - Region threading for lithium sleeping block entity
|
||||||
existingTicker.rebind(actualTicker);
|
existingTicker.rebind(actualTicker);
|
||||||
return (LevelChunk.RebindableTickingBlockEntityWrapper)existingTicker;
|
return (LevelChunk.RebindableTickingBlockEntityWrapper)existingTicker;
|
||||||
} else if (this.isInLevel()) {
|
} else if (this.isInLevel()) {
|
||||||
LevelChunk.RebindableTickingBlockEntityWrapper result = new LevelChunk.RebindableTickingBlockEntityWrapper(actualTicker);
|
LevelChunk.RebindableTickingBlockEntityWrapper result = new LevelChunk.RebindableTickingBlockEntityWrapper(actualTicker);
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(result); // Leaves - Lithium Sleeping Block Entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(result); // Leaves - Lithium Sleeping Block Entity
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) result.createdBy = blockEntity; // Shiroha - Region threading for lithium sleeping block entity
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LeavesSleepingBlockEntityConfig.enabled) result.createdBy = blockEntity; // Shiroha - Region threading for lithium sleeping block entity
|
||||||
this.level.addBlockEntityTicker(result);
|
this.level.addBlockEntityTicker(result);
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ index 3c59325cb82a66a74d6605b51db83ff63e59e089..cab6061af551352a27e623af2ced3f49
|
|||||||
ProfilerFiller profiler = Profiler.get();
|
ProfilerFiller profiler = Profiler.get();
|
||||||
profiler.push("sensing");
|
profiler.push("sensing");
|
||||||
- this.sensing.tick();
|
- this.sensing.tick();
|
||||||
+ if (idBasedTickCount % moe.monnairealms.camellia.config.modules.optimizations.PetalReduceSensorWorkConfig.delayTicks == 0 || !moe.monnairealms.camellia.config.modules.optimizations.PetalReduceSensorWorkConfig.enabled) this.sensing.tick(); // Shiroha - Petal - Reduce sensor work
|
+ if (idBasedTickCount % io.nanachiyo0721.shiroha.config.modules.optimizations.PetalReduceSensorWorkConfig.delayTicks == 0 || !io.nanachiyo0721.shiroha.config.modules.optimizations.PetalReduceSensorWorkConfig.enabled) this.sensing.tick(); // Shiroha - Petal - Reduce sensor work
|
||||||
profiler.pop();
|
profiler.pop();
|
||||||
- int idBasedTickCount = this.tickCount + this.getId();
|
- int idBasedTickCount = this.tickCount + this.getId();
|
||||||
+ //int idBasedTickCount = this.tickCount + this.getId(); // Shiroha - Petal - Move up
|
+ //int idBasedTickCount = this.tickCount + this.getId(); // Shiroha - Petal - Move up
|
||||||
|
|||||||
+3
-3
@@ -20,8 +20,8 @@ index f649c46cc9a34e646f8da3244866c6e011d30aa3..b0b017f61f1c7832068d2ba7b10efc72
|
|||||||
+ private int notLobotomizedCount = 0; // Purpur
|
+ private int notLobotomizedCount = 0; // Purpur
|
||||||
+
|
+
|
||||||
+ private boolean checkLobotomized() {
|
+ private boolean checkLobotomized() {
|
||||||
+ int interval = moe.monnairealms.camellia.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeCheckInterval;
|
+ int interval = io.nanachiyo0721.shiroha.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeCheckInterval;
|
||||||
+ boolean shouldCheckForTradeLocked = moe.monnairealms.camellia.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeWaitUntilTradeLocked;
|
+ boolean shouldCheckForTradeLocked = io.nanachiyo0721.shiroha.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeWaitUntilTradeLocked;
|
||||||
+ if (this.notLobotomizedCount > 3) {
|
+ if (this.notLobotomizedCount > 3) {
|
||||||
+ // check half as often if not lobotomized for the last 3+ consecutive checks
|
+ // check half as often if not lobotomized for the last 3+ consecutive checks
|
||||||
+ interval *= 2;
|
+ interval *= 2;
|
||||||
@@ -75,7 +75,7 @@ index f649c46cc9a34e646f8da3244866c6e011d30aa3..b0b017f61f1c7832068d2ba7b10efc72
|
|||||||
ProfilerFiller profiler = Profiler.get();
|
ProfilerFiller profiler = Profiler.get();
|
||||||
profiler.push("villagerBrain");
|
profiler.push("villagerBrain");
|
||||||
+ // Purpur start
|
+ // Purpur start
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeEnabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeEnabled) {
|
||||||
+ // treat as inactive if lobotomized
|
+ // treat as inactive if lobotomized
|
||||||
+ inactive = inactive || checkLobotomized();
|
+ inactive = inactive || checkLobotomized();
|
||||||
+ } else {
|
+ } else {
|
||||||
|
|||||||
+2
-2
@@ -50,8 +50,8 @@ index 721e3b083846fd363a31311196bc4c681969215c..9f49f0b801e23a82492e6b2865ba6049
|
|||||||
+ if (previousX != newX || previousZ != newZ) {
|
+ if (previousX != newX || previousZ != newZ) {
|
||||||
+ boolean isLoaded = ((net.minecraft.server.level.ServerChunkCache) this.level().getChunkSource()).getChunkAtIfLoadedImmediately(newX, newZ) != null;
|
+ boolean isLoaded = ((net.minecraft.server.level.ServerChunkCache) this.level().getChunkSource()).getChunkAtIfLoadedImmediately(newX, newZ) != null;
|
||||||
+ if (!isLoaded) {
|
+ if (!isLoaded) {
|
||||||
+ if (currRegionData.pufferfish$loadedThisTick > moe.monnairealms.camellia.config.modules.optimizations.ProjectileChunkReduceConfig.maxProjectileLoadsPerTick) {
|
+ if (currRegionData.pufferfish$loadedThisTick > io.nanachiyo0721.shiroha.config.modules.optimizations.ProjectileChunkReduceConfig.maxProjectileLoadsPerTick) {
|
||||||
+ if (++this.loadedLifetime > moe.monnairealms.camellia.config.modules.optimizations.ProjectileChunkReduceConfig.maxProjectileLoadsPerProjectile) {
|
+ if (++this.loadedLifetime > io.nanachiyo0721.shiroha.config.modules.optimizations.ProjectileChunkReduceConfig.maxProjectileLoadsPerProjectile) {
|
||||||
+ this.discard();
|
+ this.discard();
|
||||||
+ }
|
+ }
|
||||||
+ return;
|
+ return;
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ index cab6061af551352a27e623af2ced3f497c5af2b3..e87af051432e0118fc4c16d7ac321b30
|
|||||||
super.inactiveTick();
|
super.inactiveTick();
|
||||||
if (!this.aware) return; // Paper - Do not tick AI for inactive unaware mobs
|
if (!this.aware) return; // Paper - Do not tick AI for inactive unaware mobs
|
||||||
- if (this.goalSelector.inactiveTick()) {
|
- if (this.goalSelector.inactiveTick()) {
|
||||||
+ boolean isThrottled = moe.monnairealms.camellia.config.modules.optimizations.EntityGoalSelectorInactiveTickConfig.enabled && _pufferfish_inactiveTickDisableCounter++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking
|
+ boolean isThrottled = io.nanachiyo0721.shiroha.config.modules.optimizations.EntityGoalSelectorInactiveTickConfig.enabled && _pufferfish_inactiveTickDisableCounter++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking
|
||||||
+ if (this.goalSelector.inactiveTick() && !isThrottled) { // Pufferfish
|
+ if (this.goalSelector.inactiveTick() && !isThrottled) { // Pufferfish
|
||||||
this.goalSelector.tick();
|
this.goalSelector.tick();
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-13
@@ -16,7 +16,7 @@ index 86ee3b3ae028597576b9549bc4954dfcbaa6732c..65121d2b17432f0ec5e8ec106cd20539
|
|||||||
Component seedText = ComponentUtils.copyOnClickText(String.valueOf(seed));
|
Component seedText = ComponentUtils.copyOnClickText(String.valueOf(seed));
|
||||||
c.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", seedText), false);
|
c.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", seedText), false);
|
||||||
+ // Leaf start - Matter - SecureSeed Command
|
+ // Leaf start - Matter - SecureSeed Command
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ su.plo.matter.Globals.setupGlobals(c.getSource().getLevel());
|
+ su.plo.matter.Globals.setupGlobals(c.getSource().getLevel());
|
||||||
+ String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed);
|
+ String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed);
|
||||||
+ Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr);
|
+ Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr);
|
||||||
@@ -37,7 +37,7 @@ index 639a5400499266f83cf8b7c1251483cd8fb699a4..24e355b71c196cb0ea7958ef7d33fb49
|
|||||||
long seed = WorldOptions.parseSeed(levelSeed).orElse(WorldOptions.randomSeed());
|
long seed = WorldOptions.parseSeed(levelSeed).orElse(WorldOptions.randomSeed());
|
||||||
- this.worldOptions = new WorldOptions(seed, generateStructures, false);
|
- this.worldOptions = new WorldOptions(seed, generateStructures, false);
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ String featureSeedStr = this.get("feature-level-seed", "");
|
+ String featureSeedStr = this.get("feature-level-seed", "");
|
||||||
+ long[] featureSeed = su.plo.matter.Globals.parseSeed(featureSeedStr)
|
+ long[] featureSeed = su.plo.matter.Globals.parseSeed(featureSeedStr)
|
||||||
+ .orElse(su.plo.matter.Globals.createRandomWorldSeed());
|
+ .orElse(su.plo.matter.Globals.createRandomWorldSeed());
|
||||||
@@ -84,7 +84,7 @@ index 984ec15bdebcb541cd6ee9014a654ea58988f6f1..582fcd553e85ff6e2437c117dc0a655c
|
|||||||
ChunkPos chunkPos = ChunkPos.containing(pos);
|
ChunkPos chunkPos = ChunkPos.containing(pos);
|
||||||
- boolean slimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkPos.x(), chunkPos.z(), worldGenLevel.getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
- boolean slimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkPos.x(), chunkPos.z(), worldGenLevel.getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ boolean isSlimeChunk = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ boolean isSlimeChunk = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? level.getChunk(chunkPos.x(), chunkPos.z()).isSlimeChunk()
|
+ ? level.getChunk(chunkPos.x(), chunkPos.z()).isSlimeChunk()
|
||||||
+ : WorldgenRandom.seedSlimeChunk(chunkPos.x(), chunkPos.z(), worldGenLevel.getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
+ : WorldgenRandom.seedSlimeChunk(chunkPos.x(), chunkPos.z(), worldGenLevel.getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||||
+ boolean slimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
+ boolean slimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
||||||
@@ -135,7 +135,7 @@ index b7325170369299a74be35ecc66a6446c301605b8..e3a57d7fc2ad9244594870ffac7c6625
|
|||||||
List<FeatureSorter.StepFeatureData> featureList = this.featuresPerStep.get();
|
List<FeatureSorter.StepFeatureData> featureList = this.featuresPerStep.get();
|
||||||
- WorldgenRandom random = new WorldgenRandom(new XoroshiroRandomSource(RandomSupport.generateUniqueSeed()));
|
- WorldgenRandom random = new WorldgenRandom(new XoroshiroRandomSource(RandomSupport.generateUniqueSeed()));
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ WorldgenRandom random = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? new su.plo.matter.WorldgenCryptoRandom(origin.getX(), origin.getZ(), su.plo.matter.Globals.Salt.UNDEFINED, 0)
|
+ ? new su.plo.matter.WorldgenCryptoRandom(origin.getX(), origin.getZ(), su.plo.matter.Globals.Salt.UNDEFINED, 0)
|
||||||
+ : new WorldgenRandom(new XoroshiroRandomSource(RandomSupport.generateUniqueSeed()));
|
+ : new WorldgenRandom(new XoroshiroRandomSource(RandomSupport.generateUniqueSeed()));
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
@@ -150,7 +150,7 @@ index b7325170369299a74be35ecc66a6446c301605b8..e3a57d7fc2ad9244594870ffac7c6625
|
|||||||
- random.setLargeFeatureSeed(state.getLevelSeed(), sourceChunkPos.x(), sourceChunkPos.z());
|
- random.setLargeFeatureSeed(state.getLevelSeed(), sourceChunkPos.x(), sourceChunkPos.z());
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random;
|
+ WorldgenRandom random;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ random = new su.plo.matter.WorldgenCryptoRandom(sourceChunkPos.x(), sourceChunkPos.z(), su.plo.matter.Globals.Salt.GENERATE_FEATURE, 0);
|
+ random = new su.plo.matter.WorldgenCryptoRandom(sourceChunkPos.x(), sourceChunkPos.z(), su.plo.matter.Globals.Salt.GENERATE_FEATURE, 0);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
||||||
@@ -171,11 +171,11 @@ index 8b4ea2b16da45bcefe743990866e43c94e121825..144bf28dac810c7009ec3ce06b4f08e9
|
|||||||
- RandomSource random = RandomSource.create();
|
- RandomSource random = RandomSource.create();
|
||||||
- // Paper start - Add missing structure set seed configs
|
- // Paper start - Add missing structure set seed configs
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ RandomSource random = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ RandomSource random = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.STRONGHOLDS, 0)
|
+ ? new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.STRONGHOLDS, 0)
|
||||||
+ :RandomSource.create();
|
+ :RandomSource.create();
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ //Paper start - Add missing structure set seed configs
|
+ //Paper start - Add missing structure set seed configs
|
||||||
if (this.conf.strongholdSeed != null && structureSet.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) {
|
if (this.conf.strongholdSeed != null && structureSet.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) {
|
||||||
random.setSeed(this.conf.strongholdSeed);
|
random.setSeed(this.conf.strongholdSeed);
|
||||||
@@ -209,7 +209,7 @@ index 4ad94af024d81b7dfe910dcee2a6ec7a9b200d56..075bffa587e7ca394421a3a4d03b7eb1
|
|||||||
public class WorldOptions {
|
public class WorldOptions {
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ private static final com.google.gson.Gson gson = new com.google.gson.Gson();
|
+ private static final com.google.gson.Gson gson = new com.google.gson.Gson();
|
||||||
+ private static final boolean isSecureSeedEnabled = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled;
|
+ private static final boolean isSecureSeedEnabled = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled;
|
||||||
public static final MapCodec<WorldOptions> CODEC = RecordCodecBuilder.mapCodec(
|
public static final MapCodec<WorldOptions> CODEC = RecordCodecBuilder.mapCodec(
|
||||||
- i -> i.group(
|
- i -> i.group(
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
@@ -336,7 +336,7 @@ index baed0479a4552676844989868ee4c37ffa344def..bcda97e7439945d2a559e45e33f55ccf
|
|||||||
int numPoints = config.distributionPoints().sample(random);
|
int numPoints = config.distributionPoints().sample(random);
|
||||||
- WorldgenRandom random1 = new WorldgenRandom(new LegacyRandomSource(level.getSeed()));
|
- WorldgenRandom random1 = new WorldgenRandom(new LegacyRandomSource(level.getSeed()));
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random1 = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ WorldgenRandom random1 = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.GEODE_FEATURE, 0)
|
+ ? new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.GEODE_FEATURE, 0)
|
||||||
+ : new WorldgenRandom(new LegacyRandomSource(level.getSeed()));
|
+ : new WorldgenRandom(new LegacyRandomSource(level.getSeed()));
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
@@ -352,7 +352,7 @@ index f1e13ede1f7345089ece8d8ef391f7fd5e55c445..2bfc339e3301deb0d46a92b1c138ff1a
|
|||||||
|
|
||||||
private static WorldgenRandom makeRandom(final long seed, final ChunkPos chunkPos) {
|
private static WorldgenRandom makeRandom(final long seed, final ChunkPos chunkPos) {
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ return new su.plo.matter.WorldgenCryptoRandom(chunkPos.x(), chunkPos.z(), su.plo.matter.Globals.Salt.GENERATE_FEATURE, seed);
|
+ return new su.plo.matter.WorldgenCryptoRandom(chunkPos.x(), chunkPos.z(), su.plo.matter.Globals.Salt.GENERATE_FEATURE, seed);
|
||||||
+ }
|
+ }
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
@@ -371,7 +371,7 @@ index 1310b2ca994b8f6d3d92bdc676fe44de3619cc09..ae55fd5d4b08f00557b384671412ee31
|
|||||||
- random.setLargeFeatureWithSalt(seed, spacedGridX, spacedGridZ, this.salt());
|
- random.setLargeFeatureWithSalt(seed, spacedGridX, spacedGridZ, this.salt());
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random;
|
+ WorldgenRandom random;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ random = new su.plo.matter.WorldgenCryptoRandom(spacedGridX, spacedGridZ, su.plo.matter.Globals.Salt.POTENTIONAL_FEATURE, this.salt);
|
+ random = new su.plo.matter.WorldgenCryptoRandom(spacedGridX, spacedGridZ, su.plo.matter.Globals.Salt.POTENTIONAL_FEATURE, this.salt);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
||||||
@@ -393,7 +393,7 @@ index 646df0237a5a2863f75e6c5f9dfe9ddf512c540f..3fddb11c1bd0277d878d90d0dae8e5ed
|
|||||||
- random.setLargeFeatureWithSalt(seed, sourceX, sourceZ, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT); // Paper - Add missing structure set seed configs
|
- random.setLargeFeatureWithSalt(seed, sourceX, sourceZ, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT); // Paper - Add missing structure set seed configs
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random;
|
+ WorldgenRandom random;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled) {
|
||||||
+ random = new su.plo.matter.WorldgenCryptoRandom(sourceX, sourceZ, su.plo.matter.Globals.Salt.UNDEFINED, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT);
|
+ random = new su.plo.matter.WorldgenCryptoRandom(sourceX, sourceZ, su.plo.matter.Globals.Salt.UNDEFINED, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
+ random = new WorldgenRandom(new LegacyRandomSource(0L));
|
||||||
@@ -414,7 +414,7 @@ index b92da7acae0789d955a9f71072b95ed030b879e2..2c81e8e7dd0380233b0f17e3d83ff704
|
|||||||
LevelHeightAccessor heightAccessor = context.heightAccessor();
|
LevelHeightAccessor heightAccessor = context.heightAccessor();
|
||||||
- WorldgenRandom random = context.random();
|
- WorldgenRandom random = context.random();
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldgenRandom random = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ WorldgenRandom random = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? new su.plo.matter.WorldgenCryptoRandom(context.chunkPos().x(), context.chunkPos().z(), su.plo.matter.Globals.Salt.JIGSAW_PLACEMENT, 0)
|
+ ? new su.plo.matter.WorldgenCryptoRandom(context.chunkPos().x(), context.chunkPos().z(), su.plo.matter.Globals.Salt.JIGSAW_PLACEMENT, 0)
|
||||||
+ : context.random();
|
+ : context.random();
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ index 7b74440fbbe79c018ad59d24b99da0c6d4a9d007..20536f4ed6d19ec2cc6a54aa9c5c980d
|
|||||||
- this.random = settings.getRandomSource().newInstance(seed).forkPositional();
|
- this.random = settings.getRandomSource().newInstance(seed).forkPositional();
|
||||||
+ // this.random = settings.getRandomSource().newInstance(seed).forkPositional(); // Shiroha - Add secure seed V2 with Blake3
|
+ // this.random = settings.getRandomSource().newInstance(seed).forkPositional(); // Shiroha - Add secure seed V2 with Blake3
|
||||||
+ // Shiroha start - Add secure seed V2 with Blake3
|
+ // Shiroha start - Add secure seed V2 with Blake3
|
||||||
+ final long[] secureWorldSeed = (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2)
|
+ final long[] secureWorldSeed = (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2)
|
||||||
+ ? su.plo.matter.HashingV2.expandLevelSeedTo1024Bits(seed)
|
+ ? su.plo.matter.HashingV2.expandLevelSeedTo1024Bits(seed)
|
||||||
+ : null;
|
+ : null;
|
||||||
+
|
+
|
||||||
+ long terrainSeed = (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2)
|
+ long terrainSeed = (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2)
|
||||||
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.BASE_TERRAIN)
|
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.BASE_TERRAIN)
|
||||||
+ : seed;
|
+ : seed;
|
||||||
+ long aquiferSeed = (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2)
|
+ long aquiferSeed = (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2)
|
||||||
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.AQUIFER)
|
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.AQUIFER)
|
||||||
+ : seed;
|
+ : seed;
|
||||||
+ long oreSeed = (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2)
|
+ long oreSeed = (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2)
|
||||||
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.ORE)
|
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.ORE)
|
||||||
+ : seed;
|
+ : seed;
|
||||||
+ // Shiroha end
|
+ // Shiroha end
|
||||||
@@ -45,7 +45,7 @@ index 7b74440fbbe79c018ad59d24b99da0c6d4a9d007..20536f4ed6d19ec2cc6a54aa9c5c980d
|
|||||||
|
|
||||||
private RandomSource newLegacyInstance(final long seedOffset) {
|
private RandomSource newLegacyInstance(final long seedOffset) {
|
||||||
+ // Shiroha start - Add secure seed V2 with Blake3
|
+ // Shiroha start - Add secure seed V2 with Blake3
|
||||||
+ if (moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2) {
|
||||||
+ long climateSeed = su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.CLIMATE);
|
+ long climateSeed = su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.CLIMATE);
|
||||||
+ return new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.UNDEFINED, climateSeed + seed);
|
+ return new su.plo.matter.WorldgenCryptoRandom(0, 0, su.plo.matter.Globals.Salt.UNDEFINED, climateSeed + seed);
|
||||||
+ }
|
+ }
|
||||||
@@ -60,7 +60,7 @@ index 7b74440fbbe79c018ad59d24b99da0c6d4a9d007..20536f4ed6d19ec2cc6a54aa9c5c980d
|
|||||||
- return function instanceof DensityFunctions.EndIslandDensityFunction ? new DensityFunctions.EndIslandDensityFunction(seed) : function;
|
- return function instanceof DensityFunctions.EndIslandDensityFunction ? new DensityFunctions.EndIslandDensityFunction(seed) : function;
|
||||||
+ return function instanceof DensityFunctions.EndIslandDensityFunction //? new DensityFunctions.EndIslandDensityFunction(seed)// Shiroha - Add secure seed V2 with Blake3
|
+ return function instanceof DensityFunctions.EndIslandDensityFunction //? new DensityFunctions.EndIslandDensityFunction(seed)// Shiroha - Add secure seed V2 with Blake3
|
||||||
+ // Shiroha start - Add secure seed V2 with Blake3
|
+ // Shiroha start - Add secure seed V2 with Blake3
|
||||||
+ ? new DensityFunctions.EndIslandDensityFunction((moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled && moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.version == 2)
|
+ ? new DensityFunctions.EndIslandDensityFunction((io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled && io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.version == 2)
|
||||||
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.SURFACE)
|
+ ? su.plo.matter.HashingV2.getTerrainSeed(secureWorldSeed, su.plo.matter.HashingV2.TerrainType.SURFACE)
|
||||||
+ : seed)
|
+ : seed)
|
||||||
+ // Shiroha end
|
+ // Shiroha end
|
||||||
|
|||||||
+11
-11
@@ -31,13 +31,13 @@ index 7de3bbecea2f11e4e1cb65408729f346760dc9b8..b72b81849c7fedad8efc5c7b112e89eb
|
|||||||
- if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
- if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||||
+ // Leaf start - Configurable vanilla username check
|
+ // Leaf start - Configurable vanilla username check
|
||||||
+ boolean allPrevChecksPassed;
|
+ boolean allPrevChecksPassed;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.enabled
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.enabled
|
||||||
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation
|
&& io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation
|
||||||
&& !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) {
|
&& !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) {
|
||||||
- Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
|
- Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
|
||||||
+ allPrevChecksPassed = true;
|
+ allPrevChecksPassed = true;
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) {
|
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) {
|
||||||
+ Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
|
+ Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } else {
|
||||||
@@ -52,7 +52,7 @@ index 7de3bbecea2f11e4e1cb65408729f346760dc9b8..b72b81849c7fedad8efc5c7b112e89eb
|
|||||||
try {
|
try {
|
||||||
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot
|
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot
|
||||||
+ // Leaf start - Configurable vanilla username check
|
+ // Leaf start - Configurable vanilla username check
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) {
|
||||||
+ if (server.playerDataStorage.load(new net.minecraft.server.players.NameAndId(gameprofile)).orElse(null) != null) {
|
+ if (server.playerDataStorage.load(new net.minecraft.server.players.NameAndId(gameprofile)).orElse(null) != null) {
|
||||||
+ server.getPlayerList().playedPlayers.add(packet.name());
|
+ server.getPlayerList().playedPlayers.add(packet.name());
|
||||||
+ } else if (allPrevChecksPassed) {
|
+ } else if (allPrevChecksPassed) {
|
||||||
@@ -101,7 +101,7 @@ index 134d74d8ed2c61b28cda0bd5107dea88bc114f51..0392962ed409e3f970904de05926c356
|
|||||||
player.getAdvancements().clearTriggers();
|
player.getAdvancements().clearTriggers();
|
||||||
this.players.remove(player);
|
this.players.remove(player);
|
||||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) this.playedPlayers.remove(player.getGameProfile().name()); // Leaf - Configurable vanilla username check
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) this.playedPlayers.remove(player.getGameProfile().name()); // Leaf - Configurable vanilla username check
|
||||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||||
UUID uuid = player.getUUID();
|
UUID uuid = player.getUUID();
|
||||||
ServerPlayer serverPlayer = this.playersByUUID.get(uuid);
|
ServerPlayer serverPlayer = this.playersByUUID.get(uuid);
|
||||||
@@ -114,7 +114,7 @@ index 7957e0cfc43909c5268698a11c4933d20b4d9155..1cee7f26a5cd55b146b89da5912952d1
|
|||||||
|
|
||||||
public static boolean isValidPlayerName(final String name) {
|
public static boolean isValidPlayerName(final String name) {
|
||||||
+ // Leaf start - Configurable vanilla username check
|
+ // Leaf start - Configurable vanilla username check
|
||||||
+ return isValidPlayerName(name, moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.shouldSkipNonPlayerNameCheck());
|
+ return isValidPlayerName(name, io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.shouldSkipNonPlayerNameCheck());
|
||||||
+ }
|
+ }
|
||||||
+ public static boolean isValidPlayerNameVanilla(final String name) {
|
+ public static boolean isValidPlayerNameVanilla(final String name) {
|
||||||
+ return name.length() <= 16 && name.chars().filter(i -> i <= 32 || i >= 127).findAny().isEmpty();
|
+ return name.length() <= 16 && name.chars().filter(i -> i <= 32 || i >= 127).findAny().isEmpty();
|
||||||
@@ -130,9 +130,9 @@ index 7957e0cfc43909c5268698a11c4933d20b4d9155..1cee7f26a5cd55b146b89da5912952d1
|
|||||||
// Paper start - Username validation
|
// Paper start - Username validation
|
||||||
public static boolean isReasonablePlayerName(final String name) {
|
public static boolean isReasonablePlayerName(final String name) {
|
||||||
+ // Leaf start - Configurable vanilla username check
|
+ // Leaf start - Configurable vanilla username check
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin && net.minecraft.server.MinecraftServer.getServer().getPlayerList().playedPlayers.contains(name)) return true;
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin && net.minecraft.server.MinecraftServer.getServer().getPlayerList().playedPlayers.contains(name)) return true;
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.useCustomUsernameRegex()) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.useCustomUsernameRegex()) {
|
||||||
+ return moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.usernameRegex.matcher(name).matches() && name.length() <= 16; // Leaf - Configurable username check
|
+ return io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.usernameRegex.matcher(name).matches() && name.length() <= 16; // Leaf - Configurable username check
|
||||||
+ }
|
+ }
|
||||||
+ // Leaf end - Configurable vanilla username check
|
+ // Leaf end - Configurable vanilla username check
|
||||||
if (name.isEmpty() || name.length() > 16) {
|
if (name.isEmpty() || name.length() > 16) {
|
||||||
@@ -151,14 +151,14 @@ index f1b62a6e0d8176d8ba1875e78cc730ee55b1b0c1..c0329b8304cce7ecfe53b102027f73bf
|
|||||||
+ if (nameOrId.left().isEmpty()) {
|
+ if (nameOrId.left().isEmpty()) {
|
||||||
+ return nameOrId;
|
+ return nameOrId;
|
||||||
+ }
|
+ }
|
||||||
+ return moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(nameOrId.left().get()) ? Either.left("INVALID_OWNER") : nameOrId;
|
+ return io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(nameOrId.left().get()) ? Either.left("INVALID_OWNER") : nameOrId;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static Optional<String> sanitizePartialPlayerName(final Optional<String> name) {
|
+ private static Optional<String> sanitizePartialPlayerName(final Optional<String> name) {
|
||||||
+ if (name.isEmpty()) {
|
+ if (name.isEmpty()) {
|
||||||
+ return name;
|
+ return name;
|
||||||
+ }
|
+ }
|
||||||
+ return moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(name.get()) ? Optional.of("INVALID_OWNER") : name;
|
+ return io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(name.get()) ? Optional.of("INVALID_OWNER") : name;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static Either<GameProfile, ResolvableProfile.Partial> sanitizeStaticPlayerName(final Either<GameProfile, ResolvableProfile.Partial> contents) {
|
+ private static Either<GameProfile, ResolvableProfile.Partial> sanitizeStaticPlayerName(final Either<GameProfile, ResolvableProfile.Partial> contents) {
|
||||||
@@ -166,7 +166,7 @@ index f1b62a6e0d8176d8ba1875e78cc730ee55b1b0c1..c0329b8304cce7ecfe53b102027f73bf
|
|||||||
+ return contents;
|
+ return contents;
|
||||||
+ }
|
+ }
|
||||||
+ GameProfile gameProfile = contents.left().get();
|
+ GameProfile gameProfile = contents.left().get();
|
||||||
+ return moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(gameProfile.name()) ? Either.left(new GameProfile(gameProfile.id(), "INVALID_OWNER", gameProfile.properties())) : contents;
|
+ return io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.enforceSkullValidation && !net.minecraft.util.StringUtil.isValidPlayerNameVanilla(gameProfile.name()) ? Either.left(new GameProfile(gameProfile.id(), "INVALID_OWNER", gameProfile.properties())) : contents;
|
||||||
+ }
|
+ }
|
||||||
+ // Leaf end - Configurable vanilla username check - Enforce skull validation
|
+ // Leaf end - Configurable vanilla username check - Enforce skull validation
|
||||||
+
|
+
|
||||||
|
|||||||
+5
-5
@@ -15,7 +15,7 @@ index d0dff5850717bd083b7a29104a61754ce1b2f822..d0809790e3b3526622af4f7a7eca6c52
|
|||||||
}
|
}
|
||||||
- if (this.allPacketCounts != null ||
|
- if (this.allPacketCounts != null ||
|
||||||
- io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass())) {
|
- io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass())) {
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.misc.PaperPacketLimiterConfig.forceDisable && (this.allPacketCounts != null || // Shiroha - Add config to force disable the packet limiter of Paper
|
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.PaperPacketLimiterConfig.forceDisable && (this.allPacketCounts != null || // Shiroha - Add config to force disable the packet limiter of Paper
|
||||||
+ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass()))) { // Shiroha - Add config to force disable the packet limiter of Paper
|
+ io.papermc.paper.configuration.GlobalConfiguration.get().packetLimiter.overrides.containsKey(packet.getClass()))) { // Shiroha - Add config to force disable the packet limiter of Paper
|
||||||
long time = System.nanoTime();
|
long time = System.nanoTime();
|
||||||
synchronized (PACKET_LIMIT_LOCK) {
|
synchronized (PACKET_LIMIT_LOCK) {
|
||||||
@@ -29,7 +29,7 @@ index 9fe5ee1c5578be6f6c5ad9a58e10669a4b7ac75a..ee4b6d293c32c00e6173cf8efe8aecce
|
|||||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); // Paper - AsyncTabCompleteEvent; run this async
|
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); // Paper - AsyncTabCompleteEvent; run this async
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
- if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.nameAndId()) && !this.server.isSingleplayerOwner(this.player.nameAndId())) { // Paper - configurable tab spam limits
|
- if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.nameAndId()) && !this.server.isSingleplayerOwner(this.player.nameAndId())) { // Paper - configurable tab spam limits
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.misc.PaperPacketLimiterConfig.forceDisable && !this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.nameAndId()) && !this.server.isSingleplayerOwner(this.player.nameAndId())) { // Paper - configurable tab spam limits // Leaves - can disable
|
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.PaperPacketLimiterConfig.forceDisable && !this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.nameAndId()) && !this.server.isSingleplayerOwner(this.player.nameAndId())) { // Paper - configurable tab spam limits // Leaves - can disable
|
||||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ index 9fe5ee1c5578be6f6c5ad9a58e10669a4b7ac75a..ee4b6d293c32c00e6173cf8efe8aecce
|
|||||||
private long lastLimitedPacket = -1;
|
private long lastLimitedPacket = -1;
|
||||||
|
|
||||||
private boolean checkLimit(long timestamp) {
|
private boolean checkLimit(long timestamp) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.PaperPacketLimiterConfig.forceDisable) return true; // Leaves - disable
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.PaperPacketLimiterConfig.forceDisable) return true; // Leaves - disable
|
||||||
if (!io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold.enabled()) {
|
if (!io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold.enabled()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ index 9fe5ee1c5578be6f6c5ad9a58e10669a4b7ac75a..ee4b6d293c32c00e6173cf8efe8aecce
|
|||||||
|
|
||||||
// Spigot start - spam exclusions
|
// Spigot start - spam exclusions
|
||||||
private void detectRateSpam(final TickThrottler throttler, final String message) {
|
private void detectRateSpam(final TickThrottler throttler, final String message) {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.misc.PaperPacketLimiterConfig.forceDisable) return; // Leaves - disable
|
+ if (io.nanachiyo0721.shiroha.config.modules.misc.PaperPacketLimiterConfig.forceDisable) return; // Leaves - disable
|
||||||
+ // CraftBukkit start - replaced with thread safe throttle
|
+ // CraftBukkit start - replaced with thread safe throttle
|
||||||
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
||||||
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
|
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
|
||||||
@@ -55,7 +55,7 @@ index 9fe5ee1c5578be6f6c5ad9a58e10669a4b7ac75a..ee4b6d293c32c00e6173cf8efe8aecce
|
|||||||
public void handlePlaceRecipe(final ServerboundPlaceRecipePacket packet) {
|
public void handlePlaceRecipe(final ServerboundPlaceRecipePacket packet) {
|
||||||
// Paper start - auto recipe limit
|
// Paper start - auto recipe limit
|
||||||
- if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
- if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||||
+ if (!moe.monnairealms.camellia.config.modules.misc.PaperPacketLimiterConfig.forceDisable && !org.bukkit.Bukkit.isPrimaryThread()) { // Leaves - can disable
|
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.PaperPacketLimiterConfig.forceDisable && !org.bukkit.Bukkit.isPrimaryThread()) { // Leaves - can disable
|
||||||
if (!this.recipeSpamPackets.isIncrementAndUnderThreshold()) {
|
if (!this.recipeSpamPackets.isIncrementAndUnderThreshold()) {
|
||||||
this.disconnectAsync(net.minecraft.network.chat.Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause // Paper - add proper async disconnect
|
this.disconnectAsync(net.minecraft.network.chat.Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause // Paper - add proper async disconnect
|
||||||
return;
|
return;
|
||||||
|
|||||||
+3
-3
@@ -42,9 +42,9 @@ index 8d2518600ad518999b75124f0a87db9efe541f2e..c2c4a83ac4fb787402400d490ecc94be
|
|||||||
+ // Leaves start - Configurable collision behavior
|
+ // Leaves start - Configurable collision behavior
|
||||||
+ private static boolean shouldSkip(AABB aabb, VoxelShape blockCollision, AABB singleAABB) {
|
+ private static boolean shouldSkip(AABB aabb, VoxelShape blockCollision, AABB singleAABB) {
|
||||||
+ boolean isBlockShape = blockCollision == Shapes.block();
|
+ boolean isBlockShape = blockCollision == Shapes.block();
|
||||||
+ return switch (moe.monnairealms.camellia.config.modules.fixes.CollisionBehaviorConfig.behaviorMode) {
|
+ return switch (io.nanachiyo0721.shiroha.config.modules.fixes.CollisionBehaviorConfig.behaviorMode) {
|
||||||
+ case moe.monnairealms.camellia.enums.EnumCollisionBehaviorMode.VANILLA -> !voxelShapeIntersectVanilla(aabb, singleAABB);
|
+ case io.nanachiyo0721.shiroha.enums.EnumCollisionBehaviorMode.VANILLA -> !voxelShapeIntersectVanilla(aabb, singleAABB);
|
||||||
+ case moe.monnairealms.camellia.enums.EnumCollisionBehaviorMode.PAPER -> !voxelShapeIntersect(aabb, singleAABB);
|
+ case io.nanachiyo0721.shiroha.enums.EnumCollisionBehaviorMode.PAPER -> !voxelShapeIntersect(aabb, singleAABB);
|
||||||
+ default -> isBlockShape && !voxelShapeIntersectVanilla(aabb, singleAABB) || !isBlockShape && !voxelShapeIntersect(aabb, singleAABB);
|
+ default -> isBlockShape && !voxelShapeIntersectVanilla(aabb, singleAABB) || !isBlockShape && !voxelShapeIntersect(aabb, singleAABB);
|
||||||
+ // All other value as BLOCK_SHAPE_VANILLA to process
|
+ // All other value as BLOCK_SHAPE_VANILLA to process
|
||||||
+ };
|
+ };
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..64a2fc0e49a6fc50773f6e0c40c2535a
|
|||||||
+ private int cachePortalOriginIteratorY = -1;
|
+ private int cachePortalOriginIteratorY = -1;
|
||||||
+
|
+
|
||||||
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
||||||
+ if (moe.monnairealms.camellia.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
+ if (io.nanachiyo0721.shiroha.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
||||||
+ int i, j;
|
+ int i, j;
|
||||||
+ for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
+ for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
||||||
+ for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
+ for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ index b4f9f41a56bbc40e90217c0344c070ebdd08c119..33cab0d9d144a37d144f18c6fff31afc
|
|||||||
+ private static final java.util.concurrent.ThreadLocalRandom wakeUpDurationRandom = java.util.concurrent.ThreadLocalRandom.current();
|
+ private static final java.util.concurrent.ThreadLocalRandom wakeUpDurationRandom = java.util.concurrent.ThreadLocalRandom.current();
|
||||||
+
|
+
|
||||||
+ private static int getWakeUpDurationWithVariance(Entity entity, int wakeUpDuration) {
|
+ private static int getWakeUpDurationWithVariance(Entity entity, int wakeUpDuration) {
|
||||||
+ double deviation = moe.monnairealms.camellia.config.modules.optimizations.GaleVariableEntityWakeupConfig.entityWakeUpDurationRatioStandardDeviation;
|
+ double deviation = io.nanachiyo0721.shiroha.config.modules.optimizations.GaleVariableEntityWakeupConfig.entityWakeUpDurationRatioStandardDeviation;
|
||||||
+ if (deviation <= 0) {
|
+ if (deviation <= 0) {
|
||||||
+ return wakeUpDuration;
|
+ return wakeUpDuration;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ index 13b03dab807c5d83e086993af705e1d9a2676b4d..83894904de29c01a4e105c1fae625f91
|
|||||||
PaperServerListPingEventImpl(MinecraftServer server, StatusClient client, int protocolVersion, @Nullable CachedServerIcon icon) {
|
PaperServerListPingEventImpl(MinecraftServer server, StatusClient client, int protocolVersion, @Nullable CachedServerIcon icon) {
|
||||||
super(client, server.motd(), server.getPlayerCount(), server.getMaxPlayers(),
|
super(client, server.motd(), server.getPlayerCount(), server.getMaxPlayers(),
|
||||||
- server.getServerModName() + ' ' + server.getServerVersion(), protocolVersion, icon);
|
- server.getServerModName() + ' ' + server.getServerVersion(), protocolVersion, icon);
|
||||||
+ moe.monnairealms.camellia.config.modules.misc.ServerModNameConfig.fakeVanilla ? server.getServerVersion() : server.getServerModName() + ' ' + server.getServerVersion(), protocolVersion, icon); // Shiroha - Add config for server mod name
|
+ io.nanachiyo0721.shiroha.config.modules.misc.ServerModNameConfig.fakeVanilla ? server.getServerVersion() : server.getServerModName() + ' ' + server.getServerVersion(), protocolVersion, icon); // Shiroha - Add config for server mod name
|
||||||
this.server = server;
|
this.server = server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -13,7 +13,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public static void ensureTickThread(final String reason) {
|
public static void ensureTickThread(final String reason) {
|
||||||
- if (!isTickThread()) {
|
- if (!isTickThread()) {
|
||||||
+ if (!isTickThread() && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThread() && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
LOGGER.error("Thread failed main thread check: " + reason + ", context=" + getThreadContext(), new Throwable());
|
LOGGER.error("Thread failed main thread check: " + reason + ", context=" + getThreadContext(), new Throwable());
|
||||||
throw new IllegalStateException(reason);
|
throw new IllegalStateException(reason);
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final BlockPos pos, final String reason) {
|
public static void ensureTickThread(final Level world, final BlockPos pos, final String reason) {
|
||||||
- if (!isTickThreadFor(world, pos)) {
|
- if (!isTickThreadFor(world, pos)) {
|
||||||
+ if (!isTickThreadFor(world, pos) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, pos) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos;
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos;
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -30,7 +30,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final BlockPos pos, final int blockRadius, final String reason) {
|
public static void ensureTickThread(final Level world, final BlockPos pos, final int blockRadius, final String reason) {
|
||||||
- if (!isTickThreadFor(world, pos, blockRadius)) {
|
- if (!isTickThreadFor(world, pos, blockRadius)) {
|
||||||
+ if (!isTickThreadFor(world, pos, blockRadius) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, pos, blockRadius) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos + ", block_radius=" + blockRadius;
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos + ", block_radius=" + blockRadius;
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -39,7 +39,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final ChunkPos pos, final String reason) {
|
public static void ensureTickThread(final Level world, final ChunkPos pos, final String reason) {
|
||||||
- if (!isTickThreadFor(world, pos)) {
|
- if (!isTickThreadFor(world, pos)) {
|
||||||
+ if (!isTickThreadFor(world, pos) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, pos) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + pos;
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + pos;
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -48,7 +48,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final int chunkX, final int chunkZ, final String reason) {
|
public static void ensureTickThread(final Level world, final int chunkX, final int chunkZ, final String reason) {
|
||||||
- if (!isTickThreadFor(world, chunkX, chunkZ)) {
|
- if (!isTickThreadFor(world, chunkX, chunkZ)) {
|
||||||
+ if (!isTickThreadFor(world, chunkX, chunkZ) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, chunkX, chunkZ) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + new ChunkPos(chunkX, chunkZ);
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + new ChunkPos(chunkX, chunkZ);
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -57,7 +57,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Entity entity, final String reason) {
|
public static void ensureTickThread(final Entity entity, final String reason) {
|
||||||
- if (!isTickThreadFor(entity)) {
|
- if (!isTickThreadFor(entity)) {
|
||||||
+ if (!isTickThreadFor(entity) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(entity) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", entity=" + EntityUtil.dumpEntity(entity);
|
reason + ", context=" + getThreadContext() + ", entity=" + EntityUtil.dumpEntity(entity);
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -66,7 +66,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final AABB aabb, final String reason) {
|
public static void ensureTickThread(final Level world, final AABB aabb, final String reason) {
|
||||||
- if (!isTickThreadFor(world, aabb)) {
|
- if (!isTickThreadFor(world, aabb)) {
|
||||||
+ if (!isTickThreadFor(world, aabb) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, aabb) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", aabb=" + aabb;
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", aabb=" + aabb;
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -75,7 +75,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
|||||||
|
|
||||||
public static void ensureTickThread(final Level world, final double blockX, final double blockZ, final String reason) {
|
public static void ensureTickThread(final Level world, final double blockX, final double blockZ, final String reason) {
|
||||||
- if (!isTickThreadFor(world, blockX, blockZ)) {
|
- if (!isTickThreadFor(world, blockX, blockZ)) {
|
||||||
+ if (!isTickThreadFor(world, blockX, blockZ) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
+ if (!isTickThreadFor(world, blockX, blockZ) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||||
final String ex = "Thread failed main thread check: " +
|
final String ex = "Thread failed main thread check: " +
|
||||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + new Vec3(blockX, 0.0, blockZ);
|
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + new Vec3(blockX, 0.0, blockZ);
|
||||||
LOGGER.error(ex, new Throwable());
|
LOGGER.error(ex, new Throwable());
|
||||||
@@ -88,7 +88,7 @@ index 7e7a0ed944961af5ab7a49bc659da2862d2e2c82..1dc664a97442744d0a9364805cc6d6c5
|
|||||||
|
|
||||||
public static void catchOp(String reason) {
|
public static void catchOp(String reason) {
|
||||||
- if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
|
- if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
|
||||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Paper - chunk system // Shiroha - Add config to disable async catchers
|
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Paper - chunk system // Shiroha - Add config to disable async catchers
|
||||||
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
|
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
|
||||||
throw new IllegalStateException("Asynchronous " + reason + "!");
|
throw new IllegalStateException("Asynchronous " + reason + "!");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ index 6369b13e1fcdbdb25dd9d6e4d3bffdedbee4f739..ea27ce9d08b3b8bbb0cd4918dbf51fd8
|
|||||||
public PaperPluginParent build(JarFile file, PaperPluginMeta configuration, Path source) {
|
public PaperPluginParent build(JarFile file, PaperPluginMeta configuration, Path source) {
|
||||||
// Folia start - block plugins not marked as supported
|
// Folia start - block plugins not marked as supported
|
||||||
- if (!configuration.isFoliaSupported()) {
|
- if (!configuration.isFoliaSupported()) {
|
||||||
+ if (!configuration.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
+ if (!configuration.isFoliaSupported() && !io.nanachiyo0721.shiroha.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
||||||
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
||||||
}
|
}
|
||||||
// Folia end - block plugins not marked as supported
|
// Folia end - block plugins not marked as supported
|
||||||
@@ -29,7 +29,7 @@ index 6ef0042a355c65262bdb89dcf151bd644653216d..7da13c7a2c5303d8f3bee2db4b5b76a1
|
|||||||
public SpigotPluginProvider build(JarFile file, PluginDescriptionFile configuration, Path source) throws InvalidDescriptionException {
|
public SpigotPluginProvider build(JarFile file, PluginDescriptionFile configuration, Path source) throws InvalidDescriptionException {
|
||||||
// Folia start - block plugins not marked as supported
|
// Folia start - block plugins not marked as supported
|
||||||
- if (!configuration.isFoliaSupported()) {
|
- if (!configuration.isFoliaSupported()) {
|
||||||
+ if (!configuration.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
+ if (!configuration.isFoliaSupported() && !io.nanachiyo0721.shiroha.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
||||||
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
||||||
}
|
}
|
||||||
// Folia end - block plugins not marked as supported
|
// Folia end - block plugins not marked as supported
|
||||||
@@ -42,7 +42,7 @@ index 55a095e00bfe15321d8a1d69beb232e9956b0df7..844d6211ae34b3136806b8513e30d48c
|
|||||||
|
|
||||||
// Folia start - block plugins not marked as supported
|
// Folia start - block plugins not marked as supported
|
||||||
- if (!descriptionFile.isFoliaSupported()) {
|
- if (!descriptionFile.isFoliaSupported()) {
|
||||||
+ if (!descriptionFile.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
+ if (!descriptionFile.isFoliaSupported() && !io.nanachiyo0721.shiroha.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
||||||
throw new InvalidPluginException("Plugin " + descriptionFile.getFullName() + " is not marked as supporting regionised multithreading");
|
throw new InvalidPluginException("Plugin " + descriptionFile.getFullName() + " is not marked as supporting regionised multithreading");
|
||||||
}
|
}
|
||||||
// Folia end - block plugins not marked as supported
|
// Folia end - block plugins not marked as supported
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ index b9f788693b0c4be48e8a923a3dec50555d135e7e..1ce8304688ff3751d2de3ada14539842
|
|||||||
@Override
|
@Override
|
||||||
public Thread newThread(final Runnable run) {
|
public Thread newThread(final Runnable run) {
|
||||||
- final Thread thread = new Thread(run, PlatformHooks.get().getBrand() + " Common Worker #" + this.idGenerator.getAndIncrement());
|
- final Thread thread = new Thread(run, PlatformHooks.get().getBrand() + " Common Worker #" + this.idGenerator.getAndIncrement());
|
||||||
+ final Thread thread = new Thread(moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForChunkSystemWorker(run), PlatformHooks.get().getBrand() + " Common Worker #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
+ final Thread thread = new Thread(io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForChunkSystemWorker(run), PlatformHooks.get().getBrand() + " Common Worker #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
||||||
|
|
||||||
thread.setDaemon(true);
|
thread.setDaemon(true);
|
||||||
thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||||
@@ -22,7 +22,7 @@ index b9f788693b0c4be48e8a923a3dec50555d135e7e..1ce8304688ff3751d2de3ada14539842
|
|||||||
@Override
|
@Override
|
||||||
public Thread newThread(final Runnable run) {
|
public Thread newThread(final Runnable run) {
|
||||||
- final Thread thread = new Thread(run, PlatformHooks.get().getBrand() + " I/O Worker #" + this.idGenerator.getAndIncrement());
|
- final Thread thread = new Thread(run, PlatformHooks.get().getBrand() + " I/O Worker #" + this.idGenerator.getAndIncrement());
|
||||||
+ final Thread thread = new Thread(moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForChunkSystemIo(run), PlatformHooks.get().getBrand() + " I/O Worker #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
+ final Thread thread = new Thread(io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForChunkSystemIo(run), PlatformHooks.get().getBrand() + " I/O Worker #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
|
||||||
|
|
||||||
thread.setDaemon(true);
|
thread.setDaemon(true);
|
||||||
thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||||
|
|||||||
+2
-2
@@ -16,7 +16,7 @@ index 10b351d8bd6b0e117ecbe961ae2f101686a38fe4..7a93251c575870235a0aabf2fad84635
|
|||||||
// 987234911L is taken from Slime when seeing if a slime can spawn in a chunk
|
// 987234911L is taken from Slime when seeing if a slime can spawn in a chunk
|
||||||
- return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
- return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ boolean isSlimeChunk = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ boolean isSlimeChunk = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? level.getChunk(this.getX(), this.getZ()).isSlimeChunk()
|
+ ? level.getChunk(this.getX(), this.getZ()).isSlimeChunk()
|
||||||
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||||
+ return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
+ return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
||||||
@@ -34,7 +34,7 @@ index 3c46e2cc23ac57df52996e3d2c5ae416a9633a67..e0b1a7c8bc4e69afe5f78638e8fddbe8
|
|||||||
if (worldGenSettings == null) {
|
if (worldGenSettings == null) {
|
||||||
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
||||||
+ // Leaf start - Matter - Secure Seed
|
+ // Leaf start - Matter - Secure Seed
|
||||||
+ WorldOptions worldOptions = moe.monnairealms.camellia.config.modules.function.SecureSeedConfig.enabled
|
+ WorldOptions worldOptions = io.nanachiyo0721.shiroha.config.modules.function.SecureSeedConfig.enabled
|
||||||
+ ? new WorldOptions(creator.seed(), su.plo.matter.Globals.createRandomWorldSeed(), creator.generateStructures(), false)
|
+ ? new WorldOptions(creator.seed(), su.plo.matter.Globals.createRandomWorldSeed(), creator.generateStructures(), false)
|
||||||
+ : new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
+ : new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
||||||
+ // Leaf end - Matter - Secure Seed
|
+ // Leaf end - Matter - Secure Seed
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ index ceaf63c76272b2a11b92f877b9828e93ec79d47f..be8319e3548eeac6cc7a333e95ec9a0b
|
|||||||
|
|
||||||
+ // Leaf start - Configurable vanilla username check
|
+ // Leaf start - Configurable vanilla username check
|
||||||
+ public CraftPlayerProfile cloneCustom() {
|
+ public CraftPlayerProfile cloneCustom() {
|
||||||
+ CraftPlayerProfile clone = new CraftPlayerProfile(this.getId(), this.getName(), moe.monnairealms.camellia.config.modules.misc.UsernameCheckConfig.useCustomUsernameRegex());
|
+ CraftPlayerProfile clone = new CraftPlayerProfile(this.getId(), this.getName(), io.nanachiyo0721.shiroha.config.modules.misc.UsernameCheckConfig.useCustomUsernameRegex());
|
||||||
+ clone.setProperties(getProperties());
|
+ clone.setProperties(getProperties());
|
||||||
+ return clone;
|
+ return clone;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO;
|
|||||||
import com.github.luben.zstd.ZstdInputStream;
|
import com.github.luben.zstd.ZstdInputStream;
|
||||||
import com.github.luben.zstd.ZstdOutputStream;
|
import com.github.luben.zstd.ZstdOutputStream;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import moe.monnairealms.camellia.data.RegionFile;
|
import io.nanachiyo0721.shiroha.data.RegionFile;
|
||||||
import net.jpountz.lz4.LZ4Compressor;
|
import net.jpountz.lz4.LZ4Compressor;
|
||||||
import net.jpountz.lz4.LZ4Factory;
|
import net.jpountz.lz4.LZ4Factory;
|
||||||
import net.jpountz.lz4.LZ4FastDecompressor;
|
import net.jpountz.lz4.LZ4FastDecompressor;
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package moe.monnairealms.camellia.commands;
|
package io.nanachiyo0721.shiroha.commands;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.commands.bar.BarCommand;
|
import io.nanachiyo0721.shiroha.commands.bar.BarCommand;
|
||||||
|
|
||||||
public class CommandRegister {
|
public class CommandRegister {
|
||||||
/**
|
/**
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package moe.monnairealms.camellia.commands.bar;
|
package io.nanachiyo0721.shiroha.commands.bar;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.commands.bar.sub.ToggleCommand;
|
import io.nanachiyo0721.shiroha.commands.bar.sub.ToggleCommand;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.leavesmc.leaves.command.RootNode;
|
import org.leavesmc.leaves.command.RootNode;
|
||||||
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.commands.bar;
|
package io.nanachiyo0721.shiroha.commands.bar;
|
||||||
|
|
||||||
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
||||||
import moe.monnairealms.camellia.commands.bar.sub.ConfigEditCommand;
|
import io.nanachiyo0721.shiroha.commands.bar.sub.ConfigEditCommand;
|
||||||
import moe.monnairealms.camellia.commands.bar.sub.ToggleCommand;
|
import io.nanachiyo0721.shiroha.commands.bar.sub.ToggleCommand;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.leavesmc.leaves.command.CommandNode;
|
import org.leavesmc.leaves.command.CommandNode;
|
||||||
+8
-8
@@ -1,13 +1,13 @@
|
|||||||
package moe.monnairealms.camellia.commands.bar.sub;
|
package io.nanachiyo0721.shiroha.commands.bar.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.BoolArgumentType;
|
import com.mojang.brigadier.arguments.BoolArgumentType;
|
||||||
import moe.monnairealms.camellia.api.config.CamelliaConfigsInstance;
|
import io.nanachiyo0721.shiroha.api.config.CamelliaConfigsInstance;
|
||||||
import moe.monnairealms.camellia.config.ConfigManager;
|
import io.nanachiyo0721.shiroha.config.ConfigManager;
|
||||||
import moe.monnairealms.camellia.config.modules.function.MembarConfig;
|
import io.nanachiyo0721.shiroha.config.modules.function.MembarConfig;
|
||||||
import moe.monnairealms.camellia.config.modules.function.RegionBarConfig;
|
import io.nanachiyo0721.shiroha.config.modules.function.RegionBarConfig;
|
||||||
import moe.monnairealms.camellia.config.modules.function.TpsBarConfig;
|
import io.nanachiyo0721.shiroha.config.modules.function.TpsBarConfig;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import moe.monnairealms.camellia.functions.bars.TickableStatusBarList;
|
import io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.Contract;
|
import org.jetbrains.annotations.Contract;
|
||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.commands.bar.sub;
|
package io.nanachiyo0721.shiroha.commands.bar.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||||
@@ -9,9 +9,9 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
|||||||
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
||||||
import io.papermc.paper.command.brigadier.Commands;
|
import io.papermc.paper.command.brigadier.Commands;
|
||||||
import io.papermc.paper.command.brigadier.PaperCommands;
|
import io.papermc.paper.command.brigadier.PaperCommands;
|
||||||
import moe.monnairealms.camellia.commands.bar.BarCommand;
|
import io.nanachiyo0721.shiroha.commands.bar.BarCommand;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import moe.monnairealms.camellia.functions.bars.TickableStatusBarList;
|
import io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package moe.monnairealms.camellia.commands.config;
|
package io.nanachiyo0721.shiroha.commands.config;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.commands.config.sub.*;
|
import io.nanachiyo0721.shiroha.commands.config.sub.*;
|
||||||
import moe.monnairealms.camellia.config.ConfigsInstance;
|
import io.nanachiyo0721.shiroha.config.ConfigsInstance;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.leavesmc.leaves.command.RootNode;
|
import org.leavesmc.leaves.command.RootNode;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.commands.config;
|
package io.nanachiyo0721.shiroha.commands.config;
|
||||||
|
|
||||||
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import moe.monnairealms.camellia.utils.dialog.ConfigCommandDialog;
|
import io.nanachiyo0721.shiroha.utils.dialog.ConfigCommandDialog;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+3
-3
@@ -1,11 +1,11 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.commands.config.sub;
|
package io.nanachiyo0721.shiroha.commands.config.sub;
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigSubcommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigSubcommand;
|
||||||
import moe.monnairealms.camellia.utils.dialog.ConfigCommandDialog;
|
import io.nanachiyo0721.shiroha.utils.dialog.ConfigCommandDialog;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.leavesmc.leaves.command.ArgumentNode;
|
import org.leavesmc.leaves.command.ArgumentNode;
|
||||||
import org.leavesmc.leaves.command.CommandContext;
|
import org.leavesmc.leaves.command.CommandContext;
|
||||||
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import moe.monnairealms.camellia.commands.CommandRegister;
|
import io.nanachiyo0721.shiroha.commands.CommandRegister;
|
||||||
import moe.monnairealms.camellia.config.flags.TransformedConfig;
|
import io.nanachiyo0721.shiroha.config.flags.TransformedConfig;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -24,7 +24,7 @@ public class ConfigManager {
|
|||||||
// 3 -> target full path
|
// 3 -> target full path
|
||||||
|
|
||||||
public static void initConfigs() {
|
public static void initConfigs() {
|
||||||
registerConfig("camellia", builder.of("camellia", "moe.monnairealms.camellia.config.modules"));
|
registerConfig("shiroha", builder.of("shiroha", "io.nanachiyo0721.shiroha.config.modules"));
|
||||||
preLoad();
|
preLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
+7
-7
@@ -1,15 +1,15 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
|
import io.nanachiyo0721.shiroha.config.flags.*;
|
||||||
import io.papermc.paper.threadedregions.RegionizedServer;
|
import io.papermc.paper.threadedregions.RegionizedServer;
|
||||||
import moe.monnairealms.camellia.api.config.CamelliaConfigsInstance;
|
import io.nanachiyo0721.shiroha.api.config.CamelliaConfigsInstance;
|
||||||
import moe.monnairealms.camellia.api.config.ConfigDataPair;
|
import io.nanachiyo0721.shiroha.api.config.ConfigDataPair;
|
||||||
import moe.monnairealms.camellia.commands.config.ConfigCommand;
|
import io.nanachiyo0721.shiroha.commands.config.ConfigCommand;
|
||||||
import moe.monnairealms.camellia.config.flags.*;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.utils.ClassLoadUtil;
|
||||||
import moe.monnairealms.camellia.utils.ClassLoadUtil;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.api.config.CamelliaConfigBuilder;
|
import io.nanachiyo0721.shiroha.api.config.CamelliaConfigBuilder;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
public class DefaultTransformLogic {
|
public class DefaultTransformLogic {
|
||||||
public Object transform(Object obj) {
|
public Object transform(Object obj) {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config;
|
package io.nanachiyo0721.shiroha.config;
|
||||||
|
|
||||||
import java.util.IllegalFormatConversionException;
|
import java.util.IllegalFormatConversionException;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package moe.monnairealms.camellia.config.flags;
|
package io.nanachiyo0721.shiroha.config.flags;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.DefaultTransformLogic;
|
import io.nanachiyo0721.shiroha.config.DefaultTransformLogic;
|
||||||
|
|
||||||
import java.lang.annotation.Repeatable;
|
import java.lang.annotation.Repeatable;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.experiment;
|
package io.nanachiyo0721.shiroha.config.modules.experiment;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "command")
|
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "command")
|
||||||
public class CommandConfig implements IConfigModule {
|
public class CommandConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.experiment;
|
package io.nanachiyo0721.shiroha.config.modules.experiment;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_async_catchers")
|
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_async_catchers")
|
||||||
public class DisableAsyncCatcherConfig implements IConfigModule {
|
public class DisableAsyncCatcherConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.experiment;
|
package io.nanachiyo0721.shiroha.config.modules.experiment;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_entity_exception_catchers")
|
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_entity_exception_catchers")
|
||||||
public class DisableEntityCatchConfig implements IConfigModule {
|
public class DisableEntityCatchConfig implements IConfigModule {
|
||||||
+7
-7
@@ -1,11 +1,11 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.CommandSuggestions;
|
import io.nanachiyo0721.shiroha.config.flags.CommandSuggestions;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumCollisionBehaviorMode;
|
import io.nanachiyo0721.shiroha.enums.EnumCollisionBehaviorMode;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "collision_behavior")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "collision_behavior")
|
||||||
public class CollisionBehaviorConfig implements IConfigModule {
|
public class CollisionBehaviorConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "fix_high_velocity_issue")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "fix_high_velocity_issue")
|
||||||
public class FoliaEntityMovingFixConfig implements IConfigModule {
|
public class FoliaEntityMovingFixConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "force_cleanup_drop_non_owned_entity_memory_module", comments = "This config is a temporary fix for those incorrect owned data in the memory of each mob, for more you can see https://github.com/PaperMC/Folia/issues/203")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "force_cleanup_drop_non_owned_entity_memory_module", comments = "This config is a temporary fix for those incorrect owned data in the memory of each mob, for more you can see https://github.com/PaperMC/Folia/issues/203")
|
||||||
public class ForceCleanupEntityBrainMemoryConfig implements IConfigModule {
|
public class ForceCleanupEntityBrainMemoryConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "item_multitask")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "item_multitask")
|
||||||
public class ItemMultitaskConfig implements IConfigModule {
|
public class ItemMultitaskConfig implements IConfigModule {
|
||||||
+4
-4
@@ -1,8 +1,8 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "long_command_support")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "long_command_support")
|
||||||
public class LongCommandSupportConfig {
|
public class LongCommandSupportConfig {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(name = "poi_range_fixes", category = EnumConfigCategory.FIXES)
|
@ConfigClassInfo(name = "poi_range_fixes", category = EnumConfigCategory.FIXES)
|
||||||
public class POIRangeFixes implements IConfigModule {
|
public class POIRangeFixes implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "pathfinding_fixes")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "pathfinding_fixes")
|
||||||
public class PathfindingFixesConfig implements IConfigModule {
|
public class PathfindingFixesConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.fixes;
|
package io.nanachiyo0721.shiroha.config.modules.fixes;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "allow_unsafe_teleportation")
|
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "allow_unsafe_teleportation")
|
||||||
public class UnsafeTeleportationConfig implements IConfigModule {
|
public class UnsafeTeleportationConfig implements IConfigModule {
|
||||||
+9
-9
@@ -1,14 +1,14 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumStatusBarDisplay;
|
import io.nanachiyo0721.shiroha.enums.EnumStatusBarDisplay;
|
||||||
import moe.monnairealms.camellia.functions.bars.TickableStatusBarList;
|
import io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList;
|
||||||
import net.kyori.adventure.bossbar.BossBar;
|
import net.kyori.adventure.bossbar.BossBar;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import net.objecthunter.exp4j.Expression;
|
import net.objecthunter.exp4j.Expression;
|
||||||
import net.objecthunter.exp4j.ExpressionBuilder;
|
import net.objecthunter.exp4j.ExpressionBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
+9
-9
@@ -1,14 +1,14 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumStatusBarDisplay;
|
import io.nanachiyo0721.shiroha.enums.EnumStatusBarDisplay;
|
||||||
import moe.monnairealms.camellia.functions.bars.TickableStatusBarList;
|
import io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList;
|
||||||
import net.kyori.adventure.bossbar.BossBar;
|
import net.kyori.adventure.bossbar.BossBar;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
+10
-10
@@ -1,16 +1,16 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import abomination.LinearRegionFile;
|
import abomination.LinearRegionFile;
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.IllegalFormatConversionExceptionWithOrigin;
|
import io.nanachiyo0721.shiroha.config.IllegalFormatConversionExceptionWithOrigin;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumRegionFormat;
|
import io.nanachiyo0721.shiroha.enums.EnumRegionFormat;
|
||||||
import moe.monnairealms.camellia.utils.BufferedLinearRegionFileFlusher;
|
import io.nanachiyo0721.shiroha.utils.BufferedLinearRegionFileFlusher;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
+9
-9
@@ -1,14 +1,14 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.enums.EnumBarType;
|
import io.nanachiyo0721.shiroha.enums.EnumBarType;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumStatusBarDisplay;
|
import io.nanachiyo0721.shiroha.enums.EnumStatusBarDisplay;
|
||||||
import moe.monnairealms.camellia.functions.bars.TickableStatusBarList;
|
import io.nanachiyo0721.shiroha.functions.bars.TickableStatusBarList;
|
||||||
import net.kyori.adventure.bossbar.BossBar;
|
import net.kyori.adventure.bossbar.BossBar;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.function;
|
package io.nanachiyo0721.shiroha.config.modules.function;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.enums.EnumTripwireBehavior;
|
import io.nanachiyo0721.shiroha.enums.EnumTripwireBehavior;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "tripwire_dupe")
|
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "tripwire_dupe")
|
||||||
public class TripwireBehaviorConfig implements IConfigModule {
|
public class TripwireBehaviorConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "disable_warning")
|
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "disable_warning")
|
||||||
public class DisableWarningConfig implements IConfigModule {
|
public class DisableWarningConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "folia_watchdog")
|
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "folia_watchdog")
|
||||||
public class FoliaWatchogConfig implements IConfigModule {
|
public class FoliaWatchogConfig implements IConfigModule {
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "force_disable_packet_limiter_of_paper", comments =
|
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "force_disable_packet_limiter_of_paper", comments =
|
||||||
"Force and fully disable all packet limiters of Paper, which is used to prevent from kicking by using some quick crafting mods but \n" +
|
"Force and fully disable all packet limiters of Paper, which is used to prevent from kicking by using some quick crafting mods but \n" +
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "save_portal_tickets")
|
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "save_portal_tickets")
|
||||||
public class SavePortalTicketsConfig implements IConfigModule {
|
public class SavePortalTicketsConfig implements IConfigModule {
|
||||||
+6
-6
@@ -1,14 +1,14 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "server_mod_name")
|
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "server_mod_name")
|
||||||
public class ServerModNameConfig implements IConfigModule {
|
public class ServerModNameConfig implements IConfigModule {
|
||||||
@ConfigInfo(name = "name", comments = "Decides the server mod name shown in your F3 debug screen.")
|
@ConfigInfo(name = "name", comments = "Decides the server mod name shown in your F3 debug screen.")
|
||||||
public static String serverModName = "Camellia";
|
public static String serverModName = "Shiroha";
|
||||||
|
|
||||||
@ConfigInfo(name = "vanilla_spoof", comments = "Ignore any plugin's modification and server mod name set in this config block, only force sending brand name of vanilla")
|
@ConfigInfo(name = "vanilla_spoof", comments = "Ignore any plugin's modification and server mod name set in this config block, only force sending brand name of vanilla")
|
||||||
public static boolean fakeVanilla = false;
|
public static boolean fakeVanilla = false;
|
||||||
+6
-6
@@ -1,12 +1,12 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.misc;
|
package io.nanachiyo0721.shiroha.config.modules.misc;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "use_async_protocol_switching")
|
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "use_async_protocol_switching")
|
||||||
public class AsyncProtocolChangeConfig implements IConfigModule {
|
public class AsyncProtocolChangeConfig implements IConfigModule {
|
||||||
+8
-8
@@ -1,14 +1,14 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.DoNotLoad;
|
import io.nanachiyo0721.shiroha.config.flags.DoNotLoad;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import moe.monnairealms.camellia.utils.AffinityRunnableWrapper;
|
import io.nanachiyo0721.shiroha.utils.AffinityRunnableWrapper;
|
||||||
import net.openhft.affinity.Affinity;
|
import net.openhft.affinity.Affinity;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jspecify.annotations.NonNull;
|
import org.jspecify.annotations.NonNull;
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "throttle_goal_selector_tick_in_inactive_tick", comments =
|
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "throttle_goal_selector_tick_in_inactive_tick", comments =
|
||||||
"Throttles the AI goal selector in entity inactive ticks. \n" +
|
"Throttles the AI goal selector in entity inactive ticks. \n" +
|
||||||
+5
-5
@@ -1,9 +1,9 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "variable_entity_waking_up")
|
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "variable_entity_waking_up")
|
||||||
public class GaleVariableEntityWakeupConfig implements IConfigModule {
|
public class GaleVariableEntityWakeupConfig implements IConfigModule {
|
||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||||
import dev.kaiijumc.kaiiju.KaiijuEntityLimits;
|
import dev.kaiijumc.kaiiju.KaiijuEntityLimits;
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
package moe.monnairealms.camellia.config.modules.optimizations;
|
package io.nanachiyo0721.shiroha.config.modules.optimizations;
|
||||||
|
|
||||||
import moe.monnairealms.camellia.config.IConfigModule;
|
import io.nanachiyo0721.shiroha.config.IConfigModule;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigClassInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigClassInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.ConfigInfo;
|
import io.nanachiyo0721.shiroha.config.flags.ConfigInfo;
|
||||||
import moe.monnairealms.camellia.config.flags.HotReloadUnsupported;
|
import io.nanachiyo0721.shiroha.config.flags.HotReloadUnsupported;
|
||||||
import moe.monnairealms.camellia.enums.EnumConfigCategory;
|
import io.nanachiyo0721.shiroha.enums.EnumConfigCategory;
|
||||||
|
|
||||||
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "lithium_sleeping_block_entity")
|
@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "lithium_sleeping_block_entity")
|
||||||
public class LeavesSleepingBlockEntityConfig implements IConfigModule {
|
public class LeavesSleepingBlockEntityConfig implements IConfigModule {
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user