18 lines
653 B
Kotlin
18 lines
653 B
Kotlin
package com.github.itzilly.sbt.renderer
|
|
|
|
import net.minecraft.client.Minecraft
|
|
import net.minecraft.util.BlockPos
|
|
import net.minecraftforge.client.event.RenderWorldLastEvent
|
|
|
|
class RenderableBlockOutline(val x: Int, val y: Int, val z: Int, val outlineColor: Int) {
|
|
fun renderOutline(event: RenderWorldLastEvent) {
|
|
val player = Minecraft.getMinecraft().thePlayer
|
|
val pos = BlockPos(x, y, z)
|
|
RenderFuncs.drawBlockOutline(player, pos, event.partialTicks, outlineColor)
|
|
}
|
|
|
|
fun renderLine(event: RenderWorldLastEvent) {
|
|
val pos = BlockPos(x, y, z)
|
|
RenderFuncs.drawBlockLine(pos, event.partialTicks)
|
|
}
|
|
} |