Skip to content

Commit

Permalink
Fix errors after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hlysine committed Jul 21, 2024
1 parent 4ff577c commit abf140e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.HitResult;
Expand Down Expand Up @@ -143,7 +144,7 @@ public float getEnchantPowerBonus(BlockState state, LevelReader level, BlockPos
return maybeMaterialAs(
level, pos, EnchantmentBonusBlock.class,
(material, block) -> block.getEnchantPowerBonus(material, level, pos),
material -> material.is(BlockTags.ENCHANTMENT_POWER_PROVIDER) ? 1f : 0f
material -> material.is(Blocks.BOOKSHELF) ? 1f : 0f
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public float getEnchantPowerBonus(BlockState state, LevelReader level, BlockPos
bonus.accumulateAndGet(
maybeMaterialAs(level, pos, EnchantmentBonusBlock.class, mat,
(material, enchantmentBlock) -> enchantmentBlock.getEnchantPowerBonus(material, level, pos),
(material) -> material.is(BlockTags.ENCHANTMENT_POWER_PROVIDER) ? 1f : 0f
(material) -> material.is(Blocks.BOOKSHELF) ? 1f : 0f
),
Float::max
);
Expand Down

0 comments on commit abf140e

Please sign in to comment.