Fixed villager trades having non-applicable enchants
Also added an AT at lex's request
This commit is contained in:
parent
87d89fb09a
commit
cbac95de0f
2 changed files with 3 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
for(Enchantment enchantment : Registry.field_212628_q) {
|
||||
- if ((!enchantment.func_185261_e() || p_185291_2_) && enchantment.func_230310_i_() && (enchantment.field_77351_y.func_77557_a(item) || flag)) {
|
||||
+ if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.canApplyAtEnchantingTable(p_185291_1_) || (flag || enchantment.isAllowedOnBooks()))) {
|
||||
+ if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.canApplyAtEnchantingTable(p_185291_1_) || (flag && enchantment.isAllowedOnBooks()))) {
|
||||
for(int i = enchantment.func_77325_b(); i > enchantment.func_77319_d() - 1; --i) {
|
||||
if (p_185291_0_ >= enchantment.func_77321_a(i) && p_185291_0_ <= enchantment.func_223551_b(i)) {
|
||||
list.add(new EnchantmentData(enchantment, i));
|
||||
|
|
|
@ -173,4 +173,5 @@ public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/wor
|
|||
private-f net.minecraft.world.server.ChunkHolder field_219320_o # block update location
|
||||
public net.minecraft.world.server.ServerChunkProvider field_186029_c # chunkGenerator
|
||||
public net.minecraft.world.server.ServerChunkProvider field_73251_h # worldObj
|
||||
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor
|
||||
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor
|
||||
public net.minecraft.item.ItemModelsProperties func_239418_a_(Lnet/minecraft/item/Item;Lnet/minecraft/util/ResourceLocation;Lnet/minecraft/item/IItemPropertyGetter;)V
|
Loading…
Reference in a new issue