Tomato soup
This commit is contained in:
parent
ec80d8de95
commit
a6567c90da
6 changed files with 81 additions and 1 deletions
1
TODO.txt
1
TODO.txt
|
@ -20,7 +20,6 @@ food ??? Milk processing
|
||||||
food No Extra recipes
|
food No Extra recipes
|
||||||
Apple pie
|
Apple pie
|
||||||
Ratatouille
|
Ratatouille
|
||||||
Tomato stew
|
|
||||||
Pasta w/tomato
|
Pasta w/tomato
|
||||||
Beef stew
|
Beef stew
|
||||||
Pizza
|
Pizza
|
||||||
|
|
69
src/java/mmm/food/FMealInBowl.java
Normal file
69
src/java/mmm/food/FMealInBowl.java
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import mmm.core.CRegistry;
|
||||||
|
import mmm.core.api.I_RecipeRegistrar;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemFood;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FMealInBowl
|
||||||
|
extends ItemFood
|
||||||
|
implements I_RecipeRegistrar
|
||||||
|
{
|
||||||
|
|
||||||
|
private Object[] recipe;
|
||||||
|
|
||||||
|
|
||||||
|
public FMealInBowl( final String name , final int amount , final float saturation , Object... recipe )
|
||||||
|
{
|
||||||
|
super( amount , saturation , false );
|
||||||
|
this.setMaxStackSize( 1 );
|
||||||
|
CRegistry.setIdentifiers( this , "food" , "meal" , name );
|
||||||
|
CRegistry.addItem( this );
|
||||||
|
|
||||||
|
if ( recipe.length == 0 ) {
|
||||||
|
this.recipe = null;
|
||||||
|
} else if ( recipe[ 0 ] instanceof String ) {
|
||||||
|
this.recipe = new Object[ recipe.length + 2 ];
|
||||||
|
System.arraycopy( recipe , 0 , this.recipe , 0 , recipe.length );
|
||||||
|
this.recipe[ recipe.length ] = 'B';
|
||||||
|
this.recipe[ recipe.length + 1 ] = Items.BOWL;
|
||||||
|
} else {
|
||||||
|
this.recipe = new Object[ recipe.length + 1 ];
|
||||||
|
System.arraycopy( recipe , 0 , this.recipe , 0 , recipe.length );
|
||||||
|
this.recipe[ recipe.length ] = Items.BOWL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public ItemStack onItemUseFinish( ItemStack stack , World worldIn , EntityLivingBase entityLiving )
|
||||||
|
{
|
||||||
|
super.onItemUseFinish( stack , worldIn , entityLiving );
|
||||||
|
return new ItemStack( Items.BOWL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerRecipes( )
|
||||||
|
{
|
||||||
|
if ( this.recipe == null ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( this.recipe[ 0 ] instanceof String ) {
|
||||||
|
GameRegistry.addShapedRecipe( new ItemStack( this ) , recipe );
|
||||||
|
} else {
|
||||||
|
GameRegistry.addShapelessRecipe( new ItemStack( this ) , recipe );
|
||||||
|
}
|
||||||
|
this.recipe = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package mmm.food;
|
||||||
|
|
||||||
import mmm.MmmFood;
|
import mmm.MmmFood;
|
||||||
import mmm.MmmMaterials;
|
import mmm.MmmMaterials;
|
||||||
|
import mmm.MmmPlants;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ public class FMeals
|
||||||
|
|
||||||
public final FCookableMeal SAUSAGE;
|
public final FCookableMeal SAUSAGE;
|
||||||
public final FCookableMeal PASTA;
|
public final FCookableMeal PASTA;
|
||||||
|
public final FMealInBowl TOMATO_SOUP;
|
||||||
|
|
||||||
|
|
||||||
public FMeals( )
|
public FMeals( )
|
||||||
|
@ -20,6 +22,8 @@ public class FMeals
|
||||||
Items.PORKCHOP , MmmMaterials.ITEM.ROCK_SALT , Items.LEATHER );
|
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 , //
|
||||||
|
"TTT" , " B " , 'T' , MmmPlants.TOMATO.FRUIT );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,6 +152,8 @@ item.mmm.food.meal.sausage.cooked.name=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
|
||||||
|
|
||||||
|
item.mmm.food.meal.tomato_soup.name=Tomato Soup
|
||||||
|
|
||||||
|
|
||||||
tile.mmm.deco.smoothstone.limestone.name=Polished Limestone
|
tile.mmm.deco.smoothstone.limestone.name=Polished Limestone
|
||||||
tile.mmm.deco.smoothstone.basalt.name=Polished Basalt
|
tile.mmm.deco.smoothstone.basalt.name=Polished Basalt
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mmm:items/food/meal/tomato_soup"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 149 B |
Reference in a new issue