Skip to content

Commit 3717d95

Browse files
committed
Add option to disable cannon entities being affected by bubble columns
1 parent 3a2b951 commit 3717d95

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

patches/server/0004-Sakura-Configuration-Files.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,10 @@ index 0000000000000000000000000000000000000000..5fc23a0b579d7cbe03baf5324bef887a
608608
+}
609609
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
610610
new file mode 100644
611-
index 0000000000000000000000000000000000000000..0a06172054ef1df798b8ba866fffb0da3a3f9fbe
611+
index 0000000000000000000000000000000000000000..4c8e90dbfa8c3d6d211dc8890f7dfcc52667a180
612612
--- /dev/null
613613
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
614-
@@ -0,0 +1,151 @@
614+
@@ -0,0 +1,152 @@
615615
+package me.samsuik.sakura.configuration;
616616
+
617617
+import com.mojang.logging.LogUtils;
@@ -658,6 +658,7 @@ index 0000000000000000000000000000000000000000..0a06172054ef1df798b8ba866fffb0da
658658
+ public Cannons cannons;
659659
+ public class Cannons extends ConfigurationPart {
660660
+ public MergeLevel mergeLevel = MergeLevel.STRICT;
661+
+ public boolean tntAndSandAffectedByBubbleColumns = true;
661662
+
662663
+ public Tnt tnt = new Tnt();
663664
+ public class Tnt extends ConfigurationPart {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Samsuik <[email protected]>
3+
Date: Sun, 26 Nov 2023 17:41:00 +0000
4+
Subject: [PATCH] Disable bubble columns affecting cannon entities
5+
6+
7+
diff --git a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
8+
index ed36a378b79f62c3dce3da637a337595415f14ac..16f99b775957101883d91de82700d712f4eaacb9 100644
9+
--- a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
10+
+++ b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
11+
@@ -41,6 +41,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup {
12+
@Override
13+
public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
14+
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
15+
+ if (!world.sakuraConfig().cannons.tntAndSandAffectedByBubbleColumns && entity.isPrimedTNT | entity.isFallingBlock) return; // Sakura
16+
BlockState blockState = world.getBlockState(pos.above());
17+
if (blockState.isAir()) {
18+
entity.onAboveBubbleCol(state.getValue(DRAG_DOWN));

0 commit comments

Comments
 (0)