mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes:85ffdc4389Updated Upstream (CraftBukkit)f6a1cb21c5Do not process entity loads in CraftChunk#getEntities (Fixes #6543)5c7da5536bPrevent an infinite recursion error while rendering translatables (Fixes #6551) (#6555)cc6fd371b2Remove "Auto fix bad Y levels on player login" patch3562558d62Prevent softlocked end exit portal generation (#6525)6fa1983e9cUse BlockPost#atY in end portal softlock fix
49 lines
3.1 KiB
Diff
49 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 30 Nov 2020 19:36:35 -0600
|
|
Subject: [PATCH] Add boat fall damage config
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index bfcd520f5186e61ff601de27aa10b25cf3deea13..708544ba328bab7a5eb9f4860eccb32258c6ee04 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -990,7 +990,16 @@ public class ServerPlayer extends Player {
|
|
if (this.isInvulnerableTo(source)) {
|
|
return false;
|
|
} else {
|
|
- if (source == DamageSource.FALL && getRootVehicle() instanceof net.minecraft.world.entity.vehicle.AbstractMinecart && level.purpurConfig.minecartControllable && !level.purpurConfig.minecartControllableFallDamage) return false; // Purpur
|
|
+ // Purpur start
|
|
+ if (source == DamageSource.FALL) {
|
|
+ if (getRootVehicle() instanceof net.minecraft.world.entity.vehicle.AbstractMinecart && level.purpurConfig.minecartControllable && !level.purpurConfig.minecartControllableFallDamage) {
|
|
+ return false;
|
|
+ }
|
|
+ if (getRootVehicle() instanceof net.minecraft.world.entity.vehicle.Boat && !level.purpurConfig.boatsDoFallDamage) {
|
|
+ return false;
|
|
+ }
|
|
+ }
|
|
+ // Purpur end
|
|
boolean flag = this.server.isDedicatedServer() && this.isPvpAllowed() && "fall".equals(source.msgId);
|
|
|
|
if (!flag && isSpawnInvulnerable() && source != DamageSource.OUT_OF_WORLD) { // Purpur
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 78f558029ac9bb36133b45f357ac85425d474b0e..41dacbe19c2c42b755da0ce91e531c2c84f82016 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -365,6 +365,7 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean useBetterMending = false;
|
|
public boolean boatEjectPlayersOnLand = false;
|
|
+ public boolean boatsDoFallDamage = true;
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean entitiesCanUsePortals = true;
|
|
public boolean milkCuresBadOmen = true;
|
|
@@ -378,6 +379,7 @@ public class PurpurWorldConfig {
|
|
private void miscGameplayMechanicsSettings() {
|
|
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
|
|
boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
|
|
+ boatsDoFallDamage = getBoolean("gameplay-mechanics.boat.do-fall-damage", boatsDoFallDamage);
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
|
|
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|