mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@44ee1cd fix recipe packet limiter (#9841) PaperMC/Paper@e57af7d sync netty version with vanilla (#9842) Pufferfish Changes: pufferfish-gg/Pufferfish@0020a8b Port a patch from upstream pufferfish-gg/Pufferfish@979d3a2 Update upstream (last 1.20.1) pufferfish-gg/Pufferfish@06262c1 Initial 1.20.2 update
52 lines
3.3 KiB
Diff
52 lines
3.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Thu, 27 Feb 2020 21:42:19 -0600
|
|
Subject: [PATCH] Configurable void damage height and damage
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index a5f54e2c17f618b99c76281b45d005280e4e31f9..790c6c677cd83bd4158e1567e51b7669fc219178 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -860,7 +860,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
|
|
public void checkBelowWorld() {
|
|
// Paper start - Configurable nether ceiling damage
|
|
- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
|
+ if (this.getY() < (double) (this.level.getMinBuildHeight() + level().purpurConfig.voidDamageHeight) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER // Purpur
|
|
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
|
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
|
// Paper end
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index c22b07728dde5807873004e4037ce3b738792689..8b25c2f8b089caf3fa03ff73d65be5c2f442a5d3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2538,7 +2538,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
@Override
|
|
protected void onBelowWorld() {
|
|
- this.hurt(this.damageSources().fellOutOfWorld(), 4.0F);
|
|
+ this.hurt(this.damageSources().fellOutOfWorld(), (float) level().purpurConfig.voidDamageDealt); // Purpur
|
|
}
|
|
|
|
protected void updateSwingTime() {
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 189b59cd6218e8e6b7f7c0326211e1b6545e9ca3..9311e620a821bbd46d962dd01ef9b0c1ec99555f 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -98,10 +98,14 @@ public class PurpurWorldConfig {
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean milkCuresBadOmen = true;
|
|
public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
+ public double voidDamageHeight = -64.0D;
|
|
+ public double voidDamageDealt = 4.0D;
|
|
private void miscGameplayMechanicsSettings() {
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
+ voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
|
|
+ voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt);
|
|
}
|
|
|
|
public double minecartMaxSpeed = 0.4D;
|