Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -30,9 +30,9 @@
this(i, playerinventory, new MerchantWrapper(playerinventory.player));
}
@@ -42,6 +57,7 @@
this.a(new Slot(this.tradeContainer, 0, 136, 37));
this.a(new Slot(this.tradeContainer, 1, 162, 37));
this.a((Slot) (new SlotMerchantResult(playerinventory.player, imerchant, this.tradeContainer, 2, 220, 37)));
this.addSlot(new Slot(this.tradeContainer, 0, 136, 37));
this.addSlot(new Slot(this.tradeContainer, 1, 162, 37));
this.addSlot(new SlotMerchantResult(playerinventory.player, imerchant, this.tradeContainer, 2, 220, 37));
+ this.player = playerinventory; // CraftBukkit - save player
int j;
@@ -40,9 +40,9 @@
@@ -154,7 +170,7 @@
}
private void r() {
- if (!this.trader.getWorld().isClientSide) {
+ if (!this.trader.getWorld().isClientSide && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035
private void playTradeSound() {
- if (!this.trader.isClientSide()) {
+ if (!this.trader.isClientSide() && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035
Entity entity = (Entity) this.trader;
this.trader.getWorld().a(entity.locX(), entity.locY(), entity.locZ(), this.trader.getTradeSound(), SoundCategory.NEUTRAL, 1.0F, 1.0F, false);
entity.getLevel().playLocalSound(entity.getX(), entity.getY(), entity.getZ(), this.trader.getNotifyTradeSound(), SoundCategory.NEUTRAL, 1.0F, 1.0F, false);