Search in sources :

Example 1 with WoodHardness

use of betterwithaddons.handler.StumpingHandler.WoodHardness in project BetterWithAddons by DaedalusGame.

the class SoftWoods method add.

@ZenMethod
public static void add(@NotNull IItemStack input, float hardness) {
    if (!InputHelper.isABlock(input)) {
        MineTweakerAPI.logError("Could not add soft wood " + input.toString() + "; not recognized as a block.");
        return;
    }
    ItemStack stack = InputHelper.toStack(input);
    WoodHardness r = new WoodHardness(Block.getBlockFromItem(stack.getItem()), stack.getMetadata(), hardness);
    MineTweakerAPI.apply(new Add(r));
}
Also used : WoodHardness(betterwithaddons.handler.StumpingHandler.WoodHardness) IItemStack(minetweaker.api.item.IItemStack) ItemStack(net.minecraft.item.ItemStack) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

WoodHardness (betterwithaddons.handler.StumpingHandler.WoodHardness)1 IItemStack (minetweaker.api.item.IItemStack)1 ItemStack (net.minecraft.item.ItemStack)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1