Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -22,7 +22,7 @@
public EntityCreeper(EntityTypes<? extends EntityCreeper> entitytypes, World world) {
super(entitytypes, world);
@@ -218,9 +226,20 @@
@@ -216,9 +224,20 @@
@Override
public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
super.thunderHit(worldserver, entitylightning);
@@ -43,18 +43,18 @@
@Override
protected EnumInteractionResult mobInteract(EntityHuman entityhuman, EnumHand enumhand) {
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
@@ -230,8 +249,9 @@
@@ -228,8 +247,9 @@
this.level().playSound(entityhuman, this.getX(), this.getY(), this.getZ(), soundeffect, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
if (!this.level().isClientSide) {
+ this.entityIgniter = entityhuman; // CraftBukkit
this.ignite();
- if (!itemstack.isDamageableItem()) {
+ if (itemstack.getItem().getMaxDamage() == 0) { // CraftBukkit - fix MC-264285: unbreakable flint and steels are completely consumed when igniting a creeper
+ if (itemstack.getMaxDamage() == 0) { // CraftBukkit - fix MC-264285: unbreakable flint and steels are completely consumed when igniting a creeper
itemstack.shrink(1);
} else {
itemstack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
@@ -250,10 +270,19 @@
itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
@@ -246,10 +266,19 @@
if (!this.level().isClientSide) {
float f = this.isPowered() ? 2.0F : 1.0F;
@@ -76,7 +76,7 @@
}
}
@@ -264,6 +293,7 @@
@@ -260,6 +289,7 @@
if (!collection.isEmpty()) {
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
@@ -84,7 +84,7 @@
entityareaeffectcloud.setRadius(2.5F);
entityareaeffectcloud.setRadiusOnUse(-0.5F);
entityareaeffectcloud.setWaitTime(10);
@@ -277,7 +307,7 @@
@@ -273,7 +303,7 @@
entityareaeffectcloud.addEffect(new MobEffect(mobeffect));
}