Giter VIP home page Giter VIP logo

forgegroove's Introduction

ForgeGroove

Currently I would consider this to be experiment, but uh, Groovy for Forge. With this, you can easily make Minecraft mods using Groovy instead of Java (or another JVM language).

Why use Groovy over Java? (or over Scala or Kotlin?)

Groovy is a lot like Java; in fact, most Java code would work just the same in Groovy, although it would be unGroovy-like. However, Groovy is simpler in many ways, and allows one to make more with less, with not much of a learning curve.

What about other JVM languages? One might like how Groovy is a bit closer in syntax than Scala and Kotlin (see this page) but it still allows for plenty of simplification. Groovy's syntax might be less awkward in certain situations (cough Kotlin's naming with the fun keyword is dumb) and it has many nice things in its library.

Does this even work? Examples?

Well, I think so. I'll be experimenting with it more later. No examples yet.

How can I use this?

You should put this in your builder.gradle:

apply plugin: "groovy"
//...

compileGroovy {
	groovyClasspath = files("libs/forgegroove-1.0.0a.jar")
}

//...

dependencies {
	compile files("libs/forgegroove-1.0.0a.jar") //Yeah hokay homie, I don't have a maven, I don't know how to use maven, I don't even know how to spell maven. In theory CurseForge has an automatic maven or somethin' but not even Jesus can help you figure out how to use that. Just download the damn file or something. Not like this is experimental anyway.
}

//...

In your main class, you should include the following in your @Mod declaration:

@Mod(modLanguageAdapter = "xbony2.forgegroove.GroovyAdapter")

Everything gradle-wise should be the same /gradlew setupDecompWorkspace, /gradlew eclipse (or whatever), /gradlew build, you can run all of that the same. IDE-wise, the Eclipse Groovy Development Tools work very well for me, IntelliJ IDEA probably works fine, and you don't need to worry about messing with project stuff since Gradle will take care of that (at least for Eclipse, I would asssume so for IntelliJ IDEA as well). If you use a different IDE for modding, then good luck, you're on your own.

Credits

This mod distributes Groovy (obviously), so huge credit to the hundreds of contributors behind Apache Groovy.

I looked at Forgelin and Forge's internal Java/Scala support in order to create this. You may notice that this project is remarkable similar in structure to those two. Thanks to the creators of those.

forgegroove's People

Contributors

xbony2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.