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:
@@ -375,6 +375,15 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
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("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.blocks.ItemNBTCrucible;
|
||||
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.CustomHoe;
|
||||
@@ -118,6 +120,9 @@ public class ModItems {
|
||||
public static Item wootzshovel;
|
||||
public static Item wootzhoe;
|
||||
|
||||
public static Item bonehandle;
|
||||
public static Item boneguard;
|
||||
|
||||
public static Item rawbronzegladius;
|
||||
public static Item rawcoppergladius;
|
||||
public static Item rawwroughtirongladius;
|
||||
@@ -258,6 +263,9 @@ public class ModItems {
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
bonehandle = new WeaponHandle("bonehandle").setDictionaryNames("weaponHandle");
|
||||
boneguard = new WeaponGuard("boneguard").setDictionaryNames("weaponGuard");
|
||||
|
||||
rawbronzegladius = new WeaponPart("rawbronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||
rawcoppergladius= new WeaponPart("rawcoppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||
rawwroughtirongladius= new WeaponPart("rawwroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
@@ -417,6 +425,9 @@ public class ModItems {
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
ForgeRegistries.ITEMS.register(bonehandle);
|
||||
ForgeRegistries.ITEMS.register(boneguard);
|
||||
|
||||
ForgeRegistries.ITEMS.register(rawbronzegladius);
|
||||
ForgeRegistries.ITEMS.register(rawcoppergladius);
|
||||
ForgeRegistries.ITEMS.register(rawwroughtirongladius);
|
||||
@@ -557,10 +568,13 @@ public class ModItems {
|
||||
registerRender(wootzhoe);
|
||||
registerRender(wootzsledgehammer);
|
||||
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
WEAPON PARTS
|
||||
**********/
|
||||
//registerRender(wroughtironshield);
|
||||
registerRender(bonehandle);
|
||||
registerRender(boneguard);
|
||||
|
||||
registerRender(rawbronzegladius);
|
||||
registerRender(rawcoppergladius);
|
||||
@@ -569,6 +583,10 @@ public class ModItems {
|
||||
registerRender(rawsteelgladius);
|
||||
registerRender(rawwootzgladius);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
|
||||
registerRender(bronzegladius);
|
||||
registerRender(wroughtirongladius);
|
||||
registerRender(cleanirongladius);
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 11/26/2016.
|
||||
*/
|
||||
public class BaseItem extends Item
|
||||
public class BaseItem extends Item implements IDictionaryName<Item>
|
||||
{
|
||||
public BaseItem(String registryName)
|
||||
{
|
||||
@@ -24,4 +27,30 @@ public class BaseItem extends Item
|
||||
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 nmd.primal.core.common.helper.RecipeHelper;
|
||||
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.CustomHoe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||
@@ -25,7 +28,9 @@ public class TileWorkbench extends TileBaseSlot{
|
||||
}
|
||||
}*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -35,12 +40,13 @@ public class TileWorkbench extends TileBaseSlot{
|
||||
}
|
||||
}*/
|
||||
if(index == 3){
|
||||
if ( (stack.getItem() instanceof ToolPart)) {
|
||||
if ( (stack.getItem() instanceof ToolPart) || stack.getItem() instanceof WeaponGuard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(index == 4){
|
||||
if (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) {
|
||||
if ( (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) ||
|
||||
stack.getItem() instanceof WeaponPart) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user