@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user