mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-08 06:50:22 -04:00
remove ItemInteractEntityHandler
not used anymore
This commit is contained in:
parent
baf810ec72
commit
e093c60808
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.registries.item.handler
|
||||
|
||||
import de.bixilon.minosoft.camera.target.targets.EntityTarget
|
||||
import de.bixilon.minosoft.data.container.stack.ItemStack
|
||||
import de.bixilon.minosoft.data.entities.entities.player.Hands
|
||||
import de.bixilon.minosoft.input.interaction.InteractionResults
|
||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
||||
|
||||
@Deprecated("Need? InteractAtHandler")
|
||||
interface ItemInteractEntityHandler {
|
||||
|
||||
fun interactEntity(connection: PlayConnection, target: EntityTarget, hand: Hands, stack: ItemStack): InteractionResults
|
||||
}
|
@ -36,7 +36,6 @@ import de.bixilon.kutil.primitive.IntUtil.checkInt
|
||||
import de.bixilon.kutil.reflection.ReflectionUtil.forceInit
|
||||
import de.bixilon.kutil.reflection.ReflectionUtil.realName
|
||||
import de.bixilon.kutil.shutdown.ShutdownManager
|
||||
import de.bixilon.kutil.time.Cooldown
|
||||
import de.bixilon.kutil.url.URLProtocolStreamHandlers
|
||||
import de.bixilon.minosoft.config.profile.manager.ProfileManagers
|
||||
import de.bixilon.minosoft.data.container.stack.ItemStack
|
||||
@ -216,20 +215,13 @@ object KUtil {
|
||||
}
|
||||
|
||||
fun Any?.autoType(): Any? {
|
||||
if (this == null) {
|
||||
return null
|
||||
}
|
||||
if (this is Number) {
|
||||
return this
|
||||
}
|
||||
if (this == null) return null
|
||||
if (this is Number) return this
|
||||
|
||||
val string = this.toString()
|
||||
|
||||
if (string == "true") {
|
||||
return true
|
||||
}
|
||||
if (string == "false") {
|
||||
return false
|
||||
}
|
||||
if (string == "true") return true
|
||||
if (string == "false") return false
|
||||
|
||||
string.checkInt()?.let { return it }
|
||||
|
||||
@ -292,10 +284,6 @@ object KUtil {
|
||||
return prefixed.toArray()
|
||||
}
|
||||
|
||||
fun Cooldown.setTicks(ticks: Int) {
|
||||
set(ticks * ProtocolDefinition.TICK_TIME)
|
||||
}
|
||||
|
||||
fun init() {
|
||||
Table.DEFAULT_STYLE = TableStyles.FANCY
|
||||
URLProtocolStreamHandlers.register("resource", ResourceURLHandler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user