mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 15:33:08 +00:00
Make recipes reloadable using an event. Eventually they may move to jsons/files, but this will do for now
This commit is contained in:
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user