@@ -61,7 +61,10 @@ import net.minecraft.inventory.ClickType
6161import net.minecraft.inventory.ItemStackHelper
6262import net.minecraft.inventory.Slot
6363import net.minecraft.item.*
64- import net.minecraft.network.play.client.*
64+ import net.minecraft.network.play.client.CPacketClientStatus
65+ import net.minecraft.network.play.client.CPacketEntityAction
66+ import net.minecraft.network.play.client.CPacketPlayerDigging
67+ import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock
6568import net.minecraft.network.play.server.SPacketBlockChange
6669import net.minecraft.network.play.server.SPacketOpenWindow
6770import net.minecraft.network.play.server.SPacketPlayerPosLook
@@ -81,7 +84,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent
8184import org.lwjgl.opengl.GL11
8285import java.util.*
8386import kotlin.collections.ArrayDeque
84- import kotlin.collections.LinkedHashMap
8587import kotlin.math.PI
8688import kotlin.math.abs
8789import kotlin.math.sin
@@ -113,7 +115,7 @@ internal object HighwayTools : PluginModule(
113115 )
114116
115117 // build settings
116- val mode by setting(" Mode" , Mode .HIGHWAY , { page == Page .BUILD }, description = " Choose the structure" )
118+ private val mode by setting(" Mode" , Mode .HIGHWAY , { page == Page .BUILD }, description = " Choose the structure" )
117119 private val width by setting(" Width" , 6 , 1 .. 11 , 1 , { page == Page .BUILD }, description = " Sets the width of blueprint" )
118120 private val height by setting(" Height" , 4 , 1 .. 6 , 1 , { page == Page .BUILD && clearSpace }, description = " Sets height of blueprint" )
119121 private val backfill by setting(" Backfill" , false , { page == Page .BUILD && mode == Mode .TUNNEL }, description = " Fills the tunnel behind you" )
@@ -229,7 +231,7 @@ internal object HighwayTools : PluginModule(
229231 private var startingDirection = Direction .NORTH
230232 private var currentBlockPos = BlockPos (0 , - 1 , 0 )
231233 private var startingBlockPos = BlockPos (0 , - 1 , 0 )
232- var targetBlockPos = BlockPos (0 , - 1 , 0 )
234+ private var targetBlockPos = BlockPos (0 , - 1 , 0 )
233235 var distancePending = 0
234236 private val blueprint = LinkedHashMap <BlockPos , Block >()
235237
@@ -276,9 +278,9 @@ internal object HighwayTools : PluginModule(
276278 private var fillerMatLeft = 0
277279 private var lastToolDamage = 0
278280 private var durabilityUsages = 0
279- var matPlaced = 0
281+ private var matPlaced = 0
280282 private var enderMined = 0
281- var netherrackMined = 0
283+ private var netherrackMined = 0
282284 private var pickaxeBroken = 0
283285
284286 private val stateUpdateMutex = Mutex ()
@@ -565,7 +567,7 @@ internal object HighwayTools : PluginModule(
565567 val color = ColorHolder (255 , 255 , 255 , 255 )
566568
567569 val debugInfos = mutableListOf<Pair <String , String >>()
568- if (blockTask.sides > 0 ) debugInfos.add(Pair (" Sides" , " ${blockTask.sides} " ))
570+ if (blockTask.sides > 0 ) debugInfos.add(Pair (" Sides" , " ${blockTask.sides} " ))
569571 if (blockTask != containerTask) {
570572 debugInfos.add(Pair (" Distance" , " %.2f" .format(blockTask.eyeDistance)))
571573 } else {
@@ -1010,21 +1012,6 @@ internal object HighwayTools : PluginModule(
10101012 }
10111013 }
10121014
1013- private fun SafeClientEvent.checkDoneTasks (): Boolean {
1014- for (blockTask in doneTasks.values) {
1015- val block = world.getBlockState(blockTask.blockPos).block
1016- if (ignoreBlocks.contains(block.registryName.toString())) continue
1017-
1018- when {
1019- blockTask.block == material && block != material -> return false
1020- mode == Mode .TUNNEL && blockTask.block == fillerMat && block != fillerMat -> return false
1021- blockTask.block == Blocks .AIR && block != Blocks .AIR -> return false
1022- }
1023-
1024- }
1025- return true
1026- }
1027-
10281015 private fun SafeClientEvent.sortTasks () {
10291016
10301017 if (multiBuilding) {
@@ -1482,7 +1469,7 @@ internal object HighwayTools : PluginModule(
14821469
14831470 when (neighbours.size) {
14841471 0 -> {
1485- if (blockTask.taskState == TaskState .LIQUID_FLOW || blockTask.taskState == TaskState .LIQUID_SOURCE ) {
1472+ if (blockTask.taskState == TaskState .LIQUID_FLOW || blockTask.taskState == TaskState .LIQUID_SOURCE ) {
14861473 if (debugMessages == DebugMessages .ALL ) {
14871474 if (! anonymizeStats) {
14881475 sendChatMessage(" $chatName Can't replace Liquid@(${blockTask.blockPos} )" )
0 commit comments