mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 01:54:46 +00:00
Diamond chisel is working
This commit is contained in:
1 parent
b2a8807efd
commit
996be4b4e0
12 files changed
+266
-66
No files matched your search
@@ -177,6 +177,7 @@ public class Chisel
|
||||
|
||||
proxy.init();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(new ChiselLeftClick());
|
||||
FMLCommonHandler.instance().bus().register(instance);
|
||||
|
||||
FMLInterModComms.sendMessage("Waila", "register", "com.cricketcraft.chisel.Waila.register");
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.cricketcraft.chisel;
|
||||
|
||||
import com.cricketcraft.chisel.api.ChiselMode;
|
||||
import com.cricketcraft.chisel.carving.CarvingVariation;
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.init.ModBlocks;
|
||||
import com.cricketcraft.chisel.init.ModItems;
|
||||
import com.cricketcraft.chisel.item.ItemDiamondChisel;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
public class ChiselLeftClick {
|
||||
HashMap<String, Long> chiselUseTime = new HashMap<String, Long>();
|
||||
HashMap<String, String> chiselUseLocation = new HashMap<String, String>();
|
||||
Random random = new Random();
|
||||
|
||||
public static void setBlock(World world, int x, int y, int z, ChiselMode chiselMode, Block previousBlock, int previousMetadata, Block newBlock, int newMetadata, ForgeDirection direction) {
|
||||
if (chiselMode == ChiselMode.SINGLE)
|
||||
{
|
||||
world.setBlock(x, y, z, newBlock, newMetadata, 2);
|
||||
} else if (chiselMode == ChiselMode.CIRCLETHREE)
|
||||
{
|
||||
int radius = 1;
|
||||
for (int i = radius; i <= radius; i++)
|
||||
for (int j = radius; j <= radius; j++)
|
||||
{
|
||||
//TODO facing stuff so this can be anywhere
|
||||
if (world.getBlock(x + i, y, z + j) != null)
|
||||
{
|
||||
if (world.getBlock(x + i, y, z + j) == previousBlock && world.getBlockMetadata(x + i, y, z + j) == previousMetadata) {
|
||||
int shiftedX = x;
|
||||
int shiftedY = y;
|
||||
int shiftedZ = z;
|
||||
|
||||
world.setBlock(shiftedX, shiftedY, shiftedZ, newBlock, newMetadata, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerClick(PlayerInteractEvent event) {
|
||||
if (event.action != PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) return;
|
||||
if (!Configurations.featureEnabled("diamondChisel")) return;
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
ItemStack stack = player.getHeldItem();
|
||||
if (stack == null || stack.getItem() != ModItems.diamondChisel) return;
|
||||
|
||||
World world = event.world;
|
||||
int x = event.x;
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
int blockMeta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
ItemStack chiselTarget = null;
|
||||
|
||||
if (stack.stackTagCompound != null) {
|
||||
chiselTarget = ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("chiselTarget"));
|
||||
}
|
||||
|
||||
boolean chiselHasBlockInside = true;
|
||||
|
||||
if (chiselTarget == null) {
|
||||
chiselHasBlockInside = false;
|
||||
|
||||
Long useTime = chiselUseTime.get(player.getCommandSenderName());
|
||||
String loc = chiselUseLocation.get(player.getCommandSenderName());
|
||||
|
||||
if (useTime != null && chiselUseLocation != null && loc.equals(x + "|" + y + "|" + z)) {
|
||||
long cooldown = 20;
|
||||
long time = world.getWorldInfo().getWorldTotalTime();
|
||||
|
||||
if (time > useTime - cooldown && time < useTime + cooldown) return; //noReplace = true;
|
||||
}
|
||||
|
||||
CarvingVariation[] variations = ItemDiamondChisel.carving.getVariations(block, blockMeta);
|
||||
if (variations == null || variations.length < 2) return; //noReplace = true;
|
||||
else {
|
||||
int index = 1;
|
||||
//Find the index of the next block in the variation list
|
||||
for (int i = 0; i < variations.length; ++i) {
|
||||
CarvingVariation currVariation = variations[i];
|
||||
|
||||
//If the metadata matches, then we are interested in the block AFTER this one
|
||||
if (currVariation.block.equals(block) && currVariation.meta == blockMeta) {
|
||||
index = i + 1;
|
||||
}
|
||||
}
|
||||
//If no index was found, something is wrong. Return.
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
//If the the current block is the last in the list, loop back to the first
|
||||
else if (index >= variations.length) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
CarvingVariation var = variations[index];
|
||||
chiselTarget = new ItemStack(var.block, 1, var.damage);
|
||||
}
|
||||
}
|
||||
Item result = null;
|
||||
int targetMeta = 0;
|
||||
|
||||
Item target = chiselTarget.getItem();
|
||||
|
||||
targetMeta = chiselTarget.getItemDamage();
|
||||
|
||||
boolean match = ItemDiamondChisel.carving.isVariationOfSameClass(Block.getBlockFromItem(target), targetMeta, block, blockMeta);
|
||||
result = target;
|
||||
|
||||
/* special case: stone can be carved to cobble and bricks */
|
||||
if (Configurations.chiselStoneToCobbleBricks) {
|
||||
if (!match && block.equals(Blocks.stone) && Block.getBlockFromItem(target).equals(ModBlocks.cobblestone))
|
||||
match = true;
|
||||
if (!match && block.equals(Blocks.stone) && Block.getBlockFromItem(target).equals(ModBlocks.stoneBrick))
|
||||
match = true;
|
||||
}
|
||||
if (!match)
|
||||
return; //noReplace = true;
|
||||
|
||||
int updateValue = 1;
|
||||
|
||||
if (!world.isRemote || chiselHasBlockInside) {
|
||||
world.setBlock(x, y, z, Block.getBlockFromItem(result), targetMeta, updateValue);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
switch (FMLCommonHandler.instance().getEffectiveSide()) {
|
||||
case SERVER:
|
||||
chiselUseTime.put(player.getCommandSenderName(), world.getWorldInfo().getWorldTotalTime());
|
||||
chiselUseLocation.put(player.getCommandSenderName(), x + "|" + y + "|" + z);
|
||||
|
||||
try {
|
||||
//TODO chisel left click thingy
|
||||
// Packet packet = Chisel.packet.create(Packets.CHISELED).writeInt(x).writeInt(y).writeInt(z);
|
||||
// Chisel.packet.sendToAllAround(packet, new TargetPoint(player.dimension, x, y, z, 30.0f));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
|
||||
case CLIENT:
|
||||
if (chiselHasBlockInside) {
|
||||
String sound = ItemDiamondChisel.carving.getVariationSound(result, chiselTarget.getItemDamage());
|
||||
GeneralChiselClient.spawnChiselEffect(x, y, z, sound);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
stack.damageItem(1, player);
|
||||
if (stack.stackSize == 0) {
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = chiselHasBlockInside ? chiselTarget : null;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
||||
if (!Configurations.featureEnabled("diamondChisel")) return;
|
||||
EntityPlayer player = event.getPlayer();
|
||||
ItemStack stack = player.getHeldItem();
|
||||
if (stack == null || stack.getItem() != ModItems.diamondChisel) return;
|
||||
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ public class Configurations
|
||||
public static boolean disableCTM;
|
||||
public static boolean blockDescriptions;
|
||||
public static boolean ghostCloud;
|
||||
public static boolean chiselStoneToCobbleBricks;
|
||||
public static boolean allowMossy;
|
||||
public static boolean chiselRecipe;
|
||||
public static boolean autoChisel;
|
||||
@@ -40,6 +41,7 @@ public class Configurations
|
||||
chiselRecipe = config.get("general", "chiselAlternateRecipe", false, "Use alternative crafting recipe for the chisel").getBoolean(false);
|
||||
autoChisel = config.get("general", "autoChisel", true, "Should people be allowed to use the auto chisel").getBoolean(true);
|
||||
enableFMP = config.get("general", "enableFMP", true, "Do you want to enable FMP").getBoolean(true);
|
||||
chiselStoneToCobbleBricks = config.get("general", "chiselStoneToCobbleBricks", true, "Chisel stone to cobblestone and bricks by left clicking.").getBoolean(false);
|
||||
|
||||
if(config.hasChanged())
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
setResistance(10.0F);
|
||||
setHardness(2.0F);
|
||||
setCreativeTab(ModTabs.tabOtherChiselBlocks);
|
||||
setHarvestLevel("chisel", 0);
|
||||
}
|
||||
|
||||
public BlockCarvable setStained(boolean a) {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.cricketcraft.chisel.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class MarbleCompatibility
|
||||
{
|
||||
@@ -82,6 +80,7 @@ public class MarbleCompatibility
|
||||
ClassBlockCompat.this.doAction(block);
|
||||
}
|
||||
};
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -105,6 +104,7 @@ public class MarbleCompatibility
|
||||
void action()
|
||||
{
|
||||
Carving.chisel.addVariation("marble", block, 0, 99);
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,6 +114,7 @@ public class MarbleCompatibility
|
||||
void action()
|
||||
{
|
||||
Carving.chisel.addVariation("marble", block, 0, 99);
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -123,6 +124,7 @@ public class MarbleCompatibility
|
||||
void action()
|
||||
{
|
||||
Carving.chisel.addVariation("marble", block, 0, 99);
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -132,6 +134,7 @@ public class MarbleCompatibility
|
||||
void action()
|
||||
{
|
||||
Carving.chisel.addVariation("limestone", block, 0, 99);
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
new ClassBlockCompat("emasher.core.EmasherCore", "limestone")
|
||||
@@ -140,6 +143,7 @@ public class MarbleCompatibility
|
||||
void action()
|
||||
{
|
||||
Carving.chisel.addVariation("limestone", block, 0, 99);
|
||||
block.setHarvestLevel("chisel", 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -151,8 +155,10 @@ public class MarbleCompatibility
|
||||
Block[] blocks = (Block[]) cl.getField("blocks").get(null);
|
||||
|
||||
Carving.chisel.addVariation("marble", blocks[0], 2, 99);
|
||||
blocks[0].setHarvestLevel("chisel", 0, 2);
|
||||
|
||||
Carving.chisel.addVariation("limestone", blocks[0], 3, 99);
|
||||
blocks[0].setHarvestLevel("chisel", 0, 3);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
package com.cricketcraft.chisel.init;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.Configurations;
|
||||
import com.cricketcraft.chisel.block.*;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.item.ItemCarvable;
|
||||
import com.cricketcraft.chisel.item.ItemMarbleSlab;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -7,53 +17,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.Configurations;
|
||||
import com.cricketcraft.chisel.block.BlockAutoChisel;
|
||||
import com.cricketcraft.chisel.block.BlockBeaconBase;
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlass;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePane;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePowered;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePumpkin;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableTorch;
|
||||
import com.cricketcraft.chisel.block.BlockCloud;
|
||||
import com.cricketcraft.chisel.block.BlockConcrete;
|
||||
import com.cricketcraft.chisel.block.BlockEldritch;
|
||||
import com.cricketcraft.chisel.block.BlockGrimstone;
|
||||
import com.cricketcraft.chisel.block.BlockHolystone;
|
||||
import com.cricketcraft.chisel.block.BlockLavastone;
|
||||
import com.cricketcraft.chisel.block.BlockLeaf;
|
||||
import com.cricketcraft.chisel.block.BlockLightstoneCarvable;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleBookshelf;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleCarpet;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleIce;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockMarblePackedIce;
|
||||
import com.cricketcraft.chisel.block.BlockMarblePackedIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockMarblePillar;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleSlab;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleStairs;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleStairsMaker;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleStairsMakerCreator;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleTexturedOre;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleWall;
|
||||
import com.cricketcraft.chisel.block.BlockPresent;
|
||||
import com.cricketcraft.chisel.block.BlockRoadLine;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestone;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
|
||||
import com.cricketcraft.chisel.block.BlockVoidstonePillar;
|
||||
import com.cricketcraft.chisel.block.BlockVoidstonePillar2;
|
||||
import com.cricketcraft.chisel.block.BlockWaterstone;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.item.ItemCarvable;
|
||||
import com.cricketcraft.chisel.item.ItemMarbleSlab;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ModBlocks {
|
||||
public static BlockCarvable marble;
|
||||
public static BlockCarvable marblePillar;
|
||||
@@ -138,6 +101,9 @@ public class ModBlocks {
|
||||
|
||||
public static void load()
|
||||
{
|
||||
Blocks.stone.setHarvestLevel("chisel", 0);
|
||||
Blocks.sand.setHarvestLevel("chisel", 0);
|
||||
|
||||
if(Configurations.featureEnabled("autoChisel")){
|
||||
autoChisel = new BlockAutoChisel().setBlockTextureName("Chisel:autoChisel").setCreativeTab(ModTabs.tabChisel).setBlockName("autoChisel").setBlockTextureName(Chisel.MOD_ID + ":factory/circuit");
|
||||
GameRegistry.registerBlock(autoChisel, "autoChisel");
|
||||
|
||||
@@ -5,17 +5,13 @@ import com.cricketcraft.chisel.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityBallOMoss;
|
||||
import com.cricketcraft.chisel.entity.EntityCloudInABottle;
|
||||
import com.cricketcraft.chisel.entity.EntitySmashingRock;
|
||||
import com.cricketcraft.chisel.item.ItemBallOMoss;
|
||||
import com.cricketcraft.chisel.item.ItemChisel;
|
||||
import com.cricketcraft.chisel.item.ItemCloudInABottle;
|
||||
import com.cricketcraft.chisel.item.ItemSmashingRock;
|
||||
import com.cricketcraft.chisel.item.ItemUpgrade;
|
||||
|
||||
import com.cricketcraft.chisel.item.*;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ModItems {
|
||||
public static ItemChisel chisel;
|
||||
public static ItemDiamondChisel diamondChisel;
|
||||
public static ItemCloudInABottle itemCloudInABottle;
|
||||
public static ItemBallOMoss itemBallOMoss;
|
||||
public static ItemSmashingRock smashingRock;
|
||||
@@ -47,5 +43,10 @@ public class ModItems {
|
||||
upgrade = (ItemUpgrade) new ItemUpgrade("upgrade").setCreativeTab(ModTabs.tabChisel);
|
||||
GameRegistry.registerItem(upgrade, upgrade.getUnlocalizedName());
|
||||
}
|
||||
|
||||
if(Configurations.featureEnabled("diamondChisel")){
|
||||
diamondChisel = (ItemDiamondChisel) new ItemDiamondChisel().setTextureName(Chisel.MOD_ID + ":diamondChisel").setCreativeTab(ModTabs.tabChisel);
|
||||
GameRegistry.registerItem(diamondChisel, diamondChisel.getUnlocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,9 @@ public class ItemChisel extends Item implements IChiselMode {
|
||||
public ChiselMode getChiselMode(ItemStack itemStack) {
|
||||
return ChiselMode.SINGLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4){
|
||||
StatCollector.translateToLocal(itemStack.getUnlocalizedName() + ".desc");
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4){
|
||||
StatCollector.translateToLocal("item.chisel.desc");
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,60 @@
|
||||
package com.cricketcraft.chisel.item;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.api.ChiselMode;
|
||||
import com.cricketcraft.chisel.api.IChiselMode;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemDiamondChisel extends ItemTool implements ICarvable{
|
||||
protected ItemDiamondChisel(float p_i45333_1_, ToolMaterial p_i45333_2_, Set p_i45333_3_) {
|
||||
super(p_i45333_1_, p_i45333_2_, p_i45333_3_);
|
||||
public class ItemDiamondChisel extends ItemTool implements IChiselMode{
|
||||
public static Carving carving = Carving.chisel;
|
||||
private static final HashSet<String> toolSet = new HashSet<String>();
|
||||
|
||||
public ItemDiamondChisel() {
|
||||
super(1, ToolMaterial.IRON, CarvableHelper.getChiselBlockSet());
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(-1);
|
||||
efficiencyOnProperMaterial = 100F;
|
||||
setUnlocalizedName("diamondChisel");
|
||||
toolSet.add("chisel");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {
|
||||
entityplayer.openGui(Chisel.instance, 0, world, 0, 0, 0);
|
||||
if(!entityplayer.isSneaking())
|
||||
entityplayer.openGui(Chisel.instance, 0, world, 0, 0, 0);
|
||||
|
||||
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CarvableVariation getVariation(int metadata) {
|
||||
return null;
|
||||
public Set<String> getToolClasses(ItemStack itemStack){
|
||||
return toolSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack itemStack, int x, int y, int z, EntityPlayer player){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChiselMode getChiselMode(ItemStack itemStack){
|
||||
return ChiselMode.SINGLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4){
|
||||
StatCollector.translateToLocal("item.diamondChisel.desc");
|
||||
}
|
||||
}
|
||||
@@ -56,5 +56,6 @@ public class ClientProxy extends CommonProxy
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySmashingRock.class, new RenderSnowball(ModItems.smashingRock));
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.chisel, renderer);
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.diamondChisel, renderer);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,10 @@ item.upgrade_stack.desc=Allows it to manufacture stacks at a time
|
||||
|
||||
#Chisel 2
|
||||
|
||||
#Diamond Chisel
|
||||
item.diamondChisel.name=Diamond Chisel
|
||||
item.diamondChisel.desc=Left click and it changes blocks!
|
||||
|
||||
#Auto Chisel
|
||||
tile.autoChisel.name=Auto Chisel
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 186 B |
Reference in new issue
Block a user