mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
add prefixes and descriptions
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
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] |FEAT| Configurable void damage height and damage
|
||||
|
||||
{EXPLANATION}
|
||||
|
||||
$-----------------------------$
|
||||
gameplay-mechanics:
|
||||
void-damage-height:
|
||||
default: -64.0
|
||||
description: |-
|
||||
The height at which void damage begins
|
||||
void-damage-dealt:
|
||||
default: 4.0
|
||||
description: |-
|
||||
The amount of void damage dealt
|
||||
$-----------------------------$
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7417cfa1a64f7adbc8b4699eef05a2662846dce4..7c042280e3b462f2c3e2658e0ff944ffe83c55fa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -799,7 +799,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
||||
public void checkOutOfWorld() {
|
||||
// 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
|
||||
&& level.paperConfig.doNetherTopVoidDamage()
|
||||
&& this.getY() >= this.level.paperConfig.netherVoidTopDamageHeight)) {
|
||||
// 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 fce1b923f33bae53141b9cffda7808d031812a06..3626912350c6412f386578bfd5a338e120cae7fb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2403,7 +2403,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
protected void outOfWorld() {
|
||||
- this.hurt(DamageSource.OUT_OF_WORLD, 4.0F);
|
||||
+ this.hurt(DamageSource.OUT_OF_WORLD, (float) level.purpurConfig.voidDamageDealt); // Purpur
|
||||
}
|
||||
|
||||
protected void updateSwingTime() {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 54f802449b8be8913c6d357ba7f6cfe50c09fb03..b1722d945ce43e296e603b8c4eec43df39cc3bed 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -222,10 +222,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 boolean farmlandGetsMoistFromBelow = false;
|
||||
Reference in New Issue
Block a user