mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 22:40:21 +01:00
Fix EnchantmentView#setOffers length precondition being flipped (#11818)
This commit is contained in:
parent
d568e175ee
commit
25cc3d8578
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ public class CraftEnchantmentView extends CraftInventoryView<EnchantmentMenu, En
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setOffers(@NotNull final EnchantmentOffer[] offers) {
|
public void setOffers(@NotNull final EnchantmentOffer[] offers) {
|
||||||
Preconditions.checkArgument(offers.length != 3, "There must be 3 offers given");
|
Preconditions.checkArgument(offers.length == 3, "There must be 3 offers given");
|
||||||
IdMap<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
|
IdMap<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
|
||||||
for (int i = 0; i < offers.length; i++) {
|
for (int i = 0; i < offers.length; i++) {
|
||||||
final EnchantmentOffer offer = offers[i];
|
final EnchantmentOffer offer = offers[i];
|
||||||
|
|
Loading…
Reference in a new issue