mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@55a16d8 Fix Varint21FrameDecoder cached length buf usage PaperMC/Paper@e6e37ba Add api to resolve components (#7648) PaperMC/Paper@7168438 [ci skip] Rework workflows to support optional paperclip build (#8583) PaperMC/Paper@da230d5 More vanilla friendly methods to update trades (#8478) PaperMC/Paper@8aff07a Add /paper dumplisteners command (#8507) PaperMC/Paper@b8919a7 pr command action fixes (#8591) PaperMC/Paper@185fa48 Fix chest relooting mechanics (#8580) PaperMC/Paper@b4beac0 Fixes potential issues arising from optimizing getPlayerByUUID (#8585) PaperMC/Paper@f637b1a Fix async entity add due to fungus trees (#7626) PaperMC/Paper@414ea80 ItemStack damage API (#7801) PaperMC/Paper@d98c370 Add displayName methods for advancements (#8584) PaperMC/Paper@44bb599 Add Tick TemporalUnit (#5445) PaperMC/Paper@9f7eef8 Friction API (#6611) PaperMC/Paper@4048d3e Allow using degrees for ArmorStand rotations (#7847) PaperMC/Paper@f59c802 Schoolable Fish API (#7089) PaperMC/Paper@21b964a Added ability to control player's insomnia and phantoms spawning (#6500) PaperMC/Paper@f1583fc Add `/paper dumplisteners tofile` and increase detail of command output (#8592)
This commit is contained in:
@@ -18,13 +18,13 @@ index 163f14b4e1ca99d75e5d8e14190f7b91cb58e8f3..7880cdcaf12197f6b36777c51b2859f2
|
||||
|
||||
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
|
||||
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 16a55f94bda9f959548772c8916b4dc3eb045d47..aa1c929d948cea8f6212330f922eb5f1d9b9bb97 100644
|
||||
index 8a5efb6c81bbe85b67a6bb83c0c4afdf995121d0..d7e102024b495067335fe008ec1649708f3a4016 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -55,6 +55,12 @@ public class ItemEntity extends Entity {
|
||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
||||
@@ -56,6 +56,12 @@ public class ItemEntity extends Entity {
|
||||
public boolean canMobPickup = true; // Paper
|
||||
private int despawnRate = -1; // Paper
|
||||
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper
|
||||
+ // Purpur start
|
||||
+ public boolean immuneToCactus = false;
|
||||
+ public boolean immuneToExplosion = false;
|
||||
@@ -34,7 +34,7 @@ index 16a55f94bda9f959548772c8916b4dc3eb045d47..aa1c929d948cea8f6212330f922eb5f1
|
||||
|
||||
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -337,6 +343,15 @@ public class ItemEntity extends Entity {
|
||||
@@ -342,6 +348,15 @@ public class ItemEntity extends Entity {
|
||||
return false;
|
||||
} else if (!this.getItem().getItem().canBeHurtBy(source)) {
|
||||
return false;
|
||||
@@ -50,7 +50,7 @@ index 16a55f94bda9f959548772c8916b4dc3eb045d47..aa1c929d948cea8f6212330f922eb5f1
|
||||
} else if (this.level.isClientSide) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -522,6 +537,12 @@ public class ItemEntity extends Entity {
|
||||
@@ -543,6 +558,12 @@ public class ItemEntity extends Entity {
|
||||
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
|
||||
this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty
|
||||
this.despawnRate = level.paperConfig().entities.spawning.altItemDespawnRate.enabled ? level.paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), level.spigotConfig.itemDespawnRate) : level.spigotConfig.itemDespawnRate; // Paper
|
||||
@@ -64,10 +64,10 @@ index 16a55f94bda9f959548772c8916b4dc3eb045d47..aa1c929d948cea8f6212330f922eb5f1
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
index fea44ba6a6584b4a510af6a58cab07eecec6b68b..f3bf5199bc7ddf8a3d0dc67a184e7690efa659eb 100644
|
||||
index ecec5e17807a760769fc0ea79c2a0161cc5db1ef..3023cadd21947389158f1bfaf9fe84fd0ea80456 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
@@ -148,4 +148,46 @@ public class CraftItem extends CraftEntity implements Item {
|
||||
@@ -160,4 +160,46 @@ public class CraftItem extends CraftEntity implements Item {
|
||||
public EntityType getType() {
|
||||
return EntityType.DROPPED_ITEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user