diff --git a/graphics/sausage.xcf b/graphics/sausage.xcf index 627270b..ad468ad 100644 Binary files a/graphics/sausage.xcf and b/graphics/sausage.xcf differ diff --git a/src/java/mmm/food/FHelpers.java b/src/java/mmm/food/FHelpers.java index 3533f40..b83f678 100644 --- a/src/java/mmm/food/FHelpers.java +++ b/src/java/mmm/food/FHelpers.java @@ -4,6 +4,7 @@ package mmm.food; import mmm.core.CRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -12,6 +13,22 @@ import net.minecraftforge.fml.common.registry.GameRegistry; 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 ) { final Item item = new Item( ); diff --git a/src/java/mmm/food/FMeals.java b/src/java/mmm/food/FMeals.java index 5a3927f..5cd25dd 100644 --- a/src/java/mmm/food/FMeals.java +++ b/src/java/mmm/food/FMeals.java @@ -2,7 +2,6 @@ package mmm.food; import mmm.MmmFood; -import mmm.MmmMaterials; import mmm.MmmPlants; import net.minecraft.init.Items; @@ -11,7 +10,7 @@ import net.minecraft.init.Items; public class FMeals { - public final FCookableMeal SAUSAGE; + public final FSausage SAUSAGE; public final FCookableMeal PASTA; public final FMealInBowl TOMATO_SOUP; public final FMealInBowl GLOWING_SOUP; @@ -19,8 +18,7 @@ public class FMeals public FMeals( ) { - this.SAUSAGE = new FCookableMeal( "sausage" , 3 , 0.7f , 1.3f , true , 4 , // - Items.PORKCHOP , MmmMaterials.ITEM.ROCK_SALT , Items.LEATHER ); + this.SAUSAGE = new FSausage( ); this.PASTA = new FCookableMeal( "pasta" , 2 , 0.7f , 0.5f , false , 1 , // Items.EGG , MmmFood.INGREDIENT.FLOUR ); this.TOMATO_SOUP = new FMealInBowl( "tomato_soup" , 8 , 1.1f , // diff --git a/src/java/mmm/food/FSausage.java b/src/java/mmm/food/FSausage.java new file mode 100644 index 0000000..6f944e5 --- /dev/null +++ b/src/java/mmm/food/FSausage.java @@ -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 ); + } + +} diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index 6feb718..87bc1b7 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -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.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.cooked.name=Pasta diff --git a/src/resources/assets/mmm/models/item/food/meal/sausage/dried.json b/src/resources/assets/mmm/models/item/food/meal/sausage/dried.json new file mode 100644 index 0000000..e17e289 --- /dev/null +++ b/src/resources/assets/mmm/models/item/food/meal/sausage/dried.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/food/meal/sausage/dried" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/items/food/meal/sausage/dried.png b/src/resources/assets/mmm/textures/items/food/meal/sausage/dried.png new file mode 100644 index 0000000..625f80d Binary files /dev/null and b/src/resources/assets/mmm/textures/items/food/meal/sausage/dried.png differ