geforkt von Mirrors/Paper
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
26 Zeilen
1.5 KiB
Diff
26 Zeilen
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Phoenix616 <max@themoep.de>
|
|
Date: Sun, 20 Jun 2021 16:35:42 +0100
|
|
Subject: [PATCH] Don't apply cramming damage to players
|
|
|
|
It does not make a lot of sense to damage players if they get crammed,
|
|
especially as the usecase of teleporting lots of players to the same
|
|
location isn't too uncommon and killing all those players isn't
|
|
really what one would expect to happen.
|
|
|
|
For those who really want it a config option is provided.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index 31d976d0a4fdf3bb155e08627ce4a85bd5d051db..a02b02c71ac6dddcccb10a6aa7993337ed04b829 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1431,7 +1431,7 @@ public class ServerPlayer extends Player {
|
|
|
|
@Override
|
|
public boolean isInvulnerableTo(DamageSource damageSource) {
|
|
- return super.isInvulnerableTo(damageSource) || this.isChangingDimension() || this.getAbilities().invulnerable && damageSource == DamageSource.WITHER;
|
|
+ return super.isInvulnerableTo(damageSource) || this.isChangingDimension() || this.getAbilities().invulnerable && damageSource == DamageSource.WITHER || !level.paperConfig().collisions.allowPlayerCrammingDamage && damageSource == DamageSource.CRAMMING; // Paper - disable player cramming
|
|
}
|
|
|
|
@Override
|