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,6 +1,6 @@
--- a/net/minecraft/world/inventory/ContainerBeacon.java
+++ b/net/minecraft/world/inventory/ContainerBeacon.java
@@ -12,6 +12,11 @@
@@ -13,6 +13,11 @@
import net.minecraft.world.level.World;
import net.minecraft.world.level.block.Blocks;
@@ -12,7 +12,7 @@
public class ContainerBeacon extends Container {
private static final int PAYMENT_SLOT = 0;
@@ -26,6 +31,10 @@
@@ -27,6 +32,10 @@
private final ContainerBeacon.SlotBeacon paymentSlot;
private final ContainerAccess access;
private final IContainerProperties beaconData;
@@ -23,15 +23,17 @@
public ContainerBeacon(int i, IInventory iinventory) {
this(i, iinventory, new ContainerProperties(3), ContainerAccess.NULL);
@@ -33,6 +42,7 @@
@@ -34,7 +43,8 @@
public ContainerBeacon(int i, IInventory iinventory, IContainerProperties icontainerproperties, ContainerAccess containeraccess) {
super(Containers.BEACON, i);
- this.beacon = new InventorySubcontainer(this, 1) {
+ player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
this.beacon = new InventorySubcontainer(1) {
+ this.beacon = new InventorySubcontainer(1) { // CraftBukkit - decompile error
@Override
public boolean canPlaceItem(int j, ItemStack itemstack) {
@@ -82,6 +92,7 @@
return itemstack.is(TagsItem.BEACON_PAYMENT_ITEMS);
@@ -83,6 +93,7 @@
@Override
public boolean stillValid(EntityHuman entityhuman) {
@@ -39,18 +41,18 @@
return stillValid(this.access, entityhuman, Blocks.BEACON);
}
@@ -163,8 +174,8 @@
@@ -164,8 +175,8 @@
public void updateEffects(Optional<MobEffectList> optional, Optional<MobEffectList> optional1) {
public void updateEffects(Optional<Holder<MobEffectList>> optional, Optional<Holder<MobEffectList>> optional1) {
if (this.paymentSlot.hasItem()) {
- this.beaconData.set(1, encodeEffect((MobEffectList) optional.orElse((Object) null)));
- this.beaconData.set(2, encodeEffect((MobEffectList) optional1.orElse((Object) null)));
+ this.beaconData.set(1, encodeEffect((MobEffectList) optional.orElse(null))); // CraftBukkit - decompile error
+ this.beaconData.set(2, encodeEffect((MobEffectList) optional1.orElse(null))); // CraftBukkit - decompile error
- this.beaconData.set(1, encodeEffect((Holder) optional.orElse((Object) null)));
- this.beaconData.set(2, encodeEffect((Holder) optional1.orElse((Object) null)));
+ this.beaconData.set(1, encodeEffect((Holder) optional.orElse(null)));// CraftBukkit - decompile error
+ this.beaconData.set(2, encodeEffect((Holder) optional1.orElse(null)));// CraftBukkit - decompile error
this.paymentSlot.remove(1);
this.access.execute(World::blockEntityChanged);
}
@@ -191,4 +202,17 @@
@@ -192,4 +203,17 @@
return 1;
}
}