mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
add some abstraction layers to block entities
This commit is contained in:
parent
7edf846d5d
commit
369ae366a6
@ -13,6 +13,8 @@
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.container.*
|
||||
import de.bixilon.minosoft.data.entities.block.container.storage.*
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class BlastFurnaceBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class BlastFurnaceBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<BlastFurnaceBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:blast_furnace")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class BrewingStandBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class BrewingStandBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<BrewingStandBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:brewing_stand")
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2021 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
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntity
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
abstract class ContainerBlockEntity(connection: PlayConnection) : BlockEntity(connection)
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class DispenserBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class DispenserBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<DispenserBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:dispenser")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class DropperBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class DropperBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<DropperBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:dropper")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class FurnaceBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class FurnaceBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<FurnaceBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:furnace")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class HopperBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class HopperBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
|
||||
companion object : BlockEntityFactory<HopperBlockEntity> {
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class SmokerBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class SmokerBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<SmokerBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:smoker")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class BarrelBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class BarrelBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<BarrelBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:barrel")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class ChestBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class ChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<ChestBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:chest")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class EnderChestBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class EnderChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<EnderChestBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:ender_chest")
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class ShulkerBoxBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class ShulkerBoxBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<ShulkerBoxBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:shulker_box")
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2021 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.container.ContainerBlockEntity
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
abstract class StorageBlockEntity(connection: PlayConnection) : ContainerBlockEntity(connection)
|
@ -11,12 +11,13 @@
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.data.entities.block
|
||||
package de.bixilon.minosoft.data.entities.block.container.storage
|
||||
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntityFactory
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
|
||||
class TrappedChestBlockEntity(connection: PlayConnection) : BlockEntity(connection) {
|
||||
class TrappedChestBlockEntity(connection: PlayConnection) : StorageBlockEntity(connection) {
|
||||
|
||||
companion object : BlockEntityFactory<TrappedChestBlockEntity> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("minecraft:trapped_chest")
|
Loading…
x
Reference in New Issue
Block a user