mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-11-23 07:16:39 +01:00
parent
41273001d8
commit
f4a5ccb1f9
1 changed files with 3 additions and 1 deletions
|
@ -104,7 +104,9 @@ public class JavaMerchantOffersTranslator extends PacketTranslator<ClientboundMe
|
|||
recipe.put("sell", getItemTag(session, trade.getOutput()));
|
||||
|
||||
// The buy count before demand and special price adjustments
|
||||
recipe.putInt("buyCountA", Math.max(trade.getFirstInput().getAmount(), 0));
|
||||
// The first input CAN be null as of Java 1.19.0/Bedrock 1.19.10
|
||||
// Replicable item: https://gist.github.com/Camotoy/3f3f23d1f80981d1b4472bdb23bba698 from https://github.com/GeyserMC/Geyser/issues/3171
|
||||
recipe.putInt("buyCountA", trade.getFirstInput() != null ? Math.max(trade.getFirstInput().getAmount(), 0) : 0);
|
||||
recipe.putInt("buyCountB", trade.getSecondInput() != null ? Math.max(trade.getSecondInput().getAmount(), 0) : 0);
|
||||
|
||||
recipe.putInt("demand", trade.getDemand()); // Seems to have no effect
|
||||
|
|
Loading…
Reference in a new issue