Auto chisel prep, done with #44
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
After Width: | Height: | Size: 700 B |
|
After Width: | Height: | Size: 724 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 734 B |
|
After Width: | Height: | Size: 656 B |
|
After Width: | Height: | Size: 664 B |
|
After Width: | Height: | Size: 659 B |
|
After Width: | Height: | Size: 683 B |
|
After Width: | Height: | Size: 691 B |
|
After Width: | Height: | Size: 706 B |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 656 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 655 B |
@@ -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": []
|
||||
|
||||