mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-03 21:37:28 +01:00
update some patches
This commit is contained in:
parent
a0f4d303eb
commit
0785c29a37
38 changed files with 16 additions and 18 deletions
patches/server
Ability-to-control-player-s-insomnia-and-phantoms.patchAdd-BlockLockCheckEvent.patchAdd-CompostItemEvent-and-EntityCompostItemEvent.patchAdd-Entity-Body-Yaw-API.patchAdd-EntityFertilizeEggEvent.patchAdd-Shearable-API.patchAdd-Sneaking-API-for-Entities.patchAdd-config-option-for-spider-worldborder-climbing.patchAdd-missing-SpigotConfig-logCommands-check.patchCorrectly-handle-ArmorStand-invisibility.patchCorrectly-shrink-items-during-EntityResurrectEvent.patchExpose-pre-collision-moving-velocity-to-VehicleBlock.patchFix-HumanEntity-drop-not-updating-the-client-inv.patchFix-MC-157464-Prevent-sleeping-villagers-moving-towa.patchFix-NPE-on-Allay-stopDancing-while-not-dancing.patchFix-SpawnEggMeta-get-setSpawnedType.patchFix-advancement-triggers-for-entity-damage.patchFix-crash-relating-to-bad-recipes-in-furnace-like-ti.patchFix-force-opening-enchantment-tables.patchFix-inconsistencies-in-dispense-events-regarding-sta.patchFix-inventories-returning-null-Locations.patchFix-premature-player-kicks-on-shutdown.patchFix-text-display-error-on-spawn.patchFixes-and-additions-to-the-SpawnReason-API.patchFlying-Fall-Damage.patchFriction-API.patchImprove-PortalEvents.patchImprove-inlining-for-some-hot-BlockBehavior-and-Flui.patchImprove-logging-and-errors.patchLimit-pet-look-distance.patchPlayer-Entity-Tracking-Events.patchRemove-CraftItemStack-setAmount-null-assignment.patchSync-offhand-slot-in-menus.patchTreat-sequence-violations-like-they-should-be.patchUse-single-player-info-update-packet-on-join.patchWin-Screen-API.patchconfig-for-disabling-entity-tag-tags.patchfix-Instruments.patch
|
@ -146,9 +146,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
((Saddleable) list.get(0)).equipSaddle(itemstack1, SoundSource.BLOCKS);
|
||||
// CraftBukkit end
|
||||
((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591
|
||||
- // itemstack.shrink(1); // CraftBukkit - handled above
|
||||
+ if (shrink) stack.shrink(1); // Paper - actually handle here
|
||||
this.setSuccess(true);
|
||||
return stack;
|
||||
|
@ -386,7 +385,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class ArmorItem extends Item implements Equipable {
|
||||
} else {
|
||||
LivingEntity entityliving = (LivingEntity) list.get(0);
|
||||
EquipmentSlot enumitemslot = Mob.getEquipmentSlotForItem(armor);
|
||||
EquipmentSlot enumitemslot = entityliving.getEquipmentSlotForItem(armor);
|
||||
- ItemStack itemstack1 = armor.split(1);
|
||||
+ ItemStack itemstack1 = armor.copyWithCount(1); // Paper - shrink below and single item in event
|
||||
// CraftBukkit start
|
|
@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
;
|
||||
+ } catch (io.papermc.paper.util.ServerStopRejectedExecutionException ignored) { // Paper - do not prematurely disconnect players on stop
|
||||
} catch (RejectedExecutionException rejectedexecutionexception) {
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.server_shutdown"));
|
||||
this.disconnect((Component) Component.translatable("multiplayer.disconnect.server_shutdown"));
|
||||
} catch (ClassCastException classcastexception) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
||||
public Entity currentExplosionCause;
|
||||
public boolean ignoreFallDamageFromCurrentImpulse;
|
||||
private boolean ignoreFallDamageFromCurrentImpulse;
|
||||
private int currentImpulseContextResetGraceTime;
|
||||
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
|
||||
|
|
@ -51,8 +51,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ }
|
||||
+ // Paper end - Friction API
|
||||
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||
if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("attributes", 10));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
@ -137,10 +137,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
nmsStack.hurtAndBreakWithoutChecks(amount, this.getHandle(), slot);
|
||||
nmsStack.hurtAndBreak(amount, this.getHandle(), slot, true);
|
||||
}
|
||||
// Paper end - ItemStack damage API
|
||||
+
|
||||
+ // Paper start - friction API
|
||||
+ @org.jetbrains.annotations.NotNull
|
||||
+ @Override
|
|
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
|
||||
Location enter = bukkitEntity.getLocation();
|
||||
Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld());
|
||||
|
||||
- EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius);
|
||||
+ // Paper start
|
|
@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||
@@ -0,0 +0,0 @@ public class FollowOwnerGoal extends Goal {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot());
|
||||
+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance
|
||||
boolean bl = this.tamable.shouldTryTeleportToOwner();
|
||||
if (!bl) {
|
||||
- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot());
|
||||
+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance
|
||||
}
|
||||
|
||||
if (--this.timeToRecalcPath <= 0) {
|
||||
this.timeToRecalcPath = this.adjustedTickDelay(10);
|
||||
if (this.tamable.distanceToSqr((Entity) this.owner) >= 144.0D) {
|
|
@ -11,7 +11,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue