added tools
This commit is contained in:
46
src/main/java/de/jottyfan/quickiemod/item/ToolRangeable.java
Normal file
46
src/main/java/de/jottyfan/quickiemod/item/ToolRangeable.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package de.jottyfan.quickiemod.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public interface ToolRangeable {
|
||||
|
||||
/**
|
||||
* dummy to have a getName method that comes with the item
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
public Text getName();
|
||||
|
||||
/**
|
||||
* @param stack the item stack that keeps the range
|
||||
* @return range of blocks to be harvested
|
||||
*/
|
||||
public HarvestRange getRange(ItemStack stack);
|
||||
|
||||
/**
|
||||
* check if this block state is one that affects the neighbor blocks to break
|
||||
* also if they are from the same type
|
||||
*
|
||||
* @param blockState the block state of the current block
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean canBreakNeighbors(BlockState blockState);
|
||||
|
||||
/**
|
||||
* get list of blocks that belong together (could be useful for stripped logs)
|
||||
*
|
||||
* @param block of the set
|
||||
* @return the list of blocks or null if not found
|
||||
*/
|
||||
public List<Block> getBlockList(Block block);
|
||||
}
|
Reference in New Issue
Block a user