Glowing soup!
This commit is contained in:
parent
6db315bcac
commit
1de5956dd2
5 changed files with 49 additions and 0 deletions
39
src/java/mmm/food/FGlowingSoup.java
Normal file
39
src/java/mmm/food/FGlowingSoup.java
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
package mmm.food;
|
||||||
|
|
||||||
|
|
||||||
|
import mmm.MmmPlants;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.init.MobEffects;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FGlowingSoup
|
||||||
|
extends FMealInBowl
|
||||||
|
{
|
||||||
|
|
||||||
|
public FGlowingSoup( )
|
||||||
|
{
|
||||||
|
super( "glowing_soup" , 4 , 0.6f , //
|
||||||
|
"CCC" , "CPC" , " B " , //
|
||||||
|
'C' , new ItemStack( MmmPlants.NETHER_CORAL.ITEM , 1 , OreDictionary.WILDCARD_VALUE ) , //
|
||||||
|
'P' , Items.POTATO );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onFoodEaten( final ItemStack stack , final World worldIn , final EntityPlayer player )
|
||||||
|
{
|
||||||
|
super.onFoodEaten( stack , worldIn , player );
|
||||||
|
if ( !worldIn.isRemote && worldIn.rand.nextFloat( ) < .25f ) {
|
||||||
|
final int duration = 300 + worldIn.rand.nextInt( 1200 );
|
||||||
|
player.addPotionEffect( new PotionEffect( MobEffects.GLOWING , duration ) );
|
||||||
|
player.addPotionEffect( new PotionEffect( MobEffects.NIGHT_VISION , duration ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,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 final FMealInBowl TOMATO_SOUP;
|
||||||
|
public final FMealInBowl GLOWING_SOUP;
|
||||||
|
|
||||||
|
|
||||||
public FMeals( )
|
public FMeals( )
|
||||||
|
@ -24,6 +25,8 @@ public class FMeals
|
||||||
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 , //
|
||||||
"TTT" , " B " , 'T' , MmmPlants.TOMATO.FRUIT );
|
"TTT" , " B " , 'T' , MmmPlants.TOMATO.FRUIT );
|
||||||
|
|
||||||
|
this.GLOWING_SOUP = new FGlowingSoup( );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,7 @@ 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
|
item.mmm.food.meal.tomato_soup.name=Tomato Soup
|
||||||
|
item.mmm.food.meal.glowing_soup.name=Glowing Soup
|
||||||
|
|
||||||
|
|
||||||
tile.mmm.deco.smoothstone.limestone.name=Polished Limestone
|
tile.mmm.deco.smoothstone.limestone.name=Polished Limestone
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mmm:items/food/meal/glowing_soup"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 181 B |
Reference in a new issue