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; import crafttweaker.event.PlayerInteractBlockEvent; import crafttweaker.block.IBlock; 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.target) && (event.target.isInvulnerable==false)){ 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.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 50", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 50", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 150", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 150", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 150", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 250", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 250", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 280", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ 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.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 120", event.player, event.target.world, false, true); } } } }); events.onPlayerAttackEntity(function (event as PlayerAttackEntityEvent) { if(!isNull(event.target) && (event.target.isInvulnerable==false)){ if(!isNull(event.player) && !isNull(event.player.currentItem)){ if (event.player.currentItem.definition.id.matches(.definition.id)) { Commands.call("/aoaskill addxp hunter @p 110", event.player, event.target.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 anima @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 anima @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 anima @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 anima @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 anima @p 1000", 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 anima @p 800", 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 anima @p 10000", 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 anima @p 5000", 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 anima @p 50000", event.player, event.world, false, true); } } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 500", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 80", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 100", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 20", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 500", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 1500", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 5000", event.player, event.world, true, true); heldItem.mutable().shrink(1); } }); events.onPlayerInteractBlock(function(event as PlayerInteractBlockEvent) { if (event.world.isRemote()) { return; } val heldItem = event.item; if (!isNull(heldItem) && heldItem.definition.id.matches(.definition.id)) { val targetBlock as IBlock = event.block; if (targetBlock.definition.id != "aoa3:creation_forge") { return; } Commands.call("/aoaskill addxp anima @p 20000", event.player, event.world, true, true); heldItem.mutable().shrink(1); } });