-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
416f191
commit e81e8ec
Showing
9 changed files
with
49 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,37 +14,37 @@ Co-authored-by: Dreeam <[email protected]> | |
Co-authored-by: HaHaWTH <[email protected]> | ||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java | ||
index de8b9048c8395c05b8688bc9d984b8ad680f15b3..3310a780aba946d7fe9cf2d1d9487e5286177233 100644 | ||
index de8b9048c8395c05b8688bc9d984b8ad680f15b3..fab62216edd7181585fbf1e5cd9870e88d51e99b 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java | ||
@@ -206,7 +206,12 @@ public class CraftChunk implements Chunk { | ||
@Override | ||
public boolean isSlimeChunk() { | ||
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk | ||
- return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper | ||
+ // Leaf start - Matter - Feature Secure Seed | ||
+ // Leaf start - Matter - Secure Seed | ||
+ boolean isSlimeChunk = org.dreeam.leaf.config.modules.misc.SecureSeed.enabled | ||
+ ? worldServer.getChunk(this.getX(), this.getZ()).isSlimeChunk() | ||
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper | ||
+ return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk; | ||
+ // Leaf end - Matter - Feature Secure Seed | ||
+ // Leaf end - Matter - Secure Seed | ||
} | ||
|
||
@Override | ||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
index 926d85d1584fa0e9ff16c4079f60cde98e6927f7..c58a626e9ab72f45665cda40581e268ead322091 100644 | ||
index 926d85d1584fa0e9ff16c4079f60cde98e6927f7..ac4a964be491e85ef9e7b9d26e609f24387b5c45 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
@@ -1412,7 +1412,11 @@ public final class CraftServer implements Server { | ||
registryAccess = levelDataAndDimensions.dimensions().dimensionsRegistryAccess(); | ||
} else { | ||
LevelSettings levelSettings; | ||
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), false); | ||
+ // Leaf start - Matter - Feature Secure Seed | ||
+ // Leaf start - Matter - Secure Seed | ||
+ WorldOptions worldOptions = org.dreeam.leaf.config.modules.misc.SecureSeed.enabled | ||
+ ? new WorldOptions(creator.seed(), su.plo.matter.Globals.createRandomWorldSeed(), creator.generateStructures(), false) | ||
+ : new WorldOptions(creator.seed(), creator.generateStructures(), false); | ||
+ // Leaf end - Matter - Feature Secure Seed | ||
+ // Leaf end - Matter - Secure Seed | ||
WorldDimensions worldDimensions; | ||
|
||
DedicatedServerProperties.WorldDimensionData properties = new DedicatedServerProperties.WorldDimensionData(GsonHelper.parse((creator.generatorSettings().isEmpty()) ? "{}" : creator.generatorSettings()), creator.type().name().toLowerCase(Locale.ROOT)); |
13 changes: 7 additions & 6 deletions
13
...atures/0019-Faster-Random-Generator.patch → ...atures/0019-Faster-random-generator.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: HaHaWTH <[email protected]> | ||
Date: Tue, 9 Nov 2077 00:00:00 +0800 | ||
Subject: [PATCH] Faster Random Generator | ||
Subject: [PATCH] Faster random generator | ||
|
||
This patch replaces LegacyRandomSource with FasterRandomSource by default, | ||
which is faster in general. | ||
|
||
Benchmark results (10,000,000 iterations) (GraalVM 21) | ||
SimpleRandom (Moonrise): 80ms | ||
FasterRandomSource (Leaf) (Backed by Xoroshiro128PlusPlus): 35ms | ||
LegacyRandomSource (Vanilla): 200ms | ||
XoroshiroRandomSource (Vanilla): 47ms | ||
Benchmark results (10,000,000 iterations) (Azul Zulu 23.0.1) | ||
|
||
FasterRandomSource (Leaf) (Backed by Xoroshiro128PlusPlus): 51,633,700 ns | ||
LegacyRandomSource (Vanilla): 254,857,500 ns | ||
ThreadUnsafeRandom (Moonrise): 102,265,100 ns | ||
SimpleThreadUnsafeRandom (Moonrise): 97,054,600 ns | ||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java | ||
index c60c05b9e426f56ed3e812abb9aae9ef52bd20e8..268fd8e60630e835c750a8b67201cc63f0b5193d 100644 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ault-don-t-use-blockstate-snapshots.patch → ...-snapshots-for-acquiring-blockstate.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Aikar <[email protected]> | ||
Date: Thu, 28 Jun 2018 22:13:44 -0400 | ||
Subject: [PATCH] EMC: Default don't use blockstate snapshots | ||
Subject: [PATCH] EMC: Don't use snapshots for acquiring blockstate | ||
|
||
Original license: MIT | ||
Original project: https://github.com/starlis/empirecraft | ||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | ||
index 5cb69d0b822e11a99a96aef4f59986d083b079f4..e9d43d9c4ad7cc1e12880e671f42e32dda85f17b 100644 | ||
index 5cb69d0b822e11a99a96aef4f59986d083b079f4..973b297a22c0cc53f966582c67c3688f4b2205c7 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | ||
@@ -331,7 +331,7 @@ public class CraftBlock implements Block { | ||
|
||
@Override | ||
public BlockState getState() { | ||
- return CraftBlockStates.getBlockState(this); | ||
+ return CraftBlockStates.getBlockState(this, org.dreeam.leaf.config.modules.opt.TileEntitySnapshotCreation.enabled); // Leaf - EMC - default to not use snapshots | ||
+ return CraftBlockStates.getBlockState(this, org.dreeam.leaf.config.modules.opt.TileEntitySnapshotCreation.enabled); // Leaf - EMC - Don't use snapshots for acquiring blockstate | ||
} | ||
|
||
// Paper start | ||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java | ||
index 56453454cbd4b9e9270fc833f8ab38d5fa7a3763..99f9335e6e36bb97710b30135648c9dbf72d833b 100644 | ||
index 56453454cbd4b9e9270fc833f8ab38d5fa7a3763..55572e799b5c8a74a546ac8febc14f80d5731c52 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java | ||
@@ -238,7 +238,7 @@ public final class CraftBlockStates { | ||
|
||
public static BlockState getBlockState(Block block) { | ||
// Paper start | ||
- return CraftBlockStates.getBlockState(block, true); | ||
+ return CraftBlockStates.getBlockState(block, org.dreeam.leaf.config.modules.opt.TileEntitySnapshotCreation.enabled); // Leaf - default to not use snapshots | ||
+ return CraftBlockStates.getBlockState(block, org.dreeam.leaf.config.modules.opt.TileEntitySnapshotCreation.enabled); // Leaf - EMC - Don't use snapshots for acquiring blockstate | ||
} | ||
public static BlockState getBlockState(Block block, boolean useSnapshot) { | ||
// Paper end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters