remove some unneeded block entities

This commit is contained in:
Moritz Zwerger 2023-10-29 22:31:58 +01:00
parent a7d8a09e1b
commit 8cfc4efd32
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
14 changed files with 7 additions and 349 deletions

View File

@ -13,13 +13,13 @@
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.*
import de.bixilon.minosoft.data.entities.block.container.storage.ChestBlockEntity
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.EndPortalBlockEntity
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.piston.PistonBlockEntity
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>>(
BedBlockEntity,
HopperBlockEntity,
SignBlockEntity,
BlastFurnaceBlockEntity,
FurnaceBlockEntity,
CampfireBlockEntity,
JigsawBlockEntity,
LecternBlockEntity,
BellBlockEntity,
SmokerBlockEntity,
ConduitBlockEntity,
BarrelBlockEntity,
ShulkerBoxBlockEntity,
StructureBlockBlockEntity,
CommandBlockEntity,
ComparatorBlockEntity,
BannerBlockEntity,
DaylightDetectorBlockEntity,
BeaconBlockEntity,
SkullBlockEntity,
EnchantingTableBlockEntity,
BrewingStandBlockEntity,
MobSpawnerBlockEntity,
DispenserBlockEntity,
DropperBlockEntity,
EnderChestBlockEntity,
JukeboxBlockEntity,
ChestBlockEntity,

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -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)
}
}
}

View File

@ -23,7 +23,7 @@ import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
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
}

View File

@ -13,13 +13,13 @@
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.types.pixlyzer.entity.PixLyzerBlockWithEntity
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
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> {
override fun build(resourceLocation: ResourceLocation, registries: Registries, data: Map<String, Any>): DaylightDetectorBlock {