created bone handle and bone guard items as well as workbench recipes to create the finised item, need to check if the NBT transfers correctly
This commit is contained in:
@@ -376,5 +376,14 @@ public final class RecipesWorkbench {
|
|||||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||||
new ItemStack(ModItems.wootzshovelhead, 1)).setRecipeName("wootzshovelsplit"));
|
new ItemStack(ModItems.wootzshovelhead, 1)).setRecipeName("wootzshovelsplit"));
|
||||||
|
|
||||||
|
/*********WEAPONS********/
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
new OreIngredient("weaponHandle"),
|
||||||
|
new OreIngredient("weaponGuard"),
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.rawbronzegladius, 1)),
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
new ItemStack(ModItems.bronzegladius, 1)).setRecipeName("bronzegladius"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,5 +34,7 @@ public class ModDictionary {/***************************************************
|
|||||||
OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk);
|
OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk);
|
||||||
//}
|
//}
|
||||||
OreDictionary.registerOre("dustBlaze", Items.BLAZE_POWDER);
|
OreDictionary.registerOre("dustBlaze", Items.BLAZE_POWDER);
|
||||||
|
OreDictionary.registerOre("weaponHandle", ModItems.bonehandle);
|
||||||
|
OreDictionary.registerOre("weaponGuard", ModItems.boneguard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,8 @@ import nmd.primal.forgecraft.items.*;
|
|||||||
import nmd.primal.forgecraft.items.armor.CustomHelmet;
|
import nmd.primal.forgecraft.items.armor.CustomHelmet;
|
||||||
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
|
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
|
||||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponGuard;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponHandle;
|
||||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||||
@@ -118,6 +120,9 @@ public class ModItems {
|
|||||||
public static Item wootzshovel;
|
public static Item wootzshovel;
|
||||||
public static Item wootzhoe;
|
public static Item wootzhoe;
|
||||||
|
|
||||||
|
public static Item bonehandle;
|
||||||
|
public static Item boneguard;
|
||||||
|
|
||||||
public static Item rawbronzegladius;
|
public static Item rawbronzegladius;
|
||||||
public static Item rawcoppergladius;
|
public static Item rawcoppergladius;
|
||||||
public static Item rawwroughtirongladius;
|
public static Item rawwroughtirongladius;
|
||||||
@@ -258,6 +263,9 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPONS
|
||||||
**********/
|
**********/
|
||||||
|
bonehandle = new WeaponHandle("bonehandle").setDictionaryNames("weaponHandle");
|
||||||
|
boneguard = new WeaponGuard("boneguard").setDictionaryNames("weaponGuard");
|
||||||
|
|
||||||
rawbronzegladius = new WeaponPart("rawbronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
rawbronzegladius = new WeaponPart("rawbronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||||
rawcoppergladius= new WeaponPart("rawcoppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
rawcoppergladius= new WeaponPart("rawcoppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||||
rawwroughtirongladius= new WeaponPart("rawwroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
rawwroughtirongladius= new WeaponPart("rawwroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||||
@@ -417,6 +425,9 @@ public class ModItems {
|
|||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPONS
|
||||||
**********/
|
**********/
|
||||||
|
ForgeRegistries.ITEMS.register(bonehandle);
|
||||||
|
ForgeRegistries.ITEMS.register(boneguard);
|
||||||
|
|
||||||
ForgeRegistries.ITEMS.register(rawbronzegladius);
|
ForgeRegistries.ITEMS.register(rawbronzegladius);
|
||||||
ForgeRegistries.ITEMS.register(rawcoppergladius);
|
ForgeRegistries.ITEMS.register(rawcoppergladius);
|
||||||
ForgeRegistries.ITEMS.register(rawwroughtirongladius);
|
ForgeRegistries.ITEMS.register(rawwroughtirongladius);
|
||||||
@@ -557,10 +568,13 @@ public class ModItems {
|
|||||||
registerRender(wootzhoe);
|
registerRender(wootzhoe);
|
||||||
registerRender(wootzsledgehammer);
|
registerRender(wootzsledgehammer);
|
||||||
|
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
WEAPONS
|
WEAPON PARTS
|
||||||
**********/
|
**********/
|
||||||
//registerRender(wroughtironshield);
|
//registerRender(wroughtironshield);
|
||||||
|
registerRender(bonehandle);
|
||||||
|
registerRender(boneguard);
|
||||||
|
|
||||||
registerRender(rawbronzegladius);
|
registerRender(rawbronzegladius);
|
||||||
registerRender(rawcoppergladius);
|
registerRender(rawcoppergladius);
|
||||||
@@ -569,6 +583,10 @@ public class ModItems {
|
|||||||
registerRender(rawsteelgladius);
|
registerRender(rawsteelgladius);
|
||||||
registerRender(rawwootzgladius);
|
registerRender(rawwootzgladius);
|
||||||
|
|
||||||
|
/**********
|
||||||
|
WEAPONS
|
||||||
|
**********/
|
||||||
|
|
||||||
registerRender(bronzegladius);
|
registerRender(bronzegladius);
|
||||||
registerRender(wroughtirongladius);
|
registerRender(wroughtirongladius);
|
||||||
registerRender(cleanirongladius);
|
registerRender(cleanirongladius);
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package nmd.primal.forgecraft.items;
|
package nmd.primal.forgecraft.items;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import nmd.primal.core.api.interfaces.crafting.IDictionaryName;
|
||||||
|
import nmd.primal.core.common.helper.RegistryHelper;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by kitsu on 11/26/2016.
|
* Created by kitsu on 11/26/2016.
|
||||||
*/
|
*/
|
||||||
public class BaseItem extends Item
|
public class BaseItem extends Item implements IDictionaryName<Item>
|
||||||
{
|
{
|
||||||
public BaseItem(String registryName)
|
public BaseItem(String registryName)
|
||||||
{
|
{
|
||||||
@@ -24,4 +27,30 @@ public class BaseItem extends Item
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************** //
|
||||||
|
// IDictionaryName
|
||||||
|
// ***************************************************************************** //
|
||||||
|
private String[] dictionary_names;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item setDictionaryNames(String... strings)
|
||||||
|
{
|
||||||
|
this.dictionary_names = strings;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getDictionaryNames()
|
||||||
|
{
|
||||||
|
return this.dictionary_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerDictionaryNames()
|
||||||
|
{
|
||||||
|
for (String name : this.getDictionaryNames())
|
||||||
|
//RegistryHelper.registerDictionaryNames(new ItemStack(this, 1, OreDictionary.WILDCARD_VALUE), REGISTRY_NAME);
|
||||||
|
RegistryHelper.registerDictionaryNames(new ItemStack(this), name);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,9 @@ package nmd.primal.forgecraft.tiles;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import nmd.primal.core.common.helper.RecipeHelper;
|
import nmd.primal.core.common.helper.RecipeHelper;
|
||||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponGuard;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponHandle;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||||
@@ -25,7 +28,9 @@ public class TileWorkbench extends TileBaseSlot{
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
if(index == 2){
|
if(index == 2){
|
||||||
if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || RecipeHelper.isOreName(stack.getItem(), "stickLacquer")){
|
if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") ||
|
||||||
|
RecipeHelper.isOreName(stack.getItem(), "stickLacquer") ||
|
||||||
|
stack.getItem() instanceof WeaponHandle){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,12 +40,13 @@ public class TileWorkbench extends TileBaseSlot{
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
if(index == 3){
|
if(index == 3){
|
||||||
if ( (stack.getItem() instanceof ToolPart)) {
|
if ( (stack.getItem() instanceof ToolPart) || stack.getItem() instanceof WeaponGuard) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(index == 4){
|
if(index == 4){
|
||||||
if (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) {
|
if ( (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) ||
|
||||||
|
stack.getItem() instanceof WeaponPart) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user