mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
remove some block entity aliases
This commit is contained in:
parent
28e28288cd
commit
3ed00f31a7
@ -13,11 +13,9 @@
|
|||||||
|
|
||||||
package de.bixilon.minosoft.data.entities.block
|
package de.bixilon.minosoft.data.entities.block
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.data.text.ChatColors
|
import de.bixilon.minosoft.data.text.ChatColors
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class BedBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
class BedBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||||
var color = ChatColors.RED
|
var color = ChatColors.RED
|
||||||
@ -28,9 +26,8 @@ class BedBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
|||||||
color = ChatColors.RED // ToDo
|
color = ChatColors.RED // ToDo
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object : BlockEntityFactory<BedBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<BedBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:bed")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:bed")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:Bed").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): BedBlockEntity {
|
override fun build(connection: PlayConnection): BedBlockEntity {
|
||||||
return BedBlockEntity(connection)
|
return BedBlockEntity(connection)
|
||||||
|
@ -13,13 +13,11 @@
|
|||||||
|
|
||||||
package de.bixilon.minosoft.data.entities.block
|
package de.bixilon.minosoft.data.entities.block
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.data.text.ChatComponent
|
import de.bixilon.minosoft.data.text.ChatComponent
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
||||||
import de.bixilon.minosoft.util.KUtil.nullCast
|
import de.bixilon.minosoft.util.KUtil.nullCast
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class SignBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
class SignBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||||
var lines: Array<ChatComponent> = Array(ProtocolDefinition.SIGN_LINES) { ChatComponent.of("") }
|
var lines: Array<ChatComponent> = Array(ProtocolDefinition.SIGN_LINES) { ChatComponent.of("") }
|
||||||
@ -33,9 +31,8 @@ class SignBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object : BlockEntityFactory<SignBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<SignBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:sign")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:sign")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:Sign").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): SignBlockEntity {
|
override fun build(connection: PlayConnection): SignBlockEntity {
|
||||||
return SignBlockEntity(connection)
|
return SignBlockEntity(connection)
|
||||||
|
@ -13,16 +13,13 @@
|
|||||||
|
|
||||||
package de.bixilon.minosoft.data.entities.block
|
package de.bixilon.minosoft.data.entities.block
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class SkullBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
class SkullBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||||
|
|
||||||
companion object : BlockEntityFactory<SkullBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<SkullBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:skull")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:skull")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:Skull").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): SkullBlockEntity {
|
override fun build(connection: PlayConnection): SkullBlockEntity {
|
||||||
return SkullBlockEntity(connection)
|
return SkullBlockEntity(connection)
|
||||||
|
@ -14,17 +14,14 @@
|
|||||||
package de.bixilon.minosoft.data.entities.block.container
|
package de.bixilon.minosoft.data.entities.block.container
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class HopperBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
class HopperBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||||
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<HopperBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<HopperBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:hopper")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:hopper")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:Hopper").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): HopperBlockEntity {
|
override fun build(connection: PlayConnection): HopperBlockEntity {
|
||||||
return HopperBlockEntity(connection)
|
return HopperBlockEntity(connection)
|
||||||
|
@ -14,16 +14,13 @@
|
|||||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class ChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
class ChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||||
|
|
||||||
companion object : BlockEntityFactory<ChestBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<ChestBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:chest")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:chest")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:Chest").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): ChestBlockEntity {
|
override fun build(connection: PlayConnection): ChestBlockEntity {
|
||||||
return ChestBlockEntity(connection)
|
return ChestBlockEntity(connection)
|
||||||
|
@ -14,16 +14,13 @@
|
|||||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||||
import de.bixilon.minosoft.data.registries.MultiResourceLocationAble
|
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocationList
|
|
||||||
|
|
||||||
class EnderChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
class EnderChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||||
|
|
||||||
companion object : BlockEntityFactory<EnderChestBlockEntity>, MultiResourceLocationAble {
|
companion object : BlockEntityFactory<EnderChestBlockEntity> {
|
||||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:ender_chest")
|
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:ender_chest")
|
||||||
override val ALIASES: Set<ResourceLocation> = setOf("minecraft:EnderChest").toResourceLocationList()
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): EnderChestBlockEntity {
|
override fun build(connection: PlayConnection): EnderChestBlockEntity {
|
||||||
return EnderChestBlockEntity(connection)
|
return EnderChestBlockEntity(connection)
|
||||||
|
@ -43,6 +43,10 @@ data class EntityType(
|
|||||||
val factory: EntityFactory<out Entity>,
|
val factory: EntityFactory<out Entity>,
|
||||||
) : RegistryItem(), Translatable {
|
) : RegistryItem(), Translatable {
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return resourceLocation.toString()
|
||||||
|
}
|
||||||
|
|
||||||
fun build(connection: PlayConnection, position: Vec3d, rotation: EntityRotation, entityMetaData: EntityMetaData?, versionId: Int): Entity? {
|
fun build(connection: PlayConnection, position: Vec3d, rotation: EntityRotation, entityMetaData: EntityMetaData?, versionId: Int): Entity? {
|
||||||
return DefaultEntityFactories.buildEntity(factory, connection, position, rotation, entityMetaData, versionId)
|
return DefaultEntityFactories.buildEntity(factory, connection, position, rotation, entityMetaData, versionId)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user