Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import crafttweaker.events.IEventManager;
- import crafttweaker.event.BlockHarvestDropsEvent;
- import crafttweaker.item.IItemStack;
- import crafttweaker.item.WeightedItemStack;
- import crafttweaker.block.IBlockPattern;
- import crafttweaker.block.IBlock;
- import crafttweaker.block.IBlockDefinition;
- import scripts.statics.leafVariants;
- events.onBlockHarvestDrops(function(event as BlockHarvestDropsEvent)
- {
- var leafDblSlabs as IBlockDefinition [] = [ <minecraft:double_wooden_slab:2>.asBlock().definition ];
- if((leafVariants has event.block.definition)
- | (leafDblSlabs has event.block.definition)
- )
- {
- if(!isNull(event.player) && !isNull(event.player.currentItem))
- {
- if (event.player.currentItem.definition.id == <minecraft:shears>.definition.id) { return; }
- if (!isNull(event.player.currentItem.enchantments))
- {
- for enchantment in event.player.currentItem.enchantments { if(enchantment.definition == <enchantment:minecraft:silk_touch>) { return; } }
- }
- }
- event.drops = [] as WeightedItemStack[];
- }
- return;
- });
Advertisement
Add Comment
Please, Sign In to add comment