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

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/animal/EntitySheep.java
+++ b/net/minecraft/world/entity/animal/EntitySheep.java
@@ -66,6 +66,14 @@
@@ -64,6 +64,14 @@
import net.minecraft.world.level.storage.loot.LootTable;
import net.minecraft.world.level.storage.loot.LootTables;
import org.joml.Vector3f;
+// CraftBukkit start
+import net.minecraft.world.inventory.InventoryCraftResult;
@@ -15,7 +15,7 @@
public class EntitySheep extends EntityAnimal implements IShearable {
private static final int EAT_ANIMATION_TICKS = 40;
@@ -246,6 +254,11 @@
@@ -251,6 +259,11 @@
if (itemstack.is(Items.SHEARS)) {
if (!this.level().isClientSide && this.readyForShearing()) {
@@ -26,8 +26,8 @@
+ // CraftBukkit end
this.shear(SoundCategory.PLAYERS);
this.gameEvent(GameEvent.SHEAR, entityhuman);
itemstack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
@@ -267,7 +280,9 @@
itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
@@ -270,7 +283,9 @@
int i = 1 + this.random.nextInt(3);
for (int j = 0; j < i; ++j) {
@@ -37,7 +37,7 @@
if (entityitem != null) {
entityitem.setDeltaMovement(entityitem.getDeltaMovement().add((double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (this.random.nextFloat() * 0.05F), (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F)));
@@ -360,6 +375,12 @@
@@ -363,6 +378,12 @@
@Override
public void ate() {
@@ -50,7 +50,7 @@
super.ate();
this.setSheared(false);
if (this.isBaby()) {
@@ -379,7 +400,7 @@
@@ -382,7 +403,7 @@
EnumColor enumcolor = ((EntitySheep) entityanimal).getColor();
EnumColor enumcolor1 = ((EntitySheep) entityanimal1).getColor();
InventoryCrafting inventorycrafting = makeContainer(enumcolor, enumcolor1);
@@ -59,7 +59,7 @@
return ((RecipeCrafting) recipeholder.value()).assemble(inventorycrafting, this.level().registryAccess());
}).map(ItemStack::getItem);
@@ -402,10 +423,18 @@
@@ -405,10 +426,18 @@
public boolean stillValid(EntityHuman entityhuman) {
return false;
}
@@ -77,4 +77,4 @@
+ transientcraftingcontainer.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
return transientcraftingcontainer;
}
}