BlockHarvestDropsEvent
Link to blockharvestdropsevent
The BlockHarvestDrops Event is fired whenever a block is about to drop its items.
You can modify the block list as well as the overall drop chance. Set latter to 1 if you do all chance handling beforehand.
Event-Klasse
Link to event-klasse
You will need to cast the event in the function header as this class:
crafttweaker.event.BlockHarvestDropsEvent
You can, of course, also import the class before and use that name then.
Erweiterte Event-Schnittellen
Link to erweiterte-event-schnittellen
BlockHarvestDrops Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
ZenGetter
Link to zengetter
Die folgenden Informationen lassen sich von diesem Event (Ereignis) abrufen:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter player | ZenSetter | Type IPlayer |
ZenGetter isPlayer | ZenSetter | Type bool |
ZenGetter silkTouch | ZenSetter | Type bool |
ZenGetter fortuneLevel | ZenSetter | Type int |
ZenGetter drops | ZenSetter drops | Type List<WeightedItemStack> |
ZenGetter dropChance | ZenSetter dropChance | Type float |
Adding an item to the list
Link to adding-an-item-to-the-list
You can either addAssign the list or use the method to add an item to the list:
ZenScript Copyevent.drops += <minecraft:coal>;
event.addItem(<minecraft:coal>);