Unicopia/src/main/java/com/minelittlepony/unicopia/block/UBlockEntities.java

24 lines
1.2 KiB
Java
Raw Normal View History

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));
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() {}
}