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

Serveral Non-Ticking blocks are marked as ticking forcing the growth-algorithm to check chunks needlessly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.11.2
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed

      Description

      The bug

      Blocktypes in Minecraft are marked as ticking if they can be activated by the random growth algorithm.
      Examples would be crops, grass or fire.

      However, several other blocks have no ticking-functionality but are still marked as ticking. An example would be the Cake or the Button-Blocks.

      This causes problems with the growth-algorithm and chunk-indexing on chunk-loads. Each time a chunk is loaded it will count all ticking blocks. If the count is == 0 the specific chunk has no tickable blocks and will not need to be randomly checked every tick and try to grow something.

      Unfortunately this benefit never really occurs if so many blocks are marked as ticking when in fact they cannot tick.

      Maybe some additional information as I have some optimizations running for some time now:

      • A large amount of ChunkSections will always need to tick as they contain growable blocks like grass or leaves so the optimizations here are limited
      • Currently only the ChunkSections contain a counter that indicates if it needs to be ticked, a Chunk itself could contain this too and reduce the lookups at runtime

      Affected blocks

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      List might be incomplete

      Block (MCP name) Comment
      BlockBasePressurePlate (1) Could maybe be solved by scheduling block updates until no entity is on it anymore
      BlockFlower (2) Just causes the block to break if it is at an invalid position
      BlockLilyPad 2
      BlockDeadBush 2
      BlockDoublePlant 2
      BlockTallGrass 2
      BlockButton Uses 1 already
      BlockCake -
      BlockCarpet -
      BlockLiquid -
      BlockMagma Schedule block event when neighboor changed and water is above
      BlockPumpkin -
      BlockRailDetector Uses 1 already
      BlockRedstoneOre Schedule a block event with random delay
      BlockRedstoneTorch Uses 1 already
      BlockSnowBlock See MC-88097
      BlockTorch -
      BlockTripWire Uses 1 already
      BlockTripWireHook Uses 1 already

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Kademlia Kademlia
              • Votes:
                10 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: