Added plant oil and associated recipes - need to compile a list for future alchemy items

This commit is contained in:
WayofTime 2016-05-05 07:59:08 -04:00
parent 050d1185a7
commit 03fa7b2712
9 changed files with 50 additions and 11 deletions

View file

@ -0,0 +1,20 @@
package WayofTime.bloodmagic.fuel;
import WayofTime.bloodmagic.item.ItemComponent;
import WayofTime.bloodmagic.registry.ModItems;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.IFuelHandler;
public class FuelHandler implements IFuelHandler
{
@Override
public int getBurnTime(ItemStack fuel)
{
if (fuel != null && fuel.getItem() == ModItems.itemComponent && fuel.getMetadata() == ItemComponent.getStack(ItemComponent.SAND_COAL).getMetadata())
{
return 1600;
}
return 0;
}
}

View file

@ -45,6 +45,7 @@ public class ItemComponent extends Item implements IVariantProvider
public static final String SAND_IRON = "ironSand";
public static final String SAND_GOLD = "goldSand";
public static final String SAND_COAL = "coalSand";
public static final String PLANT_OIL = "plantOil";
public ItemComponent()
{
@ -81,6 +82,7 @@ public class ItemComponent extends Item implements IVariantProvider
names.add(19, SAND_IRON);
names.add(20, SAND_GOLD);
names.add(21, SAND_COAL);
names.add(22, PLANT_OIL);
}
@Override

View file

@ -1,16 +1,18 @@
package WayofTime.bloodmagic.proxy;
import WayofTime.bloodmagic.api.ritual.CapabilityRuneType;
import WayofTime.bloodmagic.api.ritual.IRitualStone;
import WayofTime.bloodmagic.api.teleport.TeleportQueue;
import WayofTime.bloodmagic.util.handler.EventHandler;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.bloodmagic.api.ritual.CapabilityRuneType;
import WayofTime.bloodmagic.api.ritual.IRitualStone;
import WayofTime.bloodmagic.api.teleport.TeleportQueue;
import WayofTime.bloodmagic.fuel.FuelHandler;
import WayofTime.bloodmagic.util.handler.EventHandler;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2;
public class CommonProxy
{
@ -29,6 +31,7 @@ public class CommonProxy
{
MinecraftForge.EVENT_BUS.register(new EventHandler());
MinecraftForge.EVENT_BUS.register(TeleportQueue.getInstance());
GameRegistry.registerFuelHandler(new FuelHandler());
registerRenderers();
}

View file

@ -4,6 +4,7 @@ import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.IFuelHandler;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.ConfigHandler;
@ -187,7 +188,7 @@ public class ModItems
ritualReader = registerItem(new ItemRitualReader(), Constants.BloodMagicItem.RITUAL_READER.getRegName());
lavaCrystal = registerItem(new ItemLavaCrystal(), Constants.BloodMagicItem.LAVA_CRYSTAL.getRegName());
GameRegistry.registerFuelHandler(new ItemLavaCrystal());
GameRegistry.registerFuelHandler((IFuelHandler) lavaCrystal);
boundSword = registerItem(new ItemBoundSword(), Constants.BloodMagicItem.BOUND_SWORD.getRegName());
boundPickaxe = registerItem(new ItemBoundPickaxe(), Constants.BloodMagicItem.BOUND_PICKAXE.getRegName());

View file

@ -290,9 +290,16 @@ public class ModRecipes
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.CLAY, 5), 200, 200, 1, Items.WATER_BUCKET, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY);
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.OBSIDIAN), 50, 50, 1, Items.WATER_BUCKET, Items.LAVA_BUCKET);
AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC), 1000, 400, 1, "dustCoal", Items.GUNPOWDER, Items.REDSTONE, Items.SUGAR, Items.WHEAT, new ItemStack(Items.POTIONITEM));
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_COAL, 4), 100, 100, 1, new ItemStack(Items.COAL, 1, 0), new ItemStack(Items.COAL, 1, 0), Items.FLINT));
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_IRON, 2), 100, 200, 1, "oreIron", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_GOLD, 2), 100, 200, 1, "oreGold", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC), 1000, 400, 1, "dustCoal", Items.GUNPOWDER, Items.REDSTONE, Items.SUGAR, ItemComponent.getStack(ItemComponent.PLANT_OIL), new ItemStack(Items.POTIONITEM));
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_IRON, 2), 400, 200, 1, "oreIron", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ItemComponent.getStack(ItemComponent.SAND_GOLD, 2), 400, 200, 1, "oreGold", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.CARROT, Items.CARROT, Items.CARROT, new ItemStack(Items.DYE, 15));
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.POTATO, Items.POTATO, new ItemStack(Items.DYE, 15));
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.WHEAT, Items.WHEAT, new ItemStack(Items.DYE, 15));
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.BEETROOT, Items.BEETROOT, Items.BEETROOT, new ItemStack(Items.DYE, 15));
}
}

View file

@ -115,6 +115,11 @@
"textures": {
"layer0": "bloodmagic:items/CoalSand"
}
},
"plantoil": {
"textures": {
"layer0": "bloodmagic:items/PlantOil"
}
}
}
}

View file

@ -10,7 +10,7 @@
"textures": {
"layer0": "bloodmagic:items/BasicCuttingFluid"
}
}
}
}
}
}

View file

@ -90,6 +90,7 @@ item.BloodMagic.baseComponent.reagentTransposition.name=Transposition Reagent
item.BloodMagic.baseComponent.ironSand.name=Iron Sand
item.BloodMagic.baseComponent.goldSand.name=Gold Sand
item.BloodMagic.baseComponent.coalSand.name=Coal Sand
item.BloodMagic.baseComponent.plantOil.name=Plant Oil
item.BloodMagic.cuttingFluid.basicCuttingFluid.name=Basic Cutting Fluid

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B