9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-23 08:49:25 +00:00

Drop useless reduce movement allocations patch

This commit is contained in:
Samsuik
2024-07-20 00:23:26 +01:00
parent 17b32245f6
commit ff811ffd5c
70 changed files with 104 additions and 341 deletions

View File

@@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
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 4c1f20fafdbd86011959cc2d4983b6c2f8e87a5f..f0c7b64fafbc9d19cc16a70f416df2bee6bb130c 100644
--- a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java
@@ -48,6 +48,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup {
@Override
protected 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 - Add EntityInsideBlockEvent
+ if (!world.sakuraConfig().cannons.tntAndSandAffectedByBubbleColumns && (entity.isPrimedTNT || entity.isFallingBlock)) return; // Sakura - configure bubble columns affecting cannon entities
BlockState blockState = world.getBlockState(pos.above());
if (blockState.isAir()) {
entity.onAboveBubbleCol(state.getValue(DRAG_DOWN));