Skip to content

Commit

Permalink
Don't save FireworkRocket Entity
Browse files Browse the repository at this point in the history
  • Loading branch information
404Setup committed Sep 9, 2024
1 parent b5dd1e2 commit 6cfa6da
Show file tree
Hide file tree
Showing 88 changed files with 41 additions and 46 deletions.
57 changes: 14 additions & 43 deletions patches/api/0005-Vine-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Vine Config

diff --git a/src/main/java/one/tranic/vine/config/VineConfig.java b/src/main/java/one/tranic/vine/config/VineConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33d48cd67b
index 0000000000000000000000000000000000000000..fb5b6306efe79a7f7d5ba2fc8e4200997fd09621
--- /dev/null
+++ b/src/main/java/one/tranic/vine/config/VineConfig.java
@@ -0,0 +1,178 @@
@@ -0,0 +1,149 @@
+package one.tranic.vine.config;
+
+import one.tranic.vine.region.Compression;
Expand Down Expand Up @@ -42,18 +42,11 @@ index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33
+ }
+
+ public static class Feature {
+ /**
+ * This just removes spark from being loaded by default, if you disable it, or install spark yourself, it will still be loaded.
+ */
+ // This just removes spark from being loaded by default, if you disable it, or install spark yourself, it will still be loaded.
+ public static boolean disableSpark = true;
+ /**
+ * If the player is blocked on the top of the player's head, he will not try to rebirth the player on the ceiling.
+ */
+ // If the player is blocked on the top of the player's head, he will not try to rebirth the player on the ceiling.
+ public static boolean disableRespawnCeiling = false;
+ public static boolean flattenTriangularDistribution = false;
+ /**
+ * The new liquid physics system may affect some mechanisms.
+ */
+ public static boolean liquidPhysics = false;
+ /**
+ * Switch to a 1024-bit secure seed to protect it from being cracked.
Expand All @@ -62,9 +55,6 @@ index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33
+ */
+ public static boolean secureSeed = false;
+ public static boolean vanillaHopper = false;
+ /**
+ * zero tick plants is back now
+ */
+ public static boolean zeroTickPlants = false;
+
+ public static class cachePlayerProfileResult {
Expand All @@ -78,32 +68,19 @@ index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33
+ * panacea, so take precautions.
+ */
+ public static class DSE {
+ /**
+ * Do not save tnt entities
+ */
+ public static boolean primedTNT = false;
+ /**
+ * Do not save falling blocks
+ */
+ public static boolean fallingBlock = false;
+ public static boolean fireworks = false;
+ }
+
+ public static class Region {
+ /**
+ * Support: ANVIL (Vanilla), LINEAR, SECTORFILE
+ */
+ // Support: ANVIL (Vanilla), LINEAR, SECTORFILE
+ public static Format format = Format.ANVIL;
+ /**
+ * Only SECTORFILE | Support: GZIP, ZLIB, LZ4, BROTLI (Only Tranic Server), SNAPPY (Only Tranic Server), ZSTD
+ */
+ // Only SECTORFILE | Support: GZIP, ZLIB, LZ4, BROTLI (Only Tranic Server), SNAPPY (Only Tranic Server), ZSTD
+ public static Compression compressionFormat = Compression.ZSTD;
+ /**
+ * Only LINEAR | 1-15
+ */
+ // Only LINEAR | 1-15
+ public static int compressionLevel = 1;
+ /**
+ * Only LINEAR | flush second
+ */
+ // Only LINEAR | flush second
+ public static int flushFrequency = 5;
+ }
+
Expand All @@ -113,29 +90,25 @@ index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33
+ * may have some adverse consequences. Please enable it with caution.
+ */
+ public static class VirtualThread {
+ /**Virtual Thread 1.0*/
+ // Virtual Thread 1.0
+ public static boolean enabled = false;
+
+ /**Virtual Thread 2.0 (Alpha)*/
+ // Virtual Thread 2.0 (Alpha)
+ public static boolean vt2 = false;
+ }
+ }
+
+ public static class Optimize {
+ public static int acquirePoiForStuckEntity = 60;
+ /**
+ * May cause the inconsistent order of future compose tasks.
+ */
+ // May cause the inconsistent order of future compose tasks.
+ public static boolean fasterStructureGenFutureSequencing = false;
+ public static boolean floatingPointPositive = false;
+ /**
+ * Entity re-pathing optimization
+ * If the entity has already determined the path, it will not search the path as frequently.
+ */
+ public static boolean mobRePathfinding = true;
+ /**
+ * As the name suggests, it can slightly improve world generation performance, maybe.
+ */
+ // As the name suggests, it can slightly improve world generation performance, maybe.
+ public static boolean noiseGeneration = true;
+ public static boolean skipSelfRaidCheck = false;
+
Expand Down Expand Up @@ -174,9 +147,7 @@ index 0000000000000000000000000000000000000000..4dfa90e779bc6c6415dd6c587445bf33
+ }
+ }
+
+ /**
+ * Optimize stacked minecarts
+ */
+ // Optimize stacked minecarts
+ public static class Minecart {
+ public static boolean enabled = true;
+ public static int skipTickCount = 30;
Expand Down
6 changes: 4 additions & 2 deletions patches/server/0009-Vine-Config-Feature.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Vine Config - Feature

diff --git a/src/main/kotlin/one/tranic/vine/config/module/feature/DontSaveEntity.kt b/src/main/kotlin/one/tranic/vine/config/module/feature/DontSaveEntity.kt
new file mode 100644
index 0000000000000000000000000000000000000000..9d7053f0d68b82ac5830881ede2cb5f99470c6ae
index 0000000000000000000000000000000000000000..657642f146baea146e6b2274052eb76afa8dae18
--- /dev/null
+++ b/src/main/kotlin/one/tranic/vine/config/module/feature/DontSaveEntity.kt
@@ -0,0 +1,24 @@
@@ -0,0 +1,26 @@
+package one.tranic.vine.config.module.feature
+
+import one.tranic.vine.config.VineConfig.Feature
Expand All @@ -27,11 +27,13 @@ index 0000000000000000000000000000000000000000..9d7053f0d68b82ac5830881ede2cb5f9
+ )
+ )
+ addDefault("$BASEPATH.falling-block", false)
+ addDefault("$BASEPATH.fireworks", false)
+ }
+
+ override fun load() {
+ Feature.DSE.primedTNT = getBoolean("$BASEPATH.primed-tnt")
+ Feature.DSE.fallingBlock = getBoolean("$BASEPATH.falling-block")
+ Feature.DSE.fireworks = getBoolean("$BASEPATH.fireworks")
+ }
+}
\ No newline at end of file
Expand Down
22 changes: 22 additions & 0 deletions patches/server/0027-Don-t-save-FireworkRocket-Entity.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: 404Setup <153366651+404Setup@users.noreply.github.com>
Date: Mon, 9 Sep 2024 09:38:22 +0800
Subject: [PATCH] Don't save FireworkRocket Entity


diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index 4671f34ba2796c1284af5bd9b2d2edfe37869ad6..259606755e7d3af7c31820500354a08c5923e44b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -354,6 +354,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
return false;
}

+ @Override
+ public boolean shouldBeSaved() {
+ return !one.tranic.vine.config.VineConfig.Feature.DSE.fireworks;
+ }
+
public static ItemStack getDefaultItem() {
return new ItemStack(Items.FIREWORK_ROCKET);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Paper PR Update Velocity natives
Source in https://github.com/PaperMC/Paper/pull/11347

diff --git a/build.gradle.kts b/build.gradle.kts
index 4777451dc9378f1bed1c5f663cf444dabe42ff4e..0b808e2d4fa6bd403799cc07ba2fc952fef94c2e 100644
index b93eb251d0c37840239381d8d0078a92b898ec1e..cd75c11712bc2c7b03d5e4d2537d0c23815ea5a2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -41,7 +41,7 @@ dependencies {
Expand Down

0 comments on commit 6cfa6da

Please sign in to comment.