2022-10-12 15:46:15 +02:00
|
|
|
package com.minelittlepony.unicopia.block;
|
|
|
|
|
2023-10-20 21:12:13 +02:00
|
|
|
import com.minelittlepony.unicopia.block.cloud.CloudBedBlock;
|
2023-12-04 15:49:24 +01:00
|
|
|
import com.minelittlepony.unicopia.block.cloud.CloudChestBlock;
|
2023-10-20 21:12:13 +02:00
|
|
|
|
2022-10-12 15:46:15 +02:00
|
|
|
import net.minecraft.block.entity.BlockEntity;
|
|
|
|
import net.minecraft.block.entity.BlockEntityType;
|
|
|
|
import net.minecraft.block.entity.BlockEntityType.Builder;
|
2023-12-04 15:49:24 +01:00
|
|
|
import net.minecraft.block.entity.ChestBlockEntity;
|
2022-12-18 22:07:24 +01:00
|
|
|
import net.minecraft.registry.Registry;
|
|
|
|
import net.minecraft.registry.Registries;
|
2022-10-12 15:46:15 +02:00
|
|
|
|
|
|
|
public interface UBlockEntities {
|
|
|
|
BlockEntityType<WeatherVaneBlock.WeatherVane> WEATHER_VANE = create("weather_vane", BlockEntityType.Builder.create(WeatherVaneBlock.WeatherVane::new, UBlocks.WEATHER_VANE));
|
2023-10-31 21:38:28 +01:00
|
|
|
BlockEntityType<CloudBedBlock.Tile> FANCY_BED = create("fancy_bed", BlockEntityType.Builder.create(CloudBedBlock.Tile::new, UBlocks.CLOTH_BED, UBlocks.CLOUD_BED));
|
2023-12-04 15:49:24 +01:00
|
|
|
BlockEntityType<ChestBlockEntity> CLOUD_CHEST = create("cloud_chest", BlockEntityType.Builder.create(CloudChestBlock.TileData::new, UBlocks.CLOUD_CHEST));
|
2024-02-16 17:42:48 +01:00
|
|
|
BlockEntityType<HiveBlock.TileData> HIVE_STORAGE = create("hive_storage", BlockEntityType.Builder.create(HiveBlock.TileData::new, UBlocks.HIVE));
|
2024-03-30 03:19:54 +01:00
|
|
|
BlockEntityType<ItemJarBlock.TileData> ITEM_JAR = create("item_jar", BlockEntityType.Builder.create(ItemJarBlock.TileData::new, UBlocks.JAR));
|
2022-10-12 15:46:15 +02:00
|
|
|
|
|
|
|
static <T extends BlockEntity> BlockEntityType<T> create(String id, Builder<T> builder) {
|
2022-12-18 22:07:24 +01:00
|
|
|
return Registry.register(Registries.BLOCK_ENTITY_TYPE, id, builder.build(null));
|
2022-10-12 15:46:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void bootstrap() {}
|
|
|
|
}
|