convert applied source patches to file patch format

This commit is contained in:
granny
2025-05-30 19:06:47 -07:00
parent 312725553b
commit 3ba90894b1
183 changed files with 385 additions and 1852 deletions

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/CombatRules.java b/net/minecraft/world/damagesource/CombatRules.java
index d5524038314591a10c9f08a68e2ac91f6079a897..bf82de45bf98e8605a1fdb69803f75f471c4af43 100644
--- a/net/minecraft/world/damagesource/CombatRules.java
+++ b/net/minecraft/world/damagesource/CombatRules.java
@@ -15,7 +15,7 @@ public class CombatRules {
@@ -15,7 +_,7 @@
public static float getDamageAfterAbsorb(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) {
float f = 2.0F + armorToughness / 4.0F;
@@ -17,7 +9,7 @@ index d5524038314591a10c9f08a68e2ac91f6079a897..bf82de45bf98e8605a1fdb69803f75f4
float f2 = f1 / 25.0F;
ItemStack weaponItem = damageSource.getWeaponItem();
float f3;
@@ -30,7 +30,7 @@ public class CombatRules {
@@ -30,7 +_,7 @@
}
public static float getDamageAfterMagicAbsorb(float damage, float enchantModifiers) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/CombatTracker.java b/net/minecraft/world/damagesource/CombatTracker.java
index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c5166f271 100644
--- a/net/minecraft/world/damagesource/CombatTracker.java
+++ b/net/minecraft/world/damagesource/CombatTracker.java
@@ -64,7 +64,7 @@ public class CombatTracker {
@@ -64,7 +_,7 @@
private Component getMessageForAssistedFall(Entity entity, Component entityDisplayName, String hasWeaponTranslationKey, String noWeaponTranslationKey) {
ItemStack itemStack = entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY;
@@ -17,7 +9,7 @@ index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c
? Component.translatable(hasWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName, itemStack.getDisplayName())
: Component.translatable(noWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName);
}
@@ -108,6 +108,15 @@ public class CombatTracker {
@@ -108,6 +_,15 @@
Component component = ComponentUtils.wrapInSquareBrackets(Component.translatable(string + ".link")).withStyle(INTENTIONAL_GAME_DESIGN_STYLE);
return Component.translatable(string + ".message", this.mob.getDisplayName(), component);
} else {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/DamageSource.java b/net/minecraft/world/damagesource/DamageSource.java
index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16953e8094 100644
--- a/net/minecraft/world/damagesource/DamageSource.java
+++ b/net/minecraft/world/damagesource/DamageSource.java
@@ -30,6 +30,8 @@ public class DamageSource {
@@ -30,6 +_,8 @@
@Nullable
private org.bukkit.block.BlockState fromBlockSnapshot; // Captured block snapshot when the eventBlockDamager is not relevant (e.g. for bad respawn point explosions the block is already removed)
private boolean critical; // Supports arrows and sweeping damage
@@ -17,7 +9,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) {
final DamageSource damageSource = this.copy();
@@ -42,6 +44,30 @@ public class DamageSource {
@@ -42,6 +_,30 @@
return this.knownCause;
}
@@ -48,7 +40,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
@Nullable
public Entity eventEntityDamager() {
return this.eventEntityDamager;
@@ -103,6 +129,8 @@ public class DamageSource {
@@ -103,6 +_,8 @@
damageSource.eventBlockDamager = this.eventBlockDamager;
damageSource.fromBlockSnapshot = this.fromBlockSnapshot;
damageSource.critical = this.critical;
@@ -57,7 +49,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
return damageSource;
}
// CraftBukkit end
@@ -169,12 +197,21 @@ public class DamageSource {
@@ -169,11 +_,20 @@
} else {
Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName();
ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY;
@@ -67,7 +59,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
: Component.translatable(string, livingEntity.getDisplayName(), component);
}
}
+
+ // Purpur start - Component related conveniences
+ public Component getLocalizedDeathMessage(String str, LivingEntity entity) {
+ net.kyori.adventure.text.Component name = io.papermc.paper.adventure.PaperAdventure.asAdventure(entity.getDisplayName());
@@ -76,7 +68,6 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
+ return io.papermc.paper.adventure.PaperAdventure.asVanilla(component);
+ }
+ // Purpur end - Component related conveniences
+
public String getMsgId() {
return this.type().msgId();
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/DamageSources.java b/net/minecraft/world/damagesource/DamageSources.java
index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a7d4e5ebb 100644
--- a/net/minecraft/world/damagesource/DamageSources.java
+++ b/net/minecraft/world/damagesource/DamageSources.java
@@ -42,6 +42,8 @@ public class DamageSources {
@@ -42,6 +_,8 @@
private final DamageSource stalagmite;
private final DamageSource outsideBorder;
private final DamageSource genericKill;
@@ -17,7 +9,7 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
public DamageSources(RegistryAccess registry) {
this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE);
@@ -70,6 +72,8 @@ public class DamageSources {
@@ -70,6 +_,8 @@
this.stalagmite = this.source(DamageTypes.STALAGMITE);
this.outsideBorder = this.source(DamageTypes.OUTSIDE_BORDER);
this.genericKill = this.source(DamageTypes.GENERIC_KILL);
@@ -26,10 +18,11 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
}
private DamageSource source(ResourceKey<DamageType> damageTypeKey) {
@@ -84,6 +88,18 @@ public class DamageSources {
@@ -83,6 +_,18 @@
private DamageSource source(ResourceKey<DamageType> damageTypeKey, @Nullable Entity causingEntity, @Nullable Entity directEntity) {
return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity);
}
+
+ // Purpur start - Dont run with scissor
+ public DamageSource scissors() {
+ return this.scissors;
@@ -41,7 +34,6 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
+ return this.stonecutter;
+ }
+ // Purpur end - Stonecutter damage
+
public DamageSource inFire() {
return this.inFire;
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/HungerMobEffect.java b/net/minecraft/world/effect/HungerMobEffect.java
index 0890694ae96b6cd60079c34066e7a6e288f038e8..6c0e6bd2a171edc57dec71af178764454de73313 100644
--- a/net/minecraft/world/effect/HungerMobEffect.java
+++ b/net/minecraft/world/effect/HungerMobEffect.java
@@ -12,7 +12,7 @@ class HungerMobEffect extends MobEffect {
@@ -12,7 +_,7 @@
@Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {
if (entity instanceof Player player) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/PoisonMobEffect.java b/net/minecraft/world/effect/PoisonMobEffect.java
index 75327fd96858fd508ea63a6983e5cbc655a8800f..73cfc61ac3f8e33e6b9f4fd08a292266c0adb535 100644
--- a/net/minecraft/world/effect/PoisonMobEffect.java
+++ b/net/minecraft/world/effect/PoisonMobEffect.java
@@ -12,8 +12,8 @@ public class PoisonMobEffect extends MobEffect {
@@ -12,8 +_,8 @@
@Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/RegenerationMobEffect.java b/net/minecraft/world/effect/RegenerationMobEffect.java
index 76cffa4d4d18d6c04749d941dbdf5eb60aed4095..81481267a1577721dcc405f39a4c350bd59ac9a2 100644
--- a/net/minecraft/world/effect/RegenerationMobEffect.java
+++ b/net/minecraft/world/effect/RegenerationMobEffect.java
@@ -11,7 +11,7 @@ class RegenerationMobEffect extends MobEffect {
@@ -11,7 +_,7 @@
@Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {
if (entity.getHealth() < entity.getMaxHealth()) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/SaturationMobEffect.java b/net/minecraft/world/effect/SaturationMobEffect.java
index c192165910f6b139df6f604d0bce989061efa9cb..622c23f4570d07de8bee9623bf900aabb3331ded 100644
--- a/net/minecraft/world/effect/SaturationMobEffect.java
+++ b/net/minecraft/world/effect/SaturationMobEffect.java
@@ -16,7 +16,8 @@ class SaturationMobEffect extends InstantenousMobEffect {
@@ -16,7 +_,8 @@
int oldFoodLevel = player.getFoodData().foodLevel;
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, amplifier + 1 + oldFoodLevel);
if (!event.isCancelled()) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/WitherMobEffect.java b/net/minecraft/world/effect/WitherMobEffect.java
index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188bebaca67b 100644
--- a/net/minecraft/world/effect/WitherMobEffect.java
+++ b/net/minecraft/world/effect/WitherMobEffect.java
@@ -12,7 +12,7 @@ public class WitherMobEffect extends MobEffect {
@@ -12,7 +_,7 @@
@Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java
index bfd58eb04eee606ac0a8071de9bf75f46c35decb..0c1953754220ff72e18f0396134507d93ba7b1b8 100644
--- a/net/minecraft/world/entity/EntitySelector.java
+++ b/net/minecraft/world/entity/EntitySelector.java
@@ -28,6 +28,8 @@ public final class EntitySelector {
@@ -28,6 +_,8 @@
return net.minecraft.util.Mth.clamp(serverPlayer.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= playerInsomniaTicks;
};
// Paper end - Ability to control player's insomnia and phantoms

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java
index 3f351fdb3cb76612d88bde713a2639d4319a7c6d..bda521cca91f070139f5e9bdef6a50e1497f53ff 100644
--- a/net/minecraft/world/entity/GlowSquid.java
+++ b/net/minecraft/world/entity/GlowSquid.java
@@ -26,6 +26,13 @@ public class GlowSquid extends Squid {
@@ -27,6 +_,13 @@
super(entityType, level);
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
index a87accd5fe14102e7a2938f991a8ed0b9accd1bb..c7515f7f24e39d6931dcf18574cb47d754983903 100644
--- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
+++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
@@ -29,6 +29,7 @@ public class RangedAttribute extends Attribute {
@@ -29,6 +_,7 @@
@Override
public double sanitizeValue(double value) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6cb454c780 100644
--- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
+++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
@@ -55,7 +55,7 @@ public class InteractWithDoor {
@@ -55,7 +_,7 @@
Node nextNode = path.getNextNode();
BlockPos blockPos = previousNode.asBlockPos();
BlockState blockState = level.getBlockState(blockPos);
@@ -17,7 +9,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c
DoorBlock doorBlock = (DoorBlock)blockState.getBlock();
if (!doorBlock.isOpen(blockState)) {
// CraftBukkit start - entities opening doors
@@ -72,7 +72,7 @@ public class InteractWithDoor {
@@ -72,7 +_,7 @@
BlockPos blockPos1 = nextNode.asBlockPos();
BlockState blockState1 = level.getBlockState(blockPos1);
@@ -26,7 +18,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c
DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock();
if (!doorBlock1.isOpen(blockState1)) {
// CraftBukkit start - entities opening doors
@@ -118,7 +118,7 @@ public class InteractWithDoor {
@@ -118,7 +_,7 @@
iterator.remove();
} else {
BlockState blockState = level.getBlockState(blockPos);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
index 400e6d49144b3e5803901938dcd2ac4e52e9c131..45c45afeffcfba3558bdf46cbe39ff60004ffc01 100644
--- a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
+++ b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
@@ -46,6 +46,7 @@ public class ShowTradesToPlayer extends Behavior<Villager> {
@@ -46,6 +_,7 @@
@Override
public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c114e22472 100644
--- a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
+++ b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
@@ -22,6 +22,7 @@ public class LlamaFollowCaravanGoal extends Goal {
@@ -22,6 +_,7 @@
@Override
public boolean canUse() {
@@ -16,7 +8,7 @@ index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c1
if (!this.llama.isLeashed() && !this.llama.inCaravan()) {
List<Entity> entities = this.llama.level().getEntities(this.llama, this.llama.getBoundingBox().inflate(9.0, 4.0, 9.0), entity1 -> {
EntityType<?> type = entity1.getType();
@@ -71,6 +72,7 @@ public class LlamaFollowCaravanGoal extends Goal {
@@ -71,6 +_,7 @@
@Override
public boolean canContinueToUse() {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
index 722f378bb3726200b6fe88948bf1e1d3514a7b5c..e337e22c2cf82b0c1cab3fe0a9ff894c0c718716 100644
--- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
+++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
@@ -116,9 +116,9 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
@@ -116,9 +_,9 @@
}
this.mob.lookAt(target, 30.0F, 30.0F);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
index 878d7813b3f2f52bef336c6d855d738bc2f83491..d0f94f065d2ecf6ca6b47ac49422ffa656a18f55 100644
--- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
+++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
@@ -58,7 +58,7 @@ public class RunAroundLikeCrazyGoal extends Goal {
@@ -58,7 +_,7 @@
if (firstPassenger instanceof Player player) {
int temper = this.horse.getTemper();
int maxTemper = this.horse.getMaxTemper();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/SwellGoal.java b/net/minecraft/world/entity/ai/goal/SwellGoal.java
index 243a552f6f0c8c2bd25c0209c95e3bca08734711..38fd0196a0f5a90e39fa4eb8592f89bf6b88ccf5 100644
--- a/net/minecraft/world/entity/ai/goal/SwellGoal.java
+++ b/net/minecraft/world/entity/ai/goal/SwellGoal.java
@@ -55,6 +55,14 @@ public class SwellGoal extends Goal {
@@ -55,6 +_,14 @@
this.creeper.setSwellDir(-1);
} else {
this.creeper.setSwellDir(1);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
index 2f8920d8ee765d057a22d76f24f7d7dc1b0b17ca..6f0fcaeaba2fec2ad944d63550f0c3e29bd9133c 100644
--- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
+++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
@@ -64,6 +64,10 @@ public class TargetingConditions {
@@ -64,6 +_,10 @@
return false;
} else if (this.selector != null && !this.selector.test(target, level)) {
return false;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java
index eb9fb57440f498079182030a46034008d3f6b5e8..ed8920bb6d29ce49626bc716aa2c2ce938f6d92b 100644
--- a/net/minecraft/world/entity/ambient/Bat.java
+++ b/net/minecraft/world/entity/ambient/Bat.java
@@ -232,7 +232,7 @@ public class Bat extends AmbientCreature {
@@ -233,7 +_,7 @@
} else {
int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos);
int i = 4;
@@ -17,7 +9,7 @@ index eb9fb57440f498079182030a46034008d3f6b5e8..ed8920bb6d29ce49626bc716aa2c2ce9
i = 7;
} else if (randomSource.nextBoolean()) {
return false;
@@ -244,6 +244,11 @@ public class Bat extends AmbientCreature {
@@ -245,6 +_,11 @@
}
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/AbstractCow.java b/net/minecraft/world/entity/animal/AbstractCow.java
index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af7f986088 100644
--- a/net/minecraft/world/entity/animal/AbstractCow.java
+++ b/net/minecraft/world/entity/animal/AbstractCow.java
@@ -39,7 +39,7 @@ public abstract class AbstractCow extends Animal {
@@ -39,7 +_,7 @@
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(1, new PanicGoal(this, 2.0));
this.goalSelector.addGoal(2, new BreedGoal(this, 1.0));
@@ -17,7 +9,7 @@ index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af
this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.25));
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0));
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
@@ -95,6 +95,10 @@ public abstract class AbstractCow extends Animal {
@@ -95,6 +_,10 @@
ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
player.setItemInHand(hand, itemStack);
return InteractionResult.SUCCESS;
@@ -28,7 +20,7 @@ index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af
} else {
return super.mobInteract(player, hand);
}
@@ -104,4 +108,67 @@ public abstract class AbstractCow extends Animal {
@@ -104,4 +_,67 @@
public EntityDimensions getDefaultDimensions(Pose pose) {
return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose);
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java
index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b077982091ee38d5 100644
--- a/net/minecraft/world/entity/animal/Bee.java
+++ b/net/minecraft/world/entity/animal/Bee.java
@@ -167,7 +167,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -168,7 +_,7 @@
// Paper end - Fix MC-167279
this.lookControl = new Bee.BeeLookControl(this);
this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F);
@@ -17,7 +9,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
this.setPathfindingMalus(PathType.WATER_BORDER, 16.0F);
this.setPathfindingMalus(PathType.COCOA, -1.0F);
this.setPathfindingMalus(PathType.FENCE, -1.0F);
@@ -365,7 +365,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -366,7 +_,7 @@
}
public static boolean isNightOrRaining(Level level) {
@@ -26,7 +18,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
}
public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) {
@@ -388,7 +388,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -389,7 +_,7 @@
@Override
protected void customServerAiStep(ServerLevel level) {
boolean hasStung = this.hasStung();
@@ -35,7 +27,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
this.underWaterTicks++;
} else {
this.underWaterTicks = 0;
@@ -398,6 +398,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -399,6 +_,7 @@
this.hurtServer(level, this.damageSources().drown(), 1.0F);
}
@@ -43,7 +35,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
if (hasStung) {
this.timeSinceSting++;
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {
@@ -1135,6 +1136,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1133,6 +_,7 @@
Bee.this.savedFlowerPos = optional.get();
Bee.this.navigation
.moveTo(Bee.this.savedFlowerPos.getX() + 0.5, Bee.this.savedFlowerPos.getY() + 0.5, Bee.this.savedFlowerPos.getZ() + 0.5, 1.2F);
@@ -51,7 +43,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
return true;
} else {
Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60);
@@ -1181,6 +1183,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1179,6 +_,7 @@
this.pollinating = false;
Bee.this.navigation.stop();
Bee.this.remainingCooldownBeforeLocatingNewFlower = 200;
@@ -59,7 +51,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..585131365c40136cf8a8a715b0779820
}
@Override
@@ -1227,6 +1230,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1225,6 +_,7 @@
this.setWantedPos();
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java
index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..7894db23663c4647742f543195b610bd7e1f3360 100644
--- a/net/minecraft/world/entity/animal/Cat.java
+++ b/net/minecraft/world/entity/animal/Cat.java
@@ -353,6 +353,14 @@ public class Cat extends TamableAnimal {
@@ -354,6 +_,14 @@
return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal);
}
@@ -23,7 +15,7 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..7894db23663c4647742f543195b610bd
@Nullable
@Override
public SpawnGroupData finalizeSpawn(
@@ -451,7 +459,7 @@ public class Cat extends TamableAnimal {
@@ -452,7 +_,7 @@
}
private void tryToTame(Player player) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java
index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..bca2e4659f4afdd7106f77e32af1943e4d276f5e 100644
--- a/net/minecraft/world/entity/animal/Dolphin.java
+++ b/net/minecraft/world/entity/animal/Dolphin.java
@@ -73,6 +73,7 @@ public class Dolphin extends AgeableWaterCreature {
@@ -74,6 +_,7 @@
private static final boolean DEFAULT_GOT_FISH = false;
@Nullable
public BlockPos treasurePos;
@@ -16,7 +8,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..bca2e4659f4afdd7106f77e32af1943e
public Dolphin(EntityType<? extends Dolphin> entityType, Level level) {
super(entityType, level);
@@ -89,6 +90,7 @@ public class Dolphin extends AgeableWaterCreature {
@@ -90,6 +_,7 @@
this.setAirSupply(this.getMaxAirSupply());
this.setXRot(0.0F);
SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F));
@@ -24,7 +16,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..bca2e4659f4afdd7106f77e32af1943e
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1);
}
@@ -155,17 +157,19 @@ public class Dolphin extends AgeableWaterCreature {
@@ -156,17 +_,19 @@
protected void registerGoals() {
this.goalSelector.addGoal(0, new BreathAirGoal(this));
this.goalSelector.addGoal(0, new TryFindWaterGoal(this));
@@ -45,7 +37,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..bca2e4659f4afdd7106f77e32af1943e
}
public static AttributeSupplier.Builder createAttributes() {
@@ -398,6 +402,7 @@ public class Dolphin extends AgeableWaterCreature {
@@ -399,6 +_,7 @@
@Override
public boolean canUse() {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java
index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..4aae42396bd3abb131efe336d7b774384897671d 100644
--- a/net/minecraft/world/entity/animal/Fox.java
+++ b/net/minecraft/world/entity/animal/Fox.java
@@ -345,6 +345,11 @@ public class Fox extends Animal {
@@ -346,6 +_,11 @@
}
private void setTargetGoals() {
@@ -20,7 +12,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..4aae42396bd3abb131efe336d7b77438
if (this.getVariant() == Fox.Variant.RED) {
this.targetSelector.addGoal(4, this.landTargetGoal);
this.targetSelector.addGoal(4, this.turtleEggTargetGoal);
@@ -372,6 +377,7 @@ public class Fox extends Animal {
@@ -373,6 +_,7 @@
public void setVariant(Fox.Variant variant) {
this.entityData.set(DATA_TYPE_ID, variant.getId());
@@ -28,10 +20,11 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..4aae42396bd3abb131efe336d7b77438
}
@Nullable
@@ -706,6 +712,29 @@ public class Fox extends Animal {
@@ -702,6 +_,29 @@
return slot == EquipmentSlot.MAINHAND;
}
// Paper end
+
+ // Purpur start - Tulips change fox type
+ @Override
+ public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) {
@@ -54,7 +47,6 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..4aae42396bd3abb131efe336d7b77438
+ return super.mobInteract(player, hand);
+ }
+ // Purpur end - Tulips change fox type
+
@Override
// Paper start - Cancellable death event
protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java
index cc2fd681d2383e62191e7b380322f2e176d79f1e..0931bab3f52ccc4e405be22559323df90bcc065e 100644
--- a/net/minecraft/world/entity/animal/MushroomCow.java
+++ b/net/minecraft/world/entity/animal/MushroomCow.java
@@ -198,6 +198,13 @@ public class MushroomCow extends AbstractCow implements Shearable {
@@ -199,6 +_,13 @@
level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, soundSource, 1.0F, 1.0F);
this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), cow -> {
level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java
index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..48c8fdfea8687f37187b6092c285275c12963ea0 100644
--- a/net/minecraft/world/entity/animal/Ocelot.java
+++ b/net/minecraft/world/entity/animal/Ocelot.java
@@ -233,7 +233,7 @@ public class Ocelot extends Animal {
@@ -234,7 +_,7 @@
public boolean checkSpawnObstruction(LevelReader level) {
if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) {
BlockPos blockPos = this.blockPosition();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java
index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd622524c4dc 100644
--- a/net/minecraft/world/entity/animal/Parrot.java
+++ b/net/minecraft/world/entity/animal/Parrot.java
@@ -157,6 +157,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@@ -159,6 +_,7 @@
protected void registerGoals() {
this.goalSelector.addGoal(0, new TamableAnimal.TamableAnimalPanicGoal(1.25));
this.goalSelector.addGoal(0, new FloatGoal(this));
@@ -16,7 +8,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd62
this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F));
this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this));
this.goalSelector.addGoal(2, new FollowOwnerGoal(this, 1.0, 5.0F, 1.0F));
@@ -262,7 +263,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@@ -264,7 +_,7 @@
}
if (!this.level().isClientSide) {
@@ -25,7 +17,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd62
this.tame(player);
this.level().broadcastEntityEvent(this, (byte)7);
} else {
@@ -270,6 +271,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@@ -272,6 +_,7 @@
}
}
@@ -33,7 +25,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd62
return InteractionResult.SUCCESS;
} else if (!itemInHand.is(ItemTags.PARROT_POISONOUS_FOOD)) {
if (!this.isFlying() && this.isTame() && this.isOwnedBy(player)) {
@@ -294,7 +296,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@@ -296,7 +_,7 @@
@Override
public boolean isFood(ItemStack stack) {
@@ -42,7 +34,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..ca661c215d2eb719392a30c7b917bd62
}
public static boolean checkParrotSpawnRules(
@@ -309,13 +311,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
@@ -311,13 +_,13 @@
@Override
public boolean canMate(Animal otherAnimal) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java
index ec2074741b52cf8f1ac3c0276bcfc9b8806b71bf..027d47b89d306bf6bc3d5457a163041f6aa7ab49 100644
--- a/net/minecraft/world/entity/animal/Pig.java
+++ b/net/minecraft/world/entity/animal/Pig.java
@@ -141,6 +141,19 @@ public class Pig extends Animal implements ItemSteerable {
@@ -142,6 +_,19 @@
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
boolean isFood = this.isFood(player.getItemInHand(hand));

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java
index fcdaaed31c38acb55e66599cd3314606d223cd67..d018b1a967557cfae0d3227d8f43d281a78a22bc 100644
--- a/net/minecraft/world/entity/animal/PolarBear.java
+++ b/net/minecraft/world/entity/animal/PolarBear.java
@@ -64,6 +64,29 @@ public class PolarBear extends Animal implements NeutralMob {
@@ -65,6 +_,29 @@
super(entityType, level);
}
@@ -38,7 +30,7 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..d018b1a967557cfae0d3227d8f43d281
@Nullable
@Override
public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) {
@@ -72,7 +95,7 @@ public class PolarBear extends Animal implements NeutralMob {
@@ -73,7 +_,7 @@
@Override
public boolean isFood(ItemStack stack) {
@@ -47,7 +39,7 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..d018b1a967557cfae0d3227d8f43d281
}
@Override
@@ -81,6 +104,12 @@ public class PolarBear extends Animal implements NeutralMob {
@@ -82,6 +_,12 @@
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(1, new PolarBear.PolarBearMeleeAttackGoal());
this.goalSelector.addGoal(1, new PanicGoal(this, 2.0, mob -> mob.isBaby() ? DamageTypeTags.PANIC_CAUSES : DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES));

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java
index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..e9445749c5264bd0ce7c426845cb342d34dea713 100644
--- a/net/minecraft/world/entity/animal/Rabbit.java
+++ b/net/minecraft/world/entity/animal/Rabbit.java
@@ -403,10 +403,23 @@ public class Rabbit extends Animal {
@@ -404,10 +_,23 @@
}
this.setVariant(randomRabbitVariant);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java
index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e80f7c2d97 100644
--- a/net/minecraft/world/entity/animal/Squid.java
+++ b/net/minecraft/world/entity/animal/Squid.java
@@ -46,10 +46,29 @@ public class Squid extends AgeableWaterCreature {
@@ -46,10 +_,29 @@
public Squid(EntityType<? extends Squid> entityType, Level level) {
super(entityType, level);
@@ -39,7 +31,7 @@ index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e8
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this));
@@ -127,6 +146,7 @@ public class Squid extends AgeableWaterCreature {
@@ -127,6 +_,7 @@
}
if (this.isInWater()) {
@@ -47,7 +39,7 @@ index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e8
if (this.tentacleMovement < (float) Math.PI) {
float f = this.tentacleMovement / (float) Math.PI;
this.tentacleAngle = Mth.sin(f * f * (float) Math.PI) * (float) Math.PI * 0.25F;
@@ -308,7 +328,7 @@ public class Squid extends AgeableWaterCreature {
@@ -308,7 +_,7 @@
int noActionTime = this.squid.getNoActionTime();
if (noActionTime > 100) {
this.squid.movementVector = Vec3.ZERO;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/WaterAnimal.java
index 2b5e091b6ebe17e30d8d0e73999e19eed49e9a9f..6ff9ca735eba1c3376f3bc4916d5ab76af782de1 100644
--- a/net/minecraft/world/entity/animal/WaterAnimal.java
+++ b/net/minecraft/world/entity/animal/WaterAnimal.java
@@ -76,8 +76,7 @@ public abstract class WaterAnimal extends PathfinderMob {
@@ -76,8 +_,7 @@
seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel);
i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i);
// Paper end - Make water animal spawn height configurable

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
index b22321ead9d66cb089b67276743624b3cca52fc1..c399192687e01bd4a05e4a85d71493d4c3c3e9a8 100644
--- a/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
@@ -395,6 +395,7 @@ public class Goat extends Animal {
@@ -396,6 +_,7 @@
// Paper start - Goat ram API
public void ram(net.minecraft.world.entity.LivingEntity entity) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
index d813427cf20117014bc42af0eb7cdee037fbcd9c..57f9f705c62706902efe9a7873f0e3866820f7d9 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
@@ -38,6 +38,24 @@ public class EndCrystal extends Entity {
@@ -39,6 +_,24 @@
this.setPos(x, y, z);
}
@@ -33,7 +25,7 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..57f9f705c62706902efe9a7873f0e386
@Override
protected Entity.MovementEmission getMovementEmission() {
return Entity.MovementEmission.NONE;
@@ -74,6 +92,8 @@ public class EndCrystal extends Entity {
@@ -75,6 +_,8 @@
}
}
// Paper end - Fix invulnerable end crystals
@@ -42,7 +34,7 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..57f9f705c62706902efe9a7873f0e386
}
@Override
@@ -114,15 +134,17 @@ public class EndCrystal extends Entity {
@@ -115,15 +_,17 @@
}
// CraftBukkit end
if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..ea9d27a3205b3699b9577f42bb04254bd76e700e 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -960,6 +960,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -961,6 +_,7 @@
@Override
protected boolean canRide(Entity entity) {
@@ -16,7 +8,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..ea9d27a3205b3699b9577f42bb04254b
return false;
}
@@ -995,7 +996,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -996,7 +_,7 @@
boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT);
int i = 500;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java
index 5d23d8754b304d5e2fd54400cc81c7fe5c14a804..9a00aead39e194de076ee651d2f75b29673cad1e 100644
--- a/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
@@ -253,4 +253,32 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@@ -253,4 +_,32 @@
return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid();
}
// Paper end - Option to prevent TNT from moving in water

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java
index 22d5ccb271fc19255e99afa5d1ff10549a20dc31..025b74f7fe2094110a9fd293911588f361785d0a 100644
--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -158,10 +158,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@@ -158,10 +_,7 @@
this.reassessWeaponGoal();
this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || random.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
@@ -20,7 +12,7 @@ index 22d5ccb271fc19255e99afa5d1ff10549a20dc31..025b74f7fe2094110a9fd293911588f3
this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN));
this.setDropChance(EquipmentSlot.HEAD, 0.0F);
}
@@ -217,7 +214,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@@ -217,7 +_,7 @@
if (event.getProjectile() == arrow.getBukkitEntity()) {
// CraftBukkit end
Projectile.spawnProjectileUsingShoot(

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
index 3f5e1e98802e5dd1cfc9075559e1102046605a04..c2327306f093c834da9574f9466236fbec572aec 100644
--- a/net/minecraft/world/entity/monster/Creeper.java
+++ b/net/minecraft/world/entity/monster/Creeper.java
@@ -54,6 +54,7 @@ public class Creeper extends Monster {
@@ -55,6 +_,7 @@
public int explosionRadius = 3;
private int droppedSkulls;
public @Nullable Entity entityIgniter; // CraftBukkit
@@ -16,7 +8,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..c2327306f093c834da9574f9466236fb
public Creeper(EntityType<? extends Creeper> entityType, Level level) {
super(entityType, level);
@@ -157,6 +158,27 @@ public class Creeper extends Monster {
@@ -158,6 +_,27 @@
return false; // CraftBukkit
}
@@ -44,7 +36,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..c2327306f093c834da9574f9466236fb
@Override
public SoundEvent getHurtSound(DamageSource damageSource) {
return SoundEvents.CREEPER_HURT;
@@ -239,14 +261,16 @@ public class Creeper extends Monster {
@@ -240,14 +_,16 @@
}
public void explodeCreeper() {
@@ -63,7 +55,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..c2327306f093c834da9574f9466236fb
this.spawnLingeringCloud();
this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED);
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
@@ -257,6 +281,7 @@ public class Creeper extends Monster {
@@ -258,6 +_,7 @@
}
// CraftBukkit end
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java
index 4978cd2a7a84130fc0de1cc481b39d61f388c812..c0afb6f85cecf26bb1a08669ac3fcec8fea6cbfc 100644
--- a/net/minecraft/world/entity/monster/Drowned.java
+++ b/net/minecraft/world/entity/monster/Drowned.java
@@ -82,10 +82,23 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -83,10 +_,23 @@
this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false));
this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0));
this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel()));

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a7803685557e0d7 100644
--- a/net/minecraft/world/entity/monster/EnderMan.java
+++ b/net/minecraft/world/entity/monster/EnderMan.java
@@ -103,7 +103,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -101,7 +_,7 @@
this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this));
this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt));
this.targetSelector.addGoal(2, new HurtByTargetGoal(this));
@@ -17,7 +9,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
}
@@ -220,7 +220,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -216,7 +_,7 @@
boolean isBeingStaredBy(Player player) {
// Paper start - EndermanAttackPlayerEvent
@@ -26,7 +18,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity());
event.setCancelled(!shouldAttack);
return event.callEvent();
@@ -376,6 +376,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -372,6 +_,7 @@
public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
if (this.isInvulnerableTo(level, damageSource)) {
return false;
@@ -34,7 +26,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
} else {
AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion
? abstractThrownPotion
@@ -392,6 +393,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -388,6 +_,7 @@
} else {
boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount);
@@ -42,7 +34,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent
for (int i = 0; i < 64; i++) {
if (this.teleport()) {
@@ -435,7 +437,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -431,7 +_,7 @@
@Override
public boolean requiresCustomPersistence() {
@@ -51,7 +43,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
}
static class EndermanFreezeWhenLookedAt extends Goal {
@@ -479,6 +481,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -475,6 +_,7 @@
@Override
public boolean canUse() {
@@ -59,7 +51,7 @@ index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..ed322ed572cac147acf26ba18a780368
return this.enderman.getCarriedBlock() != null
&& getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)
&& this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0;
@@ -628,6 +631,7 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -624,6 +_,7 @@
@Override
public boolean canUse() {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java
index 5ef9566b16a4d0300ee45a993c46e734db156416..04d5910d736dee2a88a2602f4a98495459277157 100644
--- a/net/minecraft/world/entity/monster/Monster.java
+++ b/net/minecraft/world/entity/monster/Monster.java
@@ -88,6 +88,14 @@ public abstract class Monster extends PathfinderMob implements Enemy {
@@ -88,6 +_,14 @@
}
public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java
index 483b0499f1f70b3aa8862e6cd8e512748492bee0..73edb1a4e5daee16fa518c05de24e413847ab65d 100644
--- a/net/minecraft/world/entity/monster/Phantom.java
+++ b/net/minecraft/world/entity/monster/Phantom.java
@@ -159,7 +159,11 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -169,7 +_,11 @@
ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData
) {
this.anchorPoint = this.blockPosition().above(5);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java
index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..85018a01b5d803a91228e2fa02717c2c518a3004 100644
--- a/net/minecraft/world/entity/monster/Ravager.java
+++ b/net/minecraft/world/entity/monster/Ravager.java
@@ -73,6 +73,7 @@ public class Ravager extends Raider {
@@ -74,6 +_,7 @@
protected void registerGoals() {
super.registerGoals();
this.goalSelector.addGoal(0, new FloatGoal(this));
@@ -16,7 +8,7 @@ index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..85018a01b5d803a91228e2fa02717c2c
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0, true));
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4));
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
@@ -153,7 +154,7 @@ public class Ravager extends Raider {
@@ -154,7 +_,7 @@
)) {
BlockState blockState = serverLevel.getBlockState(blockPos);
Block block = blockState.getBlock();

View File

@@ -1,22 +1,14 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java
index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..a8c5c2ad80afd03b3fc53127b519b5c2b73bff85 100644
--- a/net/minecraft/world/entity/monster/Shulker.java
+++ b/net/minecraft/world/entity/monster/Shulker.java
@@ -53,6 +53,7 @@ import net.minecraft.world.level.Level;
@@ -52,6 +_,7 @@
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.entity.EntityTypeTest;
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
@@ -93,6 +94,21 @@ public class Shulker extends AbstractGolem implements Enemy {
import net.minecraft.world.level.storage.ValueInput;
import net.minecraft.world.level.storage.ValueOutput;
@@ -94,6 +_,21 @@
this.lookControl = new Shulker.ShulkerLookControl(this);
}
@@ -38,7 +30,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..a8c5c2ad80afd03b3fc53127b519b5c2
@Override
protected void registerGoals() {
this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true));
@@ -460,11 +476,21 @@ public class Shulker extends AbstractGolem implements Enemy {
@@ -461,11 +_,21 @@
private void hitByShulkerBullet() {
Vec3 vec3 = this.position();
AABB boundingBox = this.getBoundingBox();
@@ -64,7 +56,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..a8c5c2ad80afd03b3fc53127b519b5c2
if (shulker != null) {
shulker.setVariant(this.getVariant());
shulker.snapTo(vec3);
@@ -572,7 +598,7 @@ public class Shulker extends AbstractGolem implements Enemy {
@@ -573,7 +_,7 @@
}
public Optional<DyeColor> getVariant() {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java
index 48f26ed693b43e3f65f1559ba69b3d7249664f71..1f35105f6ddd33fc9558d19590a5696479d2de83 100644
--- a/net/minecraft/world/entity/monster/Skeleton.java
+++ b/net/minecraft/world/entity/monster/Skeleton.java
@@ -139,4 +139,64 @@ public class Skeleton extends AbstractSkeleton {
@@ -140,4 +_,64 @@
this.spawnAtLocation(level, Items.SKELETON_SKULL);
}
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java
index afa584e2aba6bebfb2dd343215b043c983281853..4b9e60d930bc3a4bfe9aad2e81391e57cfc45d40 100644
--- a/net/minecraft/world/entity/monster/Strider.java
+++ b/net/minecraft/world/entity/monster/Strider.java
@@ -392,6 +392,19 @@ public class Strider extends Animal implements ItemSteerable {
@@ -392,6 +_,19 @@
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
boolean isFood = this.isFood(player.getItemInHand(hand));

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java
index d02b4bfc3834cdfae37983ec616ee3cbcd9f0988..79c2248b0dce457fed6d61d4b38eeb92bbc3927e 100644
--- a/net/minecraft/world/entity/monster/Vindicator.java
+++ b/net/minecraft/world/entity/monster/Vindicator.java
@@ -131,6 +131,11 @@ public class Vindicator extends AbstractIllager {
@@ -132,6 +_,11 @@
RandomSource random = level.getRandom();
this.populateDefaultEquipmentSlots(random, difficulty);
this.populateDefaultEquipmentEnchantments(level, random, difficulty);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index 39b65970a48568c95ff482b9636e7391f300ffa8..e15df574282e0f5ba5791435020bc6ac96860d15 100644
--- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -118,7 +118,19 @@ public class Zombie extends Monster {
@@ -117,7 +_,19 @@
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
@@ -29,7 +21,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..e15df574282e0f5ba5791435020bc6ac
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
}
@@ -552,10 +564,7 @@ public class Zombie extends Monster {
@@ -551,10 +_,7 @@
}
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java
index a8cd7103e636b57be1270d0f3549c709330b5536..6b0bbcf99941d768d235b9f96c3e112a4dfea2fc 100644
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -130,10 +130,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -129,10 +_,10 @@
public InteractionResult mobInteract(Player player, InteractionHand hand) {
ItemStack itemInHand = player.getItemInHand(hand);
if (itemInHand.is(Items.GOLDEN_APPLE)) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
index 05de183ce7b0be9b41f005b2ca36807a109fc634..eff0dec6efe043ad0cb0126061583bc5b67ba0e2 100644
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
@@ -112,6 +112,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
@@ -113,6 +_,12 @@
this.maybeAlertOthers();
}
@@ -21,16 +13,16 @@ index 05de183ce7b0be9b41f005b2ca36807a109fc634..eff0dec6efe043ad0cb0126061583bc5
super.customServerAiStep(level);
}
@@ -159,6 +165,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
@@ -159,6 +_,12 @@
this.playFirstAngerSoundIn = FIRST_ANGER_SOUND_DELAY.sample(this.random);
this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
}
+
+ // Purpur start - Toggle for Zombified Piglin death always counting as player kill when angry
+ if (livingEntity instanceof Player player && this.level().purpurConfig.zombifiedPiglinCountAsPlayerKillWhenAngry) {
+ this.setLastHurtByPlayer(player, this.tickCount);
+ }
+ // Purpur end - Toggle for Zombified Piglin death always counting as player kill when angry
+
return super.setTarget(livingEntity, reason); // CraftBukkit
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c784e4270d8 100644
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -661,7 +661,10 @@ public class PiglinAi {
@@ -661,13 +_,23 @@
public static boolean isWearingSafeArmor(LivingEntity entity) {
for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) {
@@ -20,17 +12,16 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..df1ef03f584fcaa31bd8cfd2c7301c78
return true;
}
}
@@ -669,6 +672,13 @@ public class PiglinAi {
return false;
}
+
+ // Purpur start - piglins ignore gold-trimmed armor
+ private static boolean isWearingGoldTrim(Item itemstack) {
+ net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.components().get(net.minecraft.core.component.DataComponents.TRIM);
+ return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD);
+ }
+ // Purpur end - piglins ignore gold-trimmed armor
+
private static void stopWalking(Piglin piglin) {
piglin.getBrain().eraseMemory(MemoryModuleType.WALK_TARGET);
piglin.getNavigation().stop();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java
index e282b6ab6d0d1c11ee40f5f436bd50fa90ddc88b..d6ae13c19481ce33bfa0b6c9db63283009339d8c 100644
--- a/net/minecraft/world/entity/npc/CatSpawner.java
+++ b/net/minecraft/world/entity/npc/CatSpawner.java
@@ -25,7 +25,7 @@ public class CatSpawner implements CustomSpawner {
@@ -25,7 +_,7 @@
if (spawnFriendlies && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) {
this.nextTick--;
if (this.nextTick <= 0) {
@@ -17,7 +9,7 @@ index e282b6ab6d0d1c11ee40f5f436bd50fa90ddc88b..d6ae13c19481ce33bfa0b6c9db632830
Player randomPlayer = level.getRandomPlayer();
if (randomPlayer != null) {
RandomSource randomSource = level.random;
@@ -48,9 +48,12 @@ public class CatSpawner implements CustomSpawner {
@@ -48,9 +_,12 @@
}
private void spawnInVillage(ServerLevel level, BlockPos pos) {
@@ -33,7 +25,7 @@ index e282b6ab6d0d1c11ee40f5f436bd50fa90ddc88b..d6ae13c19481ce33bfa0b6c9db632830
if (entitiesOfClass.size() < 5) {
this.spawnCat(pos, level, false);
}
@@ -58,8 +61,11 @@ public class CatSpawner implements CustomSpawner {
@@ -58,8 +_,11 @@
}
private void spawnInHut(ServerLevel level, BlockPos pos) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..b0eec451b68a6a2697b1620410f07b25c4d2fda7 100644
--- a/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -59,6 +59,13 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@@ -60,6 +_,13 @@
super(entityType, level);
}
@@ -22,7 +14,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..b0eec451b68a6a2697b1620410f07b25
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new FloatGoal(this));
@@ -79,7 +86,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@@ -80,7 +_,7 @@
this,
new ItemStack(Items.MILK_BUCKET),
SoundEvents.WANDERING_TRADER_REAPPEARED,
@@ -31,7 +23,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..b0eec451b68a6a2697b1620410f07b25
)
);
this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this));
@@ -123,8 +130,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@@ -124,8 +_,10 @@
return InteractionResult.CONSUME;
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index 9d9ec2bf16027b479bbc4339ad4e9dcfc2077d40..d4527765262818099dfb695d6a84b56d33888e34 100644
--- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -137,7 +137,17 @@ public class WanderingTraderSpawner implements CustomSpawner {
@@ -137,7 +_,17 @@
int i1 = pos.getX() + this.random.nextInt(maxDistance * 2) - maxDistance;
int i2 = pos.getZ() + this.random.nextInt(maxDistance * 2) - maxDistance;
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i1, i2);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java
index 595cdb7d013eb0b9282b133a22f51ee865d18623..b00e5b523a07bd3f65c6d7eee96430266e5661c9 100644
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -79,6 +79,7 @@ public abstract class AbstractArrow extends Projectile {
@@ -76,6 +_,7 @@
public ItemStack pickupItemStack = this.getDefaultPickupItem();
@Nullable
public ItemStack firedFromWeapon = null;
@@ -16,7 +8,7 @@ index 595cdb7d013eb0b9282b133a22f51ee865d18623..b00e5b523a07bd3f65c6d7eee9643026
protected AbstractArrow(EntityType<? extends AbstractArrow> entityType, Level level) {
super(entityType, level);
@@ -352,7 +353,7 @@ public abstract class AbstractArrow extends Projectile {
@@ -349,7 +_,7 @@
this.setInGround(false);
Vec3 deltaMovement = this.getDeltaMovement();
this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F));
@@ -25,16 +17,16 @@ index 595cdb7d013eb0b9282b133a22f51ee865d18623..b00e5b523a07bd3f65c6d7eee9643026
}
public boolean isInGround() {
@@ -576,6 +577,12 @@ public abstract class AbstractArrow extends Projectile {
@@ -572,6 +_,12 @@
public ItemStack getWeaponItem() {
return this.firedFromWeapon;
}
+
+ // Purpur start - Add an option to fix MC-3304 projectile looting
+ public void setActualEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments) {
+ this.actualEnchantments = actualEnchantments;
+ }
+ // Purpur end - Add an option to fix MC-3304 projectile looting
+
protected SoundEvent getDefaultHitGroundSoundEvent() {
return SoundEvents.ARROW_HIT;
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java
index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b4844daf4 100644
--- a/net/minecraft/world/entity/projectile/Snowball.java
+++ b/net/minecraft/world/entity/projectile/Snowball.java
@@ -52,10 +52,40 @@ public class Snowball extends ThrowableItemProjectile {
@@ -52,9 +_,39 @@
protected void onHitEntity(EntityHitResult result) {
super.onHitEntity(result);
Entity entity = result.getEntity();
@@ -16,7 +8,7 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b
+ int i = entity.level().purpurConfig.snowballDamage >= 0 ? entity.level().purpurConfig.snowballDamage : entity instanceof Blaze ? 3 : 0; // Purpur - Add configurable snowball damage
entity.hurt(this.damageSources().thrown(this, this.getOwner()), i);
}
+
+ // Purpur start - options to extinguish fire blocks with snowballs - borrowed and modified code from ThrownPotion#onHitBlock and ThrownPotion#dowseFire
+ @Override
+ protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult) {
@@ -46,7 +38,6 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b
+ }
+ }
+ // Purpur end - options to extinguish fire blocks with snowballs
+
@Override
protected void onHit(HitResult result) {
super.onHit(result);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java
index 00f805667ea48fd8699f3cea05781739e376cedd..e814daaa10c138b1497dffbdf9224d34cd9c9926 100644
--- a/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/net/minecraft/world/entity/projectile/ThrownTrident.java
@@ -65,7 +65,7 @@ public class ThrownTrident extends AbstractArrow {
@@ -66,7 +_,7 @@
Entity owner = this.getOwner();
int i = this.entityData.get(ID_LOYALTY);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java
index a2fdc87bedd1a63064cb8c7a7615978483268fdc..c96dc62b9f890335892a8075ed9b1285f98c9e8a 100644
--- a/net/minecraft/world/entity/projectile/WitherSkull.java
+++ b/net/minecraft/world/entity/projectile/WitherSkull.java
@@ -93,7 +93,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
@@ -94,7 +_,7 @@
super.onHit(result);
if (!this.level().isClientSide) {
// CraftBukkit start
@@ -17,17 +9,17 @@ index a2fdc87bedd1a63064cb8c7a7615978483268fdc..c96dc62b9f890335892a8075ed9b1285
if (event.callEvent()) {
this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
}
@@ -102,6 +102,13 @@ public class WitherSkull extends AbstractHurtingProjectile {
@@ -102,6 +_,13 @@
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
+
+ // Purpur start - Add canSaveToDisk to Entity
+ @Override
+ public boolean canSaveToDisk() {
+ return false;
+ }
+ // Purpur end - Add canSaveToDisk to Entity
+
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(DATA_DANGEROUS, false);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/raid/Raids.java b/net/minecraft/world/entity/raid/Raids.java
index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db9284254d 100644
--- a/net/minecraft/world/entity/raid/Raids.java
+++ b/net/minecraft/world/entity/raid/Raids.java
@@ -29,6 +29,7 @@ import net.minecraft.world.phys.Vec3;
@@ -29,6 +_,7 @@
public class Raids extends SavedData {
private static final String RAID_FILE_ID = "raids";
@@ -16,7 +8,7 @@ index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db
public static final Codec<Raids> CODEC = RecordCodecBuilder.create(
instance -> instance.group(
Raids.RaidWithId.CODEC
@@ -81,6 +82,17 @@ public class Raids extends SavedData {
@@ -81,6 +_,17 @@
public void tick(ServerLevel level) {
this.tick++;
@@ -34,7 +26,7 @@ index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db
Iterator<Raid> iterator = this.raidMap.values().iterator();
while (iterator.hasNext()) {
@@ -148,11 +160,13 @@ public class Raids extends SavedData {
@@ -148,11 +_,13 @@
// }
if (!raid.isStarted() || (raid.isInProgress() && raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel())) { // CraftBukkit - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java
index 4541bb5233e986d9993d8593afef9b12c935d00a..abfe3370382c39aeab2cc7832c0ff6ee5b95fa5b 100644
--- a/net/minecraft/world/entity/vehicle/AbstractBoat.java
+++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java
@@ -433,6 +433,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
@@ -436,6 +_,7 @@
float groundFriction = this.getGroundFriction();
if (groundFriction > 0.0F) {
this.landFriction = groundFriction;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
index 090b19752fbfc856d9fbf118510afc6cda2b9989..325ec57df2885f5e81b8a6b61e3a9fed9484b30f 100644
--- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
+++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
@@ -391,7 +391,7 @@ public class NewMinecartBehavior extends MinecartBehavior {
@@ -391,7 +_,7 @@
private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) {
if (state.is(Blocks.POWERED_RAIL) && state.getValue(PoweredRailBlock.POWERED)) {
if (speed.length() > 0.01) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
index 0d09b0809e7b224538cf5cfac9e36ec5ba10b709..4d224dc127d245556892e761fa4927a76e4b8e9a 100644
--- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
+++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
@@ -243,8 +243,8 @@ public class OldMinecartBehavior extends MinecartBehavior {
@@ -243,8 +_,8 @@
Vec3 deltaMovement1 = this.getDeltaMovement();
double d13 = deltaMovement1.horizontalDistance();
if (d13 > 0.01) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java
index 89d783315dab8ca469a1fa724cd59a329d4c2b55..7fa061718989365725ff49abd2d19d1ba3f935f9 100644
--- a/net/minecraft/world/food/FoodData.java
+++ b/net/minecraft/world/food/FoodData.java
@@ -38,6 +38,7 @@ public class FoodData {
@@ -39,6 +_,7 @@
int oldFoodLevel = this.foodLevel;
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack);
if (!event.isCancelled()) {
@@ -16,7 +8,7 @@ index 89d783315dab8ca469a1fa724cd59a329d4c2b55..7fa061718989365725ff49abd2d19d1b
this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation());
}
serverPlayer.getBukkitEntity().sendHealthUpdate();
@@ -86,7 +87,7 @@ public class FoodData {
@@ -87,7 +_,7 @@
this.tickTimer++;
if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/food/FoodProperties.java b/net/minecraft/world/food/FoodProperties.java
index 793e4528755fa5688efbad75418188e693ad0157..20f702c8266eb54a8835861188eb937f4732e078 100644
--- a/net/minecraft/world/food/FoodProperties.java
+++ b/net/minecraft/world/food/FoodProperties.java
@@ -42,9 +42,11 @@ public record FoodProperties(int nutrition, float saturation, boolean canAlwaysE
@@ -42,9 +_,11 @@
level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, random.triangle(1.0F, 0.4F));
if (entity instanceof Player player) {
player.getFoodData().eat(this, stack, (net.minecraft.server.level.ServerPlayer) player); // CraftBukkit

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
index 813417a09b4acc7d57e80a53d970767e230d75b1..c4721eb0efe34f5e313bc890b4e960144eca4fe1 100644
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -65,6 +65,7 @@ public abstract class AbstractContainerMenu {
@@ -65,6 +_,7 @@
@Nullable
private ContainerSynchronizer synchronizer;
private boolean suppressRemoteUpdates;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/net/minecraft/world/inventory/AbstractFurnaceMenu.java
index b42d55c1c0c405ce3ce073138343e74fa036fa65..b86e49b09a036532e7dbd56bc52b13cefe77f75b 100644
--- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java
+++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java
@@ -121,7 +121,13 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu {
@@ -121,7 +_,13 @@
} else if (index != 1 && index != 0) {
if (this.canSmelt(item)) {
if (!this.moveItemStackTo(item, 0, 1, false)) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/ArmorSlot.java b/net/minecraft/world/inventory/ArmorSlot.java
index 0a440ea37d14cd840cf87a99264ace5ccde7c073..dec920727401de7f5bcc6c7e50f9dd325367ee90 100644
--- a/net/minecraft/world/inventory/ArmorSlot.java
+++ b/net/minecraft/world/inventory/ArmorSlot.java
@@ -47,7 +47,7 @@ class ArmorSlot extends Slot {
@@ -47,7 +_,7 @@
@Override
public boolean mayPickup(Player player) {
ItemStack item = this.getItem();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/EnchantmentMenu.java b/net/minecraft/world/inventory/EnchantmentMenu.java
index cf9ab4c9fba11f5a0b293978853e205de81d6fc7..d0d6ae9c9c432f8bd5d9c91113fc5491e321afad 100644
--- a/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/net/minecraft/world/inventory/EnchantmentMenu.java
@@ -63,6 +63,22 @@ public class EnchantmentMenu extends AbstractContainerMenu {
@@ -63,6 +_,22 @@
return access.getLocation();
}
// CraftBukkit end
@@ -31,7 +23,7 @@ index cf9ab4c9fba11f5a0b293978853e205de81d6fc7..d0d6ae9c9c432f8bd5d9c91113fc5491
};
// Paper end - Add missing InventoryHolders
this.access = access;
@@ -83,6 +99,16 @@ public class EnchantmentMenu extends AbstractContainerMenu {
@@ -83,6 +_,16 @@
return EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI;
}
});
@@ -48,7 +40,7 @@ index cf9ab4c9fba11f5a0b293978853e205de81d6fc7..d0d6ae9c9c432f8bd5d9c91113fc5491
this.addStandardInventorySlots(playerInventory, 8, 84);
this.addDataSlot(DataSlot.shared(this.costs, 0));
this.addDataSlot(DataSlot.shared(this.costs, 1));
@@ -299,7 +325,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
@@ -299,7 +_,7 @@
@Override
public void removed(Player player) {
super.removed(player);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java
index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce14348f89e21c 100644
--- a/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -91,11 +91,13 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -91,11 +_,13 @@
@Override
public void onTake(Player player, ItemStack stack) {
access.execute((level, blockPos) -> {
@@ -23,7 +15,7 @@ index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce1434
// Paper end - Fire BlockExpEvent on grindstone use
}
@@ -124,7 +126,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -124,7 +_,7 @@
for (Entry<Holder<Enchantment>> entry : enchantmentsForCrafting.entrySet()) {
Holder<Enchantment> holder = entry.getKey();
int intValue = entry.getIntValue();
@@ -32,7 +24,7 @@ index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce1434
i += holder.value().getMinCost(intValue);
}
}
@@ -202,15 +204,75 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -202,15 +_,75 @@
for (Entry<Holder<Enchantment>> entry : enchantmentsForCrafting.entrySet()) {
Holder<Enchantment> holder = entry.getKey();
@@ -110,7 +102,7 @@ index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce1434
if (item.is(Items.ENCHANTED_BOOK) && itemEnchantments.isEmpty()) {
item = item.transmuteCopy(Items.BOOK);
}
@@ -222,6 +284,23 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -222,6 +_,23 @@
}
item.set(DataComponents.REPAIR_COST, i);
@@ -134,7 +126,7 @@ index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce1434
return item;
}
@@ -278,7 +357,9 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -278,7 +_,9 @@
return ItemStack.EMPTY;
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java
index 34d52c941395645e77de810855b14012c259cf02..c605bd700fd9f5a6596a2bf9648492786306b025 100644
--- a/net/minecraft/world/inventory/ItemCombinerMenu.java
+++ b/net/minecraft/world/inventory/ItemCombinerMenu.java
@@ -156,7 +156,9 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
@@ -156,7 +_,9 @@
return ItemStack.EMPTY;
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/AxeItem.java b/net/minecraft/world/item/AxeItem.java
index bd919b9a83f9736f02783b1ba3863fd1b77c7e89..eb8d2d6f9c65185f5fe16a13ab0cdbba78a25a40 100644
--- a/net/minecraft/world/item/AxeItem.java
+++ b/net/minecraft/world/item/AxeItem.java
@@ -62,13 +62,15 @@ public class AxeItem extends Item {
@@ -62,13 +_,15 @@
if (playerHasBlockingItemUseIntent(context)) {
return InteractionResult.PASS;
} else {
@@ -26,7 +18,7 @@ index bd919b9a83f9736f02783b1ba3863fd1b77c7e89..eb8d2d6f9c65185f5fe16a13ab0cdbba
return InteractionResult.PASS;
}
// Paper end
@@ -76,8 +78,15 @@ public class AxeItem extends Item {
@@ -76,8 +_,15 @@
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, clickedPos, itemInHand);
}
@@ -44,7 +36,7 @@ index bd919b9a83f9736f02783b1ba3863fd1b77c7e89..eb8d2d6f9c65185f5fe16a13ab0cdbba
if (player != null) {
itemInHand.hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand()));
}
@@ -94,22 +103,24 @@ public class AxeItem extends Item {
@@ -94,22 +_,24 @@
&& !player.isSecondaryUseActive();
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
index cc363ba3bc719d8b93992141d779b4c1d1bbd2fb..571a0f27a86ab24a9f8750ce1ab802bfd64d9ccf 100644
--- a/net/minecraft/world/item/BlockItem.java
+++ b/net/minecraft/world/item/BlockItem.java
@@ -145,7 +145,16 @@ public class BlockItem extends Item {
@@ -145,7 +_,16 @@
}
protected boolean updateCustomBlockEntityTag(BlockPos pos, Level level, @Nullable Player player, ItemStack stack, BlockState state) {
@@ -26,7 +18,7 @@ index cc363ba3bc719d8b93992141d779b4c1d1bbd2fb..571a0f27a86ab24a9f8750ce1ab802bf
}
@Nullable
@@ -212,6 +221,7 @@ public class BlockItem extends Item {
@@ -212,6 +_,7 @@
}
if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission
@@ -34,7 +26,7 @@ index cc363ba3bc719d8b93992141d779b4c1d1bbd2fb..571a0f27a86ab24a9f8750ce1ab802bf
return customData.loadInto(blockEntity, level.registryAccess());
}
@@ -253,6 +263,7 @@ public class BlockItem extends Item {
@@ -253,6 +_,7 @@
public void onDestroyed(ItemEntity itemEntity) {
ItemContainerContents itemContainerContents = itemEntity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY);
if (itemContainerContents != null) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/BowItem.java b/net/minecraft/world/item/BowItem.java
index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b43bf9797c 100644
--- a/net/minecraft/world/item/BowItem.java
+++ b/net/minecraft/world/item/BowItem.java
@@ -28,6 +28,11 @@ public class BowItem extends ProjectileWeaponItem {
@@ -28,6 +_,11 @@
return false;
} else {
ItemStack projectile = player.getProjectile(stack);
@@ -20,7 +12,7 @@ index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b4
if (projectile.isEmpty()) {
return false;
} else {
@@ -38,7 +43,7 @@ public class BowItem extends ProjectileWeaponItem {
@@ -38,7 +_,7 @@
} else {
List<ItemStack> list = draw(stack, projectile, player);
if (level instanceof ServerLevel serverLevel && !list.isEmpty()) {
@@ -29,7 +21,7 @@ index c4c8775de328d40bb8218d993872be5249e8174d..ce1ce18410fc1d47d999c918a8f880b4
}
level.playSound(
@@ -89,7 +94,7 @@ public class BowItem extends ProjectileWeaponItem {
@@ -89,7 +_,7 @@
public InteractionResult use(Level level, Player player, InteractionHand hand) {
ItemStack itemInHand = player.getItemInHand(hand);
boolean flag = !player.getProjectile(itemInHand).isEmpty();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/BucketItem.java b/net/minecraft/world/item/BucketItem.java
index de287715568f358dd83383d68f845df9a7b5a117..8c7be8a71348a3e66c8bf6b6cb39fe002c20bdb0 100644
--- a/net/minecraft/world/item/BucketItem.java
+++ b/net/minecraft/world/item/BucketItem.java
@@ -147,7 +147,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -147,7 +_,7 @@
// CraftBukkit end
if (!flag) {
return hitResult != null && this.emptyContents(entity, level, hitResult.getBlockPos().relative(hitResult.getDirection()), null, direction, clicked, itemstack, hand); // CraftBukkit
@@ -17,7 +9,7 @@ index de287715568f358dd83383d68f845df9a7b5a117..8c7be8a71348a3e66c8bf6b6cb39fe00
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
@@ -156,7 +156,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -156,7 +_,7 @@
);
for (int i = 0; i < 8; i++) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java
index 4c5a751bc5618a19ac6355564189cb283a01eb98..9275ba72415beaa4e495cae81674fd14ec671156 100644
--- a/net/minecraft/world/item/CrossbowItem.java
+++ b/net/minecraft/world/item/CrossbowItem.java
@@ -66,7 +66,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
@@ -66,7 +_,7 @@
ItemStack itemInHand = player.getItemInHand(hand);
ChargedProjectiles chargedProjectiles = itemInHand.get(DataComponents.CHARGED_PROJECTILES);
if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/DyeColor.java b/net/minecraft/world/item/DyeColor.java
index 63751ad67d44bb20912870df5d0d2b2fee4d8cec..6bac07817d2916c64f703586599a2cab226872e6 100644
--- a/net/minecraft/world/item/DyeColor.java
+++ b/net/minecraft/world/item/DyeColor.java
@@ -126,4 +126,10 @@ public enum DyeColor implements StringRepresentable {
@@ -126,4 +_,10 @@
private static CraftingInput makeCraftColorInput(DyeColor first, DyeColor second) {
return CraftingInput.of(2, 1, List.of(new ItemStack(DyeItem.byColor(first)), new ItemStack(DyeItem.byColor(second))));
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/EggItem.java b/net/minecraft/world/item/EggItem.java
index ccae6089cdc4fffca7d759252006a13c2c14691a..c4097bd6acf671ddf857350154e6e1a04e76d64b 100644
--- a/net/minecraft/world/item/EggItem.java
+++ b/net/minecraft/world/item/EggItem.java
@@ -24,7 +24,7 @@ public class EggItem extends Item implements ProjectileItem {
@@ -24,7 +_,7 @@
public InteractionResult use(Level level, Player player, InteractionHand hand) {
ItemStack itemInHand = player.getItemInHand(hand);
// Paper start

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/EndCrystalItem.java b/net/minecraft/world/item/EndCrystalItem.java
index 05ec512839898f96d9769bb0d00f6ba11dda0c4b..6e4a3c9c090a68bf5785a01d815c275411859c7b 100644
--- a/net/minecraft/world/item/EndCrystalItem.java
+++ b/net/minecraft/world/item/EndCrystalItem.java
@@ -24,7 +24,7 @@ public class EndCrystalItem extends Item {
@@ -24,7 +_,7 @@
Level level = context.getLevel();
BlockPos clickedPos = context.getClickedPos();
BlockState blockState = level.getBlockState(clickedPos);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/EnderpearlItem.java b/net/minecraft/world/item/EnderpearlItem.java
index 3becd19d3264fa631497e967656cc7ca39252586..f824f155549857d5205ba67eb5916e0b0b65efb4 100644
--- a/net/minecraft/world/item/EnderpearlItem.java
+++ b/net/minecraft/world/item/EnderpearlItem.java
@@ -24,7 +24,7 @@ public class EnderpearlItem extends Item {
@@ -24,7 +_,7 @@
if (level instanceof ServerLevel serverLevel) {
// CraftBukkit start
// Paper start - PlayerLaunchProjectileEvent
@@ -17,7 +9,7 @@ index 3becd19d3264fa631497e967656cc7ca39252586..f824f155549857d5205ba67eb5916e0b
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemInHand), (org.bukkit.entity.Projectile) thrownEnderpearl.projectile().getBukkitEntity());
if (event.callEvent() && thrownEnderpearl.attemptSpawn()) {
if (event.shouldConsume()) {
@@ -44,6 +44,7 @@ public class EnderpearlItem extends Item {
@@ -44,6 +_,7 @@
0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)
);
player.awardStat(Stats.ITEM_USED.get(this));

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/HoeItem.java b/net/minecraft/world/item/HoeItem.java
index 3bf3d4030c4da65fa386a8b8083d259a6046d15e..77a8d5d334cd93d23149afa8e58f4114412632df 100644
--- a/net/minecraft/world/item/HoeItem.java
+++ b/net/minecraft/world/item/HoeItem.java
@@ -45,15 +45,25 @@ public class HoeItem extends Item {
@@ -45,15 +_,25 @@
public InteractionResult useOn(UseOnContext context) {
Level level = context.getLevel();
BlockPos clickedPos = context.getClickedPos();

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..6de42886ed681b5e00903f0d213e4d2fcaea1482 100644
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -458,6 +458,7 @@ public final class ItemStack implements DataComponentHolder {
@@ -450,6 +_,7 @@
// revert back all captured blocks
for (org.bukkit.block.BlockState blockstate : blocks) {
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace();
@@ -16,7 +8,7 @@ index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..6de42886ed681b5e00903f0d213e4d2f
}
SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
@@ -481,6 +482,7 @@ public final class ItemStack implements DataComponentHolder {
@@ -473,6 +_,7 @@
if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically
block.onPlace(serverLevel, newPos, oldBlock, true, context);
}
@@ -24,7 +16,7 @@ index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..6de42886ed681b5e00903f0d213e4d2f
serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
}
@@ -617,6 +619,26 @@ public final class ItemStack implements DataComponentHolder {
@@ -593,6 +_,26 @@
return this.isDamageableItem() && this.getDamageValue() > 0;
}
@@ -51,16 +43,16 @@ index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..6de42886ed681b5e00903f0d213e4d2f
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
@@ -1280,6 +1302,12 @@ public final class ItemStack implements DataComponentHolder {
@@ -1203,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}
+
+ // Purpur start - Config to allow unsafe enchants
+ public boolean hasEnchantment(Holder<Enchantment> enchantment) {
+ return this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).getLevel(enchantment) > 0;
+ }
+ // Purpur end - Config to allow unsafe enchants
+
public ItemEnchantments getEnchantments() {
return this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY);
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/Items.java b/net/minecraft/world/item/Items.java
index ae228cd15342ac159dd61bf4d09c2d80b7f44fee..4afa2d9f5825ccc70492b9c3d82ac5616d6f7faa 100644
--- a/net/minecraft/world/item/Items.java
+++ b/net/minecraft/world/item/Items.java
@@ -382,7 +382,7 @@ public class Items {
@@ -383,7 +_,7 @@
public static final Item PURPUR_BLOCK = registerBlock(Blocks.PURPUR_BLOCK);
public static final Item PURPUR_PILLAR = registerBlock(Blocks.PURPUR_PILLAR);
public static final Item PURPUR_STAIRS = registerBlock(Blocks.PURPUR_STAIRS);
@@ -17,7 +9,7 @@ index ae228cd15342ac159dd61bf4d09c2d80b7f44fee..4afa2d9f5825ccc70492b9c3d82ac561
public static final Item CREAKING_HEART = registerBlock(Blocks.CREAKING_HEART);
public static final Item CHEST = registerBlock(Blocks.CHEST, properties -> properties.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY));
public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE);
@@ -2034,7 +2034,7 @@ public class Items {
@@ -2089,7 +_,7 @@
"sweet_berries", createBlockItemWithCustomItemName(Blocks.SWEET_BERRY_BUSH), new Item.Properties().food(Foods.SWEET_BERRIES)
);
public static final Item GLOW_BERRIES = registerItem(

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/MapItem.java b/net/minecraft/world/item/MapItem.java
index ba0b254d43651bca1f29b5272af05d068fc37ba8..780793750c99185e8139a1cd0ad52bc7b80899a9 100644
--- a/net/minecraft/world/item/MapItem.java
+++ b/net/minecraft/world/item/MapItem.java
@@ -194,6 +194,7 @@ public class MapItem extends Item {
@@ -194,6 +_,7 @@
public static void renderBiomePreviewMap(ServerLevel serverLevel, ItemStack stack) {
MapItemSavedData savedData = getSavedData(stack, serverLevel);
if (savedData != null) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/NameTagItem.java b/net/minecraft/world/item/NameTagItem.java
index a928124ee46a10e9033f771970198e36712917a6..65ff8078474d5039238e9398d8cfc12e79cc6524 100644
--- a/net/minecraft/world/item/NameTagItem.java
+++ b/net/minecraft/world/item/NameTagItem.java
@@ -24,6 +24,7 @@ public class NameTagItem extends Item {
@@ -24,6 +_,7 @@
LivingEntity newEntity = ((org.bukkit.craftbukkit.entity.CraftLivingEntity) event.getEntity()).getHandle();
newEntity.setCustomName(event.getName() != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(event.getName()) : null);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/ProjectileWeaponItem.java b/net/minecraft/world/item/ProjectileWeaponItem.java
index 1a9f91f3ee9c4d3902106eebd2639cc85a0dc34c..fb5077450aa9f7b7a03dd20c27a68dfdaab5ef06 100644
--- a/net/minecraft/world/item/ProjectileWeaponItem.java
+++ b/net/minecraft/world/item/ProjectileWeaponItem.java
@@ -109,6 +109,8 @@ public abstract class ProjectileWeaponItem extends Item {
@@ -109,6 +_,8 @@
abstractArrow.setCritArrow(true);
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java
index 887ac9f547ceaf76fd533ae47239a64c29a64b18..a290ad578498da07093ea31080cc3fbc87aa3778 100644
--- a/net/minecraft/world/item/ShovelItem.java
+++ b/net/minecraft/world/item/ShovelItem.java
@@ -46,9 +46,12 @@ public class ShovelItem extends Item {
@@ -46,9 +_,12 @@
BlockState blockState1 = FLATTENABLES.get(blockState.getBlock());
BlockState blockState2 = null;
Runnable afterAction = null; // Paper

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/SnowballItem.java b/net/minecraft/world/item/SnowballItem.java
index 8eec16040fb9ae6bcccbd71bbe93521cdce5ccce..38b82537209449407922491506a7ca6224229ca9 100644
--- a/net/minecraft/world/item/SnowballItem.java
+++ b/net/minecraft/world/item/SnowballItem.java
@@ -26,7 +26,7 @@ public class SnowballItem extends Item implements ProjectileItem {
@@ -26,7 +_,7 @@
// CraftBukkit start - moved down
if (level instanceof ServerLevel serverLevel) {
// Paper start - PlayerLaunchProjectileEvent

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/SpawnEggItem.java b/net/minecraft/world/item/SpawnEggItem.java
index 7a961e5ebbdac061f6e73e4ed07fe957ba759066..d48c1dedbd39770ccf3c9c3ff3351b391601cd77 100644
--- a/net/minecraft/world/item/SpawnEggItem.java
+++ b/net/minecraft/world/item/SpawnEggItem.java
@@ -57,6 +57,23 @@ public class SpawnEggItem extends Item {
@@ -57,6 +_,23 @@
if (level.getBlockEntity(clickedPos) instanceof Spawner spawner) {
if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation
EntityType<?> type = this.getType(level.registryAccess(), itemInHand);

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/ThrowablePotionItem.java b/net/minecraft/world/item/ThrowablePotionItem.java
index 86198fb3150409b4b3e123982d8d3ba40b774621..6495c82fb88062875024c59a7c29d6d18b7a2f41 100644
--- a/net/minecraft/world/item/ThrowablePotionItem.java
+++ b/net/minecraft/world/item/ThrowablePotionItem.java
@@ -24,7 +24,7 @@ public abstract class ThrowablePotionItem extends PotionItem implements Projecti
@@ -24,7 +_,7 @@
ItemStack itemInHand = player.getItemInHand(hand);
if (level instanceof ServerLevel serverLevel) {
// Paper start - PlayerLaunchProjectileEvent

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java
index df629e3f2defce5e65aaf874d7c5ddff71f39c28..122e24ed6fb319c951841ac8ef328c5eb70514d4 100644
--- a/net/minecraft/world/item/TridentItem.java
+++ b/net/minecraft/world/item/TridentItem.java
@@ -83,7 +83,7 @@ public class TridentItem extends Item implements ProjectileItem {
@@ -83,7 +_,7 @@
if (tridentSpinAttackStrength == 0.0F) {
ItemStack itemStack = stack.copyWithCount(1); // Paper
Projectile.Delayed<ThrownTrident> tridentDelayed = Projectile.spawnProjectileFromRotationDelayed( // Paper - PlayerLaunchProjectileEvent(
@@ -17,7 +9,7 @@ index df629e3f2defce5e65aaf874d7c5ddff71f39c28..122e24ed6fb319c951841ac8ef328c5e
);
// Paper start - PlayerLaunchProjectileEvent
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), (org.bukkit.entity.Projectile) tridentDelayed.projectile().getBukkitEntity());
@@ -94,6 +94,7 @@ public class TridentItem extends Item implements ProjectileItem {
@@ -94,6 +_,7 @@
return false;
}
ThrownTrident thrownTrident = tridentDelayed.projectile(); // Paper - PlayerLaunchProjectileEvent

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
index 41e1e076a4567d3d3202cf8e426a1ebb391d85e8..2d710dd3f20cbea06c16f14a558b575b369c6ca2 100644
--- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
+++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
@@ -20,6 +20,12 @@ public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect {
@@ -20,6 +_,12 @@
@Override
// CraftBukkit start
public boolean apply(Level level, ItemStack stack, LivingEntity entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java
index b86bc2e0aca5a7ef5b01be6a21c3a8bcd1ebcca0..7afb0ee8f92f4241ce3ebcd8e5fd9f50033e3a42 100644
--- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java
+++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java
@@ -608,4 +608,58 @@ public class EnchantmentHelper {
@@ -606,4 +_,58 @@
interface EnchantmentVisitor {
void accept(Holder<Enchantment> enchantment, int level);
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/enchantment/ItemEnchantments.java b/net/minecraft/world/item/enchantment/ItemEnchantments.java
index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a9641960091bf5 100644
--- a/net/minecraft/world/item/enchantment/ItemEnchantments.java
+++ b/net/minecraft/world/item/enchantment/ItemEnchantments.java
@@ -32,7 +32,7 @@ public class ItemEnchantments implements TooltipProvider {
@@ -32,7 +_,7 @@
private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName);
public static final ItemEnchantments EMPTY = new ItemEnchantments(new it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER));
// Paper end - sort enchantments
@@ -17,7 +9,7 @@ index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a96419
public static final Codec<ItemEnchantments> CODEC = Codec.unboundedMap(Enchantment.CODEC, LEVEL_CODEC)
.xmap(
map -> new net.minecraft.world.item.enchantment.ItemEnchantments(net.minecraft.Util.make(new it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), m -> m.putAll(map))), // Paper - sort enchantments
@@ -50,7 +50,7 @@ public class ItemEnchantments implements TooltipProvider {
@@ -50,7 +_,7 @@
for (Entry<Holder<Enchantment>> entry : enchantments.object2IntEntrySet()) {
int intValue = entry.getIntValue();
@@ -26,7 +18,7 @@ index 6040b73a5351c3eb166250566b5c2385cee39ee0..29619b87fe19c66934fe5aaee8a96419
throw new IllegalArgumentException("Enchantment " + entry.getKey() + " has invalid level " + intValue);
}
}
@@ -133,13 +133,13 @@ public class ItemEnchantments implements TooltipProvider {
@@ -133,13 +_,13 @@
if (level <= 0) {
this.enchantments.removeInt(enchantment);
} else {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java
index 9333c63f217e1207eced37c5be150e192f2fcc3e..156cee58134ada34d249aab948c02adac4f6745a 100644
--- a/net/minecraft/world/item/trading/MerchantOffer.java
+++ b/net/minecraft/world/item/trading/MerchantOffer.java
@@ -143,7 +143,12 @@ public class MerchantOffer {
@@ -143,7 +_,12 @@
}
public void updateDemand() {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java
index 892a7c1eb1b321ca6d5ca709142e7feae1220815..7719bc8ff1fbbc67cdf15e1fec28dc9233cea207 100644
--- a/net/minecraft/world/level/EntityGetter.java
+++ b/net/minecraft/world/level/EntityGetter.java
@@ -185,7 +185,7 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst
@@ -144,7 +_,7 @@
default boolean hasNearbyAlivePlayer(double x, double y, double z, double distance) {
for (Player player : this.players()) {

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 418d3958b7510d469142178f9427c829b6387d83..801c4e8e01590beeb3633275f58d436d87ad746e 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -160,11 +160,55 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -152,11 +_,55 @@
}
// Paper end - add paper world config
@@ -64,8 +56,8 @@ index 418d3958b7510d469142178f9427c829b6387d83..801c4e8e01590beeb3633275f58d436d
public CraftWorld getWorld() {
return this.world;
}
@@ -840,6 +884,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
// Paper end - getblock optimisations - cache world height/sections
@@ -199,6 +_,8 @@
) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName(), environment); // Purpur - Purpur config files
@@ -73,7 +65,7 @@ index 418d3958b7510d469142178f9427c829b6387d83..801c4e8e01590beeb3633275f58d436d
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2127,4 +2173,14 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1407,4 +_,14 @@
return this.id;
}
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
index 14a2514a408a66a83f7b5fb43b4c4dc8f23fd5f4..fa06ecacc27f619853c8db76d909ab4ba75dc529 100644
--- a/net/minecraft/world/level/NaturalSpawner.java
+++ b/net/minecraft/world/level/NaturalSpawner.java
@@ -261,7 +261,7 @@ public final class NaturalSpawner {
@@ -206,7 +_,7 @@
mutableBlockPos.set(x, y, z);
double d = x + 0.5;
double d1 = z + 0.5;

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java
index e8bac6deb63e0f94fb5f8b38602b2e3333e5fa8d..b14736c25cfdd94c6e3f159e53865150b06edef6 100644
--- a/net/minecraft/world/level/block/AnvilBlock.java
+++ b/net/minecraft/world/level/block/AnvilBlock.java
@@ -54,6 +54,53 @@ public class AnvilBlock extends FallingBlock {
@@ -54,6 +_,53 @@
return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getClockWise());
}

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/level/block/AzaleaBlock.java b/net/minecraft/world/level/block/AzaleaBlock.java
index 435a455ad2ec3dfb142d570a51a720bc6c49dac3..32a1dc20202bad7a15794e98cdc1bf2fb2ad5308 100644
--- a/net/minecraft/world/level/block/AzaleaBlock.java
+++ b/net/minecraft/world/level/block/AzaleaBlock.java
@@ -50,6 +50,20 @@ public class AzaleaBlock extends VegetationBlock implements BonemealableBlock {
@@ -50,6 +_,20 @@
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {

Some files were not shown because too many files have changed in this diff Show More