Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
0514fc4e2 Add missing effects
8f5d9effd Add getMainThreadExecutor to BukkitScheduler
313b5020b Allow adding items to BlockDropItemEvent (#5093)
9a556d9da [CI-SKIP] [Auto] Rebuild Patches
72b2768ad Inline shift fields in EnumDirection (#5082)
ffff53fa7 added option to disable pathfinding updates on block changes (#5123)
b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112)
3eefafbaf Fix javadoc build
0081ed1c4 Add javadoc step to GH Actions
01082503e Add dropLeash variable to EntityUnleashEvent (#5130)
31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091
8ac27aa38 [Auto] Updated Upstream (CraftBukkit)
c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit)
d0477d326 [Auto] Updated Upstream (CraftBukkit)
d9f5f7018 EntityMoveEvent (#4614)
This commit is contained in:
BillyGalbreath
2021-01-30 20:41:46 -06:00
parent f3644e18a2
commit e581a731bf
186 changed files with 206 additions and 451 deletions

View File

@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Thu, 24 Dec 2020 11:00:15 -0600
Subject: [PATCH] Full netherite armor grants fire resistance
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index b6bfd8f5073ce481dfe2b1667ece42d32eaeb227..81f7d5bc581b42289a79121da15868999ab9feef 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -234,6 +234,16 @@ public abstract class EntityHuman extends EntityLiving {
this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TURTLE_HELMET); // CraftBukkit
}
+ // Purpur start
+ if (this.world.purpurConfig.playerNetheriteFireResistanceDuration > 0 && this.world.getTime() % 20 == 0) {
+ if (itemstack.getItem() == Items.NETHERITE_HELMET
+ && this.getEquipment(EnumItemSlot.CHEST).getItem() == Items.NETHERITE_CHESTPLATE
+ && this.getEquipment(EnumItemSlot.LEGS).getItem() == Items.NETHERITE_LEGGINGS
+ && this.getEquipment(EnumItemSlot.FEET).getItem() == Items.NETHERITE_BOOTS) {
+ this.addEffect(new MobEffect(MobEffects.FIRE_RESISTANCE, this.world.purpurConfig.playerNetheriteFireResistanceDuration, this.world.purpurConfig.playerNetheriteFireResistanceAmplifier, this.world.purpurConfig.playerNetheriteFireResistanceAmbient, this.world.purpurConfig.playerNetheriteFireResistanceShowParticles, this.world.purpurConfig.playerNetheriteFireResistanceShowIcon), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.NETHERITE_ARMOR);
+ }
+ }
+ // Purpur end
}
protected ItemCooldown i() {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 8aa4a08f4b8af273ea2f3e32066faec597e36015..abea37ca263b718f08ad3dd1f931acfb366962b8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -310,6 +310,19 @@ public class PurpurWorldConfig {
playerDeathExpDropMax = getInt("gameplay-mechanics.player.exp-dropped-on-death.maximum", playerDeathExpDropMax);
}
+ public int playerNetheriteFireResistanceDuration = 0;
+ public int playerNetheriteFireResistanceAmplifier = 0;
+ public boolean playerNetheriteFireResistanceAmbient = false;
+ public boolean playerNetheriteFireResistanceShowParticles = false;
+ public boolean playerNetheriteFireResistanceShowIcon = true;
+ private void playerNetheriteFireResistance() {
+ playerNetheriteFireResistanceDuration = getInt("gameplay-mechanics.player.netherite-fire-resistance.duration", playerNetheriteFireResistanceDuration);
+ playerNetheriteFireResistanceAmplifier = getInt("gameplay-mechanics.player.netherite-fire-resistance.amplifier", playerNetheriteFireResistanceAmplifier);
+ playerNetheriteFireResistanceAmbient = getBoolean("gameplay-mechanics.player.netherite-fire-resistance.ambient", playerNetheriteFireResistanceAmbient);
+ playerNetheriteFireResistanceShowParticles = getBoolean("gameplay-mechanics.player.netherite-fire-resistance.show-particles", playerNetheriteFireResistanceShowParticles);
+ playerNetheriteFireResistanceShowIcon = getBoolean("gameplay-mechanics.player.netherite-fire-resistance.show-icon", playerNetheriteFireResistanceShowIcon);
+ }
+
public int playerSpawnInvulnerableTicks = 60;
public boolean playerInvulnerableWhileAcceptingResourcePack = false;
private void playerInvulnerabilities() {