Skip to content

Instantly share code, notes, and snippets.

@Choonster
Created October 23, 2015 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Choonster/4adc05d25283361e5b1d to your computer and use it in GitHub Desktop.
Save Choonster/4adc05d25283361e5b1d to your computer and use it in GitHub Desktop.
Minecraft Forge 1.8-11.14.3.1521 - A demonstration of adding a recipe using a vararg method in Scala http://www.minecraftforge.net/forum/index.php/topic,34579.0.html
package com.choonster.testmod3.init
import net.minecraft.init.Items
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.registry.GameRegistry
/**
* A Scala object that calls [[GameRegistry.addRecipe()]] to add a recipe.
*/
object ScalaRecipes {
def addRecipes(): Unit = {
GameRegistry.addRecipe(new ItemStack(Items.beef), "AAA", "AAA", "AAA", 'A', Items.rotten_flesh)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment