Unfortunately, it is not possible to create Minecraft mods using only Javascript. To create Minecraft mods, you will need to use either Java or Bedrock Add-Ons (which use JSON and Javascript).
If you want to create mods for Minecraft Java Edition, you'll need to learn Java programming language and use the Minecraft Forge modding API which provides easy ways to create custom mods. Here are the basic steps to create a Minecraft Forge mod:
Set up your development environment with Java, Minecraft Forge, and an Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA.
Create a new mod project in your IDE and add the Minecraft Forge API to your project.
Write your mod code using Java, using the Minecraft Forge API to manage blocks, items, entities, and more.
Test and debug your mod using a Minecraft Forge test environment.
Distribute your mod to other Minecraft players.
There are many resources available online for learning Minecraft modding with Java and Minecraft Forge, including tutorials, documentation, and communities where you can ask for help.
gistlibby LogSnag