From 4b56cf3b5ca6bcf35600c3a54f75c6347595b78b Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sat, 2 Mar 2024 12:10:33 -0500 Subject: [PATCH] Fix #4666 --- .../block/be/MatrixEnchantingTableBlockEntity.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/block/be/MatrixEnchantingTableBlockEntity.java b/src/main/java/org/violetmoon/quark/addons/oddities/block/be/MatrixEnchantingTableBlockEntity.java index 257d51f00..c224fe56a 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/block/be/MatrixEnchantingTableBlockEntity.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/block/be/MatrixEnchantingTableBlockEntity.java @@ -1,7 +1,6 @@ package org.violetmoon.quark.addons.oddities.block.be; import com.google.common.collect.Lists; - import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; @@ -30,10 +29,8 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; - import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; - import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix; import org.violetmoon.quark.addons.oddities.inventory.EnchantmentMatrix.Piece; import org.violetmoon.quark.addons.oddities.inventory.MatrixEnchantingMenu; @@ -236,6 +233,11 @@ private void makeUUID() { } public void updateEnchantPower() { + ItemStack item = getItem(0); + influences.clear(); + if(!item.isEmpty()) + enchantability = Quark.ZETA.itemExtensions.get(item).getEnchantmentValueZeta(item); + boolean allowWater = MatrixEnchantingModule.allowUnderwaterEnchanting; boolean allowShort = MatrixEnchantingModule.allowShortBlockEnchanting; @@ -256,11 +258,6 @@ public void updateEnchantPower() { } bookshelfPower = Math.min((int) power, MatrixEnchantingModule.maxBookshelves); - - ItemStack item = getItem(0); - influences.clear(); - if(!item.isEmpty()) - enchantability = Quark.ZETA.itemExtensions.get(item).getEnchantmentValueZeta(item); } private boolean isAirGap(int j, int k, boolean allowWater, boolean allowShortBlock) {