mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Pufferfish)
Upstream has released updates that appear to apply and compile correctly Pufferfish Changes: pufferfish-gg/Pufferfish@f05b0e9 Updated Upstream (Paper) pufferfish-gg/Pufferfish@9a82b86 Updated Upstream (Paper) pufferfish-gg/Pufferfish@c6ec7a0 Updated Upstream (Paper) pufferfish-gg/Pufferfish@c789f72 Updated Upstream (Paper) pufferfish-gg/Pufferfish@9ddaa1a Updated Upstream (Paper) pufferfish-gg/Pufferfish@3554f78 Updated Upstream (Paper) pufferfish-gg/Pufferfish@a9e9d99 Updated Upstream (Paper) pufferfish-gg/Pufferfish@09a2f81 Updated Upstream (Paper) pufferfish-gg/Pufferfish@63ce67d Updated Upstream (Paper) pufferfish-gg/Pufferfish@8abd47b Updated Upstream (Paper) pufferfish-gg/Pufferfish@3415da0 Updated Upstream (Paper) pufferfish-gg/Pufferfish@cfa3c61 Updated Upstream (Paper) pufferfish-gg/Pufferfish@0a8641d 1.21.3 Update pufferfish-gg/Pufferfish@784d72f Updated Upstream (Paper) pufferfish-gg/Pufferfish@40e1ad0 Updated Upstream (Paper) pufferfish-gg/Pufferfish@95ef348 Make iterator counting in IteratorSafeOrderedReferenceSet thread-safe for async mob spawning (#109) pufferfish-gg/Pufferfish@34c0042 Updated Upstream (Paper)
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mariell Hoversholm <proximyst@proximyst.com>
|
||||
Date: Sat, 9 Jan 2021 16:06:40 +0100
|
||||
Subject: [PATCH] Farmland trampling changes
|
||||
|
||||
This lets us choose if farmland trampling is fully disabled or only
|
||||
players may trample farmland.
|
||||
|
||||
This lets us choose if entities can stop trampling if they fall a
|
||||
distance equal to their feather falling level, plus the extra block
|
||||
necessary to trample in the first place. Feather Falling 1 requires
|
||||
you to fall over 3+ blocks to trample. FF 2 requires 4+, etc.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
index e1abec46177887a92726de80f66226fe7fbbb4a2..bc149eb17695ac727aa8db08db6209497f7d20bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
@@ -127,12 +127,20 @@ public class FarmBlock extends Block {
|
||||
}
|
||||
|
||||
// Purpur start
|
||||
+ if (world.purpurConfig.farmlandTramplingDisabled) return;
|
||||
+ if (world.purpurConfig.farmlandTramplingOnlyPlayers && !(entity instanceof Player)) return;
|
||||
if (world.purpurConfig.farmlandAlpha) {
|
||||
Block block = world.getBlockState(pos.below()).getBlock();
|
||||
if (block instanceof FenceBlock || block instanceof WallBlock) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+ if (world.purpurConfig.farmlandTramplingFeatherFalling) {
|
||||
+ Iterator<net.minecraft.world.item.ItemStack> armor = ((LivingEntity) entity).getArmorSlots().iterator();
|
||||
+ if (armor.hasNext() && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.FEATHER_FALLING, armor.next()) >= (int) entity.fallDistance) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
// Purpur end
|
||||
if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.DIRT.defaultBlockState())) {
|
||||
return;
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 4fcb78a5dee5c7a12ba443c4d52b39a28ea9c061..2431777ccdf0e2aa0f8488e13da3f64baa079c11 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -418,10 +418,16 @@ public class PurpurWorldConfig {
|
||||
public boolean farmlandBypassMobGriefing = false;
|
||||
public boolean farmlandGetsMoistFromBelow = false;
|
||||
public boolean farmlandAlpha = false;
|
||||
+ public boolean farmlandTramplingDisabled = false;
|
||||
+ public boolean farmlandTramplingOnlyPlayers = false;
|
||||
+ public boolean farmlandTramplingFeatherFalling = false;
|
||||
private void farmlandSettings() {
|
||||
farmlandBypassMobGriefing = getBoolean("blocks.farmland.bypass-mob-griefing", farmlandBypassMobGriefing);
|
||||
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
||||
farmlandAlpha = getBoolean("blocks.farmland.use-alpha-farmland", farmlandAlpha);
|
||||
+ farmlandTramplingDisabled = getBoolean("blocks.farmland.disable-trampling", farmlandTramplingDisabled);
|
||||
+ farmlandTramplingOnlyPlayers = getBoolean("blocks.farmland.only-players-trample", farmlandTramplingOnlyPlayers);
|
||||
+ farmlandTramplingFeatherFalling = getBoolean("blocks.farmland.feather-fall-distance-affects-trampling", farmlandTramplingFeatherFalling);
|
||||
}
|
||||
|
||||
public boolean furnaceUseLavaFromUnderneath = false;
|
||||
Reference in New Issue
Block a user