Rename internals to org.yatopiamc.yatopia

This commit is contained in:
Ivan Pekov 2020-12-02 08:35:11 +02:00 committed by GitHub
parent a53bff4904
commit 51b27bea23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 420 additions and 422 deletions

View File

@ -3,9 +3,9 @@
<h1>Yatopia</h1>
[![Github-CI](https://github.com/YatopiaMC/Yatopia/workflows/CI/badge.svg)](https://github.com/YatopiaMC/Yatopia/actions?query=workflow%3ACI)
[![CodeMC](https://ci.codemc.io/buildStatus/icon?job=YatopiaMC%2FYatopia%2Fver%252F1.16.3)](https://ci.codemc.io/job/YatopiaMC/job/Yatopia/job/ver%252F1.16.4/)
[![CodeMC](https://ci.codemc.io/buildStatus/icon?job=YatopiaMC%2FYatopia%2Fver%252F1.16.4)](https://ci.codemc.io/job/YatopiaMC/job/Yatopia/job/ver%252F1.16.4/)
[![Discord](https://img.shields.io/discord/342814924310970398?color=%237289DA&label=Discord&logo=discord&logoColor=white)](https://discord.io/YatopiaMC)
[![API](https://img.shields.io/website?down_color=lightgrey&down_message=offline&label=API&up_color=green&up_message=online&url=http%3A%2F%2Fapi.yatopia.net%2F)](https://api.yatopia.net/v2/latestBuild?branch=ver/1.16.4)
[![API](https://img.shields.io/website?down_color=lightgrey&down_message=offline&label=API&up_color=green&up_message=online&url=http%3A%2F%2Fapi.yatopiamc.org%2F)](https://api.yatopiamc.org/v2/latestBuild?branch=ver/1.16.4)
<h3>Blazing fast <a href="https://github.com/Spottedleaf/Tuinity">Tuinity</a> fork with no-compromises performance.</h3>
</div>
@ -21,7 +21,7 @@ ## So what is Yatopia?
## Try it out
The latest stable builds of Yatopia are always available over at our [downloads page](https://yatopia.net/download.html). You can also download the latest development build [here](https://api.yatopia.net/v2/latestBuild/download?branch=ver/1.16.4).
The latest stable builds of Yatopia are always available over at our [downloads page](https://yatopiamc.org/download.html). You can also download the latest development build [here](https://api.yatopiamc.org/v2/latestBuild/download?branch=ver/1.16.4).
## Documentation
@ -67,7 +67,7 @@ ## Using Yatopia-API
```xml
<dependencies>
<dependency>
<groupId>net.yatopia</groupId>
<groupId>org.yatopiamc</groupId>
<artifactId>yatopia-api</artifactId>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
@ -90,11 +90,11 @@ ## Why aren't there many API additions?
## License
License information can be found [here](https://github.com/YatopiaMC/Yatopia/blob/ver/1.16.3/Licensing/LICENSE.md).
License information can be found [here](https://github.com/YatopiaMC/Yatopia/blob/ver/1.16.4/Licensing/LICENSE.md).
## Security
Security information can be found found [here](https://github.com/YatopiaMC/Yatopia/blob/ver/1.16.3/SECURITY.md).
Security information can be found found [here](https://github.com/YatopiaMC/Yatopia/blob/ver/1.16.4/SECURITY.md).
## Statistics
[![bStats Graph Data](https://bstats.org/signatures/server-implementation/Yatopia.svg)](https://bstats.org/plugin/server-implementation/Yatopia)

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM
diff --git a/pom.xml b/pom.xml
index 4516ba097e8afc3e422efc368311fa66e967c05a..dee56c09a9e77c5530c175867f3cddaa3b139869 100644
index 4516ba097e8afc3e422efc368311fa66e967c05a..f641f2b375bdb5c43880ff67195764c4d4124155 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,18 +3,18 @@
@ -14,7 +14,7 @@ index 4516ba097e8afc3e422efc368311fa66e967c05a..dee56c09a9e77c5530c175867f3cddaa
<parent>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-parent</artifactId>
+ <groupId>net.yatopia</groupId>
+ <groupId>org.yatopiamc</groupId>
+ <artifactId>yatopia-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add GameProfileLookupEvent
diff --git a/pom.xml b/pom.xml
index dee56c09a9e77c5530c175867f3cddaa3b139869..55d9aed1b3fb893efa2afb0a0f5f73929f31c2f5 100644
index f641f2b375bdb5c43880ff67195764c4d4124155..31aba885d940acf0a9df5d4e83dfec69030b2a37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,10 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib
diff --git a/pom.xml b/pom.xml
index 55d9aed1b3fb893efa2afb0a0f5f73929f31c2f5..1990888ac34d535851a4d943be8638ad0a4adeba 100644
index 31aba885d940acf0a9df5d4e83dfec69030b2a37..afe3477c9a577a5fa1ef6c7dfd5a221fd3ca9f6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,6 +56,11 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM
diff --git a/pom.xml b/pom.xml
index 78c2a8bbcc0132f891c8aa545529d20aa0d9eb57..d8db9f467fb0f4e5576e8c9ae5fc6cf69921d1bc 100644
index 78c2a8bbcc0132f891c8aa545529d20aa0d9eb57..9f2cc8fbc0bfaefd772904076e6fd4d0c78f30ee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,11 @@
@ -29,7 +29,7 @@ index 78c2a8bbcc0132f891c8aa545529d20aa0d9eb57..d8db9f467fb0f4e5576e8c9ae5fc6cf6
<parent>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-parent</artifactId>
+ <groupId>net.yatopia</groupId>
+ <groupId>org.yatopiamc</groupId>
+ <artifactId>yatopia-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
@ -48,7 +48,7 @@ index 78c2a8bbcc0132f891c8aa545529d20aa0d9eb57..d8db9f467fb0f4e5576e8c9ae5fc6cf6
<dependency>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-api</artifactId>
+ <groupId>net.yatopia</groupId>
+ <groupId>org.yatopiamc</groupId>
+ <artifactId>yatopia-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>

View File

@ -51,13 +51,120 @@ index 2d61504e69b6d2ee18c3b71bb032e5ab13417138..4f0ab969ec222c78b85791653c81fa4e
}
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/net/yatopia/server/YatopiaVersionFetcher.java b/src/main/java/net/yatopia/server/YatopiaVersionFetcher.java
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6c7eabe57ade13d9ac2a2bbfc406fcf73553bd78..cd3908b407df34f7cc0861abc3d47d00be6a066f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
- private final String serverName = "Tuinity"; // Paper // Tuinity
+ private final String serverName = "Yatopia"; // Paper // Tuinity // Yatopia
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 62012d2b780d3399bd641ca3ca4a4ac127e3bcb5..71159c8ad99e46eded68c0cebd0090d1a32787b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -275,7 +275,7 @@ public class Main {
if (buildDate.before(deadline.getTime())) {
// Paper start - This is some stupid bullshit
System.err.println("*** Warning, you've not updated in a while! ***");
- System.err.println("*** Please download a new build ***"); // Paper // Tuinity
+ System.err.println("*** Please download a new build as per instructions from https://yatopia.net/download ***"); // Paper // Tuinity // Yatopia
//System.err.println("*** Server will start in 20 seconds ***");
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
// Paper End
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 0f7f1503d07bdff7ce7644dfe21e444adb52c7db..2ff9bae66826ccef8929fc643275bffd7e883b58 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -353,7 +353,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
- return new com.destroystokyo.paper.PaperVersionFetcher();
+ return new org.yatopiamc.yatopia.server.YatopiaVersionFetcher(); // Yatopia
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 001b1e5197eaa51bfff9031aa6c69876c9a47960..0525370b7e3bf24147b4948caf522ad785ce5d78 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
public static String getBukkitVersion() {
String result = "Unknown-Version";
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.yatopia/yatopia-api/pom.properties"); // Yatopia
Properties properties = new Properties();
if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 4d310908489953d6d061b2358f614142edacb62e..121e7cd534558dcc249fb9a3bffbd22fb436fba5 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -26,7 +26,7 @@ public class WatchdogThread extends Thread
private WatchdogThread(long timeoutTime, boolean restart)
{
- super( "Paper Watchdog Thread" );
+ super( "Yatopia Watchdog Thread" ); // Yatopia
this.timeoutTime = timeoutTime;
this.restart = restart;
earlyWarningEvery = Math.min(PaperConfig.watchdogPrintEarlyWarningEvery, timeoutTime); // Paper
@@ -158,14 +158,14 @@ public class WatchdogThread extends Thread
if (isLongTimeout) {
// Paper end
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Yatopia bug." ); // Paper // Yatopia
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
- log.log( Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Yatopia bug, please report this to https://github.com/YatopiaMC/Yatopia/issues" ); // Yatopia
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
+ log.log( Level.SEVERE, "Yatopia version: " + Bukkit.getServer().getVersion() ); // Yatopia
//
if ( net.minecraft.server.World.lastPhysicsProblem != null )
{
@@ -188,12 +188,12 @@ public class WatchdogThread extends Thread
// Paper end
} else
{
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---");
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO YATOPIA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Yatopia
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
}
// Paper end - Different message for short timeout
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Yatopia!):" ); // Paper // Yatopia
ChunkTaskManager.dumpAllChunkLoadInfo(); // Paper
this.dumpTickingInfo(); // Tuinity - log detailed tick information
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( server.serverThread.getId(), Integer.MAX_VALUE ), log );
@@ -209,7 +209,7 @@ public class WatchdogThread extends Thread
dumpThread( thread, log );
}
} else {
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---");
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO YATOPIA - THIS IS NOT A BUG OR A CRASH ---"); // Yatopia
}
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b66968313a1eb38637989bfe853ee68b7d434d0
index 0000000000000000000000000000000000000000..e6564bae963cda66ee4152648836f172f7e4ea91
--- /dev/null
+++ b/src/main/java/net/yatopia/server/YatopiaVersionFetcher.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java
@@ -0,0 +1,96 @@
+package net.yatopia.server;
+package org.yatopiamc.yatopia.server;
+
+import com.destroystokyo.paper.VersionHistoryManager;
+import com.google.common.base.Charsets;
@ -154,110 +261,3 @@ index 0000000000000000000000000000000000000000..7b66968313a1eb38637989bfe853ee68
+
+}
\ No newline at end of file
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6c7eabe57ade13d9ac2a2bbfc406fcf73553bd78..cd3908b407df34f7cc0861abc3d47d00be6a066f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
- private final String serverName = "Tuinity"; // Paper // Tuinity
+ private final String serverName = "Yatopia"; // Paper // Tuinity // Yatopia
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 62012d2b780d3399bd641ca3ca4a4ac127e3bcb5..71159c8ad99e46eded68c0cebd0090d1a32787b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -275,7 +275,7 @@ public class Main {
if (buildDate.before(deadline.getTime())) {
// Paper start - This is some stupid bullshit
System.err.println("*** Warning, you've not updated in a while! ***");
- System.err.println("*** Please download a new build ***"); // Paper // Tuinity
+ System.err.println("*** Please download a new build as per instructions from https://yatopia.net/download ***"); // Paper // Tuinity // Yatopia
//System.err.println("*** Server will start in 20 seconds ***");
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
// Paper End
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 0f7f1503d07bdff7ce7644dfe21e444adb52c7db..edc01c66220c390b844cfb37c26ad77f60885c51 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -353,7 +353,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
- return new com.destroystokyo.paper.PaperVersionFetcher();
+ return new net.yatopia.server.YatopiaVersionFetcher(); // Yatopia
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 001b1e5197eaa51bfff9031aa6c69876c9a47960..0525370b7e3bf24147b4948caf522ad785ce5d78 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
public static String getBukkitVersion() {
String result = "Unknown-Version";
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.yatopia/yatopia-api/pom.properties"); // Yatopia
Properties properties = new Properties();
if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 4d310908489953d6d061b2358f614142edacb62e..fd3e1d363a8ed18af6132421e927e83680ff8e76 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -26,7 +26,7 @@ public class WatchdogThread extends Thread
private WatchdogThread(long timeoutTime, boolean restart)
{
- super( "Paper Watchdog Thread" );
+ super( "Yatopia Watchdog Thread" ); // Yatopia
this.timeoutTime = timeoutTime;
this.restart = restart;
earlyWarningEvery = Math.min(PaperConfig.watchdogPrintEarlyWarningEvery, timeoutTime); // Paper
@@ -158,14 +158,14 @@ public class WatchdogThread extends Thread
if (isLongTimeout) {
// Paper end
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Yatopia bug." ); // Paper // Yatopia
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
- log.log( Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Yatopia bug, please report this to https://github.com/tr7zw/Yatopia/issues" ); // Yatopia
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
+ log.log( Level.SEVERE, "Yatopia version: " + Bukkit.getServer().getVersion() ); // Yatopia
//
if ( net.minecraft.server.World.lastPhysicsProblem != null )
{
@@ -188,12 +188,12 @@ public class WatchdogThread extends Thread
// Paper end
} else
{
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---");
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO YATOPIA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Yatopia
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
}
// Paper end - Different message for short timeout
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Yatopia!):" ); // Paper // Yatopia
ChunkTaskManager.dumpAllChunkLoadInfo(); // Paper
this.dumpTickingInfo(); // Tuinity - log detailed tick information
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( server.serverThread.getId(), Integer.MAX_VALUE ), log );
@@ -209,7 +209,7 @@ public class WatchdogThread extends Thread
dumpThread( thread, log );
}
} else {
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---");
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO YATOPIA - THIS IS NOT A BUG OR A CRASH ---"); // Yatopia
}

View File

@ -9,7 +9,7 @@ Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
diff --git a/pom.xml b/pom.xml
index d8db9f467fb0f4e5576e8c9ae5fc6cf69921d1bc..797e7c884fcd8a28d0c538e3e174080f485d95d3 100644
index 9f2cc8fbc0bfaefd772904076e6fd4d0c78f30ee..2acc51071e968333f85959d76b86e7e6e0ee828b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -166,6 +166,12 @@
@ -25,26 +25,26 @@ index d8db9f467fb0f4e5576e8c9ae5fc6cf69921d1bc..797e7c884fcd8a28d0c538e3e174080f
</dependencies>
<repositories>
diff --git a/src/main/java/net/yatopia/server/util/Constants.java b/src/main/java/net/yatopia/server/util/Constants.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/util/Constants.java b/src/main/java/org/yatopiamc/yatopia/server/util/Constants.java
new file mode 100644
index 0000000000000000000000000000000000000000..5b2ac2bd00c49e44f5692be42e483409a3b70a5c
index 0000000000000000000000000000000000000000..ac5235155eb1b5515165fc9648b7c9d7a0713b44
--- /dev/null
+++ b/src/main/java/net/yatopia/server/util/Constants.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/util/Constants.java
@@ -0,0 +1,7 @@
+package net.yatopia.server.util;
+package org.yatopiamc.yatopia.server.util;
+
+public class Constants {
+
+ public static final int[] EMPTY_ARRAY = new int[0];
+ public static final int[] ZERO_ARRAY = new int[]{0};
+}
diff --git a/src/main/java/net/yatopia/server/util/FastRandom.java b/src/main/java/net/yatopia/server/util/FastRandom.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/util/FastRandom.java b/src/main/java/org/yatopiamc/yatopia/server/util/FastRandom.java
new file mode 100644
index 0000000000000000000000000000000000000000..8fa24a06f6dbdfcef2c9b907b2e7b1267befab48
index 0000000000000000000000000000000000000000..e41c1e3fa656d8f595733897ab05089c3b0976a7
--- /dev/null
+++ b/src/main/java/net/yatopia/server/util/FastRandom.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/util/FastRandom.java
@@ -0,0 +1,64 @@
+package net.yatopia.server.util;
+package org.yatopiamc.yatopia.server.util;
+
+import org.apache.commons.rng.core.source64.XoRoShiRo128PlusPlus;
+
@ -108,13 +108,13 @@ index 0000000000000000000000000000000000000000..8fa24a06f6dbdfcef2c9b907b2e7b126
+ return random.nextLong();
+ }
+}
diff --git a/src/main/java/net/yatopia/server/util/TimeUtils.java b/src/main/java/net/yatopia/server/util/TimeUtils.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java b/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..d68e8ec871b99f0e6fe1c52948bedf38bd449b27
index 0000000000000000000000000000000000000000..acdf3d60738791b767a3bafa2c9511342a8c18df
--- /dev/null
+++ b/src/main/java/net/yatopia/server/util/TimeUtils.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java
@@ -0,0 +1,27 @@
+package net.yatopia.server.util;
+package org.yatopiamc.yatopia.server.util;
+
+import java.util.concurrent.TimeUnit;
+

View File

@ -41,22 +41,21 @@ index cd3908b407df34f7cc0861abc3d47d00be6a066f..6b2517256ed22c7dcf942e6974e1ad13
+ @Override public java.time.Duration getLastTickTime() { return net.minecraft.server.MinecraftServer.lastTickTime; } // Yatopia
}
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index 3c7b9a6d24e064f9c1ec5fb6d52f42627944d7fa..a7b97660ac147dffbbb4ec83e6a2753732d7c041 100644
index 3c7b9a6d24e064f9c1ec5fb6d52f42627944d7fa..dd44c1f3721fb9c7233417150a073b79465c0480 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -34,6 +34,11 @@ public class TicksPerSecondCommand extends Command
@@ -34,6 +34,10 @@ public class TicksPerSecondCommand extends Command
tpsAvg[i] = format( tps[i] );
}
sender.sendMessage(ChatColor.GOLD + "TPS from last 5s, 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", ")); // Purpur
+ // Yatopia start
+ java.time.Duration lastTickTime = org.bukkit.Bukkit.getLastTickTime();
+ sender.sendMessage(ChatColor.GOLD + "Last tick: " + formatTo( lastTickTime, java.util.concurrent.TimeUnit.MILLISECONDS ) + " (" + formatTo( lastTickTime, java.util.concurrent.TimeUnit.NANOSECONDS ) + ")");
+ sender.sendMessage( ChatColor.GOLD + "Lagging: " + ( org.bukkit.Bukkit.isLagging() ? ChatColor.RED + "Yes" : ChatColor.GREEN + "No" ));
+ // Yatopia end
if (args.length > 0 && args[0].equals("mem") && sender.hasPermission("bukkit.command.tpsmemory")) {
sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)");
if (!hasShownMemoryWarning) {
@@ -52,4 +57,16 @@ public class TicksPerSecondCommand extends Command
@@ -52,4 +56,16 @@ public class TicksPerSecondCommand extends Command
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
+ ( ( tps > 21.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); // Paper - only print * at 21, we commonly peak to 20.02 as the tick sleep is not accurate enough, stop the noise
}
@ -69,7 +68,7 @@ index 3c7b9a6d24e064f9c1ec5fb6d52f42627944d7fa..a7b97660ac147dffbbb4ec83e6a27537
+ long toAskedUnit = unit.convert( nanos, nanosUnit );
+ long ms = nanosUnit.toMillis( nanos );
+ ChatColor startingColor = ms < 40 ? ChatColor.GREEN : ( ms < 50 ) ? ChatColor.YELLOW : ChatColor.RED;
+ return startingColor.toString() + toAskedUnit + ChatColor.GOLD + net.yatopia.server.util.TimeUtils.getFriendlyName( unit );
+ return startingColor.toString() + toAskedUnit + ChatColor.GOLD + org.yatopiamc.yatopia.server.util.TimeUtils.getFriendlyName( unit );
+ }
+ // Yatopia end
}

View File

@ -27,7 +27,7 @@ index dae2e5d70756c5b61163d57099b65f7e415b288c..21712a6691e00ffaf523f084da6ce565
String hostName = "BrokenHost";
try {
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c1eb8e8679de29cb0c18feed73b277801b4b07e5..c8e0310143e72e43832ecaebe6b9252f9cbd3c5b 100644
index c1eb8e8679de29cb0c18feed73b277801b4b07e5..0808edf7a20ccf3eb4639543f73ac968cc25e148 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -180,6 +180,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -36,7 +36,7 @@ index c1eb8e8679de29cb0c18feed73b277801b4b07e5..c8e0310143e72e43832ecaebe6b9252f
+ // Yatopia start
+ try {
+ net.yatopia.server.YatopiaConfig.init((java.io.File) options.valueOf("yatopia-settings"));
+ org.yatopiamc.yatopia.server.YatopiaConfig.init((java.io.File) options.valueOf("yatopia-settings"));
+ } catch (Exception e) {
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
+ return false;
@ -47,14 +47,14 @@ index c1eb8e8679de29cb0c18feed73b277801b4b07e5..c8e0310143e72e43832ecaebe6b9252f
this.setAllowFlight(dedicatedserverproperties.allowFlight);
this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba());
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 75b04efa0c0d03bd97508a466d5f00b33fa901fa..db73c73277a7061b2004109d060cca7ded92908f 100644
index 75b04efa0c0d03bd97508a466d5f00b33fa901fa..36c481852cc38f74cd202289a640426fcff04654 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -267,6 +267,7 @@ public abstract class EntityLiving extends Entity {
this.world.getMethodProfiler().enter("livingEntityBaseTick");
boolean flag = this instanceof EntityHuman;
+ if (!net.yatopia.server.YatopiaConfig.disableEntityStuckChecks) { // Yatopia
+ if (!org.yatopiamc.yatopia.server.YatopiaConfig.disableEntityStuckChecks) { // Yatopia
if (this.isAlive()) {
if (this.inBlock()) {
this.damageEntity(DamageSource.STUCK, 1.0F);
@ -67,7 +67,7 @@ index 75b04efa0c0d03bd97508a466d5f00b33fa901fa..db73c73277a7061b2004109d060cca7d
if (this.isFireProof() || this.world.isClientSide) {
this.extinguish();
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9c330ee370f120eb2d498430d799bfaf9eabdc49..f237bd8ae933af2913408bf4539526c69114226e 100644
index 9c330ee370f120eb2d498430d799bfaf9eabdc49..b679a6ee7ee2fb00293fb02b3537eddf5580e596 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -188,7 +188,7 @@ public abstract class PlayerList {
@ -75,17 +75,62 @@ index 9c330ee370f120eb2d498430d799bfaf9eabdc49..f237bd8ae933af2913408bf4539526c6
playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.F(), this.s, worldserver1.getDimensionManager(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance
entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
- playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName())));
+ playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(net.yatopia.server.YatopiaConfig.brandName))); // Yatopia
+ playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(org.yatopiamc.yatopia.server.YatopiaConfig.brandName))); // Yatopia
playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities));
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6b2517256ed22c7dcf942e6974e1ad13debf1da4..b4c58c8a3fd124931bdbf1f732dfc40aaae691ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -859,6 +859,7 @@ public final class CraftServer implements Server {
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami
+ org.yatopiamc.yatopia.server.YatopiaConfig.init((File) console.options.valueOf("yatopia-settings")); // Yatopia
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -2310,6 +2311,13 @@ public final class CraftServer implements Server {
}
// Origami end
+ // Yatopia start
+ @Override
+ public YamlConfiguration getYatopiaConfig() {
+ return org.yatopiamc.yatopia.server.YatopiaConfig.config;
+ }
+ // Yatopia end
+
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 71159c8ad99e46eded68c0cebd0090d1a32787b3..da624fbeb5aaba2aa717ed3aada7633d324fb8cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -162,6 +162,14 @@ public class Main {
.describedAs("Yml file");
// Origami end
+ // Yatopia start
+ acceptsAll(asList("yatopia", "yatopia-settings"), "File for yatopia settings")
+ .withRequiredArg()
+ .ofType(File.class)
+ .defaultsTo(new File("yatopia.yml"))
+ .describedAs("Yml file");
+ // Yatopia end
+
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..c4dd521d18dd60ec07bdcf0d367b5135710dca58
index 0000000000000000000000000000000000000000..f5a43e607f9c13e07a0f5e7e139eed93f159185b
--- /dev/null
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -0,0 +1,193 @@
+package net.yatopia.server;
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -0,0 +1,192 @@
+package org.yatopiamc.yatopia.server;
+
+import com.google.common.base.Throwables;
+import java.io.File;
@ -97,7 +142,6 @@ index 0000000000000000000000000000000000000000..c4dd521d18dd60ec07bdcf0d367b5135
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
+import java.util.regex.Pattern;
+import net.minecraft.server.MinecraftServer;
+import org.bukkit.Bukkit;
+import org.bukkit.configuration.InvalidConfigurationException;
+import org.bukkit.configuration.file.YamlConfiguration;
@ -278,48 +322,3 @@ index 0000000000000000000000000000000000000000..c4dd521d18dd60ec07bdcf0d367b5135
+ brandName = getString("brand-name", brandName);
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6b2517256ed22c7dcf942e6974e1ad13debf1da4..200a13f619546bf10948fab496a07ba174869fd2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -859,6 +859,7 @@ public final class CraftServer implements Server {
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami
+ net.yatopia.server.YatopiaConfig.init((File) console.options.valueOf("yatopia-settings")); // Yatopia
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -2310,6 +2311,13 @@ public final class CraftServer implements Server {
}
// Origami end
+ // Yatopia start
+ @Override
+ public YamlConfiguration getYatopiaConfig() {
+ return net.yatopia.server.YatopiaConfig.config;
+ }
+ // Yatopia end
+
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 71159c8ad99e46eded68c0cebd0090d1a32787b3..da624fbeb5aaba2aa717ed3aada7633d324fb8cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -162,6 +162,14 @@ public class Main {
.describedAs("Yml file");
// Origami end
+ // Yatopia start
+ acceptsAll(asList("yatopia", "yatopia-settings"), "File for yatopia settings")
+ .withRequiredArg()
+ .ofType(File.class)
+ .defaultsTo(new File("yatopia.yml"))
+ .describedAs("Yml file");
+ // Yatopia end
+
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()

View File

@ -59,7 +59,7 @@ index 537456a7427cddd6783f5b5d8ee2d655668c4c53..004184a7c3da4f72f68a5fd9b4dd5abd
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index db73c73277a7061b2004109d060cca7ded92908f..1e1e31c218581811cf6662360c9de8ceeccade04 100644
index 36c481852cc38f74cd202289a640426fcff04654..b280b9f657d75c7224f54daf9a426cd38d8ab57b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2859,7 +2859,7 @@ public abstract class EntityLiving extends Entity {
@ -67,17 +67,17 @@ index db73c73277a7061b2004109d060cca7ded92908f..1e1e31c218581811cf6662360c9de8ce
// Tuinity start - reduce memory allocation from collideNearby
List<Entity> list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList();
- this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this), list);
+ this.world.getEntities(this, this.getBoundingBox(), net.yatopia.server.EntityFilter.getFilter(this), list); // Yatopia
+ this.world.getEntities(this, this.getBoundingBox(), org.yatopiamc.yatopia.server.EntityFilter.getFilter(this), list); // Yatopia
try {
// Tuinity end - reduce memory allocation from collideNearby
diff --git a/src/main/java/net/yatopia/server/EntityFilter.java b/src/main/java/net/yatopia/server/EntityFilter.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java b/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java
new file mode 100644
index 0000000000000000000000000000000000000000..a76e8f9aa6eefd0afeeeae1d2de90037a2cb0e80
index 0000000000000000000000000000000000000000..32a3dd7087b73dc92d518d88c7eada8ff1ec8621
--- /dev/null
+++ b/src/main/java/net/yatopia/server/EntityFilter.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java
@@ -0,0 +1,145 @@
+package net.yatopia.server;
+package org.yatopiamc.yatopia.server;
+
+import de.minebench.origami.OrigamiConfig;
+import java.util.function.Predicate;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow to change the piston push limit
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..71636ce642efcd3453b6c5bfb2b2ef0edc6baee7 100644
index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..ae28b1f6ef56ab2199e1cf8d4f7d3f3e12496545 100644
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
@@ -79,7 +79,7 @@ public class PistonExtendsChecker {
@ -13,7 +13,7 @@ index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..71636ce642efcd3453b6c5bfb2b2ef0e
int i = 1;
- if (i + this.f.size() > 12) {
+ if (i + this.f.size() > net.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
+ if (i + this.f.size() > org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
return false;
} else {
while (a(block)) {
@ -22,7 +22,7 @@ index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..71636ce642efcd3453b6c5bfb2b2ef0e
++i;
- if (i + this.f.size() > 12) {
+ if (i + this.f.size() > net.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
+ if (i + this.f.size() > org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
return false;
}
}
@ -31,15 +31,15 @@ index 95aeaaf0bb07c5ecf7117dae3382b0f0aac6426f..71636ce642efcd3453b6c5bfb2b2ef0e
}
- if (this.f.size() >= 12) {
+ if (this.f.size() >= net.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
+ if (this.f.size() >= org.yatopiamc.yatopia.server.YatopiaConfig.pistonPushLimit) { // Yatopia
return false;
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index c4dd521d18dd60ec07bdcf0d367b5135710dca58..d69001b126046070abfa96dd3d1e6f95a24af536 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -190,4 +190,9 @@ public class YatopiaConfig {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index f5a43e607f9c13e07a0f5e7e139eed93f159185b..415f7def834399ab94edc380b8201058b424fe45 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -189,4 +189,9 @@ public class YatopiaConfig {
private static void brandName() {
brandName = getString("brand-name", brandName);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib
diff --git a/pom.xml b/pom.xml
index 797e7c884fcd8a28d0c538e3e174080f485d95d3..cbc10255e7133b8860d52609c3ca5d2290499e76 100644
index 2acc51071e968333f85959d76b86e7e6e0ee828b..4918a1e92d3515825402258605bcd9b4511420a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -348,6 +348,10 @@

View File

@ -39,7 +39,7 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b
if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) {
return true;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 1e1e31c218581811cf6662360c9de8ceeccade04..7d28bd1743b98e1493b87d9a3336e1426f65a9fe 100644
index b280b9f657d75c7224f54daf9a426cd38d8ab57b..6ba89d0fde0ad2f8bc56584c65a50ba2530c3c4f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2580,10 +2580,12 @@ public abstract class EntityLiving extends Entity {
@ -115,7 +115,7 @@ index a7c2543fdd4d5f6a04c45ec42472837ccaea9619..92ab79532d29341e8840341ff5ee8f52
};
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
index 71636ce642efcd3453b6c5bfb2b2ef0edc6baee7..1f70536e1cb51a895f46297f891aca7dd2e8590a 100644
index ae28b1f6ef56ab2199e1cf8d4f7d3f3e12496545..b684f2b297eda2014962bed36087d08bfcddb119 100644
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
@@ -166,10 +166,11 @@ public class PistonExtendsChecker {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Item stuck sleep config
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index f2af9cb9d7c88c51a1a2e004a0eeb47b3d407b44..ba4a9f67a9d4f387f62cb84e86cbba8b682636c3 100644
index f2af9cb9d7c88c51a1a2e004a0eeb47b3d407b44..4812adaadc7a28794590849d4773a4fa66a7f913 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -82,7 +82,7 @@ public class EntityItem extends Entity {
@ -13,15 +13,15 @@ index f2af9cb9d7c88c51a1a2e004a0eeb47b3d407b44..ba4a9f67a9d4f387f62cb84e86cbba8b
if (this.world.isClientSide) {
this.noclip = false;
- } else {
+ } else if (!this.onGround || this.noclip || this.ticksLived % net.yatopia.server.YatopiaConfig.itemStuckSleepTicks == 0) { // Yatopia
+ } else if (!this.onGround || this.noclip || this.ticksLived % org.yatopiamc.yatopia.server.YatopiaConfig.itemStuckSleepTicks == 0) { // Yatopia
this.noclip = !this.world.getCubes(this);
if (this.noclip) {
this.l(this.locX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.locZ());
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index d69001b126046070abfa96dd3d1e6f95a24af536..9357d12cd623cd3ea92e39bd9d70ee89330ad1b3 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -195,4 +195,9 @@ public class YatopiaConfig {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 415f7def834399ab94edc380b8201058b424fe45..a790e1e5161d956ccc1023b0d4bcac647627150a 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -194,4 +194,9 @@ public class YatopiaConfig {
private static void pistonPushLimit() {
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
}

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Option for simpler Villagers
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 2faaf483cca26586226a2e08ac01285a62a68f6f..ce0d773d1c338ecf082573a219d8bfe024780a23 100644
index 2faaf483cca26586226a2e08ac01285a62a68f6f..4b291174493f163260b1f92372d882a99669514c 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -31,6 +31,7 @@ import org.bukkit.event.entity.VillagerReplenishTradeEvent;
public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder {
+ private boolean simplerVillagerBehavior = net.yatopia.server.YatopiaConfig.simplerVillagerBehavior; // Yatopia - so we don't make them bork upon reload
+ private boolean simplerVillagerBehavior = org.yatopiamc.yatopia.server.YatopiaConfig.simplerVillagerBehavior; // Yatopia - so we don't make them bork upon reload
private static final DataWatcherObject<VillagerData> br = DataWatcher.a(EntityVillager.class, DataWatcherRegistry.q);
public static final Map<Item, Integer> bp = ImmutableMap.of(Items.BREAD, 4, Items.POTATO, 1, Items.CARROT, 1, Items.BEETROOT, 1);
private static final Set<Item> bs = ImmutableSet.of(Items.BREAD, Items.POTATO, Items.CARROT, Items.WHEAT, Items.WHEAT_SEEDS, Items.BEETROOT, new Item[]{Items.BEETROOT_SEEDS});
@ -41,7 +41,7 @@ index 2faaf483cca26586226a2e08ac01285a62a68f6f..ce0d773d1c338ecf082573a219d8bfe0
+ return;
+ }
+ this.goalSelector.a(0, new PathfinderGoalFloat(this));
+ if (net.yatopia.server.YatopiaConfig.villagersHideAtNight) {
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.villagersHideAtNight) {
+ this.goalSelector.a(0, new PathfinderGoalUseItem<>(this, PotionUtil.a(new ItemStack(Items.POTION), Potions.INVISIBILITY), SoundEffects.ENTITY_WANDERING_TRADER_DISAPPEARED, (entityvillagertrader) -> {
+ return !this.world.isDay() && !entityvillagertrader.isInvisible();
+ }));
@ -152,11 +152,11 @@ index 2faaf483cca26586226a2e08ac01285a62a68f6f..ce0d773d1c338ecf082573a219d8bfe0
if (this.world instanceof WorldServer) {
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 9357d12cd623cd3ea92e39bd9d70ee89330ad1b3..eb53176099103172961d544c0dab17cc19ef2e7f 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -200,4 +200,11 @@ public class YatopiaConfig {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index a790e1e5161d956ccc1023b0d4bcac647627150a..0f3803757a81c7ecaad48637ede8a3dc95b93f13 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -199,4 +199,11 @@ public class YatopiaConfig {
private static void itemStuckSleepTicks() {
itemStuckSleepTicks = getInt("settings.itemStuckSleepTicks", 1);
}

View File

@ -5,17 +5,10 @@ Subject: [PATCH] Redirect Configs
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..4230872de3551393a35c567d07a570dd07976fb8 100644
index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..a0ff3cdafbf499802600de2d2174781c45071b38 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -1,5 +1,6 @@
package de.minebench.origami;
+import net.yatopia.server.YatopiaConfig;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -20,6 +21,8 @@ public final class OrigamiConfig {
@@ -20,6 +20,8 @@ public final class OrigamiConfig {
private static int configVersion;
public static void init(final File file) {
@ -24,7 +17,7 @@ index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..4230872de3551393a35c567d07a570dd
OrigamiConfig.configFile = file;
OrigamiConfig.config = new YamlConfiguration();
config.options().header(CONFIG_HEADER);
@@ -39,13 +42,16 @@ public final class OrigamiConfig {
@@ -39,13 +41,16 @@ public final class OrigamiConfig {
System.out.println("Failure to load origami config");
throw new RuntimeException(ex);
}
@ -32,9 +25,9 @@ index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..4230872de3551393a35c567d07a570dd
-
- OrigamiConfig.load(OrigamiConfig.class, null);
+ }*/
+ config = net.yatopia.server.YatopiaConfig.config;
+ configFile = net.yatopia.server.YatopiaConfig.CONFIG_FILE;
+ configVersion = net.yatopia.server.YatopiaConfig.version;
+ config = org.yatopiamc.yatopia.server.YatopiaConfig.config;
+ configFile = org.yatopiamc.yatopia.server.YatopiaConfig.CONFIG_FILE;
+ configVersion = org.yatopiamc.yatopia.server.YatopiaConfig.version;
+ //OrigamiConfig.load(OrigamiConfig.class, null); // todo: uncomment when config options are ported
+ // Yatopia end
}
@ -46,7 +39,7 @@ index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..4230872de3551393a35c567d07a570dd
for (final Method method : clazz.getDeclaredMethods()) {
if (method.getReturnType() != void.class || method.getParameterCount() != 0 ||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c8e0310143e72e43832ecaebe6b9252f9cbd3c5b..d1cf80ce9e87fa6ec03f2e965883041acbd181d5 100644
index 0808edf7a20ccf3eb4639543f73ac968cc25e148..21999986018b93315eea54d0c5f3bff6b7e417f7 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -188,7 +188,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

View File

@ -5,23 +5,23 @@ Subject: [PATCH] Fix lead fall dmg config
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2d3a486f290ef096346b8667e696518506936eaf..05353636bee54f3874fd243059d1c2c96e735d8b 100644
index 2d3a486f290ef096346b8667e696518506936eaf..2d6c0235879ef2b9024d6b881048bb8b73d18abe 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1290,6 +1290,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance = 0.0F;
} else if (d0 < 0.0D) {
this.fallDistance = (float) ((double) this.fallDistance - d0);
+ } else if (d0 > 0.0D && net.yatopia.server.YatopiaConfig.fixFallDistance) { // Yatopia
+ } else if (d0 > 0.0D && org.yatopiamc.yatopia.server.YatopiaConfig.fixFallDistance) { // Yatopia
+ this.fallDistance = 0.0F; // Yatopia
}
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index eb53176099103172961d544c0dab17cc19ef2e7f..b0dac509dddd576742308b687048e432fcf0484f 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -207,4 +207,9 @@ public class YatopiaConfig {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 0f3803757a81c7ecaad48637ede8a3dc95b93f13..003a024da8ab877895244ff9e4e4ff62288622ff 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -206,4 +206,9 @@ public class YatopiaConfig {
simplerVillagerBehavior = getBoolean("settings.villager.simplerVillagerBehavior", false);
villagersHideAtNight = getBoolean("settings.villager.villagersHideAtNight", false);
}

View File

@ -20,7 +20,7 @@ Thanks to Gabriele C <sgdc3.mail@gmail.com> for pointing this issue to us, as he
have any interest fixing this.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index caaa01b20e5b7430b809477022f8ab35f3c5bf20..b5dd5f44dc6583559b9cb5803af15e9a040cf7ea 100644
index caaa01b20e5b7430b809477022f8ab35f3c5bf20..dfa719716efdb93b2f4440916bef70971a2a404d 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1914,7 +1914,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -28,12 +28,12 @@ index caaa01b20e5b7430b809477022f8ab35f3c5bf20..b5dd5f44dc6583559b9cb5803af15e9a
UUID uuid = gameprofile.getId();
- if (uuid == null) {
+ if (net.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() || uuid == null) { // Yatopia
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() || uuid == null) { // Yatopia
uuid = getOfflineUUID(gameprofile.getName());
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index 1496c43fc9487caf6ddb3782a9d1c79ef6ca1e94..7e486c0f326449a10700efcec7ed3d9da5222615 100644
index 1496c43fc9487caf6ddb3782a9d1c79ef6ca1e94..d3ffbd5247b3a9b2a046d6696c959e834dff7ef4 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -82,6 +82,11 @@ public class UserCache {
@ -41,7 +41,7 @@ index 1496c43fc9487caf6ddb3782a9d1c79ef6ca1e94..7e486c0f326449a10700efcec7ed3d9d
@Nullable
private static GameProfile a(GameProfileRepository gameprofilerepository, String s) {
+ // Yatopia start
+ if (net.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() && net.yatopia.server.YatopiaConfig.isProxy()) {
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() && org.yatopiamc.yatopia.server.YatopiaConfig.isProxy()) {
+ return new GameProfile(EntityHuman.getOfflineUUID(s), s);
+ }
+ // Yatopia end
@ -53,7 +53,7 @@ index 1496c43fc9487caf6ddb3782a9d1c79ef6ca1e94..7e486c0f326449a10700efcec7ed3d9d
}
+ // Yatopia start
+ if (net.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() && !net.yatopia.server.YatopiaConfig.isProxy()) {
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.shouldUseOfflineUUID() && !org.yatopiamc.yatopia.server.YatopiaConfig.isProxy()) {
+ GameProfile newProfile = new GameProfile(EntityHuman.getOfflineUUID(s), s);
+ if (gameprofile == null || gameprofile.getProperties().isEmpty()) return newProfile;
+ newProfile.getProperties().putAll(gameprofile.getProperties());
@ -64,11 +64,19 @@ index 1496c43fc9487caf6ddb3782a9d1c79ef6ca1e94..7e486c0f326449a10700efcec7ed3d9d
return gameprofile;
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index b0dac509dddd576742308b687048e432fcf0484f..0237e91512dd15dae1597f1cbb37b0fb178ae35e 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
@@ -212,4 +212,26 @@ public class YatopiaConfig {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 003a024da8ab877895244ff9e4e4ff62288622ff..eb5f7172829037862c20bb7527badaa589f50cc7 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -10,6 +10,7 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.regex.Pattern;
+import net.minecraft.server.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -211,4 +212,26 @@ public class YatopiaConfig {
private static void fixFallDistance() {
fixFallDistance = getBoolean("settings.fixFallDistance", false);
}

View File

@ -9,21 +9,20 @@ villagers again.
diff --git a/src/main/java/me/jellysquid/mods/lithium/common/util/Producer.java b/src/main/java/me/jellysquid/mods/lithium/common/util/Producer.java
new file mode 100644
index 0000000000000000000000000000000000000000..18666522e08153093bc5457b2524622a4b619233
index 0000000000000000000000000000000000000000..e647624f4c9afe8bc603792ad88c807ed9f01250
--- /dev/null
+++ b/src/main/java/me/jellysquid/mods/lithium/common/util/Producer.java
@@ -0,0 +1,54 @@
@@ -0,0 +1,53 @@
+package me.jellysquid.mods.lithium.common.util;
+
+import java.util.List;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
+import net.yatopia.server.HoldingConsumer;
+import org.yatopiamc.yatopia.server.util.HoldingConsumer;
+
+public interface Producer<T> {
+ /**
@ -68,7 +67,7 @@ index 0000000000000000000000000000000000000000..18666522e08153093bc5457b2524622a
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f..e6b5a21c523c598f53207d024322301fbae74825 100644
index 6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f..aac055489291cd742bbbfd0aeb0b8face4040e17 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition {
@ -79,7 +78,7 @@ index 6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f..e6b5a21c523c598f53207d024322301f
+ public static java.util.List<BlockPosition> getPositions(int i, int j, int k, int l, int i1, int j1) {
+ java.util.List<BlockPosition> ret = new java.util.ArrayList<>();
+ Iterable<BlockPosition> iterable = b(i, j, k, l, i1, j1);
+ net.yatopia.server.HoldingConsumer<BlockPosition> consumer = new net.yatopia.server.HoldingConsumer<>();
+ org.yatopiamc.yatopia.server.util.HoldingConsumer<BlockPosition> consumer = new org.yatopiamc.yatopia.server.util.HoldingConsumer<>();
+ java.util.Spliterator<BlockPosition> spliterator = iterable.spliterator();
+ while (spliterator.tryAdvance(consumer)) ret.add(consumer.getValue());
+ return ret;
@ -89,7 +88,7 @@ index 6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f..e6b5a21c523c598f53207d024322301f
return StreamSupport.stream(b(i, j, k, l, i1, j1).spliterator(), false);
}
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
index 271fddbbf73ca5c0e4e2722d7246c14b778d6072..7d5935be528a17809f778578dd2cc559ad947ddd 100644
index 271fddbbf73ca5c0e4e2722d7246c14b778d6072..860943989b10a4f65c0de345a56aaa00f0959214 100644
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
@@ -118,6 +118,15 @@ public class ChunkCoordIntPair {
@ -101,7 +100,7 @@ index 271fddbbf73ca5c0e4e2722d7246c14b778d6072..7d5935be528a17809f778578dd2cc559
+ return streamList(new ChunkCoordIntPair(center.x - radius, center.z - radius), new ChunkCoordIntPair(center.x + radius, center.z + radius));
+ }
+ public static java.util.List<ChunkCoordIntPair> streamList(ChunkCoordIntPair pos1, ChunkCoordIntPair pos2) {
+ return net.yatopia.server.YatopiaChunkPos.asList(pos1, pos2);
+ return org.yatopiamc.yatopia.server.YatopiaChunkPos.asList(pos1, pos2);
+ }
+ // Yatopia end
+
@ -149,7 +148,7 @@ index 826dcf9f7eedc3664d66170b97b2a19552a0dc60..81f9b2ec160a015ce7e82ba33dd684e0
Vec3D vec3d = Vec3D.ORIGIN;
diff --git a/src/main/java/net/minecraft/server/SectionPosition.java b/src/main/java/net/minecraft/server/SectionPosition.java
index f95925f1c5d091f1a129d0437bb6e175c6ac080f..6796b1a832779b65d337c63d6b600e2a3b5e9559 100644
index f95925f1c5d091f1a129d0437bb6e175c6ac080f..11ba5c18d761f6cc76faa3e0f5de3d5b4175749d 100644
--- a/src/main/java/net/minecraft/server/SectionPosition.java
+++ b/src/main/java/net/minecraft/server/SectionPosition.java
@@ -159,6 +159,7 @@ public class SectionPosition extends BaseBlockPosition {
@ -185,7 +184,7 @@ index f95925f1c5d091f1a129d0437bb6e175c6ac080f..6796b1a832779b65d337c63d6b600e2a
+ return getPosList(chunkPos.x - i, 0, chunkPos.z - i, chunkPos.x + i, 15, chunkPos.z + i);
+ }
+ public static java.util.List<SectionPosition> getPosList(int i, int j, int k, int l, int i1, int j1) {
+ return net.yatopia.server.YatopiaChunkSectionPos.getChunkSectionPosList(i, j, k, l, i1, j1);
+ return org.yatopiamc.yatopia.server.YatopiaChunkSectionPos.getChunkSectionPosList(i, j, k, l, i1, j1);
+ }
+ // Yatopia end
+
@ -428,36 +427,13 @@ index f43bc1f7d693d63c6bbdba976c048d2d0c8767b1..15d2b2c21e61369b5c7897914ccf0aa9
})).add(villageplacerecord);
return true;
}
diff --git a/src/main/java/net/yatopia/server/HoldingConsumer.java b/src/main/java/net/yatopia/server/HoldingConsumer.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkPos.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkPos.java
new file mode 100644
index 0000000000000000000000000000000000000000..438adad46014043591f41d037d130a8569ec754f
index 0000000000000000000000000000000000000000..de95cf5ca20abdc8f200806287fb0ba03eec1e7c
--- /dev/null
+++ b/src/main/java/net/yatopia/server/HoldingConsumer.java
@@ -0,0 +1,17 @@
+package net.yatopia.server;
+
+import java.util.function.Consumer;
+
+public class HoldingConsumer<T> implements Consumer<T> {
+
+ private T value;
+
+ @Override
+ public void accept(T t) {
+ this.value = t;
+ }
+
+ public T getValue() {
+ return value;
+ }
+}
diff --git a/src/main/java/net/yatopia/server/YatopiaChunkPos.java b/src/main/java/net/yatopia/server/YatopiaChunkPos.java
new file mode 100644
index 0000000000000000000000000000000000000000..757c459668837aa36e21f90265f08fbbb4bdead8
--- /dev/null
+++ b/src/main/java/net/yatopia/server/YatopiaChunkPos.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkPos.java
@@ -0,0 +1,54 @@
+package net.yatopia.server;
+package org.yatopiamc.yatopia.server;
+
+import java.util.ArrayList;
+import java.util.List;
@ -511,13 +487,13 @@ index 0000000000000000000000000000000000000000..757c459668837aa36e21f90265f08fbb
+ };
+ }
+}
diff --git a/src/main/java/net/yatopia/server/YatopiaChunkSectionPos.java b/src/main/java/net/yatopia/server/YatopiaChunkSectionPos.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkSectionPos.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkSectionPos.java
new file mode 100644
index 0000000000000000000000000000000000000000..4466c4c3afe875106a8dd0818718ce71e1d00eb3
index 0000000000000000000000000000000000000000..d298cf985def6d7adcc6156b1476f86c085ad5e7
--- /dev/null
+++ b/src/main/java/net/yatopia/server/YatopiaChunkSectionPos.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaChunkSectionPos.java
@@ -0,0 +1,32 @@
+package net.yatopia.server;
+package org.yatopiamc.yatopia.server;
+
+import java.util.ArrayList;
+import java.util.List;
@ -549,3 +525,26 @@ index 0000000000000000000000000000000000000000..4466c4c3afe875106a8dd0818718ce71
+ };
+ }
+}
diff --git a/src/main/java/org/yatopiamc/yatopia/server/util/HoldingConsumer.java b/src/main/java/org/yatopiamc/yatopia/server/util/HoldingConsumer.java
new file mode 100644
index 0000000000000000000000000000000000000000..adcbe5a009ef8156945b48c4d29d171ebffc4bec
--- /dev/null
+++ b/src/main/java/org/yatopiamc/yatopia/server/util/HoldingConsumer.java
@@ -0,0 +1,17 @@
+package org.yatopiamc.yatopia.server.util;
+
+import java.util.function.Consumer;
+
+public class HoldingConsumer<T> implements Consumer<T> {
+
+ private T value;
+
+ @Override
+ public void accept(T t) {
+ this.value = t;
+ }
+
+ public T getValue() {
+ return value;
+ }
+}

View File

@ -25,7 +25,7 @@ index fdfd955aad65b758696b72a71521ec74e9aa122a..7c3e792b53329c869fbd21e298961b3f
return this.getBlock().a(block);
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index e6b5a21c523c598f53207d024322301fbae74825..9e41ff0ed0686fb7c400a0f551e3ea5927183ca3 100644
index aac055489291cd742bbbfd0aeb0b8face4040e17..34d0240903deb43ff486daa35a04a4b33788e474 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -318,7 +318,15 @@ public class BlockPosition extends BaseBlockPosition {

View File

@ -55,7 +55,7 @@ index 4094ef76b7b05de1bfcc28aa0ef13033abadeb7e..0224a6d0e47e836fa485b39e7b4ce5b8
Throwable throwable = null;
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f237bd8ae933af2913408bf4539526c69114226e..3f43cb17f4150a0b8cc4fac8fcb2ab7acb2daccb 100644
index b679a6ee7ee2fb00293fb02b3537eddf5580e596..e54706b9c65f0a15bd5ff0e0f227bb881fc172b3 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -636,6 +636,7 @@ public abstract class PlayerList {

View File

@ -39,7 +39,7 @@ index a7373681b8442b302a5f9cf5a7408443defc6f8c..292eef68b8d71236c845dd5c42c5366b
this.minecraftServer.getPlayerList().sendMessage(CraftChatMessage.fromString(quitMessage));
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 3f43cb17f4150a0b8cc4fac8fcb2ab7acb2daccb..4ab7165e6db3e9f5909c7bf1e42a700f3efbaa1d 100644
index e54706b9c65f0a15bd5ff0e0f227bb881fc172b3..1ef3df97c5af937a342a9e2c18e51e707e9bd203 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -499,6 +499,11 @@ public abstract class PlayerList {

View File

@ -111,7 +111,7 @@ index 893d2c1c74ed28dcdb83b71762ccdcbfd50a8f9d..107091a4cae0e4eaba93f69ae91239ab
private static int b(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index b5dd5f44dc6583559b9cb5803af15e9a040cf7ea..1aa9e6e939ac23b7e08e24d14ea585f287b97ac7 100644
index dfa719716efdb93b2f4440916bef70971a2a404d..b66338f3658aeded6264a8f522c9d60f9b426a04 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -77,6 +77,7 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] PlayerAttackEntityEvent
Added per request
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1aa9e6e939ac23b7e08e24d14ea585f287b97ac7..1bfa1500b942905c3918f0715da0a9d534909edb 100644
index b66338f3658aeded6264a8f522c9d60f9b426a04..08c1e85e1fcc55f647d238729870e84b7c55f598 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1049,11 +1049,47 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -5,24 +5,36 @@ Subject: [PATCH] Add nspt command
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index d1cf80ce9e87fa6ec03f2e965883041acbd181d5..e5eb34da6994519b81bafab8241d680568cfcc84 100644
index 21999986018b93315eea54d0c5f3bff6b7e417f7..d8c1add8d1281d40a7aa13810ed425cc5f6f38f1 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -187,6 +187,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.error("Unable to load server configuration", e);
return false;
}
+ net.yatopia.server.YatopiaConfig.registerCommands();
+ org.yatopiamc.yatopia.server.YatopiaConfig.registerCommands();
// Yatopia end
de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings"));
this.setPVP(dedicatedserverproperties.pvp);
diff --git a/src/main/java/net/yatopia/server/NSPTCommand.java b/src/main/java/net/yatopia/server/NSPTCommand.java
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b4c58c8a3fd124931bdbf1f732dfc40aaae691ea..8bf63976035d563a1ac5092adb4e0705a2c04c6e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -916,6 +916,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
net.pl3x.purpur.PurpurConfig.registerCommands(); // Purpur
+ org.yatopiamc.yatopia.server.YatopiaConfig.registerCommands(); // Yatopia
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
diff --git a/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java b/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..7a8c3e451788b017110a0dd5d83e40ebfeab9e70
index 0000000000000000000000000000000000000000..e6eaa07c57e04bbfba9e4aa8e0e939f85169d0c8
--- /dev/null
+++ b/src/main/java/net/yatopia/server/NSPTCommand.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java
@@ -0,0 +1,59 @@
+package net.yatopia.server;
+package org.yatopiamc.yatopia.server;
+
+import java.util.ArrayList;
+import java.util.Arrays;
@ -81,10 +93,10 @@ index 0000000000000000000000000000000000000000..7a8c3e451788b017110a0dd5d83e40eb
+ return ChatColor.COLOR_CHAR + (avg >= 5E+7 ? "c" : avg >= (4E+7) ? "e" : "a") + avg;
+ }
+}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 0237e91512dd15dae1597f1cbb37b0fb178ae35e..e4c5a485caa9e97388aefd9dc5a3ce40efeca738 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index eb5f7172829037862c20bb7527badaa589f50cc7..b358aacce7b8e1282d721ae1077b888239ec6b39 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -6,12 +6,15 @@ import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ -131,15 +143,3 @@ index 0237e91512dd15dae1597f1cbb37b0fb178ae35e..e4c5a485caa9e97388aefd9dc5a3ce40
private static void removeLeftovers() {
// this method is only to remove non-used values in the config
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 200a13f619546bf10948fab496a07ba174869fd2..67f58c4792a86b1ee4ad97ce192a5931bf597ab5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -916,6 +916,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
net.pl3x.purpur.PurpurConfig.registerCommands(); // Purpur
+ net.yatopia.server.YatopiaConfig.registerCommands(); // Yatopia
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flight checks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 292eef68b8d71236c845dd5c42c5366b5b55efc0..9d896d0bd7feda493a3aecd7959c287cd84ecb7f 100644
index 292eef68b8d71236c845dd5c42c5366b5b55efc0..793be022028be7557cfd6d96f408c7039e5f9ca5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -177,7 +177,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -13,7 +13,7 @@ index 292eef68b8d71236c845dd5c42c5366b5b55efc0..9d896d0bd7feda493a3aecd7959c287c
this.processedMovePackets = this.receivedMovePackets;
if (this.B && !this.player.isSleeping()) {
- if (++this.C > 80) {
+ if (net.yatopia.server.YatopiaConfig.checkFlying && ++this.C > 80) { // Yatopia
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkFlying && ++this.C > 80) { // Yatopia
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
return;
@ -22,14 +22,14 @@ index 292eef68b8d71236c845dd5c42c5366b5b55efc0..9d896d0bd7feda493a3aecd7959c287c
this.x = this.r.locZ();
if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) {
- if (++this.E > 80) {
+ if (net.yatopia.server.YatopiaConfig.checkVehicleFlying && ++this.E > 80) { // Yatopia
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkVehicleFlying && ++this.E > 80) { // Yatopia
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString());
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message
return;
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index e4c5a485caa9e97388aefd9dc5a3ce40efeca738..f0e7684304cab9cea05fa266a66a2ad8172c55b6 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index b358aacce7b8e1282d721ae1077b888239ec6b39..26bd1fc5b348cc16ca29f66eead2ca42bd4258a8 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -246,4 +246,11 @@ public class YatopiaConfig {
public static boolean isProxy() {
return org.spigotmc.SpigotConfig.bungee || com.destroystokyo.paper.PaperConfig.velocitySupport;

View File

@ -11,7 +11,7 @@ Portions of this patch that were sourced from Lithium were remapped from Yarn ma
Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
diff --git a/src/main/java/net/minecraft/server/BlockComposter.java b/src/main/java/net/minecraft/server/BlockComposter.java
index 55a5999080b831217b88ed3657e95218fe982c18..f30587b0c455d5159084020719bca7ded535b4c1 100644
index 55a5999080b831217b88ed3657e95218fe982c18..8025b5d258fc761f1287a395889e352beb105ad7 100644
--- a/src/main/java/net/minecraft/server/BlockComposter.java
+++ b/src/main/java/net/minecraft/server/BlockComposter.java
@@ -305,7 +305,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
@ -19,7 +19,7 @@ index 55a5999080b831217b88ed3657e95218fe982c18..f30587b0c455d5159084020719bca7de
@Override
public int[] getSlotsForFace(EnumDirection enumdirection) {
- return enumdirection == EnumDirection.UP ? new int[]{0} : new int[0];
+ return enumdirection == EnumDirection.UP ? net.yatopia.server.util.Constants.ZERO_ARRAY : net.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
+ return enumdirection == EnumDirection.UP ? org.yatopiamc.yatopia.server.util.Constants.ZERO_ARRAY : org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
}
@Override
@ -28,7 +28,7 @@ index 55a5999080b831217b88ed3657e95218fe982c18..f30587b0c455d5159084020719bca7de
@Override
public int[] getSlotsForFace(EnumDirection enumdirection) {
- return enumdirection == EnumDirection.DOWN ? new int[]{0} : new int[0];
+ return enumdirection == EnumDirection.DOWN ? net.yatopia.server.util.Constants.ZERO_ARRAY : net.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
+ return enumdirection == EnumDirection.DOWN ? org.yatopiamc.yatopia.server.util.Constants.ZERO_ARRAY : org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
}
@Override
@ -37,7 +37,7 @@ index 55a5999080b831217b88ed3657e95218fe982c18..f30587b0c455d5159084020719bca7de
@Override
public int[] getSlotsForFace(EnumDirection enumdirection) {
- return new int[0];
+ return net.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
+ return org.yatopiamc.yatopia.server.util.Constants.EMPTY_ARRAY; // Yatopia - avoid array allocation
}
@Override

View File

@ -8,7 +8,7 @@ In vanilla, statistics that count time spent for an action (i.e. time played or
With an interval of 20, this patch saves roughly 3ms per tick on a server w/ 80 players online.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1bfa1500b942905c3918f0715da0a9d534909edb..21074d369b9f7c7f101ba85a9d350627b98217d2 100644
index 08c1e85e1fcc55f647d238729870e84b7c55f598..4b19f01c891b23a8da7a39d6ae63f229bcb8e198 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -163,18 +163,23 @@ public abstract class EntityHuman extends EntityLiving {
@ -17,7 +17,7 @@ index 1bfa1500b942905c3918f0715da0a9d534909edb..21074d369b9f7c7f101ba85a9d350627
this.foodData.a(this);
- this.a(StatisticList.PLAY_ONE_MINUTE);
+ // Yatopia start
+ int interval = net.yatopia.server.YatopiaConfig.playerTimeStatisticsInterval;
+ int interval = org.yatopiamc.yatopia.server.YatopiaConfig.playerTimeStatisticsInterval;
+ if (ticksLived % interval == 0) {
+ this.a(StatisticList.PLAY_ONE_MINUTE, interval);
+ // Yatopia end
@ -39,10 +39,10 @@ index 1bfa1500b942905c3918f0715da0a9d534909edb..21074d369b9f7c7f101ba85a9d350627
}
int i = 29999999;
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index f0e7684304cab9cea05fa266a66a2ad8172c55b6..9df9f316ac2ec2567435ad33e7d4cdfff384381f 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 26bd1fc5b348cc16ca29f66eead2ca42bd4258a8..2e08558eef23d40b3a704250dfe12bb7f4b660f3 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -253,4 +253,9 @@ public class YatopiaConfig {
checkFlying = getBoolean("settings.checks.flight", checkFlying);
checkVehicleFlying = getBoolean("settings.checks.vehicle-flight", checkVehicleFlying);

View File

@ -6,14 +6,14 @@ Subject: [PATCH] Configurable criterion triggers
This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy.
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 42451ff5b9b345cd549fcbb496fc7bc053935580..151c1eb0be3099a0512caadeedc1354bb07db5c7 100644
index 42451ff5b9b345cd549fcbb496fc7bc053935580..1f54ce29006749e59cb4088b260b70596884a45d 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -431,6 +431,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected void a(IBlockData iblockdata) {
+ if (net.yatopia.server.YatopiaConfig.criterionTriggerEnterBlock) // Yatopia
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.criterionTriggerEnterBlock) // Yatopia
CriterionTriggers.d.a(this, iblockdata);
}
@ -22,14 +22,14 @@ index 42451ff5b9b345cd549fcbb496fc7bc053935580..151c1eb0be3099a0512caadeedc1354b
}
- if (this.ticksLived % 20 == 0) {
+ if (net.yatopia.server.YatopiaConfig.criterionTriggerLocation && this.ticksLived % 20 == 0) { // Yatopia
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.criterionTriggerLocation && this.ticksLived % 20 == 0) { // Yatopia
CriterionTriggers.p.a(this);
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 9df9f316ac2ec2567435ad33e7d4cdfff384381f..b92ef7f84755b1de4726c993601ec134a1e7ce9c 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 2e08558eef23d40b3a704250dfe12bb7f4b660f3..5578f5784a87019d3f091173b25b5ec1cc059fd6 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -258,4 +258,14 @@ public class YatopiaConfig {
private static void intervals() {
playerTimeStatisticsInterval = Math.max(1, getInt("settings.intervals.player-time-statistics", 1));

View File

@ -8,7 +8,7 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu
This patch implements a hard toggle for the event.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f24c33280ccb17a316c982f4cc4f004c3cc70c4b..94c20ad7fb8872f763953e0991a72a075700a024 100644
index f24c33280ccb17a316c982f4cc4f004c3cc70c4b..76d3c208e60385f842471128e4591f757cc2138c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1412,7 +1412,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -16,14 +16,14 @@ index f24c33280ccb17a316c982f4cc4f004c3cc70c4b..94c20ad7fb8872f763953e0991a72a07
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
- worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
+ worldserver.hasPhysicsEvent = net.yatopia.server.YatopiaConfig.fireBlockPhysicsEvent && org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper // Yatopia
+ worldserver.hasPhysicsEvent = org.yatopiamc.yatopia.server.YatopiaConfig.fireBlockPhysicsEvent && org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper // Yatopia
TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
this.methodProfiler.a(() -> {
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index b92ef7f84755b1de4726c993601ec134a1e7ce9c..366b1c0f7e55c954a6a2d84e4aaa857764ce1f5a 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 5578f5784a87019d3f091173b25b5ec1cc059fd6..4f99aa4b578333795296da2424f38aae65a808a3 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -268,4 +268,8 @@ public class YatopiaConfig {
criterionTriggerTick = getBoolean("settings.criterion-triggers.tick", true);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Infinity No Arrows
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 21074d369b9f7c7f101ba85a9d350627b98217d2..e35087458dea5ac1736ec2d230d8c23b84800774 100644
index 4b19f01c891b23a8da7a39d6ae63f229bcb8e198..fab44dafa479a97a69499b6af500e45c77612c81 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2137,7 +2137,7 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable movement checks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9d896d0bd7feda493a3aecd7959c287cd84ecb7f..6d23b9ce8340439837c56ad13c2b5996e20fbc51 100644
index 793be022028be7557cfd6d96f408c7039e5f9ca5..612719e1363e05af7e80d6cafd24fbdbcf78fbe0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -440,7 +440,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -13,7 +13,7 @@ index 9d896d0bd7feda493a3aecd7959c287cd84ecb7f..6d23b9ce8340439837c56ad13c2b5996
// Paper end
- if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
+ if (net.yatopia.server.YatopiaConfig.checkVehicleMovedQuickly && d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // Yatopia - Configurable movement checks
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkVehicleMovedQuickly && d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // Yatopia - Configurable movement checks
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
@ -22,7 +22,7 @@ index 9d896d0bd7feda493a3aecd7959c287cd84ecb7f..6d23b9ce8340439837c56ad13c2b5996
boolean flag1 = false;
- if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
+ if (net.yatopia.server.YatopiaConfig.checkVehicleMovedWrongly && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot // Yatopia - Configurable movement checks
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkVehicleMovedWrongly && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot // Yatopia - Configurable movement checks
flag1 = true;
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Math.sqrt(d10));
}
@ -31,7 +31,7 @@ index 9d896d0bd7feda493a3aecd7959c287cd84ecb7f..6d23b9ce8340439837c56ad13c2b5996
float f2 = this.player.isGliding() ? 300.0F : 100.0F;
- if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
+ if (net.yatopia.server.YatopiaConfig.checkMovedQuickly && d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // Yatopia - Configurable movement checks
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkMovedQuickly && d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // Yatopia - Configurable movement checks
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9);
this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch);
@ -40,14 +40,14 @@ index 9d896d0bd7feda493a3aecd7959c287cd84ecb7f..6d23b9ce8340439837c56ad13c2b5996
boolean flag1 = false;
- if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
+ if (net.yatopia.server.YatopiaConfig.checkMovedWrongly && !this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot // Yatopia - Configurable movement checks
+ if (org.yatopiamc.yatopia.server.YatopiaConfig.checkMovedWrongly && !this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot // Yatopia - Configurable movement checks
flag1 = true;
PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getDisplayName().getString());
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 366b1c0f7e55c954a6a2d84e4aaa857764ce1f5a..5139279822b1fdc4a60de5abc76e81c75fe2e6bb 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 4f99aa4b578333795296da2424f38aae65a808a3..34b5a087d1d5d84b193adbd756add060a2d49354 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -272,4 +272,15 @@ public class YatopiaConfig {
private static void fireBlockPhysicsEvent() {
fireBlockPhysicsEvent = getBoolean("settings.fire-block-physics-event", true);

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Use faster random implementation
Replace usages of random in world and entity classes with FastRandom, an adapter for XoRoShiRo128PlusPlus. This nearly doubles random performance across the board.
diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
index b5401eaf974857455c17c3f9cfdedf2eb4bde321..bcc01ea8a07deb3f437ebadd90d02e20e91889a0 100644
index b5401eaf974857455c17c3f9cfdedf2eb4bde321..ec7ce458159e04b4d2bfda8fbb9b6974595747a6 100644
--- a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
@@ -13,7 +13,7 @@ import java.util.UUID;
@ -14,12 +14,12 @@ index b5401eaf974857455c17c3f9cfdedf2eb4bde321..bcc01ea8a07deb3f437ebadd90d02e20
public class PaperLootableInventoryData {
- private static final Random RANDOM = new Random();
+ private static final Random RANDOM = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private static final Random RANDOM = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private long lastFill = -1;
private long nextRefill = -1;
diff --git a/src/main/java/net/minecraft/server/CommandSpreadPlayers.java b/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
index c9f4b69874e693c8e5c3346f09db7b5014dcfb63..b5047b0b6de4c737f52dcb4d109c610d8451260d 100644
index c9f4b69874e693c8e5c3346f09db7b5014dcfb63..e0101b688337d863ee873301368dcaced630d127 100644
--- a/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
+++ b/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
@@ -37,7 +37,7 @@ public class CommandSpreadPlayers {
@ -27,12 +27,12 @@ index c9f4b69874e693c8e5c3346f09db7b5014dcfb63..b5047b0b6de4c737f52dcb4d109c610d
private static int a(CommandListenerWrapper commandlistenerwrapper, Vec2F vec2f, float f, float f1, int i, boolean flag, Collection<? extends Entity> collection) throws CommandSyntaxException {
- Random random = new Random();
+ Random random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ Random random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
double d0 = (double) (vec2f.i - f1);
double d1 = (double) (vec2f.j - f1);
double d2 = (double) (vec2f.i + f1);
diff --git a/src/main/java/net/minecraft/server/ContainerEnchantTable.java b/src/main/java/net/minecraft/server/ContainerEnchantTable.java
index 73bff2ca1f09cf6f33479f175cae72e456e8db4b..a481a2f05b701c85cf863cd3dadc22c31403942d 100644
index 73bff2ca1f09cf6f33479f175cae72e456e8db4b..8a09aa82d97b5096e62995bc3903e15a623c15ad 100644
--- a/src/main/java/net/minecraft/server/ContainerEnchantTable.java
+++ b/src/main/java/net/minecraft/server/ContainerEnchantTable.java
@@ -52,7 +52,7 @@ public class ContainerEnchantTable extends Container {
@ -40,12 +40,12 @@ index 73bff2ca1f09cf6f33479f175cae72e456e8db4b..a481a2f05b701c85cf863cd3dadc22c3
// CraftBukkit end
};
- this.h = new Random();
+ this.h = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.h = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.i = ContainerProperty.a();
this.costs = new int[3];
this.enchantments = new int[]{-1, -1, -1};
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..08c83c8a226b6b38250aba2fab86d4685228797b 100644
index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..4e094f0e1117cecbd39be645997eb9d3080c666f 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -73,7 +73,7 @@ public class EnderDragonBattle {
@ -53,12 +53,12 @@ index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..08c83c8a226b6b38250aba2fab86d468
} else {
this.gateways.addAll(ContiguousSet.create(Range.closedOpen(0, 20), DiscreteDomain.integers()));
- Collections.shuffle(this.gateways, new Random(i));
+ Collections.shuffle(this.gateways, new net.yatopia.server.util.FastRandom(i)); // Yatopia - fast random
+ Collections.shuffle(this.gateways, new org.yatopiamc.yatopia.server.util.FastRandom(i)); // Yatopia - fast random
}
this.f = ShapeDetectorBuilder.a().a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ### ", " # # ", "# #", "# # #", "# #", " # # ", " ### ").a(" ", " ### ", " ##### ", " ##### ", " ##### ", " ### ", " ").a('#', ShapeDetectorBlock.a(BlockPredicate.a(Blocks.BEDROCK))).b();
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 05353636bee54f3874fd243059d1c2c96e735d8b..d72832863a67bc8666e21d007a6236ff5f5f9ec3 100644
index 2d6c0235879ef2b9024d6b881048bb8b73d18abe..07b8331ee44f5fc87e7b9140141ba8ffef94b4d8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -61,7 +61,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -66,12 +66,12 @@ index 05353636bee54f3874fd243059d1c2c96e735d8b..d72832863a67bc8666e21d007a6236ff
// Paper start
boolean isQueuedForRegister = false;
- public static Random SHARED_RANDOM = new Random() {
+ public static Random SHARED_RANDOM = new net.yatopia.server.util.FastRandom() { //Yatopia Faster Random
+ public static Random SHARED_RANDOM = new org.yatopiamc.yatopia.server.util.FastRandom() { //Yatopia Faster Random
private boolean locked = false;
@Override
public synchronized void setSeed(long seed) {
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 6891e61bcfea82958e100abaef94865bf36a32c2..37172d3def389f3510e05b8e63e94b5ec045e3c5 100644
index 6891e61bcfea82958e100abaef94865bf36a32c2..32ccc08455a88c510fe05713c8de7a5eed85e70b 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -38,7 +38,7 @@ public class EntityFishingHook extends IProjectile {
@ -79,12 +79,12 @@ index 6891e61bcfea82958e100abaef94865bf36a32c2..37172d3def389f3510e05b8e63e94b5e
private EntityFishingHook(World world, EntityHuman entityhuman, int i, int j) {
super(EntityTypes.FISHING_BOBBER, world);
- this.b = new Random();
+ this.b = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.b = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.ak = true;
this.am = EntityFishingHook.HookState.FLYING;
this.Y = true;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 151c1eb0be3099a0512caadeedc1354bb07db5c7..436055024ed498613a32e555a2201d2bad40df4c 100644
index 1f54ce29006749e59cb4088b260b70596884a45d..6fe7151ba7d8ad105bf21aa89be5a7ab2f2aa0ca 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -186,7 +186,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -106,7 +106,7 @@ index 151c1eb0be3099a0512caadeedc1354bb07db5c7..436055024ed498613a32e555a2201d2b
for (int l1 = 0; l1 < i1; ++l1) {
int i2 = (k1 + j1 * l1) % i1;
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 5ca4d03215c979a4d122a32178a1859b4d9c3334..3b56226e2b314724294bddc3236b8c2d16c8ccc1 100644
index 5ca4d03215c979a4d122a32178a1859b4d9c3334..a9006f3c8ccc3e46252343baa5104a5d0b48dc8b 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -27,7 +27,7 @@ public class Explosion {
@ -114,12 +114,12 @@ index 5ca4d03215c979a4d122a32178a1859b4d9c3334..3b56226e2b314724294bddc3236b8c2d
private final boolean b;
private final Explosion.Effect c;
- private final Random d = new Random();
+ private final Random d = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private final Random d = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private final World world;
private final double posX;
private final double posY;
diff --git a/src/main/java/net/minecraft/server/Item.java b/src/main/java/net/minecraft/server/Item.java
index c3b57e8d572d13ec74d6df5544072cdc55756690..6b15fc26f3ce629666efd4b46c2d62b29a62c263 100644
index c3b57e8d572d13ec74d6df5544072cdc55756690..99e5e2c6fe12e0deda1f5aeb3f8922efa5fa8cae 100644
--- a/src/main/java/net/minecraft/server/Item.java
+++ b/src/main/java/net/minecraft/server/Item.java
@@ -13,7 +13,7 @@ public class Item implements IMaterial {
@ -127,12 +127,12 @@ index c3b57e8d572d13ec74d6df5544072cdc55756690..6b15fc26f3ce629666efd4b46c2d62b2
protected static final UUID f = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
protected static final UUID g = UUID.fromString("FA233E1C-4180-4865-B01B-BCCE9785ACA3");
- protected static final Random RANDOM = new Random();
+ protected static final Random RANDOM = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ protected static final Random RANDOM = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
protected final CreativeModeTab i;
private final EnumItemRarity a;
private final int maxStackSize;
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 9190caed195b9987e3af545f4de63b8d956788a6..00e9ebe7ce698f523e08d5ed6e48e41fe3bfe85d 100644
index 9190caed195b9987e3af545f4de63b8d956788a6..178386cfb44152b50757234a624afef0d61e00d8 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -32,7 +32,7 @@ public class LoginListener implements PacketLoginInListener {
@ -140,12 +140,12 @@ index 9190caed195b9987e3af545f4de63b8d956788a6..00e9ebe7ce698f523e08d5ed6e48e41f
private static final AtomicInteger b = new AtomicInteger(0);
private static final Logger LOGGER = LogManager.getLogger();
- private static final Random random = new Random();
+ private static final Random random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private static final Random random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private final byte[] e = new byte[4];
private final MinecraftServer server;
public final NetworkManager networkManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 94c20ad7fb8872f763953e0991a72a075700a024..a28bca93e1ebb2b2427947aebd53b6cdcc5f7806 100644
index 76d3c208e60385f842471128e4591f757cc2138c..bdbbb6ea881fccbfc753dfb6a401dafb6a056a03 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -196,7 +196,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -153,12 +153,12 @@ index 94c20ad7fb8872f763953e0991a72a075700a024..a28bca93e1ebb2b2427947aebd53b6cd
this.methodProfiler = GameProfilerDisabled.a;
this.serverPing = new ServerPing();
- this.r = new Random();
+ this.r = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.r = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.serverPort = -1;
this.worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods
this.isRunning = true;
diff --git a/src/main/java/net/minecraft/server/MobSpawnerTrader.java b/src/main/java/net/minecraft/server/MobSpawnerTrader.java
index 8d89f51182444852062d549d23c00a93e601eb38..b207839f4d8ff00252187083e787526b6eba08e2 100644
index 8d89f51182444852062d549d23c00a93e601eb38..3d07f8770d618ea03b2ee0838a86c5c545fe2b73 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerTrader.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerTrader.java
@@ -7,7 +7,7 @@ import javax.annotation.Nullable;
@ -166,12 +166,12 @@ index 8d89f51182444852062d549d23c00a93e601eb38..b207839f4d8ff00252187083e787526b
public class MobSpawnerTrader implements MobSpawner {
- private final Random a = new Random();
+ private final Random a = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private final Random a = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private final IWorldDataServer b;
private int c; public final int getMinuteTimer() { return this.c; } public final void setMinuteTimer(int x) { this.c = x; } // Paper - OBFHELPER
private int d; public final int getDayTimer() { return this.d; } public final void setDayTimer(int x) { this.d = x; } // Paper - OBFHELPER
diff --git a/src/main/java/net/minecraft/server/PiglinAI.java b/src/main/java/net/minecraft/server/PiglinAI.java
index 0407fa1751d89a037da8cb01f5ceef9b9833dd18..09a5ea308a8d0dc3c8a38fce115e62d9b2e0b8aa 100644
index 0407fa1751d89a037da8cb01f5ceef9b9833dd18..c7bd1b7eff2de3ce51e096652998e1a44dfc514a 100644
--- a/src/main/java/net/minecraft/server/PiglinAI.java
+++ b/src/main/java/net/minecraft/server/PiglinAI.java
@@ -273,7 +273,7 @@ public class PiglinAI {
@ -179,12 +179,12 @@ index 0407fa1751d89a037da8cb01f5ceef9b9833dd18..09a5ea308a8d0dc3c8a38fce115e62d9
private static boolean a(EntityLiving entityliving, EntityLiving entityliving1) {
- return entityliving1.getEntityType() != EntityTypes.HOGLIN ? false : (new Random(entityliving.world.getTime())).nextFloat() < 0.1F;
+ return entityliving1.getEntityType() != EntityTypes.HOGLIN ? false : (new net.yatopia.server.util.FastRandom(entityliving.world.getTime())).nextFloat() < 0.1F; // Yatopia - fast random
+ return entityliving1.getEntityType() != EntityTypes.HOGLIN ? false : (new org.yatopiamc.yatopia.server.util.FastRandom(entityliving.world.getTime())).nextFloat() < 0.1F; // Yatopia - fast random
}
protected static boolean a(EntityPiglin entitypiglin, ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/Raid.java b/src/main/java/net/minecraft/server/Raid.java
index 11f768e04d71b96350fdb586a280c52e062dfcf2..71e64250214b27c215d30d6c6d5fe51b7a7c43a1 100644
index 11f768e04d71b96350fdb586a280c52e062dfcf2..b1890e936696bdd04a1eaad65f77e4dc6ef1a664 100644
--- a/src/main/java/net/minecraft/server/Raid.java
+++ b/src/main/java/net/minecraft/server/Raid.java
@@ -47,7 +47,7 @@ public class Raid {
@ -192,7 +192,7 @@ index 11f768e04d71b96350fdb586a280c52e062dfcf2..71e64250214b27c215d30d6c6d5fe51b
public Raid(int i, WorldServer worldserver, BlockPosition blockposition) {
this.bossBattle = new BossBattleServer(Raid.a, BossBattle.BarColor.RED, BossBattle.BarStyle.NOTCHED_10);
- this.random = new Random();
+ this.random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.y = Optional.empty();
this.id = i;
this.world = worldserver;
@ -201,12 +201,12 @@ index 11f768e04d71b96350fdb586a280c52e062dfcf2..71e64250214b27c215d30d6c6d5fe51b
public Raid(WorldServer worldserver, NBTTagCompound nbttagcompound) {
this.bossBattle = new BossBattleServer(Raid.a, BossBattle.BarColor.RED, BossBattle.BarStyle.NOTCHED_10);
- this.random = new Random();
+ this.random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.y = Optional.empty();
this.world = worldserver;
this.id = nbttagcompound.getInt("Id");
diff --git a/src/main/java/net/minecraft/server/TileEntityDispenser.java b/src/main/java/net/minecraft/server/TileEntityDispenser.java
index 6ea4bc31151bce2bdd3376a889029c4b999befac..bcd36fd3ad56897eb9968a96cb8cf3b0c1f93e8d 100644
index 6ea4bc31151bce2bdd3376a889029c4b999befac..22e8730adaa5fd489116a9730c82e90fd830514b 100644
--- a/src/main/java/net/minecraft/server/TileEntityDispenser.java
+++ b/src/main/java/net/minecraft/server/TileEntityDispenser.java
@@ -10,7 +10,7 @@ import org.bukkit.entity.HumanEntity;
@ -214,12 +214,12 @@ index 6ea4bc31151bce2bdd3376a889029c4b999befac..bcd36fd3ad56897eb9968a96cb8cf3b0
public class TileEntityDispenser extends TileEntityLootable {
- private static final Random a = new Random();
+ private static final Random a = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private static final Random a = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private NonNullList<ItemStack> items;
// CraftBukkit start - add fields and methods
diff --git a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
index 9b0c75332d9815657d96183e51e40cf14ee3ed75..de597d053fcdb983b9b08f0628e4708e6149ffab 100644
index 9b0c75332d9815657d96183e51e40cf14ee3ed75..c9066cb5f51cb2ad078aca3019e1df557062d286 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
@@ -15,7 +15,7 @@ public class TileEntityEnchantTable extends TileEntity implements INamableTileEn
@ -227,12 +227,12 @@ index 9b0c75332d9815657d96183e51e40cf14ee3ed75..de597d053fcdb983b9b08f0628e4708e
public float l;
public float m;
- private static final Random n = new Random();
+ private static final Random n = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private static final Random n = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private IChatBaseComponent o;
public TileEntityEnchantTable() {
diff --git a/src/main/java/net/minecraft/server/WeightedList.java b/src/main/java/net/minecraft/server/WeightedList.java
index f0fdfd6891e59891e7370a2d682b65c647b28e9e..964f7a4cda578c2d91d8150217da2fe0aabd6197 100644
index f0fdfd6891e59891e7370a2d682b65c647b28e9e..8d5fe0880f4f2bffe14dc1c7163cde69869422e7 100644
--- a/src/main/java/net/minecraft/server/WeightedList.java
+++ b/src/main/java/net/minecraft/server/WeightedList.java
@@ -28,7 +28,7 @@ public class WeightedList<U> {
@ -240,12 +240,12 @@ index f0fdfd6891e59891e7370a2d682b65c647b28e9e..964f7a4cda578c2d91d8150217da2fe0
this.isUnsafe = isUnsafe;
// Paper end
- this.b = new Random();
+ this.b = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ this.b = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
this.list = Lists.newArrayList(list); // Paper - decompile conflict
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index de7ca87e74084c5cca109a6eff071da351dec91b..7431bfc335dadfb5f5f83ccba6d8923c15756dc1 100644
index de7ca87e74084c5cca109a6eff071da351dec91b..84fb0492abca5a2443e89adc18b3fa17c636054f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -48,13 +48,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -253,19 +253,19 @@ index de7ca87e74084c5cca109a6eff071da351dec91b..7431bfc335dadfb5f5f83ccba6d8923c
private final boolean debugWorld;
private int d;
- protected int n = (new Random()).nextInt();
+ protected int n = (new net.yatopia.server.util.FastRandom()).nextInt(); // Yatopia - wtf ? why doesn't this use the already initiated random!?
+ protected int n = (new org.yatopiamc.yatopia.server.util.FastRandom()).nextInt(); // Yatopia - wtf ? why doesn't this use the already initiated random!?
protected final int o = 1013904223;
protected float lastRainLevel;
protected float rainLevel;
protected float lastThunderLevel;
protected float thunderLevel;
- public final Random random = new Random();
+ public final Random random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ public final Random random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private final DimensionManager x;
public final WorldDataMutable worldData;
private final Supplier<GameProfilerFiller> methodProfiler;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ae2cc01c10d2884da67ff0953e6ded8ba76c844f..a13f7453a9ea5f56da9644f7d397aa376799891f 100644
index ae2cc01c10d2884da67ff0953e6ded8ba76c844f..957a7374a1f4feadc6ed7e897be189c00d1f4de6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -334,7 +334,7 @@ public class CraftWorld implements World {
@ -273,12 +273,12 @@ index ae2cc01c10d2884da67ff0953e6ded8ba76c844f..a13f7453a9ea5f56da9644f7d397aa37
// Paper end
- private static final Random rand = new Random();
+ private static final Random rand = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private static final Random rand = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
this.world = world;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index f3066e6c781bcee72c235abcef5060fb080892d5..defeba5372bbd870e82d436c4bff8de1c0c7a0c5 100644
index f3066e6c781bcee72c235abcef5060fb080892d5..d002ec28a186939636652b98e5f0b77b5c1bed5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -13,7 +13,7 @@ import org.bukkit.inventory.meta.FireworkMeta;
@ -286,12 +286,12 @@ index f3066e6c781bcee72c235abcef5060fb080892d5..defeba5372bbd870e82d436c4bff8de1
public class CraftFirework extends CraftProjectile implements Firework {
- private final Random random = new Random();
+ private final Random random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ private final Random random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
private final CraftItemStack item;
public CraftFirework(CraftServer server, EntityFireworks entity) {
diff --git a/src/test/java/org/bukkit/NibbleArrayTest.java b/src/test/java/org/bukkit/NibbleArrayTest.java
index 40ba97fb77dddafe7c792249ca343d5abee3e5d0..86f9b00dd860c62fc783dbee0857854c22a1d06a 100644
index 40ba97fb77dddafe7c792249ca343d5abee3e5d0..be5761e76abf6f9fbe5b0e047dac02fa605ecc30 100644
--- a/src/test/java/org/bukkit/NibbleArrayTest.java
+++ b/src/test/java/org/bukkit/NibbleArrayTest.java
@@ -11,7 +11,7 @@ public class NibbleArrayTest {
@ -299,7 +299,7 @@ index 40ba97fb77dddafe7c792249ca343d5abee3e5d0..86f9b00dd860c62fc783dbee0857854c
@Test
public void testNibble() {
- Random random = new Random();
+ Random random = new net.yatopia.server.util.FastRandom(); //Yatopia Faster Random
+ Random random = new org.yatopiamc.yatopia.server.util.FastRandom(); //Yatopia Faster Random
byte[] classic = new byte[NIBBLE_SIZE];
NibbleArray nibble = new NibbleArray();

View File

@ -18,19 +18,19 @@ index a60e0872d51aeb330bd5334e35f18ad0ed63834e..40bde90306106534e73d6845caf95651
this.y();
BlockPosition blockposition = this.getPosition();
diff --git a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
index de597d053fcdb983b9b08f0628e4708e6149ffab..2400860b70cec7e1c875c0c6abd589f67b8f8146 100644
index c9066cb5f51cb2ad078aca3019e1df557062d286..46b18b6364645106b00bd4f1d721b8cd704ecabf 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
@@ -43,6 +43,7 @@ public class TileEntityEnchantTable extends TileEntity implements INamableTileEn
@Override
public void tick() {
+ if (!net.yatopia.server.YatopiaConfig.shouldTickEnchantingTables) { return; } // Yatopia - TE optimizations
+ if (!org.yatopiamc.yatopia.server.YatopiaConfig.shouldTickEnchantingTables) { return; } // Yatopia - TE optimizations
this.j = this.i;
this.l = this.k;
EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7431bfc335dadfb5f5f83ccba6d8923c15756dc1..1f7449175329adae4bfc8eacb58b22830720a8b4 100644
index 84fb0492abca5a2443e89adc18b3fa17c636054f..8aa734e1bf8cca717d6b079458f328d19599a505 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -917,13 +917,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -93,10 +93,10 @@ index 7431bfc335dadfb5f5f83ccba6d8923c15756dc1..1f7449175329adae4bfc8eacb58b2283
}
}
diff --git a/src/main/java/net/yatopia/server/YatopiaConfig.java b/src/main/java/net/yatopia/server/YatopiaConfig.java
index 5139279822b1fdc4a60de5abc76e81c75fe2e6bb..d33dd43747afc17dd80472c87e99b5cb409b40e9 100644
--- a/src/main/java/net/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/net/yatopia/server/YatopiaConfig.java
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 34b5a087d1d5d84b193adbd756add060a2d49354..2d4fb0a4664578f8d5c23db854eb8f2764724940 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -283,4 +283,9 @@ public class YatopiaConfig {
checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly);
checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly);

View File

@ -1,7 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.yatopia</groupId>
<groupId>org.yatopiamc</groupId>
<artifactId>yatopia-parent</artifactId>
<version>dev-SNAPSHOT</version>
<packaging>pom</packaging>