Update to Minecraft 1.21

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-06-14 01:05:00 +10:00
parent 7c6204e1a9
commit eed041d629
255 changed files with 3585 additions and 3261 deletions

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/world/entity/item/EntityItem.java
+++ b/net/minecraft/world/entity/item/EntityItem.java
@@ -33,6 +33,15 @@
import net.minecraft.world.level.gameevent.GameEvent;
@@ -34,6 +34,15 @@
import net.minecraft.world.level.portal.DimensionTransition;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
@@ -16,7 +16,7 @@
public class EntityItem extends Entity implements TraceableEntity {
private static final DataWatcherObject<ItemStack> DATA_ITEM = DataWatcher.defineId(EntityItem.class, DataWatcherRegistry.ITEM_STACK);
@@ -51,6 +60,7 @@
@@ -52,6 +61,7 @@
@Nullable
public UUID target;
public final float bobOffs;
@@ -24,7 +24,7 @@
public EntityItem(EntityTypes<? extends EntityItem> entitytypes, World world) {
super(entitytypes, world);
@@ -132,12 +142,15 @@
@@ -133,12 +143,15 @@
@Override
public void tick() {
if (this.getItem().isEmpty()) {
@@ -44,7 +44,7 @@
this.xo = this.getX();
this.yo = this.getY();
@@ -186,9 +199,11 @@
@@ -187,9 +200,11 @@
this.mergeWithNeighbours();
}
@@ -56,7 +56,7 @@
this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing();
if (!this.level().isClientSide) {
@@ -200,7 +215,13 @@
@@ -201,7 +216,13 @@
}
if (!this.level().isClientSide && this.age >= 6000) {
@@ -71,7 +71,7 @@
}
}
@@ -283,11 +304,16 @@
@@ -284,11 +305,16 @@
}
private static void merge(EntityItem entityitem, ItemStack itemstack, EntityItem entityitem1, ItemStack itemstack1) {
@@ -89,7 +89,7 @@
}
}
@@ -308,12 +334,17 @@
@@ -309,12 +335,17 @@
} else if (this.level().isClientSide) {
return true;
} else {
@@ -108,7 +108,7 @@
}
return true;
@@ -365,7 +396,7 @@
@@ -366,7 +397,7 @@
}
if (this.getItem().isEmpty()) {
@@ -117,7 +117,7 @@
}
}
@@ -377,10 +408,50 @@
@@ -378,10 +409,50 @@
Item item = itemstack.getItem();
int i = itemstack.getCount();