mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Add back multithreaded entity tracker
This commit is contained in:
56
patches/server/0139-Add-boat-fall-damage-config.patch
Normal file
56
patches/server/0139-Add-boat-fall-damage-config.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
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/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index 9ec4008f2195908130410d2c36fb5bf21b26b991..f942c3ab757b768fbd1d459752b7f29094471c56 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -106,6 +106,7 @@ import net.minecraft.world.entity.monster.EntityMonster;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.player.EnumChatVisibility;
|
||||
import net.minecraft.world.entity.projectile.EntityArrow;
|
||||
+import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||
import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
|
||||
import net.minecraft.world.inventory.Container;
|
||||
import net.minecraft.world.inventory.ContainerHorse;
|
||||
@@ -1142,7 +1143,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 2265952ae272dc27796f87bd05e171a6c1fdab1b..df42e4a1d1c542eb20759ede3e20ce186352e5c2 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);
|
||||
Reference in New Issue
Block a user