mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Implement super sugary cereal
This commit is contained in:
parent
9c884be31c
commit
5fac95002a
4 changed files with 37 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.unicopia;
|
package com.minelittlepony.unicopia;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.item.ItemApple;
|
import com.minelittlepony.unicopia.item.ItemApple;
|
||||||
|
import com.minelittlepony.unicopia.item.ItemCereal;
|
||||||
import com.minelittlepony.unicopia.item.ItemCloud;
|
import com.minelittlepony.unicopia.item.ItemCloud;
|
||||||
import com.minelittlepony.unicopia.item.ItemCurse;
|
import com.minelittlepony.unicopia.item.ItemCurse;
|
||||||
import com.minelittlepony.unicopia.item.ItemOfHolding;
|
import com.minelittlepony.unicopia.item.ItemOfHolding;
|
||||||
|
@ -24,7 +25,6 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemDoor;
|
import net.minecraft.item.ItemDoor;
|
||||||
import net.minecraft.item.ItemFood;
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemSeedFood;
|
import net.minecraft.item.ItemSeedFood;
|
||||||
import net.minecraft.item.ItemSoup;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
|
@ -96,13 +96,8 @@ public class UItems {
|
||||||
.setTranslationKey("alfalfa_leaves")
|
.setTranslationKey("alfalfa_leaves")
|
||||||
.setRegistryName(Unicopia.MODID, "alfalfa_leaves");
|
.setRegistryName(Unicopia.MODID, "alfalfa_leaves");
|
||||||
|
|
||||||
public static final Item cereal = new ItemSoup(15)
|
public static final Item cereal = new ItemCereal(Unicopia.MODID, "cereal", 9, 0.8F);
|
||||||
.setTranslationKey("cereal")
|
public static final Item sugar_cereal = new ItemCereal(Unicopia.MODID, "sugar_cereal", 20, -2).setAlwaysEdible();
|
||||||
.setRegistryName(Unicopia.MODID, "cereal");
|
|
||||||
|
|
||||||
public static final Item sugar_cereal = new ItemSoup(15)
|
|
||||||
.setTranslationKey("sugar_cereal")
|
|
||||||
.setRegistryName(Unicopia.MODID, "sugar_cereal");
|
|
||||||
|
|
||||||
public static final ItemTomato tomato = new ItemTomato(Unicopia.MODID, "tomato", 4, 34);
|
public static final ItemTomato tomato = new ItemTomato(Unicopia.MODID, "tomato", 4, 34);
|
||||||
public static final ItemTomato cloudsdale_tomato = new ItemTomato(Unicopia.MODID, "cloudsdale_tomato", 16, 4);
|
public static final ItemTomato cloudsdale_tomato = new ItemTomato(Unicopia.MODID, "cloudsdale_tomato", 16, 4);
|
||||||
|
@ -120,7 +115,8 @@ public class UItems {
|
||||||
cloud_stairs, cloud_slab, cloud_farmland,
|
cloud_stairs, cloud_slab, cloud_farmland,
|
||||||
mist_door, anvil,
|
mist_door, anvil,
|
||||||
bag_of_holding, spell, curse,
|
bag_of_holding, spell, curse,
|
||||||
alfalfa_seeds, alfalfa_leaves, cereal,
|
alfalfa_seeds, alfalfa_leaves,
|
||||||
|
cereal, sugar_cereal,
|
||||||
|
|
||||||
cloudsdale_tomato, tomato_seeds, tomato);
|
cloudsdale_tomato, tomato_seeds, tomato);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.minelittlepony.unicopia.item;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class ItemCereal extends ItemFood {
|
||||||
|
|
||||||
|
public ItemCereal(String domain, String name, int amount, float saturation) {
|
||||||
|
super(amount, saturation, false);
|
||||||
|
|
||||||
|
setTranslationKey(name);
|
||||||
|
setRegistryName(domain, name);
|
||||||
|
setMaxStackSize(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) {
|
||||||
|
super.onItemUseFinish(stack, worldIn, entityLiving);
|
||||||
|
|
||||||
|
this.setAlwaysEdible();
|
||||||
|
|
||||||
|
return new ItemStack(Items.BOWL);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "unicopia:items/sugar_cereal"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 253 B |
Loading…
Reference in a new issue