save stuff here

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:01:03 -04:00
parent 0b3c94c72d
commit 8768f54932
159 changed files with 4276 additions and 3663 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Full netherite armor grants fire resistance
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index f67bd221a239d98151e055f444795dea28a07269..2f6856a29cb8dd7c84e3bf4bb4af6293fba0760e 100644
index fa2a0cc24bbe31abd49ce0f3f41bab2aa5d9c81f..ca16f896ede5cfb957849ef3ad1f90f6518659dc 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -366,6 +366,16 @@ public abstract class Player extends LivingEntity {
@@ -13,12 +13,12 @@ index f67bd221a239d98151e055f444795dea28a07269..2f6856a29cb8dd7c84e3bf4bb4af6293
}
+ // Purpur start
+ if (this.level.purpurConfig.playerNetheriteFireResistanceDuration > 0 && this.level.getGameTime() % 20 == 0) {
+ if (this.level().purpurConfig.playerNetheriteFireResistanceDuration > 0 && this.level.getGameTime() % 20 == 0) {
+ if (itemstack.is(Items.NETHERITE_HELMET)
+ && this.getItemBySlot(EquipmentSlot.CHEST).is(Items.NETHERITE_CHESTPLATE)
+ && this.getItemBySlot(EquipmentSlot.LEGS).is(Items.NETHERITE_LEGGINGS)
+ && this.getItemBySlot(EquipmentSlot.FEET).is(Items.NETHERITE_BOOTS)) {
+ this.addEffect(new MobEffectInstance(MobEffects.FIRE_RESISTANCE, this.level.purpurConfig.playerNetheriteFireResistanceDuration, this.level.purpurConfig.playerNetheriteFireResistanceAmplifier, this.level.purpurConfig.playerNetheriteFireResistanceAmbient, this.level.purpurConfig.playerNetheriteFireResistanceShowParticles, this.level.purpurConfig.playerNetheriteFireResistanceShowIcon), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.NETHERITE_ARMOR);
+ this.addEffect(new MobEffectInstance(MobEffects.FIRE_RESISTANCE, this.level().purpurConfig.playerNetheriteFireResistanceDuration, this.level().purpurConfig.playerNetheriteFireResistanceAmplifier, this.level().purpurConfig.playerNetheriteFireResistanceAmbient, this.level().purpurConfig.playerNetheriteFireResistanceShowParticles, this.level().purpurConfig.playerNetheriteFireResistanceShowIcon), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.NETHERITE_ARMOR);
+ }
+ }
+ // Purpur end
@@ -26,7 +26,7 @@ index f67bd221a239d98151e055f444795dea28a07269..2f6856a29cb8dd7c84e3bf4bb4af6293
protected ItemCooldowns createItemCooldowns() {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index f319d80c225576e6970cf28c1fa11d305ac233db..06cb62b768168c06a7b454e0e7bb105b750729c3 100644
index b3697cffbf9e0ef637c547167b5b9091a3b9bf40..63b8d72db812f29fbd82bc62fd21d0d53413bd79 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -297,6 +297,19 @@ public class PurpurWorldConfig {