Vanilla Entity States

29-10-2022

In the source code of GBRPG (or Devas), Vanilla Minecraft Entity Tags are used to store entity states for optimization purposes.


Player Exclusive


  1. Sneaking:
    sneak/sneaking/sneaked
  2. Movements:
    walking/sprinting/swimming/water1/water2
  3. Fungus:
    Fungus
  4. In Rain:
    inRain
  5. Selected Item Slot:
    SIS.Swapped/SIS.FastSwapping




  1. Sneak

    As for sneaking, GBRPG uses the three tags:

    1. sneak
    2. sneaking
    3. sneaked

    sneak:
    Player starts sneaking.

    sneaking:
    Player is currently sneaking.

    sneaked:
    Player stops sneaking.





  2. Movement

    During Movement, players are granted the following tags.


    1. walking
      Player is walking.

    2. sprinting
      Player is sprinting.

    3. swimming
      Player is swimming.

    4. water1
      If player is bobbing up and down over water.
      (see minecraft.custom:minecraft.walk_on_water_one_cm)

    5. water2
      If player is walking underwater.
      (see minecraft:walk_under_water_one_cm)

    Source Code:  stats:player_state/movement





  3. Fungus

    When the player uses a warped fungus on a stick, the player is granted with the fungus tag.





  4. inRain

    Given when the player is exposed to rain.





  5. Selected Item Slots

    When selected item slot is switched, these tags may be given.


    1. SIS.Swapped
      SelectedItemSlot is swapped.

    2. SIS.FastSwapping
      SelectedItemSlot is swapped rapidly.

    Source Code:  stats:player_state/movement





All Entities


  1. HurtTime:
    HurtTime.9 / HurtTime.10 / IFrame
  2. OnGround:
    OnGround
  3. Active Effects:
    AE.hasEffect / AE.hasBuff / AE.hasDebuff /
    AE.Burn / AE.Freeze / AE.Wind / AE.Earth / AE.Seal / AE.Chaos
  4. Falling:
    Falling




  1. Sneak

    When entity is hurt, they are given the following tags.

    1. HurtTime.9
      Required NBT: {HurtTime:9s}

    2. HurtTime.10
      Required NBT: {HurtTime:10s}

    3. IFrame
      Entity has Invulnerability Frames.
      Has NBT of HurtTime > 0.

    Source Code:  stats:entity_state/hurttime





  2. OnGround

    When player is on the ground, this tag would be given.
    Required NBT: {OnGround:1b}

    Source Code:  stats:entity_state/onground





  3. Active Effects

    Given to entities with AE (Active Effects).


    1. AE.hasEffect
      If entity has an AE effect.

    2. AE.hasBuff
      Entity has an AE buff.

    3. AE.hasDebuff
      Entity has an AE debuff.

    4. AE.Burn
      Entity is burning.

    5. AE.Freeze
      Entity is freezing.

    6. AE.Paralyze
      Entity is paralyzed.

    7. AE.Poison
      Entity is poisoned.

    8. AE.Seal
      Entity is sealed.

    9. AE.Chaos
      Entity is chaotic.


    Source Code:  stats:entity_state/





  4. Falling

    Given when entity is falling.
    NBT of FallDistance > 0

    Source Code:  stats:entity_state/falldistance