Files
Purpur/patches/server/0138-Add-boat-fall-damage-config.patch
BillyGalbreath 3dd9f46453 Updated Upstream (Paper, Tuinity, & Airplane)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
8c74d3126 Updated Upstream (Bukkit) (#5359)
fd3c66a91 bug #5362 - correctly pass "render type" when registering a new scoreboard objective
39c487b37 Add per-command perms for paper command
cdbf2578c Add Item Rarity API (#5352)
d80e43647 [CI-SKIP] Removal from the MIT list (#5345)

Tuinity Changes:
aea6b8347 Merge dev/playerchunkloading
722c7ca8a Use hash table for maintaing changed block set
98ae59d85 Custom table implementation for blockstate state lookups
8b8704fb6 Oprimise map impl for tracked players
ea71d6ba4 Optimise snow & ice in chunk ticking
9871d4ce5 Remove chunk lookup & lambda allocation from counting mobs
5a4a35f3e Add patreon
7d93d9618 Refactor data management for region manager
c3035219f Change license from MIT to LGPLv3

Airplane Changes:
580f380b6 Updated Upstream (Tuinity)
82253fd36 Early return optimization for target finding
9572643bb Cache entityhuman display name
5df98254f Remove iterators from inventory contains
18d2be193 Merge pull request #14 from violetwtf/patch-1
f716d4c33 Merge pull request #13 from violetwtf/master
128cbe519 Reduce entity chunk ticking checks from 3 to 1
03ac0933b Skip copying unloading tile entities
97dd027b5 Smaller pool size for tracking
9e9f57be4 Only set up Flare if token is available
2021-03-14 18:21:36 -05:00

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 f4e0a0714fa17c370202f6ea02412dc7afb0af97..5a602de5b9ff436e7cfb70c39475be34beddfb8d 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);