mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Mon, 26 Dec 2022 07:30:30 +0100
|
|
Subject: [PATCH] Make saving fireworks configurable
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"Don't save Fireworks"
|
|
By: Aikar <aikar@aikar.co>
|
|
As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
* EmpireCraft description *
|
|
|
|
Fireworks can bug out and not detonate, and an automated
|
|
launcher can very easily fill a chunk.
|
|
|
|
Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case.
|
|
|
|
diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
|
index e0e193078e550225e163149638bf9e053c0531f8..70197071db4e46cd93579d92ff2f8aa7a49083cb 100644
|
|
--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
|
+++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
|
@@ -354,4 +354,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
|
double d1 = entity.position().z - this.position().z;
|
|
return DoubleDoubleImmutablePair.of(d, d1);
|
|
}
|
|
+
|
|
+ // Gale start - EMC - make saving fireworks configurable
|
|
+ @Override
|
|
+ public boolean shouldBeSaved() {
|
|
+ return this.level().galeConfig().smallOptimizations.saveFireworks;
|
|
+ }
|
|
+ // Gale end - EMC - make saving fireworks configurable
|
|
}
|