You'll need a custom recipe for this.
For example, I have something similar for crafting:
https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/api/recipe/RecipeTagOutput.java
Furnace (blasting, smelting, cooking) recipes use a similar system, I believe the class to look at is AbstractFurnaceRecipe and its subclasses.
I don't think so. I also don't see the texture being bound. @nekosune Passes a TextureAtlasSprite(RenderEvents.MARK_SPRITE) to his drawTexturedOutline, but never binds that texture.
No.
The @SideOnly is used if the associated object should not exist on sides not specified in the parameters.
This means classes annotated with @SideOnly(Side.Client) will not exist on the server side.
It does nothing in loading something only on one side.
Annotating an event subscriber with @SideOnly might work, but only due to the absence of the annotated object on the other side (which is considered hacky). One should use a side-specific event bus subscriber instead.
GasMaskBar is client only. Assuming your event handler is triggered on both sides, this will cause a crash on the server.
Either register your GUI in a client proxy or create a client-side event subscriber and register it there.
Again, that's not what side only does.
If you want an event to only be registered on one side, you use the value=Dist.CLIENT parameter in the @EventBusSubscriber annotation.
Also, its not called SideOnly any more. Its OnlyIn now.
.
It doesn't help you. It's meant to help you be compatible with other mods.
The best way to do what you are trying to do I think would be to cast the player to ServerPlayerEntity then get the PlayerInteractionManager field(interactionManager) and call PlayerInteractionManager#tryHarvestBlock(BlockPos)