[PATCH botania] Fake bursts no longer trigger game events
Export this patch
Kludgy fix but can't think of anything better for now.
Closes #4348
---
.../botania/common/entity/ManaBurstEntity.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Xplat/src/main/java/vazkii/botania/common/entity/ManaBurstEntity.java b/Xplat/src/main/java/vazkii/botania/common/entity/ManaBurstEntity.java
index 900073a90..af3c02189 100644
--- a/Xplat/src/main/java/vazkii/botania/common/entity/ManaBurstEntity.java
+++ b/Xplat/src/main/java/vazkii/botania/common/entity/ManaBurstEntity.java
@@ -465,6 +465,21 @@ public float getParticleSize() {
return (float) getMana() / (float) getStartingMana();
}
+ @Override
+ protected void onHit(HitResult hit) {
+ if (isFake()) {
+ // [VanillaCopy] super, without firing gameEvents
+ HitResult.Type type = hit.getType();
+ if (type == HitResult.Type.ENTITY) {
+ this.onHitEntity((EntityHitResult) hit);
+ } else if (type == HitResult.Type.BLOCK) {
+ this.onHitBlock((BlockHitResult) hit);
+ }
+ } else {
+ super.onHit(hit);
+ }
+ }
+
@Override
protected void onHitBlock(@NotNull BlockHitResult hit) {
if (!isFake()) {
--
2.40.1
botania/patches/linux.yml: SUCCESS in 17m8s
[Fake bursts no longer trigger game events][0] from [Vincent Lee][1]
[0]: https://lists.sr.ht/~williewillus/violet-moon/patches/41266
[1]: mailto:vincent@vincent-lee.net
✓ #992260 SUCCESS botania/patches/linux.yml https://builds.sr.ht/~williewillus/job/992260
lgtm