diff --git a/1.11/To-Dos b/1.11/To-Dos index 48a56d2e..bc87016e 100644 --- a/1.11/To-Dos +++ b/1.11/To-Dos @@ -4,7 +4,7 @@ To-Dos - [x] Stone Anvil - [x] Stone Anvil Inventory - [x] Stone Anvil Tile - - [ ] Stone Anvil Crafting + - [x] Stone Anvil Crafting - [x] TESR Inventory Rendering for Anvil - [x] Iron Chunk Item Model @@ -13,8 +13,10 @@ To-Dos - [x] StoneTongs Iron Chunks - [ ] Hammer Crafting -- [ ] Iron Chunking - +- [x] Iron Chunking +- [ ] Toolhead Recipes +- [ ] WeaponHead recipes +- [ ] Add forgehammer to oreDict *** Backlog *** diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java index ded11ae4..c6814e5f 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java @@ -87,6 +87,7 @@ public class Anvil extends CustomContainerFacing { AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray); if(recipe != null) { CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput()); + world.playEvent(1031, pos, 0); for (int i = 0; i < tile.getSlotListSize(); i++) { if (!tile.getSlotStack(i).isEmpty()) { tile.setSlotStack(i, ItemStack.EMPTY); diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java index 8478f8ea..38dac0b4 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java @@ -24,6 +24,7 @@ import nmd.primal.core.common.blocks.PrimalBlock; import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.blocks.*; import nmd.primal.forgecraft.items.blocks.ItemBlockIngotBall; +import nmd.primal.forgecraft.tiles.TileAnvil; /** * Created by kitsu on 11/26/2016. @@ -91,7 +92,7 @@ public class ModBlocks { Item pItem = player.getHeldItem(hand).getItem(); BlockPos belowPos = new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ()); - if(pItem.equals(PrimalItems.STONE_GALLAGHER) && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)){ + if (pItem.equals(PrimalItems.STONE_GALLAGHER) && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) { player.swingArm(hand); world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(Anvil.FACING, player.getHorizontalFacing()), 2); @@ -99,6 +100,36 @@ public class ModBlocks { //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1)); return true; } + if (pItem.equals(PrimalItems.STONE_GALLAGHER) && world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) { + TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos); + + + if (tile.getSlotStack(6).isEmpty() && + tile.getSlotStack(7).isEmpty() && + tile.getSlotStack(8).isEmpty() && + tile.getSlotStack(11).isEmpty() && + tile.getSlotStack(12).isEmpty() && + tile.getSlotStack(13).isEmpty() && + tile.getSlotStack(16).isEmpty() && + tile.getSlotStack(17).isEmpty() && + tile.getSlotStack(18).isEmpty() + ) { + player.swingArm(hand); + world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); + tile.setSlotStack(6, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(7, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(8, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(11, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(12, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(13, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(16, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(17, new ItemStack(ModItems.ironchunkhot, 1)); + tile.setSlotStack(18, new ItemStack(ModItems.ironchunkhot, 1)); + world.playEvent(1031, pos, 0); + return true; + } + } + } return false; } diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index c57c5fec..3c1f8f2e 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -150,25 +150,13 @@ public class ModCrafting { 1.0f ); - //Makes a Charred Tool Handle - ForgeCrafting.addRecipe( - ModBlocks.ironchunk, - ModBlocks.ironchunk.getDefaultState().withProperty(IngotBall.ACTIVE, false), - ModBlocks.ironchunk.getDefaultState().withProperty(IngotBall.ACTIVE, true), - new ItemStack(ModBlocks.ironchunk, 1), - ModBlocks.ironchunk.getDefaultState().withProperty(IngotBall.ACTIVE, false), - 800, - 170, - 400, - 1.0f, - 1.0f - ); - // ***************************************************************************** // // ANVILING // ***************************************************************************** // - //AnvilCrafting.addRecipe(6781014, new ItemStack(Blocks.OBSIDIAN, 1)); + + + //Makes a Pickaxe Head AnvilCrafting.addRecipe( new Integer[] { 0,0,0,0,0, 0,1,1,1,0,