mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 808bd9198 Add fast alternative constructor for Vector3f (#5339) e849c51da fix #5336 0b25bacfc fix patch 'Remove streams from SensorNearest' (fixes #5330) 4d287e31c Use Adventure for `/version` command feedback, add copy to clipboard click event (#5333) Tuinity Changes: 5b6d8beec: Update Upstream (Paper) 81d5fc1dd: Fix NPE in pickup logic for arrow 19ac6608f: Move region chunk unload & poi unload hook up 38ad5a1bd: Do not run close logic for inventories on chunk load fb75a6f83: Do not allow the server to unload chunks at request of plugins f87cb795f: Make entity tracker use highest range of passengers 71b089f18: Do not run raytrace logic for AIR 09e1a1036: Fix NPE in light exception handler 0ae7c2c23: Dump even more info for ticking entities 2e4a930c4: Store changed positions inside field on light engine 7734ef0a9: Detail player ticking in watchdog dumps
49 lines
3.1 KiB
Diff
49 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index 2508bfdaef12bc4f92962ac5d75c39c37057e964..dae7411e408df0a351c753d6eb3e2319f6499368 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -1011,7 +1011,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
if (this.isInvulnerable(damagesource)) {
|
|
return false;
|
|
} else {
|
|
- if (damagesource == DamageSource.FALL && getRootVehicle() instanceof EntityMinecartAbstract && world.purpurConfig.controllableMinecarts && !world.purpurConfig.controllableMinecartsFallDamage) return false; // Purpur
|
|
+ // Purpur start
|
|
+ if (damagesource == DamageSource.FALL) {
|
|
+ if (getRootVehicle() instanceof EntityMinecartAbstract && world.purpurConfig.controllableMinecarts && !world.purpurConfig.controllableMinecartsFallDamage) {
|
|
+ return false;
|
|
+ }
|
|
+ if (getRootVehicle() instanceof EntityBoat && !world.purpurConfig.boatsDoFallDamage) {
|
|
+ return false;
|
|
+ }
|
|
+ }
|
|
+ // Purpur end
|
|
boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex);
|
|
|
|
if (!flag && isSpawnInvulnerable() && damagesource != 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 f9c43a764a609e8c4339868cb0088b3c09ec29f4..684a2fa594176a5f456d5f203a47aba15469c727 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -224,6 +224,7 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean useBetterMending = false;
|
|
public boolean boatEjectPlayersOnLand = false;
|
|
+ public boolean boatsDoFallDamage = true;
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean entitiesPickUpLootBypassMobGriefing = false;
|
|
public boolean entitiesCanUsePortals = true;
|
|
@@ -237,6 +238,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);
|
|
entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
|
|
entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
|