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

21 lines
932 B
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;
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;
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-20 21:12:13 +02:00
BlockEntityType<CloudBedBlock.Tile> CLOUD_BED = create("cloud_bed", BlockEntityType.Builder.create(CloudBedBlock.Tile::new, UBlocks.CLOUD_BED));
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() {}
}