mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Fortern <blueten.ki@gmail.com> Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
25 lines
1.5 KiB
Diff
25 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Thu, 25 May 2023 16:37:06 +0800
|
|
Subject: [PATCH] No feather falling trample
|
|
|
|
|
|
diff --git a/net/minecraft/world/level/block/FarmBlock.java b/net/minecraft/world/level/block/FarmBlock.java
|
|
index a31ac95237515b874f59941ec24c74e2c357b3d8..d18a4a7a41bc3a685f9621f9e6f5480bd0d390bc 100644
|
|
--- a/net/minecraft/world/level/block/FarmBlock.java
|
|
+++ b/net/minecraft/world/level/block/FarmBlock.java
|
|
@@ -116,6 +116,13 @@ public class FarmBlock extends Block {
|
|
&& entity instanceof LivingEntity
|
|
&& (entity instanceof Player || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))
|
|
&& entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) {
|
|
+ // Leaves start - noFeatherFallingTrample
|
|
+ if (org.leavesmc.leaves.LeavesConfig.modify.noFeatherFallingTrample) {
|
|
+ if (net.minecraft.world.item.enchantment.EnchantmentHelper.getEnchantmentLevel(level.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.ENCHANTMENT).getOrThrow(net.minecraft.world.item.enchantment.Enchantments.FEATHER_FALLING), (LivingEntity) entity) > 0) {
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+ // Leaves end - noFeatherFallingTrample
|
|
// CraftBukkit start - Interact soil
|
|
org.bukkit.event.Cancellable cancellable;
|
|
if (entity instanceof Player) {
|