Wheat flour
This commit is contained in:
parent
170992ecba
commit
ff9bf5d16c
6 changed files with 90 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package mmm;
|
package mmm;
|
||||||
|
|
||||||
|
|
||||||
|
import mmm.food.FIngredients;
|
||||||
import mmm.food.FMeals;
|
import mmm.food.FMeals;
|
||||||
import mmm.food.FMilks;
|
import mmm.food.FMilks;
|
||||||
|
|
||||||
|
@ -9,10 +10,12 @@ import mmm.food.FMilks;
|
||||||
public class MmmFood
|
public class MmmFood
|
||||||
{
|
{
|
||||||
public static final FMilks MILK;
|
public static final FMilks MILK;
|
||||||
|
public static final FIngredients INGREDIENT;
|
||||||
public static final FMeals MEAL;
|
public static final FMeals MEAL;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
MILK = new FMilks( );
|
MILK = new FMilks( );
|
||||||
|
INGREDIENT = new FIngredients( );
|
||||||
MEAL = new FMeals( );
|
MEAL = new FMeals( );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
47
src/java/mmm/food/FHelpers.java
Normal file
47
src/java/mmm/food/FHelpers.java
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
|
import mmm.core.CRegistry;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FHelpers
|
||||||
|
{
|
||||||
|
|
||||||
|
public static Item makeIngredient( final String name )
|
||||||
|
{
|
||||||
|
final Item item = new Item( );
|
||||||
|
item.setCreativeTab( CreativeTabs.FOOD );
|
||||||
|
CRegistry.setIdentifiers( item , "food" , "ingredient" , name );
|
||||||
|
CRegistry.addItem( item );
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void addCooking( final Item in , final Item out )
|
||||||
|
{
|
||||||
|
FHelpers.addCooking( in , out , 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void addCooking( final Item in , final Item out , final int amount )
|
||||||
|
{
|
||||||
|
GameRegistry.addSmelting( in , new ItemStack( out , amount ) , 0.1f );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void addTransform( final Item in , final Item out )
|
||||||
|
{
|
||||||
|
FHelpers.addTransform( in , out , 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void addTransform( final Item in , final Item out , final int amount )
|
||||||
|
{
|
||||||
|
GameRegistry.addShapelessRecipe( new ItemStack( out , amount ) , in );
|
||||||
|
}
|
||||||
|
}
|
32
src/java/mmm/food/FIngredients.java
Normal file
32
src/java/mmm/food/FIngredients.java
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
|
import mmm.core.CRegistry;
|
||||||
|
import mmm.core.api.I_RecipeRegistrar;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FIngredients
|
||||||
|
implements I_RecipeRegistrar
|
||||||
|
{
|
||||||
|
public final Item FLOUR;
|
||||||
|
|
||||||
|
|
||||||
|
public FIngredients( )
|
||||||
|
{
|
||||||
|
CRegistry.addRegistrar( this );
|
||||||
|
|
||||||
|
this.FLOUR = FHelpers.makeIngredient( "flour" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerRecipes( )
|
||||||
|
{
|
||||||
|
FHelpers.addTransform( Items.WHEAT , this.FLOUR );
|
||||||
|
FHelpers.addCooking( this.FLOUR , Items.BREAD );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -144,6 +144,8 @@ item.mmm.food.milk.pig.name=Pig milk
|
||||||
item.mmm.food.milk.horse.name=Horse milk
|
item.mmm.food.milk.horse.name=Horse milk
|
||||||
item.mmm.food.milk.donkey.name=Donkey milk
|
item.mmm.food.milk.donkey.name=Donkey milk
|
||||||
|
|
||||||
|
item.mmm.food.ingredient.flour.name=Wheat Flour
|
||||||
|
|
||||||
item.mmm.food.meal.sausage.raw.name=Raw Sausage
|
item.mmm.food.meal.sausage.raw.name=Raw Sausage
|
||||||
item.mmm.food.meal.sausage.cooked.name=Sausage
|
item.mmm.food.meal.sausage.cooked.name=Sausage
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mmm:items/food/ingredient/flour"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 187 B |
Reference in a new issue