mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-20 02:08:15 +02:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@bcb4220 Correctly handle interactions with items on cooldown (#8008) PaperMC/Paper@60c973e Exempt players in creative/spectator from nether ceiling damage (#8427) PaperMC/Paper@77a50b9 Add Unmodifiable annotations to getDrops methods (#8440)
This commit is contained in:
@@ -79,7 +79,7 @@ index bfaa37739230107b73f81e227660e950d81d50a0..37f7e6d4ab2c5a043b122b34a4a0e574
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
ServerGamePacketListenerImpl.this.send(new ClientboundAddEntityPacket(entity));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d9348a2f58eea3bd1d70851bedf29fd96430e1ff..726c4a9dac41a887537b91ade7cb7b2a722a1e63 100644
|
||||
index 6a106250f98edd68908e6e9703cddbf5edbe69d7..56417ab6da0f9e3d11e9935c954116d9b33844e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -362,7 +362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -91,7 +91,7 @@ index d9348a2f58eea3bd1d70851bedf29fd96430e1ff..726c4a9dac41a887537b91ade7cb7b2a
|
||||
private float eyeHeight;
|
||||
public boolean isInPowderSnow;
|
||||
public boolean wasInPowderSnow;
|
||||
@@ -2782,6 +2782,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2783,6 +2783,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.passengers = ImmutableList.copyOf(list);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index d9348a2f58eea3bd1d70851bedf29fd96430e1ff..726c4a9dac41a887537b91ade7cb7b2a
|
||||
}
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
@@ -2822,6 +2828,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2823,6 +2829,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return false;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -119,7 +119,7 @@ index d9348a2f58eea3bd1d70851bedf29fd96430e1ff..726c4a9dac41a887537b91ade7cb7b2a
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} else {
|
||||
@@ -4568,4 +4582,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4569,4 +4583,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return ((ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
||||
}
|
||||
// Paper end
|
||||
@@ -5178,11 +5178,11 @@ index d4ea7d19ae16a8ccafcfe5300bb380b28fd42b75..a0d8afdee5db3202d3693ad4d10b61fc
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 3bdde2057c9c2ac0e12cf3edab1c3150838dce01..047d8c8d7fea64328f73202c5629382a2194898d 100644
|
||||
index 03b3f29bde2bf6cb4e7b08a775bcc380a9404543..1c4643e1bff41b5bce92c07c59b1c6fea16d0d43 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -533,6 +533,15 @@ public class CraftEventFactory {
|
||||
}
|
||||
@@ -544,6 +544,15 @@ public class CraftEventFactory {
|
||||
// Paper end
|
||||
craftServer.getPluginManager().callEvent(event);
|
||||
|
||||
+ // Purpur start
|
||||
@@ -5197,7 +5197,7 @@ index 3bdde2057c9c2ac0e12cf3edab1c3150838dce01..047d8c8d7fea64328f73202c5629382a
|
||||
return event;
|
||||
}
|
||||
|
||||
@@ -970,6 +979,7 @@ public class CraftEventFactory {
|
||||
@@ -981,6 +990,7 @@ public class CraftEventFactory {
|
||||
damageCause = DamageCause.ENTITY_EXPLOSION;
|
||||
}
|
||||
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions, source.isCritical()); // Paper - add critical damage API
|
||||
@@ -5205,7 +5205,7 @@ index 3bdde2057c9c2ac0e12cf3edab1c3150838dce01..047d8c8d7fea64328f73202c5629382a
|
||||
}
|
||||
event.setCancelled(cancelled);
|
||||
|
||||
@@ -1076,6 +1086,7 @@ public class CraftEventFactory {
|
||||
@@ -1087,6 +1097,7 @@ public class CraftEventFactory {
|
||||
} else {
|
||||
entity.lastDamageCancelled = true; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
}
|
||||
@@ -5213,7 +5213,7 @@ index 3bdde2057c9c2ac0e12cf3edab1c3150838dce01..047d8c8d7fea64328f73202c5629382a
|
||||
return event;
|
||||
}
|
||||
|
||||
@@ -1135,6 +1146,7 @@ public class CraftEventFactory {
|
||||
@@ -1146,6 +1157,7 @@ public class CraftEventFactory {
|
||||
EntityDamageEvent event;
|
||||
if (damager != null) {
|
||||
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions, critical); // Paper - add critical damage API
|
||||
|
||||
Reference in New Issue
Block a user