Hey I am not able to register my tile entity type.
Here is the type:
public class ModTileTypes {
public static final TileEntityType<?> RF_METER = TileEntityType.Builder.create(TileRFMeter::new, ModBlocks.RF_METER)
.build(null).setRegistryName(new ResourceLocation(BPeripheralsProperties.MODID, "rf_meter"));
}
Here is the registration:
public class BPeripherals
{
public BPeripherals() {
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onItemRegister);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onBlockRegister);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onTileRegister);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onModelRegister);
MinecraftForge.EVENT_BUS.register(this);
}
...
public void onTileRegister(RegistryEvent.Register<TileEntityType<?>> event) {
event.getRegistry().register( //line 45
ModTileTypes.RF_METER
);
}
}
and here is the exception:
java.lang.ClassCastException: net.minecraft.tileentity.TileEntityType cannot be cast to net.minecraft.block.Block
and here the full stacktrace: https://pastebin.com/kudRJjxD
I hope someone can help me ^^