sharpening and weapon upgrading
This commit is contained in:
@@ -8,10 +8,15 @@
|
|||||||
|
|
||||||
|
|
||||||
## Current Feature
|
## Current Feature
|
||||||
- [ ] weapon upgrades
|
- [x] weapon upgrades
|
||||||
- [ ] Grinding Bench
|
- [x] Grinding Bench
|
||||||
- [ ] Grinding Wheel Crafting Slack, Clay, Sand
|
- [x] Repair ToolHead
|
||||||
|
- [x] Grinding Wheel Crafting Slack, Clay, Sand
|
||||||
|
- [x] Grinding Bench Recipe
|
||||||
|
- [x] Dissasemble recipes for weapons
|
||||||
|
- [x] Chisel Pickup
|
||||||
- [ ] Damascus Workblade Recipe
|
- [ ] Damascus Workblade Recipe
|
||||||
|
|
||||||
- [ ] Untick Bloomery and Forge
|
- [ ] Untick Bloomery and Forge
|
||||||
- [ ] Craft Tweaker Support
|
- [ ] Craft Tweaker Support
|
||||||
- [ ] Recipe Handler for Block Breaker
|
- [ ] Recipe Handler for Block Breaker
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
mod_group=nmd.primal.forgecraft
|
mod_group=nmd.primal.forgecraft
|
||||||
mod_name=ForgeCraft
|
mod_name=ForgeCraft
|
||||||
|
|
||||||
mod_version=1.6.33
|
mod_version=1.6.40
|
||||||
forge_version=14.23.4.2765
|
forge_version=14.23.4.2765
|
||||||
mcp_mappings=snapshot_20171003
|
mcp_mappings=snapshot_20171003
|
||||||
mc_version=1.12.2
|
mc_version=1.12.2
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class ModInfo {
|
|||||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||||
public static final String MOD_CHANNEL = MOD_ID;
|
public static final String MOD_CHANNEL = MOD_ID;
|
||||||
|
|
||||||
public static final String MOD_VERSION = "1.6.33";
|
public static final String MOD_VERSION = "1.6.40";
|
||||||
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
||||||
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);";
|
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);";
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.MobEffects;
|
import net.minecraft.init.MobEffects;
|
||||||
|
import net.minecraft.inventory.ItemStackHelper;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
@@ -24,6 +25,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.core.api.PrimalAPI;
|
import nmd.primal.core.api.PrimalAPI;
|
||||||
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
import nmd.primal.forgecraft.init.ModSounds;
|
import nmd.primal.forgecraft.init.ModSounds;
|
||||||
import nmd.primal.forgecraft.items.SledgeHammer;
|
import nmd.primal.forgecraft.items.SledgeHammer;
|
||||||
import nmd.primal.forgecraft.util.ToolMaterialMap;
|
import nmd.primal.forgecraft.util.ToolMaterialMap;
|
||||||
@@ -146,6 +148,13 @@ public class Chisel extends CustomFacing implements ToolMaterialMap {
|
|||||||
ItemStack playerStack = player.inventory.getCurrentItem();
|
ItemStack playerStack = player.inventory.getCurrentItem();
|
||||||
ItemStack offStack = player.inventory.offHandInventory.get(0);
|
ItemStack offStack = player.inventory.offHandInventory.get(0);
|
||||||
int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state);
|
int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state);
|
||||||
|
if(player.getActiveItemStack().isEmpty()){
|
||||||
|
if(player.isSneaking()){
|
||||||
|
PlayerHelper.spawnItemOnPlayer(world, player, new ItemStack(Item.getItemFromBlock(state.getBlock()), 1));
|
||||||
|
world.setBlockToAir(pos);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (hand.equals(hand.MAIN_HAND) && offStack == ItemStack.EMPTY) {
|
if (hand.equals(hand.MAIN_HAND) && offStack == ItemStack.EMPTY) {
|
||||||
if(!player.isSwingInProgress) {
|
if(!player.isSwingInProgress) {
|
||||||
if(player.getActivePotionEffect(MobEffects.MINING_FATIGUE ) == null){
|
if(player.getActivePotionEffect(MobEffects.MINING_FATIGUE ) == null){
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.EnumParticleTypes;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
@@ -17,6 +18,7 @@ import nmd.primal.core.api.PrimalAPI;
|
|||||||
import nmd.primal.core.common.helper.PlayerHelper;
|
import nmd.primal.core.common.helper.PlayerHelper;
|
||||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
|
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||||
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||||
import nmd.primal.forgecraft.items.weapons.SlayerSword;
|
import nmd.primal.forgecraft.items.weapons.SlayerSword;
|
||||||
@@ -28,10 +30,10 @@ import javax.annotation.Nullable;
|
|||||||
public class SharpBench extends CustomContainerFacingActive {
|
public class SharpBench extends CustomContainerFacingActive {
|
||||||
|
|
||||||
|
|
||||||
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 10 / 16D, 8 / 16D);
|
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.28125D, 0.0D, 1/16D, 0.71875D, 11 / 16D, 11 / 16D);
|
||||||
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 8 / 16D, 1.0D, 10 / 16D, 1.0D);
|
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.28125D, 0.0D, 5/16D, 0.71875D, 11 / 16D, 15 / 16D);
|
||||||
protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(8 / 16D, 0.0D, 0.0D, 1.0D, 10 / 16D, 1.0D);
|
protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(5/16D, 0.0D, 0.28125D, 15/16D, 11 / 16D, 0.71875D);
|
||||||
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 8 / 16D, 10 / 16D, 1.0D);
|
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(1/16D, 0.0D, 0.28125D, 11/16D, 11 / 16D, 0.71875D);
|
||||||
|
|
||||||
public SharpBench(Material material, String registryName) {
|
public SharpBench(Material material, String registryName) {
|
||||||
super(material, registryName);
|
super(material, registryName);
|
||||||
@@ -63,6 +65,7 @@ public class SharpBench extends CustomContainerFacingActive {
|
|||||||
if(tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
if(tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
||||||
PlayerHelper.spawnItemOnGround(world, pos, tile.getSlotStack(0));
|
PlayerHelper.spawnItemOnGround(world, pos, tile.getSlotStack(0));
|
||||||
tile.clearSlot(0);
|
tile.clearSlot(0);
|
||||||
|
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,18 +83,25 @@ public class SharpBench extends CustomContainerFacingActive {
|
|||||||
TileSharpBench tile = (TileSharpBench) world.getTileEntity(pos);
|
TileSharpBench tile = (TileSharpBench) world.getTileEntity(pos);
|
||||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
||||||
ItemStack playerStack = player.inventory.getCurrentItem();
|
ItemStack playerStack = player.inventory.getCurrentItem();
|
||||||
if(playerStack.getItem() instanceof CustomSword ||
|
if(
|
||||||
playerStack.getItem() instanceof SlayerSword){
|
playerStack.getItem() instanceof CustomSword ||
|
||||||
|
playerStack.getItem() instanceof ToolPart
|
||||||
|
){
|
||||||
if(playerStack.getItemDamage() > 0){
|
if(playerStack.getItemDamage() > 0){
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
if (PrimalAPI.getRandom().nextInt(1, 4) == 1) {
|
if (PrimalAPI.getRandom().nextInt(1, 3) == 1) {
|
||||||
playerStack.setItemDamage(playerStack.getItemDamage() - 1);
|
playerStack.setItemDamage(playerStack.getItemDamage() - 1);
|
||||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||||
WeaponNBT.removeAndSetEnchantsForStack(playerStack);
|
if(tile.getSlotStack(0).getItemDamage()>= tile.getSlotStack(0).getMaxDamage()){
|
||||||
|
tile.clearSlot(0);
|
||||||
|
}
|
||||||
|
if(playerStack.getItem() instanceof CustomSword) {
|
||||||
|
WeaponNBT.removeAndSetEnchantsForStack(playerStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (world.isRemote) {
|
if (world.isRemote) {
|
||||||
//TODO make sparks
|
makeSparks(world, pos, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,4 +160,26 @@ public class SharpBench extends CustomContainerFacingActive {
|
|||||||
super.breakBlock(world, pos, state);
|
super.breakBlock(world, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void makeSparks(World world, BlockPos pos, IBlockState state){
|
||||||
|
double d0 = (double)pos.getX() + 0.5D;
|
||||||
|
double d1 = (double)pos.getY() + 0.75D;
|
||||||
|
double d2 = (double)pos.getZ() + 0.5D;
|
||||||
|
double d3 = 0.52D;
|
||||||
|
//double d4 = PrimalAPI.getRandom().nextDouble(0.066, 0.33);
|
||||||
|
double ySpeed = PrimalAPI.getRandom().nextDouble(0.05, 0.20);
|
||||||
|
double zSpeed = PrimalAPI.getRandom().nextDouble(0.05, 0.20);
|
||||||
|
if(state.getValue(FACING) == EnumFacing.NORTH) {
|
||||||
|
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, 0.0D, ySpeed, -zSpeed, new int[0]);
|
||||||
|
}
|
||||||
|
if(state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||||
|
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, 0.0D, ySpeed, zSpeed, new int[0]);
|
||||||
|
}
|
||||||
|
if(state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
|
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, zSpeed, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
if(state.getValue(FACING) == EnumFacing.WEST) {
|
||||||
|
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, -zSpeed, ySpeed, 0.0D, new int[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -101,10 +101,11 @@ public class ModJEI implements IModPlugin
|
|||||||
// Info
|
// Info
|
||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
//registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
|
//registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
|
||||||
registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
//registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
||||||
//registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
|
//registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
|
||||||
registry.addIngredientInfo(new ItemStack(ModBlocks.castingform, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.casting");
|
registry.addIngredientInfo(new ItemStack(ModBlocks.castingform, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.casting");
|
||||||
registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
|
registry.addIngredientInfo(new ItemStack(ModBlocks.sharpbench, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.sharpbench");
|
||||||
|
//registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
|
|||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
@@ -45,7 +46,7 @@ public class WorkbenchRecipeCategory extends AbstractCategory<WorkbenchRecipeWra
|
|||||||
@Override
|
@Override
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
return "jei.category.forgecraft.workbench";
|
return I18n.format("jei.category.forgecraft.workbench");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
@@ -433,6 +433,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.coppergladius, 1)).setRecipeName("coppergladius"));
|
new ItemStack(ModItems.coppergladius, 1)).setRecipeName("coppergladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.coppergladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawcoppergladius, 1)).setRecipeName("rawcoppergladius"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawbronzegladius, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawbronzegladius, 1)),
|
||||||
@@ -441,6 +449,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.bronzegladius, 1)).setRecipeName("bronzegladius"));
|
new ItemStack(ModItems.bronzegladius, 1)).setRecipeName("bronzegladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.bronzegladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawbronzegladius, 1)).setRecipeName("rawbronzegladius"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwroughtirongladius, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawwroughtirongladius, 1)),
|
||||||
@@ -449,6 +465,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.wroughtirongladius, 1)).setRecipeName("wroughtirongladius"));
|
new ItemStack(ModItems.wroughtirongladius, 1)).setRecipeName("wroughtirongladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.wroughtirongladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawwroughtirongladius, 1)).setRecipeName("rawwroughtirongladius"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanirongladius, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanirongladius, 1)),
|
||||||
@@ -457,6 +481,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.cleanirongladius, 1)).setRecipeName("cleanirongladius"));
|
new ItemStack(ModItems.cleanirongladius, 1)).setRecipeName("cleanirongladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.cleanirongladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawcleanirongladius, 1)).setRecipeName("rawcleanirongladius"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelgladius, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelgladius, 1)),
|
||||||
@@ -465,6 +497,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.steelgladius, 1)).setRecipeName("steelgladius"));
|
new ItemStack(ModItems.steelgladius, 1)).setRecipeName("steelgladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.steelgladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawsteelgladius, 1)).setRecipeName("rawsteelgladius"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzgladius, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzgladius, 1)),
|
||||||
@@ -473,6 +513,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.wootzgladius, 1)).setRecipeName("wootzgladius"));
|
new ItemStack(ModItems.wootzgladius, 1)).setRecipeName("wootzgladius"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.wootzgladius, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawwootzgladius, 1)).setRecipeName("rawwootzgladius"));
|
||||||
|
|
||||||
/***LONGSWORD***/
|
/***LONGSWORD***/
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
@@ -482,6 +530,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.cleanironlongsword, 1)).setRecipeName("cleanironlongsword"));
|
new ItemStack(ModItems.cleanironlongsword, 1)).setRecipeName("cleanironlongsword"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.cleanironlongsword, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawcleanironlongsword, 1)).setRecipeName("rawcleanironlongsword"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteellongsword, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawsteellongsword, 1)),
|
||||||
@@ -490,6 +546,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.steellongsword, 1)).setRecipeName("steellongsword"));
|
new ItemStack(ModItems.steellongsword, 1)).setRecipeName("steellongsword"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.steellongsword, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawsteellongsword, 1)).setRecipeName("rawsteellongsword"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzlongsword, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzlongsword, 1)),
|
||||||
@@ -498,6 +562,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.wootzlongsword, 1)).setRecipeName("wootzlongsword"));
|
new ItemStack(ModItems.wootzlongsword, 1)).setRecipeName("wootzlongsword"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.wootzlongsword, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawwootzlongsword, 1)).setRecipeName("rawwootzlongsword"));
|
||||||
|
|
||||||
/***SLAYER***/
|
/***SLAYER***/
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
@@ -507,6 +579,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.wroughtironslayer, 1)).setRecipeName("ironslayer"));
|
new ItemStack(ModItems.wroughtironslayer, 1)).setRecipeName("ironslayer"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.wroughtironslayer, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawironslayer, 1)).setRecipeName("rawironslayer"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanironslayer, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanironslayer, 1)),
|
||||||
@@ -515,6 +595,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.cleanironslayer, 1)).setRecipeName("cleanironslayer"));
|
new ItemStack(ModItems.cleanironslayer, 1)).setRecipeName("cleanironslayer"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.cleanironslayer, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawcleanironslayer, 1)).setRecipeName("rawcleanironslayer"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelslayer, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelslayer, 1)),
|
||||||
@@ -523,6 +611,14 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.steelslayer, 1)).setRecipeName("steelslayer"));
|
new ItemStack(ModItems.steelslayer, 1)).setRecipeName("steelslayer"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.steelslayer, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawsteelslayer, 1)).setRecipeName("rawsteelslayer"));
|
||||||
|
|
||||||
recipes.register (new WorkbenchCrafting(
|
recipes.register (new WorkbenchCrafting(
|
||||||
new OreIngredient("cordageGeneral"),
|
new OreIngredient("cordageGeneral"),
|
||||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzslayer, 1)),
|
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzslayer, 1)),
|
||||||
@@ -531,5 +627,12 @@ public final class RecipesWorkbench {
|
|||||||
new OreIngredient("toolWorkBlade"),
|
new OreIngredient("toolWorkBlade"),
|
||||||
new ItemStack(ModItems.wootzslayer, 1)).setRecipeName("wootzslayer"));
|
new ItemStack(ModItems.wootzslayer, 1)).setRecipeName("wootzslayer"));
|
||||||
|
|
||||||
|
recipes.register (new WorkbenchCrafting(
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.EMPTY,
|
||||||
|
Ingredient.fromStacks(new ItemStack(ModItems.wootzslayer, 1)),
|
||||||
|
new OreIngredient("toolWorkBlade"),
|
||||||
|
new ItemStack(ModItems.rawwootzslayer, 1)).setRecipeName("rawwootzslayer"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import nmd.primal.core.api.PrimalAPI;
|
import nmd.primal.core.api.PrimalAPI;
|
||||||
|
import nmd.primal.core.common.helper.RecipeHelper;
|
||||||
import nmd.primal.core.common.recipes.irecipe.RecipeHandler;
|
import nmd.primal.core.common.recipes.irecipe.RecipeHandler;
|
||||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||||
import nmd.primal.forgecraft.crafting.CastingCrafting;
|
import nmd.primal.forgecraft.crafting.CastingCrafting;
|
||||||
@@ -333,11 +334,11 @@ public class ModCrafting{
|
|||||||
|
|
||||||
/***Bellows Handle***/
|
/***Bellows Handle***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
|
||||||
"X X", "X X", " X ", 'X', Items.STICK);
|
"X X", "X X", " X ", 'X', "stickWood");
|
||||||
|
|
||||||
/***Tongs***/
|
/***Tongs***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.slottedtongs, 1),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.slottedtongs, 1),
|
||||||
"X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK);
|
"X X", "YSY", 'X', Blocks.STONE, 'S', "string", 'Y', "stickWood");
|
||||||
|
|
||||||
/***Anvil***/
|
/***Anvil***/
|
||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.stoneanvil, 1),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.stoneanvil, 1),
|
||||||
@@ -346,6 +347,12 @@ public class ModCrafting{
|
|||||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.workbench, 1),
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.workbench, 1),
|
||||||
" ", "rrr", "f f", 'r', Blocks.STONE_SLAB, 'f', "fenceWood");
|
" ", "rrr", "f f", 'r', Blocks.STONE_SLAB, 'f', "fenceWood");
|
||||||
|
|
||||||
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.sharpbench, 1),
|
||||||
|
" ", "sss", "f f", 's', "stickWood", 'f', "fenceWood" );
|
||||||
|
|
||||||
|
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzworkblade, 1),
|
||||||
|
" ", "sss", "f f", 's', "stickWood", 'f', "fenceWood" );
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
CASTING
|
CASTING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
@@ -814,6 +821,18 @@ public class ModCrafting{
|
|||||||
ANVILING
|
ANVILING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
/*** WORKBLADE ***/
|
||||||
|
/*AnvilCrafting.addRecipe(
|
||||||
|
new ItemStack [] {
|
||||||
|
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||||
|
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||||
|
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||||
|
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||||
|
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir },
|
||||||
|
new ItemStack(ModItems.wootzworkblade, 1),
|
||||||
|
"null"
|
||||||
|
);*/
|
||||||
|
|
||||||
/*** SLEDGEHAMMER ***/
|
/*** SLEDGEHAMMER ***/
|
||||||
AnvilCrafting.addRecipe(
|
AnvilCrafting.addRecipe(
|
||||||
new ItemStack [] {
|
new ItemStack [] {
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public class ModItems {
|
|||||||
longbow = new Longbow("longbow");
|
longbow = new Longbow("longbow");
|
||||||
//matchlockmusket = new Musket("matchlock_musket");
|
//matchlockmusket = new Musket("matchlock_musket");
|
||||||
wootzworkblade = new Workblade("wootzworkblade", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, -1.0F).setFireProof(true);
|
wootzworkblade = new Workblade("wootzworkblade", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, -1.0F).setFireProof(true);
|
||||||
grindingwheel = new BaseItem("grindingwheel").setMaxDamage(9000).setMaxStackSize(1).setNoRepair();
|
grindingwheel = new BaseSingleItem("grindingwheel", 9000);
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
TOOL PARTS
|
TOOL PARTS
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class ModTileRenders {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileWorkbench.class, new TileWorkbenchRender());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileWorkbench.class, new TileWorkbenchRender());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileSharpBench.class, new TileSharpBenchRender());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,16 @@ public class CauldronRecipes
|
|||||||
|
|
||||||
genRecipesForList(recipeList, recipes);
|
genRecipesForList(recipeList, recipes);
|
||||||
|
|
||||||
|
recipes.register(new CauldronRecipe(
|
||||||
|
5,
|
||||||
|
new FluidStack(FluidRegistry.WATER, 500),
|
||||||
|
new FluidStack(PrimalAPI.Fluids.WASTE, 500),
|
||||||
|
RecipeHelper.getOreStack("sand", 1),
|
||||||
|
RecipeHelper.getOreStack("slackLime", 4),
|
||||||
|
RecipeHelper.getOreStack("clayball", 2),
|
||||||
|
new ItemStack(ModItems.grindingwheel, 1),
|
||||||
|
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, ModItems.grindingwheel.getUnlocalizedName().toString()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDefaultNBT(ItemStack stack){
|
static void setDefaultNBT(ItemStack stack){
|
||||||
@@ -67,8 +77,8 @@ public class CauldronRecipes
|
|||||||
|
|
||||||
static CauldronRecipe genSmiteRecipe(ItemStack stack) {
|
static CauldronRecipe genSmiteRecipe(ItemStack stack) {
|
||||||
return new CauldronRecipe(
|
return new CauldronRecipe(
|
||||||
5,
|
8,
|
||||||
new FluidStack(FluidRegistry.WATER, 1000),
|
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||||
RecipeHelper.getOreStack("dustSilver", 2),
|
RecipeHelper.getOreStack("dustSilver", 2),
|
||||||
RecipeHelper.buildList(stack),
|
RecipeHelper.buildList(stack),
|
||||||
@@ -77,8 +87,8 @@ public class CauldronRecipes
|
|||||||
}
|
}
|
||||||
static CauldronRecipe genBaneRecipe(ItemStack stack) {
|
static CauldronRecipe genBaneRecipe(ItemStack stack) {
|
||||||
return new CauldronRecipe(
|
return new CauldronRecipe(
|
||||||
5,
|
8,
|
||||||
new FluidStack(FluidRegistry.WATER, 1000),
|
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||||
RecipeHelper.getOreStack("foodPoison", 2),
|
RecipeHelper.getOreStack("foodPoison", 2),
|
||||||
RecipeHelper.buildList(stack),
|
RecipeHelper.buildList(stack),
|
||||||
@@ -88,8 +98,8 @@ public class CauldronRecipes
|
|||||||
|
|
||||||
static CauldronRecipe genFireRecipe(ItemStack stack) {
|
static CauldronRecipe genFireRecipe(ItemStack stack) {
|
||||||
return new CauldronRecipe(
|
return new CauldronRecipe(
|
||||||
5,
|
8,
|
||||||
new FluidStack(FluidRegistry.WATER, 1000),
|
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||||
RecipeHelper.getOreStack("dustBlaze", 2),
|
RecipeHelper.getOreStack("dustBlaze", 2),
|
||||||
RecipeHelper.buildList(stack),
|
RecipeHelper.buildList(stack),
|
||||||
@@ -99,8 +109,8 @@ public class CauldronRecipes
|
|||||||
|
|
||||||
static CauldronRecipe genFortuneRecipe(ItemStack stack) {
|
static CauldronRecipe genFortuneRecipe(ItemStack stack) {
|
||||||
return new CauldronRecipe(
|
return new CauldronRecipe(
|
||||||
5,
|
8,
|
||||||
new FluidStack(FluidRegistry.WATER, 1000),
|
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||||
RecipeHelper.getOreStack("gemLapis", 2),
|
RecipeHelper.getOreStack("gemLapis", 2),
|
||||||
RecipeHelper.buildList(stack),
|
RecipeHelper.buildList(stack),
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
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 BaseSingleItem extends BaseItem implements IDictionaryName<Item>
|
||||||
|
{
|
||||||
|
public BaseSingleItem(String registryName, int damage)
|
||||||
|
{
|
||||||
|
super(registryName);
|
||||||
|
this.setMaxStackSize(1);
|
||||||
|
this.canRepair = false;
|
||||||
|
this.setMaxDamage(damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.getRegistryName().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isHidden()
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -161,9 +161,6 @@ public class CustomSword extends ItemSword implements WeaponNBT {
|
|||||||
if (WeaponNBT.getLeechLevel(stack) > 0) {
|
if (WeaponNBT.getLeechLevel(stack) > 0) {
|
||||||
tooltip.add(ChatFormatting.BLACK + "Life Steal: " + WeaponNBT.getLeechLevel(stack));
|
tooltip.add(ChatFormatting.BLACK + "Life Steal: " + WeaponNBT.getLeechLevel(stack));
|
||||||
}
|
}
|
||||||
//if (WeaponNBT.getSharpnessLevel(stack) > 0) {
|
|
||||||
// tooltip.add(ChatFormatting.WHITE + "Sharpness: " + WeaponNBT.getSharpnessLevel(stack));
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,72 +5,54 @@ import com.google.common.collect.Multimap;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemSword;
|
import net.minecraft.item.ItemSword;
|
||||||
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mminaie on 6/25/17.
|
* Created by mminaie on 6/25/17.
|
||||||
*/
|
*/
|
||||||
public class SlayerSword extends ItemSword {
|
public class SlayerSword extends CustomSword {
|
||||||
|
|
||||||
private double attack, speed;
|
|
||||||
|
|
||||||
public SlayerSword(String name, Item.ToolMaterial material, double attackDamage, double attackSpeed) {
|
public SlayerSword(String name, Item.ToolMaterial material, double attackDamage, double attackSpeed) {
|
||||||
super(material);
|
super(name, material, attackDamage, attackSpeed);
|
||||||
this.setUnlocalizedName(name);
|
|
||||||
this.setRegistryName(name);
|
|
||||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
|
||||||
this.setMaxStackSize(1);
|
|
||||||
this.setNoRepair();
|
|
||||||
this.attack = attackDamage;
|
|
||||||
this.speed = attackSpeed;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate(ItemStack item, World world, Entity playerin, int itemSlot, boolean isSelected) {
|
public void onUpdate(ItemStack stack, World world, Entity ent, int itemSlot, boolean isSelected) {
|
||||||
|
|
||||||
if(isSelected){
|
if(isSelected){
|
||||||
playerin.setSprinting(false);
|
EntityPlayer player = (EntityPlayer) ent;
|
||||||
|
if(!player.inventory.offHandInventory.isEmpty()) {
|
||||||
|
ent.setSprinting(false);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() < stack.getMaxDamage() * 0.5){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 5);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() > stack.getMaxDamage() * 0.5 && stack.getItemDamage() < stack.getMaxDamage() * 0.6){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 4);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() > stack.getMaxDamage() * 0.6 && stack.getItemDamage() < stack.getMaxDamage() * 0.7){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 3);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() > stack.getMaxDamage() * 0.7 && stack.getItemDamage() < stack.getMaxDamage() * 0.8){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 2);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() > stack.getMaxDamage() * 0.8 && stack.getItemDamage() < stack.getMaxDamage() * 0.9){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 1);
|
||||||
|
}
|
||||||
|
if (stack.getItemDamage() > stack.getMaxDamage() * 0.9 && stack.getItemDamage() < stack.getMaxDamage()){
|
||||||
|
WeaponNBT.setSharpnessLevel(stack, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@Override
|
|
||||||
public boolean hasEffect(ItemStack stack)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRepairable()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getItemEnchantability(ItemStack stack)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
|
|
||||||
{
|
|
||||||
Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
|
|
||||||
|
|
||||||
if (equipmentSlot == EntityEquipmentSlot.MAINHAND)
|
|
||||||
{
|
|
||||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", this.attack, 0));
|
|
||||||
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.speed, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
return multimap;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package nmd.primal.forgecraft.renders.blocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.RenderItem;
|
||||||
|
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import nmd.primal.core.api.PrimalAPI;
|
||||||
|
import nmd.primal.core.common.helper.RecipeHelper;
|
||||||
|
import nmd.primal.forgecraft.blocks.machine.SharpBench;
|
||||||
|
import nmd.primal.forgecraft.blocks.machine.Workbench;
|
||||||
|
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileSharpBench;
|
||||||
|
import nmd.primal.forgecraft.tiles.TileWorkbench;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kitsu on 12/4/2016.
|
||||||
|
*/
|
||||||
|
public class TileSharpBenchRender extends TileEntitySpecialRenderer<TileSharpBench>
|
||||||
|
{
|
||||||
|
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(TileSharpBench tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
|
||||||
|
{
|
||||||
|
BlockPos pos = tile.getPos();
|
||||||
|
IBlockState state = this.getWorld().getBlockState(pos);
|
||||||
|
if (state.getBlock() instanceof SharpBench) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x, y, z);
|
||||||
|
//GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||||
|
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||||
|
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||||
|
|
||||||
|
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||||
|
|
||||||
|
ItemStack stack0 = tile.getSlotStack(0);
|
||||||
|
|
||||||
|
if (state.getValue(Workbench.FACING) == EnumFacing.NORTH) {
|
||||||
|
|
||||||
|
if (!stack0.isEmpty()) {
|
||||||
|
float scale = 1.0f;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
GL11.glTranslated(0.5D, 0.71875D, 0.28125D);
|
||||||
|
GL11.glScalef(scale, scale, scale);
|
||||||
|
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||||
|
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||||
|
}
|
||||||
|
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) {
|
||||||
|
if (!stack0.isEmpty()) {
|
||||||
|
float scale = 1.0f;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
GL11.glTranslated(0.5D, 0.71875D, 1-0.28125D);
|
||||||
|
GL11.glScalef(scale, scale, scale);
|
||||||
|
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||||
|
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||||
|
}
|
||||||
|
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state.getValue(Workbench.FACING) == EnumFacing.EAST) {
|
||||||
|
if (!stack0.isEmpty()) {
|
||||||
|
float scale = 1.0f;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
GL11.glTranslated(1-0.28125D, 0.71875D, 0.5D);
|
||||||
|
GL11.glScalef(scale, scale, scale);
|
||||||
|
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||||
|
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||||
|
}
|
||||||
|
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state.getValue(Workbench.FACING) == EnumFacing.WEST) {
|
||||||
|
if (!stack0.isEmpty()) {
|
||||||
|
float scale = 1.0f;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
GL11.glTranslated(0.28125D, 0.71875D, 0.5D);
|
||||||
|
GL11.glScalef(scale, scale, scale);
|
||||||
|
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||||
|
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||||
|
}
|
||||||
|
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,6 +46,10 @@ public class TileSharpBench extends TileBaseSlot implements ITickable {
|
|||||||
iteration = 0;
|
iteration = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.charge==0){
|
||||||
|
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||||
|
this.updateBlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ 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;
|
||||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
||||||
|
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||||
|
|
||||||
public class TileWorkbench extends TileBaseSlot{
|
public class TileWorkbench extends TileBaseSlot{
|
||||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||||
@@ -49,7 +50,8 @@ public class TileWorkbench extends TileBaseSlot{
|
|||||||
if(stack.getItem() instanceof CustomAxe ||
|
if(stack.getItem() instanceof CustomAxe ||
|
||||||
stack.getItem() instanceof CustomHoe ||
|
stack.getItem() instanceof CustomHoe ||
|
||||||
stack.getItem() instanceof CustomPickaxe ||
|
stack.getItem() instanceof CustomPickaxe ||
|
||||||
stack.getItem() instanceof CustomShovel){
|
stack.getItem() instanceof CustomShovel ||
|
||||||
|
stack.getItem() instanceof CustomSword){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ tile.copperchisel.name=Copper Chisel
|
|||||||
tile.bronzechisel.name=Bronze Chisel
|
tile.bronzechisel.name=Bronze Chisel
|
||||||
|
|
||||||
tile.toolbench.name=Tool Bench
|
tile.toolbench.name=Tool Bench
|
||||||
|
tile.sharpbench.name=Sharpening Bench
|
||||||
|
|
||||||
item.bronzeingotball.name=Bronze Ingot
|
item.bronzeingotball.name=Bronze Ingot
|
||||||
item.bronzechunk.name=Bronze Chunk
|
item.bronzechunk.name=Bronze Chunk
|
||||||
@@ -49,6 +50,8 @@ item.brokenwootztool.name=Broken Damascus Tool
|
|||||||
item.unstrunglongbow.name=Unstrung Longbow
|
item.unstrunglongbow.name=Unstrung Longbow
|
||||||
item.longbow.name=Longbow
|
item.longbow.name=Longbow
|
||||||
item.rawlongbow.name=Raw Longbow
|
item.rawlongbow.name=Raw Longbow
|
||||||
|
item.grindingwheel.name=Grinding Wheel
|
||||||
|
item.rawironslayer.name=Raw Wrought Iron Slayer
|
||||||
|
|
||||||
item.bellowshandle.name=Bellows Handle
|
item.bellowshandle.name=Bellows Handle
|
||||||
item.softcrucible.name=Soft Crucible
|
item.softcrucible.name=Soft Crucible
|
||||||
@@ -176,8 +179,5 @@ jei.category.forgecraft.casting=Casting
|
|||||||
jei.category.forgecraft.forging=Forging
|
jei.category.forgecraft.forging=Forging
|
||||||
jei.category.forgecraft.workbench=Tool Bench
|
jei.category.forgecraft.workbench=Tool Bench
|
||||||
|
|
||||||
jei.info.forgecraft.crucible=Crucible Crafting
|
jei.info.forgecraft.casting=Right Click the casting form while holding a hot crucible of the crafting material.
|
||||||
jei.info.forgecraft.anvil=Anvil Crafting
|
jei.info.forgecraft.sharpbench=Right click with an empty hand to get the grinding wheel going. Make contact with the grinding wheel while holding a Weapon or Tool head.
|
||||||
jei.info.forgecraft.casting=Casting
|
|
||||||
jei.info.forgecraft.forging=Forging
|
|
||||||
jei.info.forgecraft.workbench=Tool Bench
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"modid": "forgecraft",
|
"modid": "forgecraft",
|
||||||
"name": "Kitsu's Forgecraft",
|
"name": "Kitsu's Forgecraft",
|
||||||
"description": "Forged with sweat and blood",
|
"description": "Forged with sweat and blood",
|
||||||
"version": "1.6.33",
|
"version": "1.6.40",
|
||||||
"mcversion": "1.12.2",
|
"mcversion": "1.12.2",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user