it compiles \o/

This commit is contained in:
granny
2024-10-26 23:46:33 -07:00
parent ab8264ec21
commit 76614d2235
92 changed files with 484 additions and 443 deletions

View File

@@ -5,28 +5,29 @@ 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 773be9c116a664e4d0349c58c00df34f203f8ebf..00b3e300c0d43f7791c9d5f83a7901304f6464f5 100644
index 773be9c116a664e4d0349c58c00df34f203f8ebf..ae5f7c275003b6fb9f6c5a0277482b4fddf8e74c 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -397,6 +397,16 @@ public abstract class Player extends LivingEntity {
super.onInsideBubbleColumn(drag);
@@ -353,6 +353,17 @@ public abstract class Player extends LivingEntity {
this.turtleHelmetTick();
}
+ // Purpur start
+ 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)) {
+ if (this.getItemBySlot(EquipmentSlot.HEAD).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);
+ }
+ }
+ // Purpur end
}
private void turtleHelmetTick() {
+
this.cooldowns.tick();
this.updatePlayerPose();
if (this.currentImpulseContextResetGraceTime > 0) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b02c2aa15bbfd3b917476f0fd296612d548d450f..b236fdc1f7cfcf9be6ab2486e53025123b950106 100644
index 9775eda4e445a29852cbf12db43282cf8ac9a118..f218c12634f40a171a5022cb3d2956236d9a4d20 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -283,6 +283,19 @@ public class PurpurWorldConfig {