Skip to content

Commit

Permalink
Add option to disable cannon entities being affected by bubble columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Samsuik committed Nov 26, 2023
1 parent 3a2b951 commit 3717d95
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions patches/server/0004-Sakura-Configuration-Files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,10 @@ index 0000000000000000000000000000000000000000..5fc23a0b579d7cbe03baf5324bef887a
+}
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
new file mode 100644
index 0000000000000000000000000000000000000000..0a06172054ef1df798b8ba866fffb0da3a3f9fbe
index 0000000000000000000000000000000000000000..4c8e90dbfa8c3d6d211dc8890f7dfcc52667a180
--- /dev/null
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
@@ -0,0 +1,151 @@
@@ -0,0 +1,152 @@
+package me.samsuik.sakura.configuration;
+
+import com.mojang.logging.LogUtils;
Expand Down Expand Up @@ -658,6 +658,7 @@ index 0000000000000000000000000000000000000000..0a06172054ef1df798b8ba866fffb0da
+ public Cannons cannons;
+ public class Cannons extends ConfigurationPart {
+ public MergeLevel mergeLevel = MergeLevel.STRICT;
+ public boolean tntAndSandAffectedByBubbleColumns = true;
+
+ public Tnt tnt = new Tnt();
+ public class Tnt extends ConfigurationPart {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <[email protected]>
Date: Sun, 26 Nov 2023 17:41:00 +0000
Subject: [PATCH] Disable bubble columns affecting cannon entities


diff --git a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
index ed36a378b79f62c3dce3da637a337595415f14ac..16f99b775957101883d91de82700d712f4eaacb9 100644
--- a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
@@ -41,6 +41,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup {
@Override
public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
+ if (!world.sakuraConfig().cannons.tntAndSandAffectedByBubbleColumns && entity.isPrimedTNT | entity.isFallingBlock) return; // Sakura
BlockState blockState = world.getBlockState(pos.above());
if (blockState.isAir()) {
entity.onAboveBubbleCol(state.getValue(DRAG_DOWN));

0 comments on commit 3717d95

Please sign in to comment.