#usin dropt to replace loot table

1 messages · Page 1 of 1 (latest)

restive patio
#

looks like the drops are added here: https://github.com/Charles445/SimpleDifficulty/blob/828a7749c27c60cfd81e4f68f9bf9f8eca46bec3/src/main/java/com/charles445/simpledifficulty/handler/BlockHandler.java#L44

so maybe you could to something like:

@SubscribeEvent(priority = EventPriority.LOW)
    static void handleMagma(@Nonnull final BlockEvent.HarvestDropsEvent event) {
        event.getDrops().removeIf(stack -> stack.getItem() == SDItems.magma_chunk && !isValidTool(event.getHarvester().getHeldItemMainhand()));
    }
    
    static boolean isValidTool(@Nonnull final ItemStack tool) {
        ...
    }
turbid flicker
#

FUCK I MEANT TO POST THIS IN THE MODPACK DEV SUPPORT FUCK

#

AAAAAAAAAAAAAAAAAAAAAA

#

a

#

finna remove

restive patio
# turbid flicker FUCK I MEANT TO POST THIS IN THE MODPACK DEV SUPPORT FUCK

you should be able to accomplish it with groovyscript too then, using the same code I posted above:

import net.minecraftforge.event.world.BlockEvent
def magma_chunk = item('simpledifficulty:magma_chunk')

event_manager.listen(EventPriority.LOW) { BlockEvent.HarvestDropsEvent event ->
    event.getDrops().removeIf(stack -> stack.getItem() == magma_chunk && !isValidTool(event.getHarvester().getHeldItemMainhand()))
}

def isValidTool(tool) {
    ...
}
turbid flicker
#

hmmm