Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Jan 22, 2024
1 parent cef4e16 commit effef95
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.drawFilledBoundingBox_nea
import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock
import net.minecraft.client.Minecraft
import net.minecraft.init.Blocks
import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.awt.Color
Expand Down Expand Up @@ -43,9 +44,9 @@ class RiftWiltedBerberisHelper {
hasFarmingToolInHand = InventoryUtils.getItemInHand()?.getInternalName() == RiftAPI.farmingTool

if (Minecraft.getMinecraft().thePlayer.onGround) {
val block = LocationUtils.playerLocation().add(y = -1).getBlockAt().toString()
val block = LocationUtils.playerLocation().add(y = -1).getBlockAt()
val currentY = LocationUtils.playerLocation().y
isOnFarmland = block == "Block{minecraft:farmland}" && (currentY % 1 == 0.0)
isOnFarmland = block == Blocks.farmland && (currentY % 1 == 0.0)
}
}

Expand Down

0 comments on commit effef95

Please sign in to comment.