use proper rounding method for scaffold

This commit is contained in:
Bella 2020-04-26 12:40:44 -04:00
parent 0dffda5cb2
commit cea7742759
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.network.play.client.CPacketEntityAction
import net.minecraft.util.math.BlockPos
import net.minecraftforge.client.event.InputUpdateEvent
import kotlin.math.round
/**
* Created by 086 on 20/01/19
@ -98,7 +99,7 @@ class Scaffold : Module() {
mc.player.motionY = motion
}
if (mc.player.posY > towerStart + motion) {
mc.player.setPosition(mc.player.posX, mc.player.posY.toInt() * 1.0, mc.player.posZ)
mc.player.setPosition(mc.player.posX, round(mc.player.posY), mc.player.posZ)
mc.player.motionY = motion
towerStart = mc.player.posY
}