hi, can anyone tell me the best way how to implement shears?
the problem with my custom shears is, they dont work on leaves, because the loot_table needs the minecraft:shears...
I added a tag forge:shears and replaced the "item": "minecraft:shears" with "tag": "forge:shears" and this is working for vanilla leaves.
but in biomes o plenty i cant override the loot_tables json, they use the default ones with the minecraft:shears entry. and not the modded version data/biomesoplenty/loot_tables/blocks/ "some_leave_block.json"..
i tried to override the loot_table by using the event "LootTableLoadEvent" for the acacia_leaves block like this
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.FORGE)
public class LootTableLoadEventHandler {
@SubscribeEvent
public static void onLootTableLoad(final LootTableLoadEvent event) {
ResourceLocation resourceLocation = event.getName();
String modId = resourceLocation.getNamespace();
String path = resourceLocation.getPath();
LootTableManager manager = event.getLootTableManager();
if (modId.equals("minecraft")) {
if (path.equals("blocks/acacia_leaves")) {
event.setTable(manager.getLootTableFromLocation(new ResourceLocation(MODID, path)));
}
}
}
}
i placed the new acacia_leavs.json with the tag entry in the path of my mod (MODID) and i tried some other locations, but now the block drops nothing .... the minecraft:shears isnt working anymore and the modded shears too...
and i tried to use the HarvestDropsEvent, but it isnt working....
so...
what is the best or right way to create shears?