diff --git a/src/main/java/info/jbcs/minecraft/chisel/block/BlockAutoChisel.java b/src/main/java/info/jbcs/minecraft/chisel/block/BlockAutoChisel.java index c0c51926..817db102 100644 --- a/src/main/java/info/jbcs/minecraft/chisel/block/BlockAutoChisel.java +++ b/src/main/java/info/jbcs/minecraft/chisel/block/BlockAutoChisel.java @@ -4,6 +4,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import info.jbcs.minecraft.chisel.Chisel; import info.jbcs.minecraft.chisel.block.tileentity.TileEntityAutoChisel; +import info.jbcs.minecraft.chisel.init.ModBlocks; +import info.jbcs.minecraft.chisel.init.ModItems; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -46,8 +48,26 @@ public class BlockAutoChisel extends BlockContainer{ TileEntity tile = world.getTileEntity(x, y, z); if (world.isRemote) return true; - if (tile != null && tile instanceof TileEntityAutoChisel) + + if (tile != null && tile instanceof TileEntityAutoChisel && !player.isSneaking()){ player.openGui(Chisel.instance, 1, world, x, y, z); + } + + if(player.isSneaking() && tile!= null && tile instanceof TileEntityAutoChisel){ + TileEntityAutoChisel autoChisel = (TileEntityAutoChisel) tile; + System.out.println(player.getHeldItem()); + if(player.getItemInUse() == new ItemStack(ModItems.upgrade, 1, 0)){ + //If they are using the speed upgrade + world.setBlock(x, y, z, ModBlocks.autoChisel, 1, 3); + } else if(player.getItemInUse() == new ItemStack(ModItems.upgrade, 1, 1)){ + //If they are using the automation upgrade + world.setBlock(x, y, z, ModBlocks.autoChisel, 2, 3); + } else if(player.getItemInUse() == new ItemStack(ModItems.upgrade, 1, 2)){ + //If they are using the stack upgrade + world.setBlock(x, y, z, ModBlocks.autoChisel, 3, 3); + } + } + return true; } diff --git a/src/main/java/info/jbcs/minecraft/chisel/init/ModBlocks.java b/src/main/java/info/jbcs/minecraft/chisel/init/ModBlocks.java index 0f805d41..36d07568 100644 --- a/src/main/java/info/jbcs/minecraft/chisel/init/ModBlocks.java +++ b/src/main/java/info/jbcs/minecraft/chisel/init/ModBlocks.java @@ -798,16 +798,13 @@ public class ModBlocks { planks[i].carverHelper.addVariation(u + " wood crate", 10, "planks-" + n + "/crate"); planks[i].carverHelper.addVariation("Fancy " + n + " wood crate", 11, "planks-" + n + "/crate-fancy"); planks[i].carverHelper.addVariation("Large long " + n + " wood planks", 13, "planks-" + n + "/large"); - if(i < 4) - { - planks[i].carverHelper.addVariation("Vertical " + n + " wood planks", 3, "planks-" + n + "/vertical"); - planks[i].carverHelper.addVariation("Vertical uneven " + n + " wood planks", 4, "planks-" + n + "/vertical-uneven"); - planks[i].carverHelper.addVariation(u + " wood parquet", 5, "planks-" + n + "/parquet"); - planks[i].carverHelper.addVariation(u + " wood plank blinds", 7, "planks-" + n + "/blinds"); - planks[i].carverHelper.addVariation(u + " wood scaffold", 12, "planks-" + n + "/crateex"); - planks[i].carverHelper.addVariation(u + " wood planks in disarray", 14, "planks-" + n + "/chaotic-hor"); - planks[i].carverHelper.addVariation("Vertical " + n + " wood planks in disarray", 15, "planks-" + n + "/chaotic"); - } + planks[i].carverHelper.addVariation("Vertical " + n + " wood planks", 3, "planks-" + n + "/vertical"); + planks[i].carverHelper.addVariation("Vertical uneven " + n + " wood planks", 4, "planks-" + n + "/vertical-uneven"); + planks[i].carverHelper.addVariation(u + " wood parquet", 5, "planks-" + n + "/parquet"); + planks[i].carverHelper.addVariation(u + " wood plank blinds", 7, "planks-" + n + "/blinds"); + planks[i].carverHelper.addVariation(u + " wood scaffold", 12, "planks-" + n + "/crateex"); + planks[i].carverHelper.addVariation(u + " wood planks in disarray", 14, "planks-" + n + "/chaotic-hor"); + planks[i].carverHelper.addVariation("Vertical " + n + " wood planks in disarray", 15, "planks-" + n + "/chaotic"); planks[i].carverHelper.register(planks[i], orename); Carving.chisel.addVariation(orename, Blocks.planks, i, 0); planks[i].setHarvestLevel("axe", 0); diff --git a/src/main/java/info/jbcs/minecraft/chisel/item/ItemUpgrade.java b/src/main/java/info/jbcs/minecraft/chisel/item/ItemUpgrade.java index 114ec470..ca16b893 100644 --- a/src/main/java/info/jbcs/minecraft/chisel/item/ItemUpgrade.java +++ b/src/main/java/info/jbcs/minecraft/chisel/item/ItemUpgrade.java @@ -1,11 +1,13 @@ package info.jbcs.minecraft.chisel.item; import info.jbcs.minecraft.chisel.Chisel; +import info.jbcs.minecraft.chisel.block.tileentity.TileEntityAutoChisel; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; @@ -23,9 +25,16 @@ public class ItemUpgrade extends Item{ } @Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player){ - System.out.println(this.getIconFromDamage(itemStack.getItemDamage())); - return itemStack; + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int size, float hitX, float hitY, float hitZ){ + if(world.isRemote) return false; + TileEntity tile = world.getTileEntity(x, y, z); + TileEntityAutoChisel autoChisel; + + if(tile != null && tile instanceof TileEntityAutoChisel){ + TileEntityAutoChisel autoChisel1 = (TileEntityAutoChisel) tile; + //TODO: Finish the switch with upgrade + } + return true; } @Override diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/blinds.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/blinds.png new file mode 100644 index 00000000..6281e0c0 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/blinds.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic-hor.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic-hor.png new file mode 100644 index 00000000..d1fb8713 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic-hor.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic.png new file mode 100644 index 00000000..503ec063 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/chaotic.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/crateex.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/crateex.png new file mode 100644 index 00000000..4cd817a5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/crateex.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/parquet.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/parquet.png new file mode 100644 index 00000000..26d3bee1 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/parquet.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical-uneven.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical-uneven.png new file mode 100644 index 00000000..fbfb0ff1 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical-uneven.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical.png b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical.png new file mode 100644 index 00000000..3103e0af Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-acacia/vertical.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/blinds.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/blinds.png new file mode 100644 index 00000000..e937f0ef Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/blinds.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic-hor.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic-hor.png new file mode 100644 index 00000000..e9950637 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic-hor.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic.png new file mode 100644 index 00000000..80f9f773 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/chaotic.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/crateex.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/crateex.png new file mode 100644 index 00000000..05b566a0 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/crateex.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/parquet.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/parquet.png new file mode 100644 index 00000000..4967838b Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/parquet.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical-uneven.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical-uneven.png new file mode 100644 index 00000000..c82d7c7e Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical-uneven.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical.png b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical.png new file mode 100644 index 00000000..2956b391 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/planks-dark-oak/vertical.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index a97991c3..7d87b518 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -8,7 +8,7 @@ "url": "http://www.minecraftforum.net/forums/thread/1294901", "updateUrl": "", "authorList": [ "AUTOMATIC_MAIDEN", "Pokefenn", "Cricket"], - "credits": "This mod uses a lot of textures from the Painterly pack: http://painterlypack.net/. Also one stone variation is designed to look like a block from Doku. Oh, and asie for porting the mod to 1.7.2. Oh and Drullkus the new artist!", + "credits": "This mod uses a lot of textures from the Painterly pack: http://painterlypack.net/. Also one stone variation is designed to look like a block from Doku. Oh, and asie for porting the mod to 1.7.2.", "logoFile": "", "screenshots": [], "dependencies": []