From ec80d8de9525953f6d142c97a81d043a61de1aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 21 Jul 2016 10:35:00 +0200 Subject: [PATCH] Pasta! --- TODO.txt | 1 - graphics/pasta-dough.xcf | Bin 0 -> 1269 bytes graphics/pasta.xcf | Bin 0 -> 1401 bytes src/java/mmm/food/FCookableMeal.java | 23 ++++++++++++++---- src/java/mmm/food/FMeals.java | 6 ++++- src/resources/assets/mmm/lang/en_US.lang | 3 +++ .../models/item/food/meal/pasta/cooked.json | 6 +++++ .../mmm/models/item/food/meal/pasta/raw.json | 6 +++++ .../textures/items/food/meal/pasta/cooked.png | Bin 0 -> 168 bytes .../textures/items/food/meal/pasta/raw.png | Bin 0 -> 468 bytes 10 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 graphics/pasta-dough.xcf create mode 100644 graphics/pasta.xcf create mode 100644 src/resources/assets/mmm/models/item/food/meal/pasta/cooked.json create mode 100644 src/resources/assets/mmm/models/item/food/meal/pasta/raw.json create mode 100644 src/resources/assets/mmm/textures/items/food/meal/pasta/cooked.png create mode 100644 src/resources/assets/mmm/textures/items/food/meal/pasta/raw.png diff --git a/TODO.txt b/TODO.txt index 4ea2f15..9b9584d 100644 --- a/TODO.txt +++ b/TODO.txt @@ -21,7 +21,6 @@ food No Extra recipes Apple pie Ratatouille Tomato stew - Pasta Pasta w/tomato Beef stew Pizza diff --git a/graphics/pasta-dough.xcf b/graphics/pasta-dough.xcf new file mode 100644 index 0000000000000000000000000000000000000000..0776586fe3bc99b4787dd2c19e5e12f9482f8746 GIT binary patch literal 1269 zcmZ`%%}>){9PT?1213Lro;>V`#_@47UI`ZyWrG-k38-Uqqjl_~?G(;lH6d^^;bb83 zvJ&~IWCCSdJE?>?k#y}miGP6~LmeOU_nWQ3i0|_BectEy(ckl~L1r}S8uJHS0VYIK zu$n9&KMNoP9_Ikg&WY-21n~2KY6};v9rKzY|03*7L1^n{Mtwor9pso{kSK@~s)ZNE zL$r&JgqYz=^(}#*KN5;?u9nK?=7K{$S9@!FWt~7etk5MW9Xg@Zj=TO(uyl-%`ut2d z=<2ZF1>*QgqNTaxVMcHP;Iueq)>#}j3U3{AaMc5Be)<@1IK~@~@iV}&uf1x4*!A{5U1bMh ztZNpxr-od|&A&CrAfB74Lv2GNnv?pWZJ35>Zh)7P_Mu?r4PqQ^P^YLpI2rj}!_cTI zifF|Gq#60VS@pV>Br!z_doxmZJ{-`J-IuVOmC8H`C zfQU{+;JXS@_EU1|IXV$lh^g7sy1w#i2Bs{Eaz;sIQ|9{0GFd*FLMtBQry$%+%=Iq>%MfcV4HEyM(&8?AUA#QA8H<8GoA&qF>IO~trw=y~Av#5uw_q6fU- zfmeR@3LKY?@qC00Uq>fio{PnW_$Vs|=uQ~&bI)ij7LA7&L-f77cRJ8WSA@HNpCxQ* z=+3~cRy5KX43EsStbbr|!qbLEx>zQ_4i60U_O_vsF4pHCnZDicy@E!%eDq*nUw=Cq y>AdQ`+}>6(QeAdZHRW2$S*`(8Q>V*S6*QC`R3iZQ2GHsuRtGt?kbkOtp85sfjh?6g literal 0 HcmV?d00001 diff --git a/graphics/pasta.xcf b/graphics/pasta.xcf new file mode 100644 index 0000000000000000000000000000000000000000..943bf5b470a59e9f035fe5640d10809254844e4f GIT binary patch literal 1401 zcmZ`&yKdV+5L{BvI0+&nk0vQt%7p^EOzS%NgcPz!F$84EkQ6|w!=Cwo{1r03JPp~?b5ud{>3+^?nef_ikiw67# zR)@WZy{j;JZ^8e7z2l>8FSzadUeBKfE<%F5CEeM4Ir5y@WE8j;XWgMcn2aVnQ# z)W7LFmme?nIsvY#)CEd!PL!Iw^MAn7#q6#>2*$p1W$r?7c`8`Ndf&&v+zG~mZ{Cdc zli_gY&HoO_>VHFJ!dEAU z>kMY_^CSG?2){hSuYlRttQLT&H-G7xNn)%|6*g0YYkzqfv%m7(kzA$H(%zPQok3Eb zD*PXmc&{>%Y%Mi;RB*qQi2mww4;Di?vbOBuOI}&MRg$WVlvEmGr8}OLpnpxQ>;SU9 zWTOd!49|_~(jA+Do?;AKYsnT6-8Gp*r09d1a>$w-)|oOh*5!e7wW%yls0<#OR*F7} zS)}nkrjQkt#Z(rH=nu-kVkk!z%HT_0S-p)Vi4`dcl_fi#V?j?SQwNasB^yl;WO#-$ zed&(PKu@TQvupv;U6VOP0vc+{A)#!gVlyL@aW1XQ4XF$snidg#=(0%Ty&H){3o3J| z%oWiel!3)ijx3bHm%Ori>q_WGq=Zx!?s#?uJ)tZ*fUGasXo4WaGnDB|cWefFNM)R5 z3yAKT%ppS1P*V;GWsAr)GeQ~XqB5&!!*HKATknqrs;r_e08P2aZ>)fN97t>FOu0Wu jK?bQ-0R@F-BZiR*{1y$nYRINER^;f(+nQuH=+5O22W*n` literal 0 HcmV?d00001 diff --git a/src/java/mmm/food/FCookableMeal.java b/src/java/mmm/food/FCookableMeal.java index 07cc909..f3fc3ac 100644 --- a/src/java/mmm/food/FCookableMeal.java +++ b/src/java/mmm/food/FCookableMeal.java @@ -6,6 +6,7 @@ import mmm.core.api.I_RecipeRegistrar; import net.minecraft.init.MobEffects; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -22,12 +23,25 @@ public class FCookableMeal private Object[] recipe; - public FCookableMeal( final String name , final int amount , final float saturation , final boolean dangerous , + public FCookableMeal( final String name , final int amount , final float saturation , float danger , final boolean wolfLikes , final int quantity , final Object... recipe ) { this.RAW = new ItemFood( Math.max( 1 , amount / 3 ) , saturation / 3f , wolfLikes ); - if ( dangerous ) { - this.RAW.setPotionEffect( new PotionEffect( MobEffects.HUNGER , 600 , 0 ) , .3f ); + if ( danger > 0 ) { + Potion effect; + if ( danger > 1 ) { + if ( danger > 2 ) { + effect = MobEffects.POISON; + danger -= 2; + } else { + effect = MobEffects.NAUSEA; + danger -= 1; + } + } else { + effect = MobEffects.HUNGER; + + } + this.RAW.setPotionEffect( new PotionEffect( effect , 600 , 0 ) , Math.min( 1f , danger ) ); } CRegistry.setIdentifiers( this.RAW , "food" , "meal" , name , "raw" ); CRegistry.addItem( this.RAW ); @@ -53,8 +67,7 @@ public class FCookableMeal } this.recipe = null; } - - GameRegistry.addSmelting( this.RAW , new ItemStack( this.COOKED ) , 0.15f ); + FHelpers.addCooking( this.RAW , this.COOKED ); } } diff --git a/src/java/mmm/food/FMeals.java b/src/java/mmm/food/FMeals.java index e6e1d57..6155286 100644 --- a/src/java/mmm/food/FMeals.java +++ b/src/java/mmm/food/FMeals.java @@ -1,6 +1,7 @@ package mmm.food; +import mmm.MmmFood; import mmm.MmmMaterials; import net.minecraft.init.Items; @@ -10,12 +11,15 @@ public class FMeals { public final FCookableMeal SAUSAGE; + public final FCookableMeal PASTA; public FMeals( ) { - this.SAUSAGE = new FCookableMeal( "sausage" , 3 , 0.7f , true , true , 4 , // + this.SAUSAGE = new FCookableMeal( "sausage" , 3 , 0.7f , 1.3f , true , 4 , // Items.PORKCHOP , MmmMaterials.ITEM.ROCK_SALT , Items.LEATHER ); + this.PASTA = new FCookableMeal( "pasta" , 2 , 0.7f , 0.5f , false , 1 , // + Items.EGG , MmmFood.INGREDIENT.FLOUR ); } } diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index df8b8f5..ee2f2c4 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -149,6 +149,9 @@ 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.pasta.raw.name=Pasta Dough +item.mmm.food.meal.pasta.cooked.name=Pasta + tile.mmm.deco.smoothstone.limestone.name=Polished Limestone tile.mmm.deco.smoothstone.basalt.name=Polished Basalt diff --git a/src/resources/assets/mmm/models/item/food/meal/pasta/cooked.json b/src/resources/assets/mmm/models/item/food/meal/pasta/cooked.json new file mode 100644 index 0000000..cf83752 --- /dev/null +++ b/src/resources/assets/mmm/models/item/food/meal/pasta/cooked.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/food/meal/pasta/cooked" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/food/meal/pasta/raw.json b/src/resources/assets/mmm/models/item/food/meal/pasta/raw.json new file mode 100644 index 0000000..a1ab5e4 --- /dev/null +++ b/src/resources/assets/mmm/models/item/food/meal/pasta/raw.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/food/meal/pasta/raw" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/items/food/meal/pasta/cooked.png b/src/resources/assets/mmm/textures/items/food/meal/pasta/cooked.png new file mode 100644 index 0000000000000000000000000000000000000000..8c8bbbef3623be1177ab541465461ef1b28d41b5 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%``JOJ0Ar_~T6Be*l)L1_K|N6J? zf6buZkIIhz-`@Y*P{pCkaaKp*>4tRzOE{KDO!w|6(({!1pn2rE)FRO&Zhkf=uFgKi znq`l9N`wBiUw3tBH`u7BbSzrp(F;H4?_zzopr02`G)%m4rY literal 0 HcmV?d00001 diff --git a/src/resources/assets/mmm/textures/items/food/meal/pasta/raw.png b/src/resources/assets/mmm/textures/items/food/meal/pasta/raw.png new file mode 100644 index 0000000000000000000000000000000000000000..6098a97c25abfc47c13184fe2694743bbd746e73 GIT binary patch literal 468 zcmV;_0W1EAP)4~l(RI~c+O#M$A`H5lWp?p0UH(Kt)GBBd25mAjoy5wVamKQcrVDe?RrN#O zzH>%{OvRuEUKE+WU=1PA%-%9@WV3WU+_!X%Rxr2dv)Ndz#eyo;-!iF&>jz7Y6g-)h4JfpvHOi{}$?n4YMhVZR~(0000< KMNUMnLSTZRrP=`i literal 0 HcmV?d00001