Dried sausage
This commit is contained in:
parent
48017ecc30
commit
8639b91717
7 changed files with 59 additions and 4 deletions
Binary file not shown.
|
@ -4,6 +4,7 @@ package mmm.food;
|
||||||
import mmm.core.CRegistry;
|
import mmm.core.CRegistry;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
@ -12,6 +13,22 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
public class FHelpers
|
public class FHelpers
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static ItemFood makeBasicMeal( int amount , float saturation , boolean wolfFood , String... name )
|
||||||
|
{
|
||||||
|
final ItemFood item = new ItemFood( amount , saturation , wolfFood );
|
||||||
|
item.setCreativeTab( CreativeTabs.FOOD );
|
||||||
|
|
||||||
|
String[] fullName = new String[ name.length + 2 ];
|
||||||
|
fullName[ 0 ] = "food";
|
||||||
|
fullName[ 1 ] = "meal";
|
||||||
|
System.arraycopy( name , 0 , fullName , 2 , name.length );
|
||||||
|
CRegistry.setIdentifiers( item , fullName );
|
||||||
|
|
||||||
|
CRegistry.addItem( item );
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Item makeIngredient( final String name )
|
public static Item makeIngredient( final String name )
|
||||||
{
|
{
|
||||||
final Item item = new Item( );
|
final Item item = new Item( );
|
||||||
|
|
|
@ -2,7 +2,6 @@ package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
import mmm.MmmFood;
|
import mmm.MmmFood;
|
||||||
import mmm.MmmMaterials;
|
|
||||||
import mmm.MmmPlants;
|
import mmm.MmmPlants;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ import net.minecraft.init.Items;
|
||||||
public class FMeals
|
public class FMeals
|
||||||
{
|
{
|
||||||
|
|
||||||
public final FCookableMeal SAUSAGE;
|
public final FSausage SAUSAGE;
|
||||||
public final FCookableMeal PASTA;
|
public final FCookableMeal PASTA;
|
||||||
public final FMealInBowl TOMATO_SOUP;
|
public final FMealInBowl TOMATO_SOUP;
|
||||||
public final FMealInBowl GLOWING_SOUP;
|
public final FMealInBowl GLOWING_SOUP;
|
||||||
|
@ -19,8 +18,7 @@ public class FMeals
|
||||||
|
|
||||||
public FMeals( )
|
public FMeals( )
|
||||||
{
|
{
|
||||||
this.SAUSAGE = new FCookableMeal( "sausage" , 3 , 0.7f , 1.3f , true , 4 , //
|
this.SAUSAGE = new FSausage( );
|
||||||
Items.PORKCHOP , MmmMaterials.ITEM.ROCK_SALT , Items.LEATHER );
|
|
||||||
this.PASTA = new FCookableMeal( "pasta" , 2 , 0.7f , 0.5f , false , 1 , //
|
this.PASTA = new FCookableMeal( "pasta" , 2 , 0.7f , 0.5f , false , 1 , //
|
||||||
Items.EGG , MmmFood.INGREDIENT.FLOUR );
|
Items.EGG , MmmFood.INGREDIENT.FLOUR );
|
||||||
this.TOMATO_SOUP = new FMealInBowl( "tomato_soup" , 8 , 1.1f , //
|
this.TOMATO_SOUP = new FMealInBowl( "tomato_soup" , 8 , 1.1f , //
|
||||||
|
|
33
src/java/mmm/food/FSausage.java
Normal file
33
src/java/mmm/food/FSausage.java
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
|
import mmm.MmmMaterials;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemFood;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FSausage
|
||||||
|
extends FCookableMeal
|
||||||
|
{
|
||||||
|
public final ItemFood DRIED;
|
||||||
|
|
||||||
|
|
||||||
|
public FSausage( )
|
||||||
|
{
|
||||||
|
super( "sausage" , 3 , 0.7f , 1.3f , true , 4 , //
|
||||||
|
Items.PORKCHOP , MmmMaterials.ITEM.ROCK_SALT , Items.LEATHER );
|
||||||
|
this.DRIED = FHelpers.makeBasicMeal( 4 , 0.9f , true , "sausage" , "dried" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerRecipes( )
|
||||||
|
{
|
||||||
|
super.registerRecipes( );
|
||||||
|
GameRegistry.addShapelessRecipe( new ItemStack( this.DRIED ) , this.RAW , MmmMaterials.ITEM.SALTPETER );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -158,6 +158,7 @@ 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
|
||||||
|
item.mmm.food.meal.sausage.dried.name=Dried Sausage
|
||||||
|
|
||||||
item.mmm.food.meal.pasta.raw.name=Pasta Dough
|
item.mmm.food.meal.pasta.raw.name=Pasta Dough
|
||||||
item.mmm.food.meal.pasta.cooked.name=Pasta
|
item.mmm.food.meal.pasta.cooked.name=Pasta
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mmm:items/food/meal/sausage/dried"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 419 B |
Reference in a new issue