Make recipes reloadable using an event. Eventually they may move to jsons/files, but this will do for now

This commit is contained in:
Vincent Lee committed 2019-07-03 21:47:42 -07:00
1 parent c4278be1ff
commit 55a2d42a29
30 files changed
+510 -419

No files matched your search

@@ -237,10 +237,13 @@ public class ModSubtiles {
@SubscribeEvent
public static void registerTEs(RegistryEvent.Register<TileEntityType<?>> evt) {
IForgeRegistry<Block> b = ForgeRegistries.BLOCKS;
IForgeRegistry<TileEntityType<?>> r = evt.getRegistry();
for (Pair<Supplier<? extends TileEntitySpecialFlower>, ResourceLocation> type : TYPES) {
register(r, TileEntityType.Builder.create(type.getLeft()).build(null), type.getRight());
Block block = b.getValue(type.getRight());
Block floating = b.getValue(floating(type.getRight()));
register(r, TileEntityType.Builder.create(type.getLeft(), block, floating).build(null), type.getRight());
}
}
}