mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-31 12:46:42 +00:00
33/50 patches
This commit is contained in:
38
patches/server/0024-Don-t-save-Fireworks.patch
Normal file
38
patches/server/0024-Don-t-save-Fireworks.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Fri, 31 Mar 2023 22:47:12 +0300
|
||||
Subject: [PATCH] Don't save Fireworks
|
||||
|
||||
|
||||
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 09d465947a5720e05c350d455c86002682104079..846d8d33eb0f5bb98848b9f3a9e8ab4f46bab984 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -347,6 +347,13 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // DivineMC start - Don't save Fireworks
|
||||
+ @Override
|
||||
+ public boolean shouldBeSaved() {
|
||||
+ return this.level().divinemcConfig.saveFireworks;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
public static ItemStack getDefaultItem() {
|
||||
return new ItemStack(Items.FIREWORK_ROCKET);
|
||||
}
|
||||
diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java
|
||||
index 3e64e0d2d925f9fca1eb38cc07c20cae785ef39f..243b3d4379f4f6f273222a3611d8a463053d3e70 100644
|
||||
--- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java
|
||||
+++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java
|
||||
@@ -77,4 +77,9 @@ public class DivineWorldConfig {
|
||||
final Map<String, Object> value = DivineConfig.getMap("world-settings." + worldName + "." + path, null);
|
||||
return value.isEmpty() ? fallback : value;
|
||||
}
|
||||
+
|
||||
+ public boolean saveFireworks = false;
|
||||
+ private void saveFireworks() {
|
||||
+ saveFireworks = getBoolean("gameplay-mechanics.should-save-fireworks", saveFireworks);
|
||||
+ }
|
||||
}
|
||||
Reference in New Issue
Block a user