use of mods.railcraft.common.blocks.tracks.outfitted.ItemTrackOutfitted in project Railcraft by Railcraft.
the class RailcraftJEIPlugin method register.
@Override
public void register(IModRegistry registry) {
ISubtypeRegistry subtypeRegistry = registry.getJeiHelpers().getSubtypeRegistry();
Item trackOutfitted = RailcraftBlocks.TRACK_OUTFITTED.item();
if (trackOutfitted != null)
subtypeRegistry.registerNbtInterpreter(trackOutfitted, stack -> ((ItemTrackOutfitted) stack.getItem()).getSuffix(stack));
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
registry.addRecipeCategories(new RollingMachineRecipeCategory(guiHelper));
registry.addRecipeHandlers(new RollingMachineRecipeHandler(jeiHelpers));
registry.addRecipeClickArea(GuiRollingMachine.class, 90, 45, 23, 9, ROLLING);
registry.addRecipeClickArea(GuiRollingMachinePowered.class, 90, 45, 23, 9, ROLLING);
IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
recipeTransferRegistry.addRecipeTransferHandler(ContainerRollingMachine.class, ROLLING, 2, 9, 11, 36);
recipeTransferRegistry.addRecipeTransferHandler(ContainerRollingMachinePowered.class, ROLLING, 2, 9, 11, 36);
boolean rolling = false;
ItemStack stack = RailcraftBlocks.EQUIPMENT.getStack(EquipmentVariant.ROLLING_MACHINE_MANUAL);
if (!InvTools.isEmpty(stack)) {
registry.addRecipeCategoryCraftingItem(stack, ROLLING);
rolling = true;
}
stack = RailcraftBlocks.EQUIPMENT.getStack(EquipmentVariant.ROLLING_MACHINE_POWERED);
if (!InvTools.isEmpty(stack)) {
registry.addRecipeCategoryCraftingItem(stack, ROLLING);
rolling = true;
}
if (rolling)
registry.addRecipes(RollingMachineRecipeMaker.getRecipes(registry.getJeiHelpers()));
RailcraftObjects.processBlockVariants((block, variant) -> addDescription(registry, block.getStack(variant)));
RailcraftObjects.processItemVariants((item, variant) -> addDescription(registry, item.getStack(variant)));
}
Aggregations