Created
September 26, 2020 18:00
-
-
Save robotgryphon/1599f3deda7bea16f9196462be0d1bd5 to your computer and use it in GitHub Desktop.
Registry Derp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================================ | |
// REGISTRIES | |
// ================================================================================================================ | |
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MOD_ID); | |
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MOD_ID); | |
private static final DeferredRegister<TileEntityType<?>> TILE_ENTITIES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, MOD_ID); | |
public static final DeferredRegister<MiniaturizationRecipe> MINIATURIZATION_RECIPES = DeferredRegister.create(MiniaturizationRecipe.class, MOD_ID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================================ | |
// INITIALIZATION | |
// ================================================================================================================ | |
public static void init() { | |
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); | |
BLOCKS.register(eventBus); | |
ITEMS.register(eventBus); | |
TILE_ENTITIES.register(eventBus); | |
MINIATURIZATION_RECIPES.register(eventBus); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================================ | |
// MINIATURIZATION RECIPES | |
// ================================================================================================================ | |
public static final RegistryObject<MiniaturizationRecipe> SIMPLE_RECIPE = MINIATURIZATION_RECIPES.register("simple", () -> | |
{ | |
MiniaturizationRecipe rec = new MiniaturizationRecipe(); | |
rec.layers = new IRecipeLayer[] { | |
new SingleComponentRecipeLayer(Items.IRON_BLOCK, new AxisAlignedBB(BlockPos.ZERO)) | |
}; | |
rec.catalyst = Items.REDSTONE; | |
return rec; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment