mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
convert file patches to git patches
This commit is contained in:
@@ -1,6 +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/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 22d91f99c50e3b3b88ccab4eb5d1b71be5a9dcd8..b8a0abd1cbdc0c86ae9e68ebaeec14cd4728450e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -141,6 +_,7 @@
|
||||
@@ -141,6 +141,7 @@ import net.minecraft.world.scores.Team;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
|
||||
@@ -8,7 +16,7 @@
|
||||
// CraftBukkit start
|
||||
private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -260,8 +_,9 @@
|
||||
@@ -260,8 +261,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public double xOld;
|
||||
public double yOld;
|
||||
public double zOld;
|
||||
@@ -19,7 +27,7 @@
|
||||
public int tickCount;
|
||||
private int remainingFireTicks = -this.getFireImmuneTicks();
|
||||
public boolean wasTouchingWater;
|
||||
@@ -295,8 +_,8 @@
|
||||
@@ -295,8 +297,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public PortalProcessor portalProcess;
|
||||
public int portalCooldown;
|
||||
private boolean invulnerable;
|
||||
@@ -30,7 +38,7 @@
|
||||
private boolean hasGlowingTag;
|
||||
private final Set<String> tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl
|
||||
private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
|
||||
@@ -350,6 +_,7 @@
|
||||
@@ -350,6 +352,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
@@ -38,7 +46,7 @@
|
||||
|
||||
public void inactiveTick() {
|
||||
}
|
||||
@@ -512,10 +_,21 @@
|
||||
@@ -512,10 +515,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// Paper end - optimise entity tracker
|
||||
|
||||
@@ -60,7 +68,7 @@
|
||||
this.position = Vec3.ZERO;
|
||||
this.blockPosition = BlockPos.ZERO;
|
||||
this.chunkPosition = ChunkPos.ZERO;
|
||||
@@ -885,6 +_,7 @@
|
||||
@@ -885,6 +899,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
||||
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
// Paper end - Configurable nether ceiling damage
|
||||
@@ -68,7 +76,7 @@
|
||||
this.onBelowWorld();
|
||||
}
|
||||
}
|
||||
@@ -1830,7 +_,7 @@
|
||||
@@ -1830,7 +1845,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean fireImmune() {
|
||||
@@ -77,7 +85,7 @@
|
||||
}
|
||||
|
||||
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
@@ -1890,7 +_,7 @@
|
||||
@@ -1890,7 +1905,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.isInWater() || flag;
|
||||
}
|
||||
|
||||
@@ -86,7 +94,7 @@
|
||||
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
|
||||
this.wasTouchingWater = false;
|
||||
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
|
||||
@@ -2516,6 +_,13 @@
|
||||
@@ -2516,6 +2531,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
compound.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -100,7 +108,7 @@
|
||||
return compound;
|
||||
} catch (Throwable var8) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT");
|
||||
@@ -2646,6 +_,13 @@
|
||||
@@ -2646,6 +2668,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false);
|
||||
}
|
||||
// Paper end
|
||||
@@ -114,7 +122,7 @@
|
||||
} catch (Throwable var8) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
||||
@@ -2874,6 +_,7 @@
|
||||
@@ -2874,6 +2903,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.isAlive() && this instanceof Leashable leashable) {
|
||||
if (leashable.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -122,7 +130,7 @@
|
||||
// CraftBukkit start - fire PlayerUnleashEntityEvent
|
||||
// Paper start - Expand EntityUnleashEvent
|
||||
org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
|
||||
@@ -3190,15 +_,18 @@
|
||||
@@ -3190,15 +3220,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return Vec3.directionFromRotation(this.getRotationVector());
|
||||
}
|
||||
|
||||
@@ -142,7 +150,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3403,7 +_,7 @@
|
||||
@@ -3403,7 +3436,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
@@ -151,7 +159,7 @@
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
@@ -3931,7 +_,7 @@
|
||||
@@ -3931,7 +3964,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit end
|
||||
|
||||
public boolean canUsePortal(boolean allowPassengers) {
|
||||
@@ -160,7 +168,7 @@
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
@@ -4468,6 +_,12 @@
|
||||
@@ -4468,6 +4501,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return Mth.lerp(partialTick, this.yRotO, this.yRot);
|
||||
}
|
||||
|
||||
@@ -173,7 +181,7 @@
|
||||
// Paper start - optimise collisions
|
||||
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
|
||||
if (this.touchingUnloadedChunk()) {
|
||||
@@ -4876,7 +_,7 @@
|
||||
@@ -4876,7 +4915,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public float maxUpStep() {
|
||||
|
||||
@@ -1,6 +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/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 +_,8 @@
|
||||
@@ -28,6 +28,8 @@ public final class EntitySelector {
|
||||
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
|
||||
|
||||
@@ -1,6 +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/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||
index ed11697d81789ee6cd48ee2de2c9fcb8ff2be0d4..d6a0ad078fd1f0350afaac3f1743896d73b015e1 100644
|
||||
--- a/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/net/minecraft/world/entity/EntityType.java
|
||||
@@ -1095,6 +_,16 @@
|
||||
@@ -1095,6 +1095,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
return register(vanillaEntityId(key), builder);
|
||||
}
|
||||
|
||||
@@ -17,7 +25,7 @@
|
||||
public static ResourceLocation getKey(EntityType<?> entityType) {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entityType);
|
||||
}
|
||||
@@ -1325,6 +_,16 @@
|
||||
@@ -1325,6 +1335,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
return this.category;
|
||||
}
|
||||
|
||||
@@ -34,7 +42,7 @@
|
||||
public String getDescriptionId() {
|
||||
return this.descriptionId;
|
||||
}
|
||||
@@ -1384,7 +_,11 @@
|
||||
@@ -1384,7 +1404,11 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
entity.load(tag);
|
||||
},
|
||||
// Paper end - Don't fire sync event during generation
|
||||
|
||||
@@ -1,6 +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/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index c97a0e500e889b406cb2d679a3870715775f5393..81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5 100644
|
||||
--- a/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -328,7 +_,7 @@
|
||||
@@ -328,7 +328,7 @@ public class ExperienceOrb extends Entity {
|
||||
public void playerTouch(Player entity) {
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
|
||||
@@ -9,7 +17,7 @@
|
||||
entity.take(this, 1);
|
||||
int i = this.repairPlayerItems(serverPlayer, this.getValue());
|
||||
if (i > 0) {
|
||||
@@ -344,7 +_,7 @@
|
||||
@@ -344,7 +344,7 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
private int repairPlayerItems(ServerPlayer player, int value) {
|
||||
|
||||
@@ -1,6 +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/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 +_,13 @@
|
||||
@@ -26,6 +26,13 @@ public class GlowSquid extends Squid {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..20d9856daa5ef4c42010381091c2a85e0755fa77 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -430,6 +_,12 @@
|
||||
@@ -430,6 +430,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (d < 0.0) {
|
||||
double damagePerBlock = serverLevel1.getWorldBorder().getDamagePerBlock();
|
||||
if (damagePerBlock > 0.0) {
|
||||
@@ -13,7 +21,7 @@
|
||||
this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock)));
|
||||
}
|
||||
}
|
||||
@@ -442,10 +_,10 @@
|
||||
@@ -442,10 +448,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
&& (!flag || !((Player)this).getAbilities().invulnerable);
|
||||
if (flag1) {
|
||||
this.setAirSupply(this.decreaseAirSupply(this.getAirSupply()));
|
||||
@@ -26,7 +34,7 @@
|
||||
}
|
||||
} else if (this.getAirSupply() < this.getMaxAirSupply()) {
|
||||
this.setAirSupply(this.increaseAirSupply(this.getAirSupply()));
|
||||
@@ -1014,14 +_,32 @@
|
||||
@@ -1014,15 +1020,33 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (lookingEntity != null) {
|
||||
ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.HEAD);
|
||||
EntityType<?> type = lookingEntity.getType();
|
||||
@@ -36,15 +44,13 @@
|
||||
- || type == EntityType.PIGLIN_BRUTE && itemBySlot.is(Items.PIGLIN_HEAD)
|
||||
- || type == EntityType.CREEPER && itemBySlot.is(Items.CREEPER_HEAD)) {
|
||||
- d *= 0.5;
|
||||
- }
|
||||
- }
|
||||
+ // Purpur start - Mob head visibility percent
|
||||
+ if (type == EntityType.SKELETON && itemBySlot.is(Items.SKELETON_SKULL)) {
|
||||
+ d *= lookingEntity.level().purpurConfig.skeletonHeadVisibilityPercent;
|
||||
+ }
|
||||
+ else if (type == EntityType.ZOMBIE && itemBySlot.is(Items.ZOMBIE_HEAD)) {
|
||||
+ d *= lookingEntity.level().purpurConfig.zombieHeadVisibilityPercent;
|
||||
+ }
|
||||
}
|
||||
+ else if ((type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE) && itemBySlot.is(Items.PIGLIN_HEAD)) {
|
||||
+ d *= lookingEntity.level().purpurConfig.piglinHeadVisibilityPercent;
|
||||
+ }
|
||||
@@ -52,8 +58,8 @@
|
||||
+ d *= lookingEntity.level().purpurConfig.creeperHeadVisibilityPercent;
|
||||
+ }
|
||||
+ // Purpur end - Mob head visibility percent
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ // Purpur start - Configurable mob blindness
|
||||
+ if (lookingEntity instanceof LivingEntity entityliving) {
|
||||
+ if (entityliving.hasEffect(MobEffects.BLINDNESS)) {
|
||||
@@ -64,10 +70,11 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - Configurable mob blindness
|
||||
|
||||
+
|
||||
return d;
|
||||
}
|
||||
@@ -1068,6 +_,7 @@
|
||||
|
||||
@@ -1068,6 +1092,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Iterator<MobEffectInstance> iterator = this.activeEffects.values().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectInstance effect = iterator.next();
|
||||
@@ -75,7 +82,7 @@
|
||||
EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED);
|
||||
if (event.isCancelled()) {
|
||||
continue;
|
||||
@@ -1385,6 +_,24 @@
|
||||
@@ -1385,6 +1410,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.stopSleeping();
|
||||
}
|
||||
|
||||
@@ -100,7 +107,7 @@
|
||||
this.noActionTime = 0;
|
||||
if (amount < 0.0F) {
|
||||
amount = 0.0F;
|
||||
@@ -1646,10 +_,10 @@
|
||||
@@ -1646,10 +1689,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) {
|
||||
Entity entity = damageSource.getEntity();
|
||||
if (entity instanceof Player player) {
|
||||
@@ -113,7 +120,7 @@
|
||||
} else {
|
||||
this.lastHurtByPlayer = null;
|
||||
this.lastHurtByPlayerMemoryTime = 0;
|
||||
@@ -1700,6 +_,18 @@
|
||||
@@ -1700,6 +1743,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +139,7 @@
|
||||
final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
|
||||
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
|
||||
event.setCancelled(itemStack == null);
|
||||
@@ -1875,6 +_,7 @@
|
||||
@@ -1875,6 +1930,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
boolean flag = this.lastHurtByPlayerMemoryTime > 0;
|
||||
this.dropEquipment(level); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot() && level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@@ -140,7 +147,7 @@
|
||||
this.dropFromLootTable(level, damageSource, flag);
|
||||
// Paper start
|
||||
final boolean prev = this.clearEquipmentSlots;
|
||||
@@ -1883,6 +_,7 @@
|
||||
@@ -1883,6 +1939,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
// Paper end
|
||||
this.dropCustomDeathLoot(level, damageSource, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
@@ -148,7 +155,7 @@
|
||||
}
|
||||
|
||||
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
|
||||
@@ -3057,6 +_,7 @@
|
||||
@@ -3057,6 +3114,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
float f = (float)(d * 10.0 - 3.0);
|
||||
if (f > 0.0F) {
|
||||
this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F);
|
||||
@@ -156,16 +163,16 @@
|
||||
this.hurt(this.damageSources().flyIntoWall(), f);
|
||||
}
|
||||
}
|
||||
@@ -4451,6 +_,12 @@
|
||||
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
|
||||
@@ -4452,6 +4510,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
|
||||
}
|
||||
+
|
||||
|
||||
+ // Purpur start - Dispenser curse of binding protection
|
||||
+ public @Nullable EquipmentSlot getEquipmentSlotForDispenserItem(ItemStack itemstack) {
|
||||
+ return EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.BINDING_CURSE, itemstack) > 0 ? null : this.getEquipmentSlotForItem(itemstack);
|
||||
+ }
|
||||
+ // Purpur end - Dispenser curse of binding protection
|
||||
|
||||
+
|
||||
private static SlotAccess createEquipmentSlotAccess(LivingEntity entity, EquipmentSlot slot) {
|
||||
return slot != EquipmentSlot.HEAD && slot != EquipmentSlot.MAINHAND && slot != EquipmentSlot.OFFHAND
|
||||
? SlotAccess.forEquipmentSlot(entity, slot, itemStack -> itemStack.isEmpty() || entity.getEquipmentSlotForItem(itemStack) == slot)
|
||||
|
||||
@@ -1,6 +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/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..e3b804f2d612ed7971db450aeea6768109b63470 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -136,6 +_,7 @@
|
||||
@@ -136,6 +136,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
private BlockPos restrictCenter = BlockPos.ZERO;
|
||||
private float restrictRadius = -1.0F;
|
||||
public boolean aware = true; // CraftBukkit
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
protected Mob(EntityType<? extends Mob> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -281,6 +_,7 @@
|
||||
@@ -281,6 +282,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
@@ -16,14 +24,13 @@
|
||||
this.target = target;
|
||||
return true;
|
||||
// CraftBukkit end
|
||||
@@ -324,7 +_,27 @@
|
||||
@@ -324,8 +326,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
}
|
||||
|
||||
profilerFiller.pop();
|
||||
- }
|
||||
+ incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ // Purpur start - Entity lifespan
|
||||
+ private void incrementTicksSinceLastInteraction() {
|
||||
+ ++this.ticksSinceLastInteraction;
|
||||
@@ -42,10 +49,11 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - Entity lifespan
|
||||
|
||||
+
|
||||
@Override
|
||||
protected void playHurtSound(DamageSource source) {
|
||||
@@ -420,6 +_,7 @@
|
||||
this.resetAmbientSoundTime();
|
||||
@@ -420,6 +442,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
compound.putBoolean("NoAI", this.isNoAi());
|
||||
}
|
||||
compound.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit
|
||||
@@ -53,7 +61,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -443,6 +_,7 @@
|
||||
@@ -443,6 +466,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
this.lootTableSeed = compound.getLongOr("DeathLootTableSeed", 0L);
|
||||
this.setNoAi(compound.getBooleanOr("NoAI", false));
|
||||
this.aware = compound.getBooleanOr("Bukkit.Aware", true); // CraftBukkit
|
||||
@@ -61,7 +69,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1167,7 +_,7 @@
|
||||
@@ -1167,7 +1191,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
);
|
||||
}
|
||||
|
||||
@@ -70,7 +78,7 @@
|
||||
return spawnGroupData;
|
||||
}
|
||||
|
||||
@@ -1499,6 +_,7 @@
|
||||
@@ -1499,6 +1523,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
this.playAttackSound();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -29,6 +29,7 @@ public class RangedAttribute extends Attribute {
|
||||
|
||||
@Override
|
||||
public double sanitizeValue(double value) {
|
||||
|
||||
@@ -1,6 +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/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
index b9174ae7e3a3e2de2d570b95ab5012ac3c3a2eda..67cbf9f5760fae5db6f31e64095cd1b6be6ade8e 100644
|
||||
--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
@@ -86,7 +_,7 @@
|
||||
@@ -86,7 +86,7 @@ public class AcquirePoi {
|
||||
};
|
||||
// Paper start - optimise POI access
|
||||
final java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -55,7 +55,7 @@ public class InteractWithDoor {
|
||||
Node nextNode = path.getNextNode();
|
||||
BlockPos blockPos = previousNode.asBlockPos();
|
||||
BlockState blockState = level.getBlockState(blockPos);
|
||||
@@ -9,7 +17,7 @@
|
||||
DoorBlock doorBlock = (DoorBlock)blockState.getBlock();
|
||||
if (!doorBlock.isOpen(blockState)) {
|
||||
// CraftBukkit start - entities opening doors
|
||||
@@ -72,7 +_,7 @@
|
||||
@@ -72,7 +72,7 @@ public class InteractWithDoor {
|
||||
|
||||
BlockPos blockPos1 = nextNode.asBlockPos();
|
||||
BlockState blockState1 = level.getBlockState(blockPos1);
|
||||
@@ -18,7 +26,7 @@
|
||||
DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock();
|
||||
if (!doorBlock1.isOpen(blockState1)) {
|
||||
// CraftBukkit start - entities opening doors
|
||||
@@ -118,7 +_,7 @@
|
||||
@@ -118,7 +118,7 @@ public class InteractWithDoor {
|
||||
iterator.remove();
|
||||
} else {
|
||||
BlockState blockState = level.getBlockState(blockPos);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -46,6 +46,7 @@ public class ShowTradesToPlayer extends Behavior<Villager> {
|
||||
|
||||
@Override
|
||||
public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) {
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -22,6 +22,7 @@ public class LlamaFollowCaravanGoal extends Goal {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@@ -8,7 +16,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -71,6 +72,7 @@ public class LlamaFollowCaravanGoal extends Goal {
|
||||
|
||||
@Override
|
||||
public boolean canContinueToUse() {
|
||||
|
||||
@@ -1,6 +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/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 +_,9 @@
|
||||
@@ -116,9 +116,9 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||
}
|
||||
|
||||
this.mob.lookAt(target, 30.0F, 30.0F);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -58,7 +58,7 @@ public class RunAroundLikeCrazyGoal extends Goal {
|
||||
if (firstPassenger instanceof Player player) {
|
||||
int temper = this.horse.getTemper();
|
||||
int maxTemper = this.horse.getMaxTemper();
|
||||
|
||||
@@ -1,6 +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/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 +_,14 @@
|
||||
@@ -55,6 +55,14 @@ public class SwellGoal extends Goal {
|
||||
this.creeper.setSwellDir(-1);
|
||||
} else {
|
||||
this.creeper.setSwellDir(1);
|
||||
|
||||
@@ -1,6 +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/ai/sensing/NearestBedSensor.java b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
|
||||
index 066faa704338c573472381e1ebd063e0d52aaaa4..1f96fd5085bacb4c584576c7cb9f51e7898e9b03 100644
|
||||
--- a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
|
||||
@@ -56,7 +_,7 @@
|
||||
@@ -56,7 +56,7 @@ public class NearestBedSensor extends Sensor<Mob> {
|
||||
// Paper start - optimise POI access
|
||||
java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
|
||||
// don't ask me why it's unbounded. ask mojang.
|
||||
|
||||
@@ -1,6 +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/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 +_,10 @@
|
||||
@@ -64,6 +64,10 @@ public class TargetingConditions {
|
||||
return false;
|
||||
} else if (this.selector != null && !this.selector.test(target, level)) {
|
||||
return false;
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -232,7 +232,7 @@ public class Bat extends AmbientCreature {
|
||||
} else {
|
||||
int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos);
|
||||
int i = 4;
|
||||
@@ -9,7 +17,7 @@
|
||||
i = 7;
|
||||
} else if (randomSource.nextBoolean()) {
|
||||
return false;
|
||||
@@ -244,6 +_,11 @@
|
||||
@@ -244,6 +244,11 @@ public class Bat extends AmbientCreature {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -39,7 +39,7 @@ public abstract class AbstractCow extends Animal {
|
||||
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));
|
||||
@@ -9,7 +17,7 @@
|
||||
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 +_,10 @@
|
||||
@@ -95,6 +95,10 @@ public abstract class AbstractCow extends Animal {
|
||||
ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
|
||||
player.setItemInHand(hand, itemStack);
|
||||
return InteractionResult.SUCCESS;
|
||||
@@ -20,7 +28,7 @@
|
||||
} else {
|
||||
return super.mobInteract(player, hand);
|
||||
}
|
||||
@@ -104,4 +_,67 @@
|
||||
@@ -104,4 +108,67 @@ public abstract class AbstractCow extends Animal {
|
||||
public EntityDimensions getDefaultDimensions(Pose pose) {
|
||||
return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose);
|
||||
}
|
||||
|
||||
@@ -1,6 +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/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java
|
||||
index b851f94d63a049292a3657009d68bc1641222104..2ce0099460c14a6dd8b128f268ee915ea4be5183 100644
|
||||
--- a/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -142,7 +_,7 @@
|
||||
@@ -142,7 +142,7 @@ public abstract class Animal extends AgeableMob {
|
||||
ItemStack itemInHand = player.getItemInHand(hand);
|
||||
if (this.isFood(itemInHand)) {
|
||||
int age = this.getAge();
|
||||
@@ -9,7 +17,7 @@
|
||||
final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying
|
||||
this.usePlayerItem(player, hand, itemInHand);
|
||||
this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying
|
||||
@@ -239,10 +_,20 @@
|
||||
@@ -239,10 +239,20 @@ public abstract class Animal extends AgeableMob {
|
||||
public void spawnChildFromBreeding(ServerLevel level, Animal mate) {
|
||||
AgeableMob breedOffspring = this.getBreedOffspring(level, mate);
|
||||
if (breedOffspring != null) {
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -167,7 +167,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
// Paper end - Fix MC-167279
|
||||
this.lookControl = new Bee.BeeLookControl(this);
|
||||
this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F);
|
||||
@@ -9,7 +17,7 @@
|
||||
this.setPathfindingMalus(PathType.WATER_BORDER, 16.0F);
|
||||
this.setPathfindingMalus(PathType.COCOA, -1.0F);
|
||||
this.setPathfindingMalus(PathType.FENCE, -1.0F);
|
||||
@@ -365,7 +_,7 @@
|
||||
@@ -365,7 +365,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
}
|
||||
|
||||
public static boolean isNightOrRaining(Level level) {
|
||||
@@ -18,7 +26,7 @@
|
||||
}
|
||||
|
||||
public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) {
|
||||
@@ -388,7 +_,7 @@
|
||||
@@ -388,7 +388,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@Override
|
||||
protected void customServerAiStep(ServerLevel level) {
|
||||
boolean hasStung = this.hasStung();
|
||||
@@ -27,7 +35,7 @@
|
||||
this.underWaterTicks++;
|
||||
} else {
|
||||
this.underWaterTicks = 0;
|
||||
@@ -398,6 +_,7 @@
|
||||
@@ -398,6 +398,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
this.hurtServer(level, this.damageSources().drown(), 1.0F);
|
||||
}
|
||||
|
||||
@@ -35,7 +43,7 @@
|
||||
if (hasStung) {
|
||||
this.timeSinceSting++;
|
||||
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {
|
||||
@@ -1135,6 +_,7 @@
|
||||
@@ -1135,6 +1136,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
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);
|
||||
@@ -43,7 +51,7 @@
|
||||
return true;
|
||||
} else {
|
||||
Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60);
|
||||
@@ -1181,6 +_,7 @@
|
||||
@@ -1181,6 +1183,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
this.pollinating = false;
|
||||
Bee.this.navigation.stop();
|
||||
Bee.this.remainingCooldownBeforeLocatingNewFlower = 200;
|
||||
@@ -51,7 +59,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1227,6 +_,7 @@
|
||||
@@ -1227,6 +1230,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
this.setWantedPos();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/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 +_,14 @@
|
||||
@@ -353,6 +353,14 @@ public class Cat extends TamableAnimal {
|
||||
return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal);
|
||||
}
|
||||
|
||||
@@ -15,7 +23,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public SpawnGroupData finalizeSpawn(
|
||||
@@ -451,7 +_,7 @@
|
||||
@@ -451,7 +459,7 @@ public class Cat extends TamableAnimal {
|
||||
}
|
||||
|
||||
private void tryToTame(Player player) {
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -73,6 +73,7 @@ public class Dolphin extends AgeableWaterCreature {
|
||||
private static final boolean DEFAULT_GOT_FISH = false;
|
||||
@Nullable
|
||||
public BlockPos treasurePos;
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
public Dolphin(EntityType<? extends Dolphin> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -89,6 +_,7 @@
|
||||
@@ -89,6 +90,7 @@ public class Dolphin extends AgeableWaterCreature {
|
||||
this.setAirSupply(this.getMaxAirSupply());
|
||||
this.setXRot(0.0F);
|
||||
SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F));
|
||||
@@ -16,7 +24,7 @@
|
||||
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1);
|
||||
}
|
||||
|
||||
@@ -155,17 +_,19 @@
|
||||
@@ -155,17 +157,19 @@ public class Dolphin extends AgeableWaterCreature {
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new BreathAirGoal(this));
|
||||
this.goalSelector.addGoal(0, new TryFindWaterGoal(this));
|
||||
@@ -37,7 +45,7 @@
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
@@ -398,6 +_,7 @@
|
||||
@@ -398,6 +402,7 @@ public class Dolphin extends AgeableWaterCreature {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
|
||||
@@ -1,6 +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/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 +_,11 @@
|
||||
@@ -345,6 +345,11 @@ public class Fox extends Animal {
|
||||
}
|
||||
|
||||
private void setTargetGoals() {
|
||||
@@ -12,7 +20,7 @@
|
||||
if (this.getVariant() == Fox.Variant.RED) {
|
||||
this.targetSelector.addGoal(4, this.landTargetGoal);
|
||||
this.targetSelector.addGoal(4, this.turtleEggTargetGoal);
|
||||
@@ -372,6 +_,7 @@
|
||||
@@ -372,6 +377,7 @@ public class Fox extends Animal {
|
||||
|
||||
public void setVariant(Fox.Variant variant) {
|
||||
this.entityData.set(DATA_TYPE_ID, variant.getId());
|
||||
@@ -20,11 +28,10 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -705,6 +_,29 @@
|
||||
return slot == EquipmentSlot.MAINHAND;
|
||||
@@ -706,6 +712,29 @@ public class Fox extends Animal {
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
|
||||
+ // Purpur start - Tulips change fox type
|
||||
+ @Override
|
||||
+ public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) {
|
||||
@@ -47,6 +54,7 @@
|
||||
+ 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) {
|
||||
|
||||
@@ -1,6 +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/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..91897447d7ef35af3300443e8eb96340081fed48 100644
|
||||
--- a/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -57,13 +_,26 @@
|
||||
@@ -57,13 +57,26 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
private int remainingPersistentAngerTime;
|
||||
@Nullable
|
||||
private UUID persistentAngerTarget;
|
||||
@@ -27,7 +35,7 @@
|
||||
this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true));
|
||||
this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F));
|
||||
this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false));
|
||||
@@ -141,6 +_,7 @@
|
||||
@@ -141,6 +154,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.putBoolean("PlayerCreated", this.isPlayerCreated());
|
||||
@@ -35,7 +43,7 @@
|
||||
this.addPersistentAngerSaveData(compound);
|
||||
}
|
||||
|
||||
@@ -148,6 +_,7 @@
|
||||
@@ -148,6 +162,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
public void readAdditionalSaveData(CompoundTag compound) {
|
||||
super.readAdditionalSaveData(compound);
|
||||
this.setPlayerCreated(compound.getBooleanOr("PlayerCreated", false));
|
||||
@@ -43,7 +51,7 @@
|
||||
this.readPersistentAngerSaveData(this.level(), compound);
|
||||
}
|
||||
|
||||
@@ -267,6 +_,7 @@
|
||||
@@ -267,6 +282,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
float f = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
|
||||
this.playSound(SoundEvents.IRON_GOLEM_REPAIR, 1.0F, f);
|
||||
itemInHand.consume(1, player);
|
||||
|
||||
@@ -1,6 +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/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 +_,13 @@
|
||||
@@ -198,6 +198,13 @@ public class MushroomCow extends AbstractCow implements Shearable {
|
||||
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);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -233,7 +233,7 @@ public class Ocelot extends Animal {
|
||||
public boolean checkSpawnObstruction(LevelReader level) {
|
||||
if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) {
|
||||
BlockPos blockPos = this.blockPosition();
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -157,6 +157,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new TamableAnimal.TamableAnimalPanicGoal(1.25));
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
@@ -8,7 +16,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -262,7 +263,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
}
|
||||
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -17,7 +25,7 @@
|
||||
this.tame(player);
|
||||
this.level().broadcastEntityEvent(this, (byte)7);
|
||||
} else {
|
||||
@@ -270,6 +_,7 @@
|
||||
@@ -270,6 +271,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +33,7 @@
|
||||
return InteractionResult.SUCCESS;
|
||||
} else if (!itemInHand.is(ItemTags.PARROT_POISONOUS_FOOD)) {
|
||||
if (!this.isFlying() && this.isTame() && this.isOwnedBy(player)) {
|
||||
@@ -294,7 +_,7 @@
|
||||
@@ -294,7 +296,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
|
||||
@Override
|
||||
public boolean isFood(ItemStack stack) {
|
||||
@@ -34,7 +42,7 @@
|
||||
}
|
||||
|
||||
public static boolean checkParrotSpawnRules(
|
||||
@@ -309,13 +_,13 @@
|
||||
@@ -309,13 +311,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
|
||||
@Override
|
||||
public boolean canMate(Animal otherAnimal) {
|
||||
|
||||
@@ -1,6 +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/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 +_,19 @@
|
||||
@@ -141,6 +141,19 @@ public class Pig extends Animal implements ItemSteerable {
|
||||
@Override
|
||||
public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
boolean isFood = this.isFood(player.getItemInHand(hand));
|
||||
|
||||
@@ -1,6 +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/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 +_,29 @@
|
||||
@@ -64,6 +64,29 @@ public class PolarBear extends Animal implements NeutralMob {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@@ -30,7 +38,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) {
|
||||
@@ -72,7 +_,7 @@
|
||||
@@ -72,7 +95,7 @@ public class PolarBear extends Animal implements NeutralMob {
|
||||
|
||||
@Override
|
||||
public boolean isFood(ItemStack stack) {
|
||||
@@ -39,7 +47,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,6 +_,12 @@
|
||||
@@ -81,6 +104,12 @@ public class PolarBear extends Animal implements NeutralMob {
|
||||
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));
|
||||
|
||||
@@ -1,6 +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/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 +_,23 @@
|
||||
@@ -403,10 +403,23 @@ public class Rabbit extends Animal {
|
||||
}
|
||||
|
||||
this.setVariant(randomRabbitVariant);
|
||||
|
||||
@@ -1,6 +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/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..67c8f1e82c775818f906eeaa639e55d7c02834c6 100644
|
||||
--- a/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
+++ b/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
@@ -45,15 +_,27 @@
|
||||
@@ -45,15 +45,27 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
||||
private static final EntityDataAccessor<Byte> DATA_PUMPKIN_ID = SynchedEntityData.defineId(SnowGolem.class, EntityDataSerializers.BYTE);
|
||||
private static final byte PUMPKIN_FLAG = 16;
|
||||
private static final boolean DEFAULT_PUMPKIN = true;
|
||||
@@ -30,7 +38,7 @@
|
||||
this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F));
|
||||
this.goalSelector.addGoal(4, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (entity, level) -> entity instanceof Enemy));
|
||||
@@ -73,12 +_,14 @@
|
||||
@@ -73,12 +85,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.putBoolean("Pumpkin", this.hasPumpkin());
|
||||
@@ -45,7 +53,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -152,6 +_,14 @@
|
||||
@@ -152,6 +166,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
@@ -1,6 +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/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 +_,29 @@
|
||||
@@ -46,10 +46,29 @@ public class Squid extends AgeableWaterCreature {
|
||||
|
||||
public Squid(EntityType<? extends Squid> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -31,7 +39,7 @@
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this));
|
||||
@@ -127,6 +_,7 @@
|
||||
@@ -127,6 +146,7 @@ public class Squid extends AgeableWaterCreature {
|
||||
}
|
||||
|
||||
if (this.isInWater()) {
|
||||
@@ -39,7 +47,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -308,7 +328,7 @@ public class Squid extends AgeableWaterCreature {
|
||||
int noActionTime = this.squid.getNoActionTime();
|
||||
if (noActionTime > 100) {
|
||||
this.squid.movementVector = Vec3.ZERO;
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -76,8 +76,7 @@ public abstract class WaterAnimal extends PathfinderMob {
|
||||
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
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -395,6 +395,7 @@ public class Goat extends Animal {
|
||||
|
||||
// Paper start - Goat ram API
|
||||
public void ram(net.minecraft.world.entity.LivingEntity entity) {
|
||||
|
||||
@@ -1,6 +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/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
index 6916adb865ff8fea498d3a61c2b5560472a223f4..d4467235e8dc9d10c61dfb6fd9dc32386903dd09 100644
|
||||
--- a/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
+++ b/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
@@ -77,6 +_,7 @@
|
||||
@@ -77,6 +77,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
||||
private Llama caravanHead;
|
||||
@Nullable
|
||||
public Llama caravanTail; // Paper
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
public Llama(EntityType<? extends Llama> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -111,6 +_,7 @@
|
||||
@@ -111,6 +112,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant());
|
||||
compound.putInt("Strength", this.getStrength());
|
||||
@@ -16,7 +24,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,6 +_,7 @@
|
||||
@@ -118,6 +120,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
||||
this.setStrength(compound.getIntOr("Strength", 0));
|
||||
super.readAdditionalSaveData(compound);
|
||||
this.setVariant(compound.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT));
|
||||
@@ -24,7 +32,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -399,6 +_,7 @@
|
||||
@@ -399,6 +402,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
||||
|
||||
public void leaveCaravan() {
|
||||
if (this.caravanHead != null) {
|
||||
@@ -32,7 +40,7 @@
|
||||
this.caravanHead.caravanTail = null;
|
||||
}
|
||||
|
||||
@@ -406,6 +_,7 @@
|
||||
@@ -406,6 +410,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
||||
}
|
||||
|
||||
public void joinCaravan(Llama caravanHead) {
|
||||
|
||||
@@ -1,6 +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/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java
|
||||
index d926ecd041ca2a421057bc22efe66a8b811ee649..0487c463806509b1dd93dcfee3b518c95b0bdb19 100644
|
||||
--- a/net/minecraft/world/entity/animal/wolf/Wolf.java
|
||||
+++ b/net/minecraft/world/entity/animal/wolf/Wolf.java
|
||||
@@ -100,6 +_,37 @@
|
||||
@@ -100,6 +100,37 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
EntityType<?> type = entity.getType();
|
||||
return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX;
|
||||
};
|
||||
@@ -38,7 +46,7 @@
|
||||
private static final float START_HEALTH = 8.0F;
|
||||
private static final float TAME_HEALTH = 40.0F;
|
||||
private static final float ARMOR_REPAIR_UNIT = 0.125F;
|
||||
@@ -122,12 +_,47 @@
|
||||
@@ -122,12 +153,47 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F);
|
||||
}
|
||||
|
||||
@@ -86,7 +94,7 @@
|
||||
this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F));
|
||||
this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0, true));
|
||||
this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0, 10.0F, 2.0F));
|
||||
@@ -140,7 +_,7 @@
|
||||
@@ -140,7 +206,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
|
||||
this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers());
|
||||
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
@@ -95,7 +103,7 @@
|
||||
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false));
|
||||
this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
@@ -231,6 +_,7 @@
|
||||
@@ -231,6 +297,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor());
|
||||
@@ -103,7 +111,7 @@
|
||||
VariantUtils.writeVariant(compound, this.getVariant());
|
||||
this.addPersistentAngerSaveData(compound);
|
||||
this.getSoundVariant()
|
||||
@@ -245,6 +_,10 @@
|
||||
@@ -245,6 +312,10 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
super.readAdditionalSaveData(compound);
|
||||
VariantUtils.readVariant(compound, this.registryAccess(), Registries.WOLF_VARIANT).ifPresent(this::setVariant);
|
||||
this.setCollarColor(compound.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR));
|
||||
@@ -114,7 +122,7 @@
|
||||
this.readPersistentAngerSaveData(this.level(), compound);
|
||||
compound.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT))
|
||||
.flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey<WolfSoundVariant>)resourceKey))
|
||||
@@ -269,6 +_,10 @@
|
||||
@@ -269,6 +340,10 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
}
|
||||
|
||||
this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), this.random));
|
||||
@@ -125,7 +133,7 @@
|
||||
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
|
||||
}
|
||||
|
||||
@@ -319,6 +_,11 @@
|
||||
@@ -319,6 +394,11 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.isAlive()) {
|
||||
@@ -137,7 +145,7 @@
|
||||
this.interestedAngleO = this.interestedAngle;
|
||||
if (this.isInterested()) {
|
||||
this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F;
|
||||
@@ -532,13 +_,27 @@
|
||||
@@ -532,13 +612,27 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
itemInHand.consume(1, player);
|
||||
this.tryToTame(player);
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
|
||||
@@ -1,6 +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/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 +_,24 @@
|
||||
@@ -38,6 +38,24 @@ public class EndCrystal extends Entity {
|
||||
this.setPos(x, y, z);
|
||||
}
|
||||
|
||||
@@ -25,7 +33,7 @@
|
||||
@Override
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.NONE;
|
||||
@@ -74,6 +_,8 @@
|
||||
@@ -74,6 +92,8 @@ public class EndCrystal extends Entity {
|
||||
}
|
||||
}
|
||||
// Paper end - Fix invulnerable end crystals
|
||||
@@ -34,7 +42,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,15 +_,17 @@
|
||||
@@ -114,15 +134,17 @@ public class EndCrystal extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) {
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -960,6 +960,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
@Override
|
||||
protected boolean canRide(Entity entity) {
|
||||
@@ -8,7 +16,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -995,7 +_,7 @@
|
||||
@@ -995,7 +996,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT);
|
||||
int i = 500;
|
||||
|
||||
|
||||
@@ -1,6 +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/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index 09924cccf9208abda22cc7e1635b567ed166e95a..2f7da367b58fd9c06c4e012e8eb7f59e5a7f9b6d 100644
|
||||
--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -78,6 +_,7 @@
|
||||
@@ -78,6 +78,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
private static final TargetingConditions.Selector LIVING_ENTITY_SELECTOR = (entity, level) -> !entity.getType().is(EntityTypeTags.WITHER_FRIENDS)
|
||||
&& entity.attackable();
|
||||
private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0).selector(LIVING_ENTITY_SELECTOR);
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
public WitherBoss(EntityType<? extends WitherBoss> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -86,6 +_,17 @@
|
||||
@@ -86,6 +87,17 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
this.xpReward = 50;
|
||||
}
|
||||
|
||||
@@ -26,7 +34,7 @@
|
||||
@Override
|
||||
protected PathNavigation createNavigation(Level level) {
|
||||
FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level);
|
||||
@@ -118,6 +_,7 @@
|
||||
@@ -118,6 +130,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.putInt("Invul", this.getInvulnerableTicks());
|
||||
@@ -34,7 +42,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,6 +_,7 @@
|
||||
@@ -127,6 +140,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
if (this.hasCustomName()) {
|
||||
this.bossEvent.setName(this.getDisplayName());
|
||||
}
|
||||
@@ -42,7 +50,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -270,7 +_,7 @@
|
||||
@@ -270,7 +284,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -51,7 +59,7 @@
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// level.globalLevelEvent(1023, this.blockPosition(), 0);
|
||||
int viewDistance = level.getCraftServer().getViewDistance() * 16;
|
||||
@@ -377,8 +_,10 @@
|
||||
@@ -377,8 +391,10 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +72,7 @@
|
||||
}
|
||||
|
||||
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
|
||||
@@ -575,6 +_,7 @@
|
||||
@@ -575,6 +591,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
|
||||
@Override
|
||||
protected boolean canRide(Entity entity) {
|
||||
|
||||
@@ -1,6 +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/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 5248f3c22abb608d7d7b338f169f13bfbf4cd2d6..fa20c642c05fa4ed3739cd0b3964e31fd4dba1d3 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -95,10 +_,13 @@
|
||||
@@ -95,10 +95,13 @@ public class ArmorStand extends LivingEntity {
|
||||
private boolean noTickPoseDirty = false;
|
||||
private boolean noTickEquipmentDirty = false;
|
||||
// Paper end - Allow ArmorStands not to tick
|
||||
@@ -14,7 +22,7 @@
|
||||
}
|
||||
|
||||
public ArmorStand(Level level, double x, double y, double z) {
|
||||
@@ -546,6 +_,7 @@
|
||||
@@ -546,6 +549,7 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -22,7 +30,7 @@
|
||||
// Paper start - Allow ArmorStands not to tick
|
||||
if (!this.canTick) {
|
||||
if (this.noTickPoseDirty) {
|
||||
@@ -875,4 +_,18 @@
|
||||
@@ -875,4 +879,18 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1,6 +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/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..4ddf1cdf7a47bf06f95c5bfce8f3c4d035e87cfc 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -59,6 +_,12 @@
|
||||
@@ -59,6 +59,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
|
||||
private int despawnRate = -1; // Paper - Alternative item-despawn-rate
|
||||
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
|
||||
@@ -13,7 +21,7 @@
|
||||
|
||||
public ItemEntity(EntityType<? extends ItemEntity> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -344,7 +_,16 @@
|
||||
@@ -344,7 +350,16 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
@Override
|
||||
public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
|
||||
@@ -31,7 +39,7 @@
|
||||
return false;
|
||||
} else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) {
|
||||
return false;
|
||||
@@ -528,6 +_,12 @@
|
||||
@@ -528,6 +543,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
public void setItem(ItemStack stack) {
|
||||
this.getEntityData().set(DATA_ITEM, stack);
|
||||
this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate
|
||||
|
||||
@@ -1,6 +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/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 +_,32 @@
|
||||
@@ -253,4 +253,32 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid();
|
||||
}
|
||||
// Paper end - Option to prevent TNT from moving in water
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -158,10 +158,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
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()) {
|
||||
@@ -12,7 +20,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -217,7 +214,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
if (event.getProjectile() == arrow.getBukkitEntity()) {
|
||||
// CraftBukkit end
|
||||
Projectile.spawnProjectileUsingShoot(
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -54,6 +54,7 @@ public class Creeper extends Monster {
|
||||
public int explosionRadius = 3;
|
||||
private int droppedSkulls;
|
||||
public @Nullable Entity entityIgniter; // CraftBukkit
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
public Creeper(EntityType<? extends Creeper> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -157,6 +_,27 @@
|
||||
@@ -157,6 +158,27 @@ public class Creeper extends Monster {
|
||||
return false; // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -36,7 +44,7 @@
|
||||
@Override
|
||||
public SoundEvent getHurtSound(DamageSource damageSource) {
|
||||
return SoundEvents.CREEPER_HURT;
|
||||
@@ -239,14 +_,16 @@
|
||||
@@ -239,14 +261,16 @@ public class Creeper extends Monster {
|
||||
}
|
||||
|
||||
public void explodeCreeper() {
|
||||
@@ -55,7 +63,7 @@
|
||||
this.spawnLingeringCloud();
|
||||
this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED);
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -257,6 +_,7 @@
|
||||
@@ -257,6 +281,7 @@ public class Creeper extends Monster {
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -1,6 +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/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 +_,23 @@
|
||||
@@ -82,10 +82,23 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
||||
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()));
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -103,7 +103,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
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));
|
||||
@@ -9,7 +17,7 @@
|
||||
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
|
||||
}
|
||||
|
||||
@@ -220,7 +_,7 @@
|
||||
@@ -220,7 +220,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
|
||||
boolean isBeingStaredBy(Player player) {
|
||||
// Paper start - EndermanAttackPlayerEvent
|
||||
@@ -18,7 +26,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -376,6 +376,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
|
||||
if (this.isInvulnerableTo(level, damageSource)) {
|
||||
return false;
|
||||
@@ -26,7 +34,7 @@
|
||||
} else {
|
||||
AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion
|
||||
? abstractThrownPotion
|
||||
@@ -392,6 +_,7 @@
|
||||
@@ -392,6 +393,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
} else {
|
||||
boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount);
|
||||
|
||||
@@ -34,7 +42,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -435,7 +437,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
|
||||
@Override
|
||||
public boolean requiresCustomPersistence() {
|
||||
@@ -43,7 +51,7 @@
|
||||
}
|
||||
|
||||
static class EndermanFreezeWhenLookedAt extends Goal {
|
||||
@@ -479,6 +_,7 @@
|
||||
@@ -479,6 +481,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@@ -51,7 +59,7 @@
|
||||
return this.enderman.getCarriedBlock() != null
|
||||
&& getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)
|
||||
&& this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0;
|
||||
@@ -628,6 +_,7 @@
|
||||
@@ -628,6 +631,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
|
||||
@@ -1,6 +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/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java
|
||||
index 7fad96756972308e71fd38033f06148467a7aecd..37eaed1455f34011c24170ca0b05f606bd03fac0 100644
|
||||
--- a/net/minecraft/world/entity/monster/Endermite.java
|
||||
+++ b/net/minecraft/world/entity/monster/Endermite.java
|
||||
@@ -29,12 +_,23 @@
|
||||
@@ -29,12 +29,23 @@ public class Endermite extends Monster {
|
||||
private static final int MAX_LIFE = 2400;
|
||||
private static final int DEFAULT_LIFE = 0;
|
||||
public int life = 0;
|
||||
@@ -24,7 +32,7 @@
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(1, new FloatGoal(this));
|
||||
@@ -80,12 +_,14 @@
|
||||
@@ -80,12 +91,14 @@ public class Endermite extends Monster {
|
||||
public void readAdditionalSaveData(CompoundTag compound) {
|
||||
super.readAdditionalSaveData(compound);
|
||||
this.life = compound.getIntOr("Lifetime", 0);
|
||||
|
||||
@@ -1,6 +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/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 +_,14 @@
|
||||
@@ -88,6 +88,14 @@ public abstract class Monster extends PathfinderMob implements Enemy {
|
||||
}
|
||||
|
||||
public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) {
|
||||
|
||||
@@ -1,6 +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/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 +_,11 @@
|
||||
@@ -159,7 +159,11 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData
|
||||
) {
|
||||
this.anchorPoint = this.blockPosition().above(5);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -73,6 +73,7 @@ public class Ravager extends Raider {
|
||||
protected void registerGoals() {
|
||||
super.registerGoals();
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
@@ -8,7 +16,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -153,7 +154,7 @@ public class Ravager extends Raider {
|
||||
)) {
|
||||
BlockState blockState = serverLevel.getBlockState(blockPos);
|
||||
Block block = blockState.getBlock();
|
||||
|
||||
@@ -1,6 +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 +_,7 @@
|
||||
@@ -53,6 +53,7 @@ import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.ServerLevelAccessor;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -8,7 +16,7 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
@@ -93,6 +_,21 @@
|
||||
@@ -93,6 +94,21 @@ public class Shulker extends AbstractGolem implements Enemy {
|
||||
this.lookControl = new Shulker.ShulkerLookControl(this);
|
||||
}
|
||||
|
||||
@@ -30,7 +38,7 @@
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true));
|
||||
@@ -460,11 +_,21 @@
|
||||
@@ -460,11 +476,21 @@ public class Shulker extends AbstractGolem implements Enemy {
|
||||
private void hitByShulkerBullet() {
|
||||
Vec3 vec3 = this.position();
|
||||
AABB boundingBox = this.getBoundingBox();
|
||||
@@ -56,7 +64,7 @@
|
||||
if (shulker != null) {
|
||||
shulker.setVariant(this.getVariant());
|
||||
shulker.snapTo(vec3);
|
||||
@@ -572,7 +_,7 @@
|
||||
@@ -572,7 +598,7 @@ public class Shulker extends AbstractGolem implements Enemy {
|
||||
}
|
||||
|
||||
public Optional<DyeColor> getVariant() {
|
||||
|
||||
@@ -1,6 +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/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 +_,64 @@
|
||||
@@ -139,4 +139,64 @@ public class Skeleton extends AbstractSkeleton {
|
||||
this.spawnAtLocation(level, Items.SKELETON_SKULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +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/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 +_,19 @@
|
||||
@@ -392,6 +392,19 @@ public class Strider extends Animal implements ItemSteerable {
|
||||
@Override
|
||||
public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
boolean isFood = this.isFood(player.getItemInHand(hand));
|
||||
|
||||
@@ -1,6 +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/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 +_,11 @@
|
||||
@@ -131,6 +131,11 @@ public class Vindicator extends AbstractIllager {
|
||||
RandomSource random = level.getRandom();
|
||||
this.populateDefaultEquipmentSlots(random, difficulty);
|
||||
this.populateDefaultEquipmentEnchantments(level, random, difficulty);
|
||||
|
||||
@@ -1,6 +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/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 +_,19 @@
|
||||
@@ -118,7 +118,19 @@ public class Zombie extends Monster {
|
||||
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));
|
||||
@@ -21,7 +29,7 @@
|
||||
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 +_,7 @@
|
||||
@@ -552,10 +564,7 @@ public class Zombie extends Monster {
|
||||
}
|
||||
|
||||
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
|
||||
|
||||
@@ -1,6 +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/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 +_,10 @@
|
||||
@@ -130,10 +130,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
||||
public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
ItemStack itemInHand = player.getItemInHand(hand);
|
||||
if (itemInHand.is(Items.GOLDEN_APPLE)) {
|
||||
|
||||
@@ -1,6 +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/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 +_,12 @@
|
||||
@@ -112,6 +112,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
this.maybeAlertOthers();
|
||||
}
|
||||
|
||||
@@ -13,16 +21,16 @@
|
||||
super.customServerAiStep(level);
|
||||
}
|
||||
|
||||
@@ -158,6 +_,12 @@
|
||||
this.playFirstAngerSoundIn = FIRST_ANGER_SOUND_DELAY.sample(this.random);
|
||||
@@ -159,6 +165,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/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,13 +_,23 @@
|
||||
@@ -661,7 +661,10 @@ public class PiglinAi {
|
||||
|
||||
public static boolean isWearingSafeArmor(LivingEntity entity) {
|
||||
for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) {
|
||||
@@ -12,16 +20,17 @@
|
||||
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();
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -25,7 +25,7 @@ public class CatSpawner implements CustomSpawner {
|
||||
if (spawnFriendlies && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) {
|
||||
this.nextTick--;
|
||||
if (this.nextTick <= 0) {
|
||||
@@ -9,7 +17,7 @@
|
||||
Player randomPlayer = level.getRandomPlayer();
|
||||
if (randomPlayer != null) {
|
||||
RandomSource randomSource = level.random;
|
||||
@@ -48,9 +_,12 @@
|
||||
@@ -48,9 +48,12 @@ public class CatSpawner implements CustomSpawner {
|
||||
}
|
||||
|
||||
private void spawnInVillage(ServerLevel level, BlockPos pos) {
|
||||
@@ -25,7 +33,7 @@
|
||||
if (entitiesOfClass.size() < 5) {
|
||||
this.spawnCat(pos, level, false);
|
||||
}
|
||||
@@ -58,8 +_,11 @@
|
||||
@@ -58,8 +61,11 @@ public class CatSpawner implements CustomSpawner {
|
||||
}
|
||||
|
||||
private void spawnInHut(ServerLevel level, BlockPos pos) {
|
||||
|
||||
@@ -1,6 +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/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
||||
index e0e0d2ea7fc60e3142c675404d152eca60263240..49d43837b88d8f278baa5062aed83a297fe20ed8 100644
|
||||
--- a/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -178,6 +_,8 @@
|
||||
@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
MemoryModuleType.MEETING_POINT,
|
||||
(villager, poiType) -> poiType.is(PoiTypes.MEETING)
|
||||
);
|
||||
@@ -9,7 +17,7 @@
|
||||
|
||||
public Villager(EntityType<? extends Villager> entityType, Level level) {
|
||||
this(entityType, level, VillagerType.PLAINS);
|
||||
@@ -196,6 +_,57 @@
|
||||
@@ -196,6 +198,57 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE));
|
||||
}
|
||||
|
||||
@@ -67,7 +75,7 @@
|
||||
@Override
|
||||
public Brain<Villager> getBrain() {
|
||||
return (Brain<Villager>)super.getBrain();
|
||||
@@ -292,11 +_,24 @@
|
||||
@@ -292,11 +345,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
// Paper start - EAR 2
|
||||
this.customServerAiStep(level, false);
|
||||
}
|
||||
@@ -94,7 +102,7 @@
|
||||
profilerFiller.pop();
|
||||
if (this.assignProfessionWhenSpawned) {
|
||||
this.assignProfessionWhenSpawned = false;
|
||||
@@ -368,6 +_,7 @@
|
||||
@@ -368,6 +434,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
|
||||
@@ -102,7 +110,7 @@
|
||||
this.startTrading(player);
|
||||
}
|
||||
|
||||
@@ -504,7 +_,7 @@
|
||||
@@ -504,7 +571,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
private void updateDemand() {
|
||||
for (MerchantOffer merchantOffer : this.getOffers()) {
|
||||
@@ -111,7 +119,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,7 +_,7 @@
|
||||
@@ -697,7 +764,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
@Override
|
||||
public boolean canBreed() {
|
||||
@@ -120,7 +128,7 @@
|
||||
}
|
||||
|
||||
private boolean hungry() {
|
||||
@@ -919,6 +_,7 @@
|
||||
@@ -919,6 +986,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
|
||||
public void spawnGolemIfNeeded(ServerLevel serverLevel, long gameTime, int minVillagerAmount) {
|
||||
@@ -128,7 +136,7 @@
|
||||
if (this.wantsToSpawnGolem(gameTime)) {
|
||||
AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0);
|
||||
List<Villager> entitiesOfClass = serverLevel.getEntitiesOfClass(Villager.class, aabb);
|
||||
@@ -992,6 +_,12 @@
|
||||
@@ -992,6 +1060,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
@Override
|
||||
public void startSleeping(BlockPos pos) {
|
||||
|
||||
@@ -1,6 +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/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 +_,13 @@
|
||||
@@ -59,6 +59,13 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@@ -14,7 +22,7 @@
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
@@ -79,7 +_,7 @@
|
||||
@@ -79,7 +86,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
this,
|
||||
new ItemStack(Items.MILK_BUCKET),
|
||||
SoundEvents.WANDERING_TRADER_REAPPEARED,
|
||||
@@ -23,7 +31,7 @@
|
||||
)
|
||||
);
|
||||
this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this));
|
||||
@@ -123,8 +_,10 @@
|
||||
@@ -123,8 +130,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +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/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 +_,17 @@
|
||||
@@ -137,7 +137,17 @@ public class WanderingTraderSpawner implements CustomSpawner {
|
||||
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);
|
||||
|
||||
@@ -1,6 +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/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 248ee263a853d1d3148746a63ba422115853f6a1..bd4d3a920e015db49436336cc180bc0b937750a0 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -210,11 +_,20 @@
|
||||
@@ -210,11 +210,20 @@ public abstract class Player extends LivingEntity {
|
||||
private int currentImpulseContextResetGraceTime = 0;
|
||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
||||
@@ -21,7 +29,7 @@
|
||||
@Override
|
||||
public org.bukkit.craftbukkit.entity.CraftHumanEntity getBukkitEntity() {
|
||||
return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity();
|
||||
@@ -277,6 +_,12 @@
|
||||
@@ -277,6 +286,12 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -34,7 +42,7 @@
|
||||
this.noPhysics = this.isSpectator();
|
||||
if (this.isSpectator() || this.isPassenger()) {
|
||||
this.setOnGround(false);
|
||||
@@ -355,6 +_,17 @@
|
||||
@@ -355,6 +370,17 @@ public abstract class Player extends LivingEntity {
|
||||
this.turtleHelmetTick();
|
||||
}
|
||||
|
||||
@@ -52,7 +60,7 @@
|
||||
this.cooldowns.tick();
|
||||
this.updatePlayerPose();
|
||||
if (this.currentImpulseContextResetGraceTime > 0) {
|
||||
@@ -620,7 +_,7 @@
|
||||
@@ -620,7 +646,7 @@ public abstract class Player extends LivingEntity {
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
|
||||
for (Entity entity : entities) {
|
||||
@@ -61,7 +69,7 @@
|
||||
list.add(entity);
|
||||
} else if (!entity.isRemoved()) {
|
||||
this.touch(entity);
|
||||
@@ -1214,7 +_,7 @@
|
||||
@@ -1214,7 +1240,7 @@ public abstract class Player extends LivingEntity {
|
||||
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
|
||||
if (flag2) {
|
||||
damageSource = damageSource.critical(); // Paper - critical damage API
|
||||
@@ -70,7 +78,7 @@
|
||||
}
|
||||
|
||||
float f2 = f + f1;
|
||||
@@ -1811,7 +_,23 @@
|
||||
@@ -1811,7 +1837,23 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected int getBaseExperienceReward(ServerLevel level) {
|
||||
@@ -95,17 +103,17 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1849,6 +_,13 @@
|
||||
public boolean addItem(ItemStack stack) {
|
||||
@@ -1850,6 +1892,13 @@ public abstract class Player extends LivingEntity {
|
||||
return this.inventory.add(stack);
|
||||
}
|
||||
+
|
||||
|
||||
+ // Purpur start - Player ridable in water option
|
||||
+ @Override
|
||||
+ public boolean dismountsUnderwater() {
|
||||
+ return !level().purpurConfig.playerRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end - Player ridable in water option
|
||||
|
||||
+
|
||||
public boolean setEntityOnShoulder(CompoundTag entityCompound) {
|
||||
if (this.isPassenger() || !this.onGround() || this.isInWater() || this.isInPowderSnow) {
|
||||
return false;
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -79,6 +79,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
public ItemStack pickupItemStack = this.getDefaultPickupItem();
|
||||
@Nullable
|
||||
public ItemStack firedFromWeapon = null;
|
||||
@@ -8,7 +16,7 @@
|
||||
|
||||
protected AbstractArrow(EntityType<? extends AbstractArrow> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -352,7 +_,7 @@
|
||||
@@ -352,7 +353,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
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));
|
||||
@@ -17,16 +25,16 @@
|
||||
}
|
||||
|
||||
public boolean isInGround() {
|
||||
@@ -575,6 +_,12 @@
|
||||
public ItemStack getWeaponItem() {
|
||||
@@ -576,6 +577,12 @@ public abstract class AbstractArrow extends Projectile {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,6 +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/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,9 +_,39 @@
|
||||
@@ -52,10 +52,40 @@ public class Snowball extends ThrowableItemProjectile {
|
||||
protected void onHitEntity(EntityHitResult result) {
|
||||
super.onHitEntity(result);
|
||||
Entity entity = result.getEntity();
|
||||
@@ -8,7 +16,7 @@
|
||||
+ 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) {
|
||||
@@ -38,6 +46,7 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - options to extinguish fire blocks with snowballs
|
||||
|
||||
+
|
||||
@Override
|
||||
protected void onHit(HitResult result) {
|
||||
super.onHit(result);
|
||||
|
||||
@@ -1,6 +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/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
index bda858b1e1c6b28cd9d5a664758b3e445eaf4f22..6575e8ef16f6011f7a799ba31531a2ebefee0c4d 100644
|
||||
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
@@ -129,9 +_,10 @@
|
||||
@@ -129,9 +129,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -12,7 +20,7 @@
|
||||
endermite.snapTo(owner.getX(), owner.getY(), owner.getZ(), owner.getYRot(), owner.getXRot());
|
||||
serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
|
||||
}
|
||||
@@ -151,7 +_,7 @@
|
||||
@@ -151,7 +152,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
||||
if (serverPlayer1 != null) {
|
||||
serverPlayer1.resetFallDistance();
|
||||
serverPlayer1.resetCurrentImpulseContext();
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -65,7 +65,7 @@ public class ThrownTrident extends AbstractArrow {
|
||||
|
||||
Entity owner = this.getOwner();
|
||||
int i = this.entityData.get(ID_LOYALTY);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -93,7 +93,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
|
||||
super.onHit(result);
|
||||
if (!this.level().isClientSide) {
|
||||
// CraftBukkit start
|
||||
@@ -9,17 +17,17 @@
|
||||
if (event.callEvent()) {
|
||||
this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
|
||||
}
|
||||
@@ -101,6 +_,13 @@
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -102,6 +102,13 @@ public class WitherSkull extends AbstractHurtingProjectile {
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
+ // 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);
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -29,6 +29,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class Raids extends SavedData {
|
||||
private static final String RAID_FILE_ID = "raids";
|
||||
@@ -8,7 +16,7 @@
|
||||
public static final Codec<Raids> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
Raids.RaidWithId.CODEC
|
||||
@@ -81,6 +_,17 @@
|
||||
@@ -81,6 +82,17 @@ public class Raids extends SavedData {
|
||||
|
||||
public void tick(ServerLevel level) {
|
||||
this.tick++;
|
||||
@@ -26,7 +34,7 @@
|
||||
Iterator<Raid> iterator = this.raidMap.values().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -148,11 +_,13 @@
|
||||
@@ -148,11 +160,13 @@ public class Raids extends SavedData {
|
||||
// }
|
||||
|
||||
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
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -433,6 +433,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
|
||||
float groundFriction = this.getGroundFriction();
|
||||
if (groundFriction > 0.0F) {
|
||||
this.landFriction = groundFriction;
|
||||
|
||||
@@ -1,6 +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/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 +_,7 @@
|
||||
@@ -391,7 +391,7 @@ public class NewMinecartBehavior extends MinecartBehavior {
|
||||
private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) {
|
||||
if (state.is(Blocks.POWERED_RAIL) && state.getValue(PoweredRailBlock.POWERED)) {
|
||||
if (speed.length() > 0.01) {
|
||||
|
||||
@@ -1,6 +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/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 +_,8 @@
|
||||
@@ -243,8 +243,8 @@ public class OldMinecartBehavior extends MinecartBehavior {
|
||||
Vec3 deltaMovement1 = this.getDeltaMovement();
|
||||
double d13 = deltaMovement1.horizontalDistance();
|
||||
if (d13 > 0.01) {
|
||||
|
||||
Reference in New Issue
Block a user