Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01:00
Ursprung
41273001d8
Commit
f4a5ccb1f9
@ -104,7 +104,9 @@ public class JavaMerchantOffersTranslator extends PacketTranslator<ClientboundMe
|
|||||||
recipe.put("sell", getItemTag(session, trade.getOutput()));
|
recipe.put("sell", getItemTag(session, trade.getOutput()));
|
||||||
|
|
||||||
// The buy count before demand and special price adjustments
|
// 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("buyCountB", trade.getSecondInput() != null ? Math.max(trade.getSecondInput().getAmount(), 0) : 0);
|
||||||
|
|
||||||
recipe.putInt("demand", trade.getDemand()); // Seems to have no effect
|
recipe.putInt("demand", trade.getDemand()); // Seems to have no effect
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren