Update to Minecraft 1.20.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-12-06 03:40:00 +11:00
parent afdb1d9bc3
commit 8398e12b34
256 changed files with 2745 additions and 1911 deletions

View File

@@ -15,7 +15,7 @@
public class EntityItem extends Entity implements TraceableEntity {
private static final DataWatcherObject<ItemStack> DATA_ITEM = DataWatcher.defineId(EntityItem.class, DataWatcherRegistry.ITEM_STACK);
@@ -45,6 +53,7 @@
@@ -47,6 +55,7 @@
@Nullable
public UUID target;
public final float bobOffs;
@@ -23,7 +23,7 @@
public EntityItem(EntityTypes<? extends EntityItem> entitytypes, World world) {
super(entitytypes, world);
@@ -110,9 +119,12 @@
@@ -128,9 +137,12 @@
this.discard();
} else {
super.tick();
@@ -39,7 +39,7 @@
this.xo = this.getX();
this.yo = this.getY();
@@ -162,9 +174,11 @@
@@ -180,9 +192,11 @@
this.mergeWithNeighbours();
}
@@ -51,7 +51,7 @@
this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing();
if (!this.level().isClientSide) {
@@ -176,6 +190,12 @@
@@ -194,6 +208,12 @@
}
if (!this.level().isClientSide && this.age >= 6000) {
@@ -64,7 +64,7 @@
this.discard();
}
@@ -259,6 +279,11 @@
@@ -277,6 +297,11 @@
}
private static void merge(EntityItem entityitem, ItemStack itemstack, EntityItem entityitem1, ItemStack itemstack1) {
@@ -76,7 +76,7 @@
merge(entityitem, itemstack, itemstack1);
entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay);
entityitem.age = Math.min(entityitem.age, entityitem1.age);
@@ -284,6 +309,11 @@
@@ -302,6 +327,11 @@
} else if (this.level().isClientSide) {
return true;
} else {
@@ -88,7 +88,7 @@
this.markHurt();
this.health = (int) ((float) this.health - f);
this.gameEvent(GameEvent.ENTITY_DAMAGE, damagesource.getEntity());
@@ -347,6 +377,46 @@
@@ -366,6 +396,46 @@
Item item = itemstack.getItem();
int i = itemstack.getCount();

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/item/EntityTNTPrimed.java
+++ b/net/minecraft/world/entity/item/EntityTNTPrimed.java
@@ -15,12 +15,19 @@
import net.minecraft.world.entity.TraceableEntity;
import net.minecraft.world.level.World;
@@ -19,6 +19,11 @@
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.IBlockData;
+// CraftBukkit start;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
@@ -12,7 +12,8 @@
public class EntityTNTPrimed extends Entity implements TraceableEntity {
private static final DataWatcherObject<Integer> DATA_FUSE_ID = DataWatcher.defineId(EntityTNTPrimed.class, DataWatcherRegistry.INT);
private static final int DEFAULT_FUSE_TIME = 80;
@@ -28,6 +33,8 @@
public static final String TAG_FUSE = "fuse";
@Nullable
public EntityLiving owner;
+ public float yield = 4; // CraftBukkit - add field
@@ -20,7 +21,7 @@
public EntityTNTPrimed(EntityTypes<? extends EntityTNTPrimed> entitytypes, World world) {
super(entitytypes, world);
@@ -71,10 +78,13 @@
@@ -79,10 +86,13 @@
this.setFuse(i);
if (i <= 0) {
@@ -35,7 +36,7 @@
} else {
this.updateInWaterStateAndDoFluidPushing();
if (this.level().isClientSide) {
@@ -85,9 +95,14 @@
@@ -93,9 +103,14 @@
}
private void explode() {