mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Option for hay block fall damage
This commit is contained in:
@@ -395,6 +395,11 @@ milk-cures-bad-omen
|
|||||||
* **default**: false
|
* **default**: false
|
||||||
* **description**: Allow players to drink milk to cure bad omen status effect
|
* **description**: Allow players to drink milk to cure bad omen status effect
|
||||||
|
|
||||||
|
hay-block-fall-damage
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
* **default:** true
|
||||||
|
* **description:** Damage factor for when falling onto hay blocks. Set to true for no fall damage (Assassin's Creed style)
|
||||||
|
|
||||||
block-tick-events
|
block-tick-events
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
* **default**: true
|
* **default**: true
|
||||||
|
|||||||
41
patches/server/0086-Option-for-hay-block-fall-damage.patch
Normal file
41
patches/server/0086-Option-for-hay-block-fall-damage.patch
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
From f8ffd6150b096620260a3bae19180b547ef2f493 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
|
Date: Sat, 30 Nov 2019 01:31:09 -0600
|
||||||
|
Subject: [PATCH] Option for hay block fall damage
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/net/minecraft/server/BlockHay.java | 2 +-
|
||||||
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/BlockHay.java b/src/main/java/net/minecraft/server/BlockHay.java
|
||||||
|
index e820cc0b06..e872d4666a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/BlockHay.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/BlockHay.java
|
||||||
|
@@ -9,6 +9,6 @@ public class BlockHay extends BlockRotatable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
|
||||||
|
- entity.b(f, 0.2F);
|
||||||
|
+ entity.b(f, world.purpurConfig.hayBlockFallDamage ? 0.2F : 0.0F); // Purpur
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
index 3ad3415c4a..a1237c5b9d 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
@@ -144,6 +144,11 @@ public class PurpurWorldConfig {
|
||||||
|
milkCuresBadOmen = getBoolean("milk-cures-bad-omen", milkCuresBadOmen);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean hayBlockFallDamage = true;
|
||||||
|
+ private void hayBlockFallDamage() {
|
||||||
|
+ hayBlockFallDamage = getBoolean("hay-block-fall-damage", hayBlockFallDamage);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public int limitPillagerOutpostSpawns = 10;
|
||||||
|
private void limitPillagerOutpostSpawns() {
|
||||||
|
limitPillagerOutpostSpawns = getInt("limit-pillager-outpost-spawns", limitPillagerOutpostSpawns);
|
||||||
|
--
|
||||||
|
2.24.0.rc1
|
||||||
|
|
||||||
Reference in New Issue
Block a user