mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
remove some unneeded block entities
This commit is contained in:
parent
a7d8a09e1b
commit
8cfc4efd32
@ -13,13 +13,13 @@
|
|||||||
|
|
||||||
package de.bixilon.minosoft.data.entities.block
|
package de.bixilon.minosoft.data.entities.block
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.container.processing.*
|
import de.bixilon.minosoft.data.entities.block.container.storage.ChestBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.container.storage.*
|
import de.bixilon.minosoft.data.entities.block.container.storage.EnderChestBlockEntity
|
||||||
|
import de.bixilon.minosoft.data.entities.block.container.storage.ShulkerBoxBlockEntity
|
||||||
|
import de.bixilon.minosoft.data.entities.block.container.storage.TrappedChestBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.end.EndGatewayBlockEntity
|
import de.bixilon.minosoft.data.entities.block.end.EndGatewayBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.end.EndPortalBlockEntity
|
import de.bixilon.minosoft.data.entities.block.end.EndPortalBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.CommandBlockEntity
|
import de.bixilon.minosoft.data.entities.block.redstone.CommandBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.ComparatorBlockEntity
|
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.DaylightDetectorBlockEntity
|
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.SculkSensorBlockEntity
|
import de.bixilon.minosoft.data.entities.block.redstone.SculkSensorBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.piston.PistonBlockEntity
|
import de.bixilon.minosoft.data.entities.block.redstone.piston.PistonBlockEntity
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.piston.StickyPistonBlockEntity
|
import de.bixilon.minosoft.data.entities.block.redstone.piston.StickyPistonBlockEntity
|
||||||
@ -28,30 +28,20 @@ import de.bixilon.minosoft.data.registries.factory.DefaultFactory
|
|||||||
|
|
||||||
object DefaultBlockDataFactory : DefaultFactory<BlockEntityFactory<out BlockEntity>>(
|
object DefaultBlockDataFactory : DefaultFactory<BlockEntityFactory<out BlockEntity>>(
|
||||||
BedBlockEntity,
|
BedBlockEntity,
|
||||||
HopperBlockEntity,
|
|
||||||
SignBlockEntity,
|
SignBlockEntity,
|
||||||
BlastFurnaceBlockEntity,
|
|
||||||
FurnaceBlockEntity,
|
|
||||||
CampfireBlockEntity,
|
CampfireBlockEntity,
|
||||||
JigsawBlockEntity,
|
JigsawBlockEntity,
|
||||||
LecternBlockEntity,
|
LecternBlockEntity,
|
||||||
BellBlockEntity,
|
BellBlockEntity,
|
||||||
SmokerBlockEntity,
|
|
||||||
ConduitBlockEntity,
|
ConduitBlockEntity,
|
||||||
BarrelBlockEntity,
|
|
||||||
ShulkerBoxBlockEntity,
|
ShulkerBoxBlockEntity,
|
||||||
StructureBlockBlockEntity,
|
StructureBlockBlockEntity,
|
||||||
CommandBlockEntity,
|
CommandBlockEntity,
|
||||||
ComparatorBlockEntity,
|
|
||||||
BannerBlockEntity,
|
BannerBlockEntity,
|
||||||
DaylightDetectorBlockEntity,
|
|
||||||
BeaconBlockEntity,
|
BeaconBlockEntity,
|
||||||
SkullBlockEntity,
|
SkullBlockEntity,
|
||||||
EnchantingTableBlockEntity,
|
EnchantingTableBlockEntity,
|
||||||
BrewingStandBlockEntity,
|
|
||||||
MobSpawnerBlockEntity,
|
MobSpawnerBlockEntity,
|
||||||
DispenserBlockEntity,
|
|
||||||
DropperBlockEntity,
|
|
||||||
EnderChestBlockEntity,
|
EnderChestBlockEntity,
|
||||||
JukeboxBlockEntity,
|
JukeboxBlockEntity,
|
||||||
ChestBlockEntity,
|
ChestBlockEntity,
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class BlastFurnaceBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<BlastFurnaceBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("blast_furnace")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): BlastFurnaceBlockEntity {
|
|
||||||
return BlastFurnaceBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class BrewingStandBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<BrewingStandBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("brewing_stand")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): BrewingStandBlockEntity {
|
|
||||||
return BrewingStandBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class DispenserBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<DispenserBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("dispenser")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): DispenserBlockEntity {
|
|
||||||
return DispenserBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class DropperBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<DropperBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("dropper")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): DropperBlockEntity {
|
|
||||||
return DropperBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class FurnaceBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<FurnaceBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("furnace")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): FurnaceBlockEntity {
|
|
||||||
return FurnaceBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class HopperBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<HopperBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("hopper")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): HopperBlockEntity {
|
|
||||||
return HopperBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.container.ContainerBlockEntity
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
|
|
||||||
abstract class ProcessingBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection)
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.processing
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class SmokerBlockEntity(connection: PlayConnection) : ProcessingBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<SmokerBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("smoker")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): SmokerBlockEntity {
|
|
||||||
return SmokerBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.container.storage
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class BarrelBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<BarrelBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("barrel")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): BarrelBlockEntity {
|
|
||||||
return BarrelBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.redstone
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntity
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class ComparatorBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<ComparatorBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("comparator")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): ComparatorBlockEntity {
|
|
||||||
return ComparatorBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minosoft
|
|
||||||
* Copyright (C) 2020-2023 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.entities.block.redstone
|
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntity
|
|
||||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
|
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
|
||||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|
||||||
import de.bixilon.minosoft.util.KUtil
|
|
||||||
|
|
||||||
class DaylightDetectorBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
|
||||||
|
|
||||||
companion object : BlockEntityFactory<DaylightDetectorBlockEntity> {
|
|
||||||
override val identifier: ResourceLocation = minecraft("daylight_detector")
|
|
||||||
|
|
||||||
override fun build(connection: PlayConnection): DaylightDetectorBlockEntity {
|
|
||||||
return DaylightDetectorBlockEntity(connection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -23,7 +23,7 @@ import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
|||||||
|
|
||||||
interface BlockWithEntity<T : BlockEntity> : InteractBlockHandler {
|
interface BlockWithEntity<T : BlockEntity> : InteractBlockHandler {
|
||||||
|
|
||||||
fun createBlockEntity(connection: PlayConnection): BlockEntity?
|
fun createBlockEntity(connection: PlayConnection): T?
|
||||||
|
|
||||||
override fun interact(connection: PlayConnection, target: BlockTarget, hand: Hands, stack: ItemStack?) = InteractionResults.SUCCESS
|
override fun interact(connection: PlayConnection, target: BlockTarget, hand: Hands, stack: ItemStack?) = InteractionResults.SUCCESS
|
||||||
}
|
}
|
||||||
|
@ -13,13 +13,13 @@
|
|||||||
|
|
||||||
package de.bixilon.minosoft.data.registries.blocks.types.pixlyzer.entity.redstone
|
package de.bixilon.minosoft.data.registries.blocks.types.pixlyzer.entity.redstone
|
||||||
|
|
||||||
import de.bixilon.minosoft.data.entities.block.redstone.DaylightDetectorBlockEntity
|
import de.bixilon.minosoft.data.entities.block.BlockEntity
|
||||||
import de.bixilon.minosoft.data.registries.blocks.factory.PixLyzerBlockFactory
|
import de.bixilon.minosoft.data.registries.blocks.factory.PixLyzerBlockFactory
|
||||||
import de.bixilon.minosoft.data.registries.blocks.types.pixlyzer.entity.PixLyzerBlockWithEntity
|
import de.bixilon.minosoft.data.registries.blocks.types.pixlyzer.entity.PixLyzerBlockWithEntity
|
||||||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
|
||||||
import de.bixilon.minosoft.data.registries.registries.Registries
|
import de.bixilon.minosoft.data.registries.registries.Registries
|
||||||
|
|
||||||
open class DaylightDetectorBlock(resourceLocation: ResourceLocation, registries: Registries, data: Map<String, Any>) : PixLyzerBlockWithEntity<DaylightDetectorBlockEntity>(resourceLocation, registries, data) {
|
open class DaylightDetectorBlock(resourceLocation: ResourceLocation, registries: Registries, data: Map<String, Any>) : PixLyzerBlockWithEntity<BlockEntity>(resourceLocation, registries, data) {
|
||||||
|
|
||||||
companion object : PixLyzerBlockFactory<DaylightDetectorBlock> {
|
companion object : PixLyzerBlockFactory<DaylightDetectorBlock> {
|
||||||
override fun build(resourceLocation: ResourceLocation, registries: Registries, data: Map<String, Any>): DaylightDetectorBlock {
|
override fun build(resourceLocation: ResourceLocation, registries: Registries, data: Map<String, Any>): DaylightDetectorBlock {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user