mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Add boat fall damage config
This commit is contained in:
committed by
granny
parent
d2132cfbfa
commit
d139523031
@@ -8,6 +8,20 @@
|
||||
|
||||
// Paper start - rewrite chunk system
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||
@@ -1217,6 +_,13 @@
|
||||
if (this.isInvulnerableTo(level, damageSource)) {
|
||||
return false;
|
||||
} else {
|
||||
+ // Purpur start - Add boat fall damage config
|
||||
+ if (damageSource.is(net.minecraft.tags.DamageTypeTags.IS_FALL)) {
|
||||
+ if (getRootVehicle() instanceof net.minecraft.world.entity.vehicle.Boat && !level().purpurConfig.boatsDoFallDamage) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - Add boat fall damage config
|
||||
Entity entity = damageSource.getEntity();
|
||||
if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false.
|
||||
!(entity instanceof Player player && !this.canHarmPlayer(player))
|
||||
@@ -2014,6 +_,26 @@
|
||||
this.lastSentExp = -1; // CraftBukkit - Added to reset
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user