Added Flour :3

This commit is contained in:
Zerotheliger 2014-05-29 02:43:09 -07:00
parent 4da9aec9f7
commit ee9c86d864
6 changed files with 146 additions and 0 deletions

View file

@ -46,6 +46,12 @@ item.resonantinduction\:imprint.name=Imprint
item.resonantinduction\:hammer.name=Hammer
item.resonantinduction\:handCrank.name=Hand Crank
item.resonantinduction\:devStaff.name=Staff of Devs
item.resonantinduction\:flour.name=Flour
item.dough.name=Dough
item.bakingtray.name=Baking Tray
item.bakingtraywithdough.name=Baking Tray With Dough
item.resonantinduction\:bakingTrayWithBread.name=Baking Tray With Bread
## Machines
tile.resonantinduction\:castingMold.name=Casting Mold

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

View file

@ -8,8 +8,11 @@ import net.minecraft.command.ICommandManager;
import net.minecraft.command.ServerCommandManager;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.BlockFluidFinite;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import org.modstats.ModstatInfo;
import org.modstats.Modstats;
@ -22,6 +25,7 @@ import resonant.lib.network.PacketTile;
import resonant.lib.prefab.item.ItemBlockMetadata;
import resonant.lib.utility.LanguageUtility;
import resonantinduction.core.handler.TextureHookHandler;
import resonantinduction.core.items.ItemBakingTrayWithBread;
import resonantinduction.core.items.ItemDevStaff;
import resonantinduction.core.prefab.part.PacketMultiPart;
import resonantinduction.core.resource.BlockDust;
@ -46,6 +50,7 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import resonantinduction.core.items.ItemFlour;
/** The core module of Resonant Induction
*
@ -77,8 +82,10 @@ public class ResonantInduction
public static ItemOreResource itemRubble, itemDust, itemRefinedDust;
public static ItemOreResourceBucket itemBucketMixture, itemBucketMolten;
public static Item itemBiomass, itemDevStaff;
public static Item itemFlour, itemBakingTrayWithBread;
public static Block blockDust, blockRefinedDust;
public static Block blockMachinePart;
@EventHandler
public void preInit(FMLPreInitializationEvent evt)
@ -105,6 +112,8 @@ public class ResonantInduction
itemBucketMolten = new ItemOreResourceBucket(Settings.getNextItemID("bucketMolten"), "bucketMolten", true);
itemBiomass = contentRegistry.createItem(ItemBiomass.class);
itemDevStaff = contentRegistry.createItem(ItemDevStaff.class);
itemFlour = contentRegistry.createItem(ItemFlour.class);
itemBakingTrayWithBread = contentRegistry.createItem(ItemBakingTrayWithBread.class);
GameRegistry.registerItem(itemRubble, itemRubble.getUnlocalizedName());
GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName());
@ -137,6 +146,14 @@ public class ResonantInduction
// Generate Resources
ResourceGenerator.generateOreResources();
// These are from zeros flour stuffs :3
GameRegistry.addRecipe(new ShapelessOreRecipe(itemFlour, new Object []{Item.wheat}));
FurnaceRecipes.smelting().addSmelting(itemFlour.itemID, 1, new ItemStack (Item.bread), 50f);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack (itemFlour ,1,1),new Object []{itemFlour, Item.bucketWater}));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack (itemFlour ,1,3),new Object []{new ItemStack (itemFlour,1,1),new ItemStack (itemFlour,1,2)}));
FurnaceRecipes.smelting().addSmelting(itemFlour.itemID, 3, new ItemStack (itemBakingTrayWithBread), 50f);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack (Item.bread,2), new Object []{new ItemStack (itemBakingTrayWithBread)}));
proxy.postInit();
Settings.CONFIGURATION.save();
}

View file

@ -0,0 +1,28 @@
package resonantinduction.core.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import resonantinduction.core.Reference;
import resonantinduction.core.ResonantInduction;
public class ItemBakingTrayWithBread extends Item{
public ItemBakingTrayWithBread(int par1) {
super(par1);
this.setCreativeTab(CreativeTabs.tabFood);
this.setTextureName(Reference.DOMAIN + ":itemBakingTrayWithBread");
this.setUnlocalizedName("itemBakingTrayWithBread");
}
public ItemStack getContainerItemStack(ItemStack itemStack)
{
return new ItemStack(ResonantInduction.itemFlour,1,2);
}
public boolean hasContainerItem()
{
return true;
}
}

View file

@ -0,0 +1,95 @@
package resonantinduction.core.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import resonantinduction.core.Reference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* Derp
*
* @author Zerotheliger
*
*/
public class ItemFlour extends Item {
@SideOnly(Side.CLIENT)
Icon doughIcon;
@SideOnly(Side.CLIENT)
Icon bakingtrayIcon;
@SideOnly(Side.CLIENT)
Icon bakingtraywithdoughIcon;
public ItemFlour(int par1) {
super(par1);
this.setHasSubtypes(true);
}
@Override
public Icon getIconFromDamage(int meta) {
switch (meta) {
case 1:
return doughIcon;
case 2:
return bakingtrayIcon;
case 3:
return bakingtraywithdoughIcon;
default:
return super.getIconFromDamage(meta);
}
}
@Override
public void registerIcons(IconRegister iconRegister) {
super.registerIcons(iconRegister);
this.doughIcon = iconRegister.registerIcon(Reference.PREFIX + "dough");
this.bakingtrayIcon = iconRegister.registerIcon(Reference.PREFIX + "bakingtray");
this.bakingtraywithdoughIcon = iconRegister.registerIcon(Reference.PREFIX + "bakingtraywithdough");
}
public String getUnlocalizedName(ItemStack par1ItemStack) {
switch (par1ItemStack.getItemDamage()) {
case 1:
return "item.dough";
case 2:
return "item.bakingtray";
case 3:
return "item.bakingtraywithdough";
default:
return super.getUnlocalizedName();
}
}
@Override
public void getSubItems(int par1, CreativeTabs tab, List items) {
super.getSubItems(par1, tab, items);
items.add(new ItemStack(par1, 1, 1));
items.add(new ItemStack(par1, 1, 2));
items.add(new ItemStack(par1, 1, 3));
}
}