Skip to content

Commit

Permalink
Minor changes, Release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Wimmer committed Jul 25, 2016
1 parent 81cdcdb commit 5ba8230
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 122 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MoreFood

This Minecraft Mod will add additional food to Mincraft to provide a healthy variety.
This Minecraft Mod will add additional food to Minecraft to provide a healthy variety.

More information can be found on [Curse](http://minecraft.curseforge.com/projects/tm-morefood)
34 changes: 22 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
buildscript {
repositories {
buildscript
{
repositories
{
jcenter()

maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'

dependencies
{
classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT"
}
}

apply plugin: "scala"
apply plugin: "net.minecraftforge.gradle.forge"

version = "2.0.0"
version = "2.1.0"
group = "io.teammion.morefood"
archivesBaseName = "tm-morefood"

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

minecraft {
minecraft
{
version = "1.10.2-12.18.1.2020"
runDir = "run"

mappings = "snapshot_20160518"
}

dependencies {
dependencies
{
}

processResources
{
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
from(sourceSets.main.resources.srcDirs)
{
include "mcmod.info"

expand 'version':project.version, 'mcversion':project.minecraft.version
expand "version": project.version,
"mcversion": project.minecraft.version
}

from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
from(sourceSets.main.resources.srcDirs)
{
exclude "mcmod.info"
}
}
96 changes: 48 additions & 48 deletions src/main/scala/io/teammion/morefood/Items.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,87 +24,87 @@ object Items
val WATER_BUCKET : minecraft.item.Item = minecraft.init.Items.WATER_BUCKET
val WHEAT : minecraft.item.Item = minecraft.init.Items.WHEAT

val MILK_BOTTLE : ItemMilkBottle = new ItemMilkBottle
val COCOA_BEAN_ROASTED : Item = new Item("cocoa_bean_roasted")
val COCOA_BEAN_GROUND : Item = new Item("cocoa_bean_ground")
val APPLE_CHOCOLATE : Item = new Item("apple_chocolate")
val APPLE_CHOCOLATE_COATED : ItemFood = new ItemFood("apple_chocolate_coated", 8)
val BREAD_DOUGH : Item = new Item("bread_dough")
val BREAD_SLICE : Item = new Item("bread_slice")
val CHOCOLATE : ItemFood = new ItemFood("chocolate", 8)
val CHOCOLATE_PIECE : ItemFood = new ItemFood("chocolate_piece", 1)
val CHOCOLATE_DRINK : ItemDrink = new ItemDrink("chocolate_drink", 4)
val FLOUR : Item = new Item("flour")
val SCHNITZEL_RAW : Item = new Item("schnitzel_raw")
val SCHNITZEL : ItemFood = new ItemFood("schnitzel", 4)
val CHOCOLATE_PIECE : ItemFood = new ItemFood("chocolate_piece", 1)
val COCOA_BEAN_GROUND : Item = new Item("cocoa_bean_ground")
val COCOA_BEAN_ROASTED : Item = new Item("cocoa_bean_roasted")
val EGG_BOILED : ItemFood = new ItemFood("egg_boiled", 3)
val APPLE_CHOCOLATE : Item = new Item("apple_chocolate")
val APPLE_CHOCOLATE_COATED : ItemFood = new ItemFood("apple_chocolate_coated", 8)
val FISH_STICK_RAW : Item = new Item("fish_stick_raw")
val FISH_STICK : ItemFood = new ItemFood("fish_stick", 6)
val BREAD_SLICE : Item = new Item("bread_slice")
val SANDWICH_SCHNITZEL : ItemFood = new ItemFood("sandwich_schnitzel", 5)
val SANDWICH_PORKCHOP : ItemFood = new ItemFood("sandwich_porkchop", 5)
val FISH_STICK_RAW : Item = new Item("fish_stick_raw")
val FLOUR : Item = new Item("flour")
val FRENCH_FRIES : ItemFood = new ItemFood("french_fries", 6)
val FRENCH_FRIES_RAW : Item = new Item("french_fries_raw")
val MILK_BOTTLE : ItemMilkBottle = new ItemMilkBottle
val SANDWICH_CHICKEN : ItemFood = new ItemFood("sandwich_chicken", 5)
val SANDWICH_FISH : ItemFood = new ItemFood("sandwich_fish", 5)
val SANDWICH_PORKCHOP : ItemFood = new ItemFood("sandwich_porkchop", 5)
val SANDWICH_SCHNITZEL : ItemFood = new ItemFood("sandwich_schnitzel", 5)
val SCHNITZEL : ItemFood = new ItemFood("schnitzel", 4)
val SCHNITZEL_RAW : Item = new Item("schnitzel_raw")
val STRAWBERRY : ItemStrawberry = new ItemStrawberry
val STRAWBERRY_CHOCOLATE : Item = new Item("strawberry_chocolate")
val STRAWBERRY_CHOCOLATE_COATED : ItemFood = new ItemFood("strawberry_chocolate_coated", 8)
val FRENCH_FRIES_RAW : Item = new Item("french_fries_raw")
val FRENCH_FRIES : ItemFood = new ItemFood("french_fries", 6)
val BREAD_DOUGH : Item = new Item("bread_dough")

def register() : Unit =
{
Registry.register(MILK_BOTTLE)
Registry.register(COCOA_BEAN_ROASTED)
Registry.register(COCOA_BEAN_GROUND)
Registry.register(APPLE_CHOCOLATE)
Registry.register(APPLE_CHOCOLATE_COATED)
Registry.register(BREAD_DOUGH)
Registry.register(BREAD_SLICE)
Registry.register(CHOCOLATE)
Registry.register(CHOCOLATE_PIECE)
Registry.register(CHOCOLATE_DRINK)
Registry.register(FLOUR)
Registry.register(SCHNITZEL_RAW)
Registry.register(SCHNITZEL)
Registry.register(CHOCOLATE_PIECE)
Registry.register(COCOA_BEAN_GROUND)
Registry.register(COCOA_BEAN_ROASTED)
Registry.register(EGG_BOILED)
Registry.register(APPLE_CHOCOLATE)
Registry.register(APPLE_CHOCOLATE_COATED)
Registry.register(FISH_STICK_RAW)
Registry.register(FISH_STICK)
Registry.register(BREAD_SLICE)
Registry.register(SANDWICH_SCHNITZEL)
Registry.register(SANDWICH_PORKCHOP)
Registry.register(FISH_STICK_RAW)
Registry.register(FLOUR)
Registry.register(FRENCH_FRIES)
Registry.register(FRENCH_FRIES_RAW)
Registry.register(MILK_BOTTLE)
Registry.register(SANDWICH_CHICKEN)
Registry.register(SANDWICH_FISH)
Registry.register(SANDWICH_PORKCHOP)
Registry.register(SANDWICH_SCHNITZEL)
Registry.register(SCHNITZEL)
Registry.register(SCHNITZEL_RAW)
Registry.register(STRAWBERRY)
Registry.register(STRAWBERRY_CHOCOLATE)
Registry.register(STRAWBERRY_CHOCOLATE_COATED)
Registry.register(FRENCH_FRIES_RAW)
Registry.register(FRENCH_FRIES)
Registry.register(BREAD_DOUGH)
}

def render() : Unit =
{
Registry.render(MILK_BOTTLE)
Registry.render(COCOA_BEAN_ROASTED)
Registry.render(COCOA_BEAN_GROUND)
Registry.render(APPLE_CHOCOLATE)
Registry.render(APPLE_CHOCOLATE_COATED)
Registry.render(BREAD_DOUGH)
Registry.render(BREAD_SLICE)
Registry.render(CHOCOLATE)
Registry.render(CHOCOLATE_PIECE)
Registry.render(CHOCOLATE_DRINK)
Registry.render(FLOUR)
Registry.render(SCHNITZEL_RAW)
Registry.render(SCHNITZEL)
Registry.render(CHOCOLATE_PIECE)
Registry.render(COCOA_BEAN_GROUND)
Registry.render(COCOA_BEAN_ROASTED)
Registry.render(EGG_BOILED)
Registry.render(APPLE_CHOCOLATE)
Registry.render(APPLE_CHOCOLATE_COATED)
Registry.render(FISH_STICK_RAW)
Registry.render(FISH_STICK)
Registry.render(BREAD_SLICE)
Registry.render(SANDWICH_SCHNITZEL)
Registry.render(SANDWICH_PORKCHOP)
Registry.render(FISH_STICK_RAW)
Registry.render(FLOUR)
Registry.render(FRENCH_FRIES)
Registry.render(FRENCH_FRIES_RAW)
Registry.render(MILK_BOTTLE)
Registry.render(SANDWICH_CHICKEN)
Registry.render(SANDWICH_FISH)
Registry.render(SANDWICH_PORKCHOP)
Registry.render(SANDWICH_SCHNITZEL)
Registry.render(SCHNITZEL)
Registry.render(SCHNITZEL_RAW)
Registry.render(STRAWBERRY)
Registry.render(STRAWBERRY_CHOCOLATE)
Registry.render(STRAWBERRY_CHOCOLATE_COATED)
Registry.render(FRENCH_FRIES_RAW)
Registry.render(FRENCH_FRIES)
Registry.render(BREAD_DOUGH)
}
}
23 changes: 23 additions & 0 deletions src/main/scala/io/teammion/morefood/MoreFood.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.teammion.morefood
import io.teammion.morefood.proxy.CommonProxy
import net.minecraftforge.fml.common.{Mod, SidedProxy}
import net.minecraftforge.fml.common.event.{FMLInitializationEvent, FMLPostInitializationEvent, FMLPreInitializationEvent}
import org.apache.logging.log4j.Logger

/**
* Created by Stefan Wimmer <[email protected]> on 24.07.16.
Expand All @@ -16,15 +17,37 @@ object MoreFood
)
var proxy : CommonProxy = _

var logger : Logger = _

@Mod.EventHandler
def preInit(e : FMLPreInitializationEvent) : Unit =
{
logger = e.getModLog

logger.info ("MoreFood preinitializing...")

proxy.preInit(e)

logger.info("MoreFood preinitialized")
}

@Mod.EventHandler
def init(e : FMLInitializationEvent) : Unit =
{
logger.info("MoreFood initializing...")

proxy.init(e)

logger.info("MoreFood initialized")
}

@Mod.EventHandler
def postInit(e : FMLPostInitializationEvent) : Unit =
{
logger.info("MoreFood postinitializing...")

proxy.postInit(e)

logger.info("MoreFood postinitialized")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.teammion.morefood.proxy
import java.util

import io.teammion.morefood.recipes.{ShapedRecipes, ShapelessRecipes, SmeltingRecipes}
import io.teammion.morefood.{Config, EventHandler, Items}
import io.teammion.morefood.{Config, EventHandler, Items, MoreFood}
import net.minecraft
import net.minecraft.item.ItemStack
import net.minecraft.item.crafting.{CraftingManager, IRecipe}
Expand Down
16 changes: 8 additions & 8 deletions src/main/scala/io/teammion/morefood/recipes/ShapedRecipes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,39 @@ object ShapedRecipes
)

Registry.addShapedRecipe(
Items.SANDWICH_SCHNITZEL.stack,
Items.SANDWICH_FISH.stack,
"A",
"B",
"A",
char2Character('A'), Items.BREAD_SLICE,
char2Character('B'), Items.SCHNITZEL
char2Character('B'), Items.COOKED_FISH
)

Registry.addShapedRecipe(
Items.SANDWICH_PORKCHOP.stack,
Items.SANDWICH_CHICKEN.stack,
"A",
"B",
"A",
char2Character('A'), Items.BREAD_SLICE,
char2Character('B'), Items.COOKED_PORKCHOP
char2Character('B'), Items.COOKED_CHICKEN
)

Registry.addShapedRecipe(
Items.SANDWICH_CHICKEN.stack,
Items.SANDWICH_PORKCHOP.stack,
"A",
"B",
"A",
char2Character('A'), Items.BREAD_SLICE,
char2Character('B'), Items.COOKED_CHICKEN
char2Character('B'), Items.COOKED_PORKCHOP
)

Registry.addShapedRecipe(
Items.SANDWICH_FISH.stack,
Items.SANDWICH_SCHNITZEL.stack,
"A",
"B",
"A",
char2Character('A'), Items.BREAD_SLICE,
char2Character('B'), Items.COOKED_FISH
char2Character('B'), Items.SCHNITZEL
)
}
}
Loading

0 comments on commit 5ba8230

Please sign in to comment.