diff --git a/1.11/To-Dos b/1.11/To-Dos index 52e75ed4..f6710282 100644 --- a/1.11/To-Dos +++ b/1.11/To-Dos @@ -3,9 +3,11 @@ To-Dos *** Priority *** - [ ] OreDict Stuff -- [ ] Use Primal Brick instead of clay brick -- [ ] Iron Plate Recipe -- [ ] Bucket Crafting +- [x] Can't remove fuel from Bloomery +- [ ] Crafting Recipe for Iron Ingot to Iron Ball +- [ ] Block To Read Temperature +- [ ] Bellows Moves Faster + *** Backlog *** - [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers 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 cd08157e..3b07ff42 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 @@ -83,6 +83,7 @@ public class Anvil extends CustomContainerFacing { ItemStack pItem = player.inventory.getCurrentItem(); TileAnvil tile = (TileAnvil) world.getTileEntity(pos); if (tile != null) { + //System.out.println("Tile is not null"); if ((player.inventory.getCurrentItem().getItem().equals(PrimalItems.STONE_GALLAGHER)) || (player.inventory.getCurrentItem().getItem() == ModItems.forgehammer)) { @@ -203,22 +204,15 @@ public class Anvil extends CustomContainerFacing { if ((pItem.getItem() != PrimalItems.STONE_GALLAGHER) || (pItem.getItem() != ModItems.forgehammer)) { - if (pItem.getItem().equals(ModItems.stonetongs)) { - if ((pItem.getTagCompound().getInteger("type") == 6) || (pItem.getTagCompound().getInteger("type") == 7) || - (pItem.getTagCompound().getInteger("type") == 8) || - (pItem.getTagCompound().getInteger("type") == 9) || - (pItem.getTagCompound().getInteger("type") == 10) || - (pItem.getTagCompound().getInteger("type") == 11) || - (pItem.getTagCompound().getInteger("type") == 0)) { + if (state.getValue(FACING) == EnumFacing.NORTH) { int counter = 0; for (int z = 0; z < 5; z++) { for (int x = 0; x < 5; x++) { if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - //System.out.println("Doing work"); + return true; } } counter++; @@ -231,9 +225,8 @@ public class Anvil extends CustomContainerFacing { for (int x = 0; x < 5; x++) { if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - + return true; } } counter++; @@ -246,9 +239,8 @@ public class Anvil extends CustomContainerFacing { for (int z = 0; z < 5; z++) { if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - + return true; } } counter++; @@ -261,17 +253,16 @@ public class Anvil extends CustomContainerFacing { for (int z = 0; z < 5; z++) { if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - + return true; } } counter++; } } } - } - } + + } } return false; @@ -280,8 +271,16 @@ public class Anvil extends CustomContainerFacing { } private boolean doWork(ItemStack pItem, Integer counter, TileAnvil tile, World world, BlockPos pos, EntityPlayer player) { + if (pItem.getItem().equals(ModItems.stonetongs)) { - //System.out.println("Level 1"); + if ((pItem.getTagCompound().getInteger("type") == 6) || + (pItem.getTagCompound().getInteger("type") == 7) || + (pItem.getTagCompound().getInteger("type") == 8) || + (pItem.getTagCompound().getInteger("type") == 9) || + (pItem.getTagCompound().getInteger("type") == 10) || + (pItem.getTagCompound().getInteger("type") == 11) || + (pItem.getTagCompound().getInteger("type") == 0)) { + //System.out.println("Level 1"); if (!tile.getSlotStack(counter).isEmpty()) { if (pItem.getTagCompound().getInteger("type") == 0) { @@ -294,6 +293,7 @@ public class Anvil extends CustomContainerFacing { pItem.getTagCompound().setInteger("type", 7); tile.setSlotStack(counter, ItemStack.EMPTY); //System.out.println(counter); + //System.out.println(counter); return true; } @@ -301,17 +301,20 @@ public class Anvil extends CustomContainerFacing { } if (tile.getSlotStack(counter).isEmpty()) { - //System.out.println("Activating"); + System.out.println("Activating"); if (pItem.getTagCompound().getInteger("type") == 6) { + System.out.println("Tongs meta = 6"); tile.setSlotStack((counter), new ItemStack(ModItems.ironingotballhot, 1)); pItem.getTagCompound().setInteger("type", 0); - return true; + //return true; } if (pItem.getTagCompound().getInteger("type") == 7) { + System.out.println("Tongs meta = 7"); tile.setSlotStack((counter), new ItemStack(ModItems.ironchunkhot, 1)); pItem.getTagCompound().setInteger("type", 0); - //System.out.println(counter); - return true; + System.out.println(counter); + System.out.println(tile.getSlotStack(counter)); + //return true; } if (pItem.getTagCompound().getInteger("type") == 8) { ItemStack tempStack = new ItemStack(ModItems.pickaxehead, 1); @@ -379,6 +382,9 @@ public class Anvil extends CustomContainerFacing { } } } + } + + //System.out.println("1" + pItem); @@ -448,7 +454,9 @@ public class Anvil extends CustomContainerFacing { } if (pItem.getItem().equals(Items.DIAMOND)) { + System.out.println("It Is Diamond"); if (tile.getSlotStack(counter).isEmpty()) { + System.out.println("Slot is empty"); tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1)); pItem.shrink(1); return true; @@ -534,7 +542,9 @@ public class Anvil extends CustomContainerFacing { @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()),2); + if(!worldIn.isRemote) { + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2); + } } @Override diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java index c70ea1e0..7e0337a0 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java @@ -23,6 +23,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.tiles.TileBloomery; @@ -63,7 +64,9 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid ItemStack tileItem = tile.getSlotStack(0); ItemStack tileItem1 = tile.getSlotStack(1); if(pItem.isEmpty()) { - /*if (player.isSneaking()) { + + + if (player.isSneaking()) { if (!tileItem.isEmpty()) { CommonUtils.spawnItemEntity(world, player, tile.getSlotStack(0)); tile.setSlotStack(0, ItemStack.EMPTY); @@ -71,7 +74,7 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid tile.updateBlock(); return true; } - }*/ + } if(!player.isSneaking()){ if(world.getBlockState(pos).getValue(ACTIVE) == true){ Integer tempInt = tile.getHeat(); @@ -200,7 +203,10 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false)), 2); + if(!worldIn.isRemote){ + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)).withProperty(COVERED, Boolean.valueOf(false)), 2); + } + } @Override diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java index b2ac7f11..b0da2023 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java @@ -345,7 +345,9 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/ @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)), 2); + if(!worldIn.isRemote) { + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)), 2); + } } @Override 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 0d1a7129..c5a20c84 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 @@ -90,7 +90,7 @@ public class ModBlocks { { if(!world.isRemote){ Item pItem = player.getHeldItem(hand).getItem(); - BlockPos belowPos = new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ()); + BlockPos belowPos = pos.down(); //System.out.println("Activating"); if (pItem.equals(PrimalItems.STONE_GALLAGHER) && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) { player.swingArm(hand); 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 0e2b3a85..9f0e2271 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 @@ -175,6 +175,17 @@ public class ModCrafting { 1.0f ); + // Converts a Vanilla Ingot into ForgeCraft Ingot Ball + ForgeCrafting.addRecipe( + Items.IRON_INGOT, + new ItemStack(ModItems.ironingotballhot, 1), + 800, + 200, + 500, + 1.0f, + 1.0f + ); + //Makes a Hot Iron Chunk ForgeCrafting.addRecipe( Item.getItemFromBlock(ModBlocks.ironchunk), diff --git a/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java b/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java index 8e302bca..e1aae3c0 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java @@ -311,7 +311,7 @@ public class ItemStoneTongs extends Item { else return EnumActionResult.FAIL; //System.out.println(itemstack.getTagCompound().getInteger("type")); } - //System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type")); + System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type")); return EnumActionResult.FAIL; } @@ -321,7 +321,7 @@ public class ItemStoneTongs extends Item { public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean advanced) { tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags")); - //tooltip.add(ChatFormatting.RED + "Consumes sticks"); + tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type")); } }