mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +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 774ca9e0b56fd175ae246051de762d0c4256ca58..7f370f938d84240d763f60e51cddc705b3eaf5ea 100644
|
|
--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
|
+++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
|
@@ -364,4 +364,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
|
|
}
|