mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-06-23 02:37:47 +02:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@59797420 26.2 PaperMC/Paper@389befc2 drop old ATs PaperMC/Paper@14bb579b fix bad exhaustion reasons for player movement PaperMC/Paper@0b4fed78 fix misc issues PaperMC/Paper@384ff989 fix contract of ItemContainerContents#contents PaperMC/Paper@af55c9de Fix Geyser particle options waterBlocks precondition (#13961) PaperMC/Paper@1daadd58 Prevent EnderDragon and Wither from receiving effect of vanilla sources (#13956) PaperMC/Paper@ca8eb49f Mention MOJIRA issue for correct stacktrace fix in FileFixerUpper [ci/skip] (#13962) PaperMC/Paper@80d10989 Expose Entity Source for EntityPotionEffectEvent (#13957) PaperMC/Paper@2c0341f9 Update adventure to 5.1.1 PaperMC/Paper@649002a4 fix IOOB for '..' namespace PaperMC/Paper@783b6f09 add preconditions to particles
This commit is contained in:
@@ -14,14 +14,14 @@
|
||||
public double zOld;
|
||||
+ public float maxUpStep; // Purpur - Add option to set armorstand step height
|
||||
public boolean noPhysics;
|
||||
- public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
|
||||
- protected final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
|
||||
+ public final RandomSource random; // Paper - Share random for entities to make them more random // Purpur - Add toggle for RNG manipulation
|
||||
public int tickCount;
|
||||
private int remainingFireTicks;
|
||||
private final EntityFluidInteraction fluidInteraction = new EntityFluidInteraction(Set.of(FluidTags.WATER, FluidTags.LAVA));
|
||||
@@ -331,8 +_,8 @@
|
||||
public @Nullable PortalProcessor portalProcess;
|
||||
public int portalCooldown;
|
||||
private int portalCooldown;
|
||||
private boolean invulnerable;
|
||||
- protected UUID uuid = Mth.createInsecureUUID(this.random);
|
||||
- protected String stringUUID = this.uuid.toString();
|
||||
@@ -66,7 +66,7 @@
|
||||
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
||||
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
// Paper end - Configurable nether ceiling damage
|
||||
+ if (this.level.purpurConfig.teleportOnNetherCeilingDamage && this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this instanceof ServerPlayer player) player.teleport(org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.level.levelData.getRespawnData().pos(), this.level)); else // Purpur - Add option to teleport to spawn on nether ceiling damage
|
||||
+ if (this.level.purpurConfig.teleportOnNetherCeilingDamage && this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this instanceof ServerPlayer player) player.teleport(org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.level.getLevelData().getRespawnData().pos(), this.level)); else // Purpur - Add option to teleport to spawn on nether ceiling damage
|
||||
this.onBelowWorld();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if (damagePerBlock > 0.0) {
|
||||
+ // Purpur start - Add option to teleport to spawn if outside world border
|
||||
+ if (this.level().purpurConfig.teleportIfOutsideBorder && this instanceof ServerPlayer serverPlayer) {
|
||||
+ serverPlayer.teleport(org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.level().levelData.getRespawnData().pos(), this.level()));
|
||||
+ serverPlayer.teleport(org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.level().getLevelData().getRespawnData().pos(), this.level()));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Purpur end - Add option to teleport to spawn if outside world border
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1070,14 +_,32 @@
|
||||
@@ -1046,14 +_,32 @@
|
||||
|
||||
if (targetingEntity != null) {
|
||||
ItemStack itemStack = this.getItemBySlot(EquipmentSlot.HEAD);
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
return visibilityPercent;
|
||||
}
|
||||
@@ -1127,6 +_,7 @@
|
||||
@@ -1103,6 +_,7 @@
|
||||
Iterator<MobEffectInstance> iterator = this.activeEffects.values().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectInstance effect = iterator.next();
|
||||
@@ -80,7 +80,7 @@
|
||||
EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED);
|
||||
if (event.isCancelled()) {
|
||||
continue;
|
||||
@@ -1459,7 +_,23 @@
|
||||
@@ -1441,7 +_,23 @@
|
||||
this.stopSleeping();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if (damage < 0.0F) {
|
||||
damage = 0.0F;
|
||||
}
|
||||
@@ -1722,10 +_,10 @@
|
||||
@@ -1704,10 +_,10 @@
|
||||
protected @Nullable Player resolvePlayerResponsibleForDamage(final DamageSource source) {
|
||||
Entity sourceEntity = source.getEntity();
|
||||
if (sourceEntity instanceof Player playerSource) {
|
||||
@@ -118,7 +118,7 @@
|
||||
} else {
|
||||
this.lastHurtByPlayer = null;
|
||||
this.lastHurtByPlayerMemoryTime = 0;
|
||||
@@ -1777,6 +_,17 @@
|
||||
@@ -1759,6 +_,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
final org.bukkit.inventory.EquipmentSlot handSlot = (usedHand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(usedHand) : null;
|
||||
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
|
||||
event.setCancelled(protectionItem == null);
|
||||
@@ -1930,8 +_,10 @@
|
||||
@@ -1912,8 +_,10 @@
|
||||
protected void dropAllDeathLoot(final ServerLevel level, final DamageSource source) {
|
||||
boolean playerKilled = this.lastHurtByPlayerMemoryTime > 0;
|
||||
if (this.shouldDropLoot(level)) {
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
|
||||
this.dropEquipment(level);
|
||||
@@ -3280,6 +_,7 @@
|
||||
@@ -3262,6 +_,7 @@
|
||||
float dmg = (float)(diff * 10.0 - 3.0);
|
||||
if (dmg > 0.0F) {
|
||||
this.playSound(this.getFallDamageSound((int)dmg), 1.0F, 1.0F);
|
||||
@@ -155,7 +155,7 @@
|
||||
this.hurt(this.damageSources().flyIntoWall(), dmg);
|
||||
}
|
||||
}
|
||||
@@ -4773,6 +_,12 @@
|
||||
@@ -4755,6 +_,12 @@
|
||||
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
|
||||
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.typeHolder());
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
xpCount = 12000;
|
||||
}
|
||||
xpCount = this.expToDrop; // CraftBukkit - SPIGOT-2420: Moved up to #getExpReward method
|
||||
@@ -960,6 +_,7 @@
|
||||
@@ -965,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
protected boolean canRide(final Entity vehicle) {
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
|
||||
@@ -579,6 +_,7 @@
|
||||
@@ -584,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
protected boolean canRide(final Entity vehicle) {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
+++ b/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -56,6 +_,7 @@
|
||||
public int explosionRadius = 3;
|
||||
public boolean droppedSkulls;
|
||||
private boolean droppedSkulls;
|
||||
public @Nullable Entity entityIgniter; // CraftBukkit
|
||||
+ private boolean exploding = false; // Purpur - Config to make Creepers explode on death
|
||||
|
||||
public Creeper(final EntityType<? extends Creeper> type, final Level level) {
|
||||
super(type, level);
|
||||
@@ -159,6 +_,27 @@
|
||||
@@ -159,6 +_,26 @@
|
||||
return false; // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -25,11 +25,10 @@
|
||||
+
|
||||
+ // Purpur start - Config to make Creepers explode on death
|
||||
+ @Override
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel world, DamageSource damageSource) {
|
||||
+ if (!this.exploding && this.level().purpurConfig.creeperExplodeWhenKilled && damageSource.getEntity() instanceof net.minecraft.server.level.ServerPlayer) {
|
||||
+ protected void dropAllDeathLoot(final ServerLevel level, final DamageSource source) {
|
||||
+ if (!this.exploding && this.level().purpurConfig.creeperExplodeWhenKilled && source.getEntity() instanceof net.minecraft.server.level.ServerPlayer) {
|
||||
+ this.explodeCreeper();
|
||||
+ }
|
||||
+ return super.dropAllDeathLoot(world, damageSource);
|
||||
+ }
|
||||
+ // Purpur end - Config to make Creepers explode on death
|
||||
+
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/world/entity/projectile/arrow/AbstractArrow.java
|
||||
@@ -79,6 +_,7 @@
|
||||
private @Nullable List<Entity> piercedAndKilledEntities;
|
||||
public ItemStack pickupItemStack = this.getDefaultPickupItem();
|
||||
private ItemStack pickupItemStack = this.getDefaultPickupItem();
|
||||
public @Nullable ItemStack firedFromWeapon = null;
|
||||
+ public net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments = net.minecraft.world.item.enchantment.ItemEnchantments.EMPTY; // Purpur - Add an option to fix MC-3304 projectile looting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user