import crafttweaker.item.IItemStack; import crafttweaker.events.IEventManager; import crafttweaker.event.BlockHarvestDropsEvent; import crafttweaker.event.IBlockEvent; import crafttweaker.world.IWorld; import crafttweaker.event.PlayerBreakSpeedEvent; import crafttweaker.player.IPlayer; import mods.contenttweaker.Commands; import crafttweaker.event.PlayerAttackEntityEvent; events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 10", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 20", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 40", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 40", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 40", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 40", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 100", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 200", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 150", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 150", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 100", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 200", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 300", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 400", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 500", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 500", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 100", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 400", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 6000", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 3000", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 8000", event.player, event.world, false, true); } } }); events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) { if (event.world.isRemote()) { return; } if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp foraging @p 30000", event.player, event.world, false, true); } } }); //events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { // if(!isNull(event.player) && !isNull(event.player.currentItem)){ // if (event.player.currentItem.definition.id.matches(.definition.id)) { // Commands.call("/aoaskill addxp hunter @p 10", event.player, event.world, false, true); // } // } //}); //events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { // if(!isNull(event.player) && !isNull(event.player.currentItem)){ // if (event.player.currentItem.definition.id.matches(.definition.id)) { // Commands.call("/aoaskill addxp hunter @p 100", event.player, event.world, false, true); // } // } //});