mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
69bb974420
* Use compileOnlyApi for CoFH * spotlessApply (#85) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
32 lines
947 B
Java
32 lines
947 B
Java
package tconstruct.library.tools;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import mantle.blocks.BlockUtils;
|
|
|
|
public class FletchlingLeafMaterial extends FletchingMaterial {
|
|
|
|
public FletchlingLeafMaterial(int materialID, int value, String oredict, ItemStack craftingItem, float accuracy,
|
|
float breakChance, float durabilityModifier) {
|
|
super(materialID, value, oredict, craftingItem, accuracy, breakChance, durabilityModifier, 0x5ece46);
|
|
}
|
|
|
|
@Override
|
|
public boolean matches(ItemStack stack) {
|
|
if (matchesLeaves(stack)) return true;
|
|
|
|
return super.matches(stack);
|
|
}
|
|
|
|
public static boolean matchesLeaves(ItemStack stack) {
|
|
if (stack != null) {
|
|
Block block = BlockUtils.getBlockFromItemStack(stack);
|
|
if (block != null) {
|
|
return block.isLeaves(null, 0, 0, 0);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|