Files
Chisel/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java
T

47 lines
1.4 KiB
Java
Raw Normal View History

2015-01-09 01:51:52 -05:00
package com.cricketcraft.chisel.api;
import net.minecraft.block.Block;
2015-01-09 01:51:52 -05:00
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Implement this on items which can be used to chisel blocks.
*/
public interface IChiselItem extends IChiselMode {
/**
2015-01-14 19:55:05 -05:00
* Called when an item is chiseled using this chisel
2015-01-09 01:51:52 -05:00
*
2015-01-14 19:55:05 -05:00
* @param world
* {@link World} object
* @param inv
* The inventory this chisel is currently in
* @param slot
* The slot index of the chisel in the inventory
* @param chisel
* The {@link ItemStack} representing the chisel
* @param target
* The {@link ItemStack} representing the target item
2015-01-09 01:51:52 -05:00
*/
void onChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target);
/**
* Allows you to control if your item can chisel this block in the world.
*
* @param world
* World object
* @param x
* X coord of the block being chiseled
* @param y
* Y coord of the block being chiseled
* @param z
* Z coord of the block being chiseled
* @param block
* The {@link Block} being chiseled
* @param metadata
* The blocks' metadata
* @return True if the chiseling should take place. False otherwise.
*/
boolean canChiselBlock(World world, int x, int y, int z, Block block, int metadata);
2015-01-09 01:51:52 -05:00
}