Skip to content

Instantly share code, notes, and snippets.

@misode
Last active November 12, 2024 01:50
Show Gist options
  • Save misode/77ee37217a69a3c74032679d8084d6c6 to your computer and use it in GitHub Desktop.
Save misode/77ee37217a69a3c74032679d8084d6c6 to your computer and use it in GitHub Desktop.

⚡ = Advancement trigger
✨ = Enchantment effect
▶️ = Commands run

  • MinecraftServer::tickServer
    • 🕑 Update /tick rate manager
    • ServerFunctionManager::tick
      • ▶️ Run #load function tag if a reload happened
      • ▶️ Run #tick function tag
    • ServerLevel::tick (per dimension)
      • 🕑 Update world border
      • 🌧️ Update weather
      • ServerLevel::tickTime (overworld only)
        • 🕑 Increment game time
        • ▶️ Run scheduled functions
        • 🕑 Increment day time
      • 🕑 Tick scheduled blocks and fluids
        • ▶️ Run command blocks
        • crafter_recipe_crafted (after crafting)
      • Raid::tick
        • hero_of_the_village
      • NaturalSpawner::spawnForChunk
        • started_riding (for natural spawns)
      • Entity::tick (per entity, oldest first)
        • hit_block (projectiles)
        • effects_changed (area effect cloud, dolphin, cave spider, etc)
        • cured_zombie_villager
        • channeled_lightning
        • killed_by_arrow
        • target_hit
        • lightning_strike (lightning bolt)
        • ServerPlayer::tick
          • ServerPlayerGamemode::tick
            • item_durability_changed (mining blocks)
            • bee_nest_destroyed (after removing block)
          • AbstractContainerMenu::broadcastChanges
            • inventory_changed (dropping items)
          • tick
          • levitation
          • fall_after_explosion
          • ride_entity_in_lava
        • LivingEntity::baseTick
          • LivingEntity::hurt
            • entity_killed_player, player_killed_entity, used_totem
            • entity_hurt_player, player_hurt_entity
          • LivingEntity::tickEffects
            • voluntary_exile
        • Mob::aiStep
          • thrown_item_picked_up_by_entity (before altering dropped item)
          • allay_drop_item_on_block (after throwing the item)
      • ServerLevel::tickBlockEntities (arbitrary order)
        • construct_beacon
    • Connection::tick
      • Connection::flushQueue (arbitrary order)
        • ServerConfigurationPacketListenerImpl::handleConfigurationFinished
          • PlayerList::placeNewPlayer
            • inventory_changed (once per slot, when spawning in the world)
        • ServerGamePacketListenerImpl::handleUseItemOn
          • ServerPlayerGamemode::useItem
            • ItemStack::use
              • projectile_spawned (using a crossbow, snowball, or other projecile)
              • shot_crossbow (after spawning projectiles, before altering crossbow)
              • fishing_rod_hooked
              • filled_bucket (after altering block and item)
              • used_ender_eye (after creating projectile, before removing item)
          • ServerPlayerGamemode::useItemOn
            • BlockBehaviour::use
              • player_generates_container_loot (block containers)
              • inventory_changed (once per slot, when opening a container menu)
              • slept_in_bed
            • item_used_on_block (when the action is determined by the block)
            • default_block_use (when interacting with an empty hand)
            • BlockItem::place
              • summoned_entity (wither, snow golem, before removing item)
              • placed_block (after updating block, before removing item)
            • ItemStack::useOn
              • item_durability_changed (strip or unwax with axe)
            • item_used_on_block (when the action is determined by the item)
          • any_block_use
        • ServerGamePacketListenerImpl::handleInteract
          • INTERACT
            • tame_animal
            • filled_bucket (bucketing fish, after altering item)
            • player_generates_container_loot (minecarts)
            • started_riding
            • player_interacted_with_entity
          • ATTACK
            • post_attack
            • item_durability_changed (using weapon)
        • ServerGamePacketListenerImpl::handleContainerClick
          • villager_trade
          • recipe_unlocked, enchanted_item, brewed_potion (gui containers)
          • inventory_changed (gui containers)
        • ServerGamePacketListenerImpl::handleClientCommand
          • changed_dimension (end portal from end to overworld)
        • ServerGamePacketListenerImpl::handleMovePlayer
          • fall_from_height
        • ServerGamePacketListenerImpl::handleContainerClick
          • recipe_crafted (triggers once for each item in the stack)
          • inventory_changed (survival inventory)
        • ServerGamePacketListenerImpl::handlePlayerAction
          • RELEASE_USE_ITEM
            • projectile_spawned (releasing a bow)
          • STOP_DESTROY_BLOCK
            • hit_block
        • ServerGamePacketListenerImpl::handleSetCreativeModeSlot
          • inventory_changed (creative inventory)
      • ServerPlayer::doTick
        • LivingEntity::baseTick
          • tick
        • LivingEntity::onChangedBlock
          • location_changed
        • Entity::handlePortal
          • changed_dimension (nether portal, or end portal from overworld to end)
          • nether_travel
        • ServerPlayer::updateUsingItem
          • using_item
          • ServerPlayer::completeUsingItem
            • consume_item
            • effects_changed (potion, milk bucket, honey bottle)
        • Entity::move
          • Entity::checkInsideBlocks
            • slide_down_block
            • enter_block
        • Player::touch
          • inventory_changed (picking up items)
          • thrown_item_picked_up_by_player
          • repair_with_xp (touching xp orb)
        • 🔢 Update health, air, armor, etc scoreboard criteria
        • location

  • AdvancementRewards::grant (can trigger at any point)
    • Give experience
    • inventory_changed (loot reward)
    • recipe_unlocked
    • ▶️ Run reward function

  • Immediate actions when running some commands
    • inventory_changed (loot, give, clear commands)
    • recipe_unlocked (recipe command)
    • effects_changed (effect command)
    • changed_dimension (teleport command)

  • Immediate actions when a mob dies
    • kill_mob_near_sculk_catalyst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment