Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-259747

NBT Entity Pos not aviable after summon and forceload

XMLWordPrintable

    • Unconfirmed
    • (Unassigned)

      NEW_3 :

      Similar to : https://bugs.mojang.com/browse/MC-227930

       

      When a function must load a chunk and summon an entity,

      the NBT Pos of the Entity is not aviable.

      1 Tick after execution of the function, the NBT Pos of the Entity is aviable.

      The Entity is always successfull at correct place summoned.

      But if the chunk is already forceloaded,

      the NBT Pos of the Entity is instant aviable, with no 1 Tick schedule.

       

      NEW :

      I have testet more this Bug and added 3 Screenshots.

      Screenshot_1 : No Chunk loaded. Worldspawn is not at this position.

      Screenshot_2 : One Chunk is loaded at position -1280 , -1280.

      -1280 %= 16 = 0

      Each Block in the Screenshot is a single Chunk.

      Red = Chunk, Block or Entity is aviable

      Blue = Chunk, Block or Entity is not aviable

      I saw that when a Chunk is loaded, it always load 2 two Chunks around it, but not entities.

       

      Bigger Problem that causes huge Lags, when world not restartet is, if the Chunk is no longer loaded (/forceload remove), the Chunk is after that also aviable, but only, when a Function load the Chunk.

       

      Entity Field = Nearest to the Armor_Stand (execute if entity @e[tag=chunk_test_01] (01 .. 64)

      Block Field = The middle Field of the three. (execute if block -1280 0 -1280)

      Register Field = Farthest Field from Armor_Stand. (execute store result ... run forceload query -1280 -1280)

       

      white_stained_glass = Chunk at -1280 -1280 , Field = 8*8 = 64 Chunks

       

      After forceload remove the blocks and entities are also aviable.

      Only when Function, not Player executed !

      When /reload, nothing changed.

      Leaving world and rejoin, the Bug is gone and Screenshot_3 is now switched to start Screenshot_1 , with the start condition. 

       

      NEW_2

       

      I have testet now my own test and saw

      forceload add (single chunk) loading always 25 chunks, (1+24)

      forceload add (single chunk) loading the target chunk + in each direction 2 chunks.

      If forceload remove AND a execute if/unless block at position of chunk that is forceload remove, the testfor block prevent the chunk from be unloading.

      when i deactivate the block testing, the chunk get complett unload and entity is no longer on testing. block testing causing the bug secondary when forceload remove.

      Unclear from me, what is causing Bug at forceload add with entity nbt not aviable for one tick.

       

      I found the Bug, after i wounder about a Bug in my Datapack.

      In my analysis tellraw of my Datapack i saw, that a NBT in my storage is not exist.

      The NBT in storage, don't exist, because, the NBT that is quested is not aviable (exist not).

      When i test it manually i saw no error, the NBT always exist, but the reason is,

      that the function execute all commands instant, that i testet manually.

       

      It looks like that the forceload need one Tick to get all summoned entities aviable.

      Later, as i written this Bug, i testet also, get NBT Pos of an existing entity, in same Tick, with function.

      The result is when a function is loading a chunk and the chunk already contain a entity,

      the NBT Pos of the Entity is instant aviable, with no schedule.

            Unassigned Unassigned
            Teayo -
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: