Hello, I've been looking into hopper performance in Minecraft as an opportunity for modding for efficiency. They are one of the blocks with the highest server resource usage.
Based on the current implementation, it seems that Minecraft has a giant controller for all hoppers loaded within chunks. My suggestion is to add a few variables to hoppers to remove or add them to a list for sending and/or receiving.
Fully Awake State: checks to send items and receive items
- Item Entity is within 1 block: could place wake on item entity when entering hopper range when in motion? basically 2d 0.25 block length parallel to direction of motion
- Target to Fill is container and is not full: removes checking for hoppers with air blocks, non containers, or full containers as targets
- Hopper is Not Full
- Pull Item Target is not empty: the block waking above triggers check on block below next tick and checks until returns no valid target.
Half-Awake Receive State
- Hopper is not full
- Target is full or invalid
- Previous tick had valid receive target or woken container. Container being used wakes and hopper receiving item wakes below and target block
Half-Awake Send State
- Hopper is full and/or above block is in sleep/empty
- Target is not full and valid: Happens upon pulling an object from target.
Full Sleep
- Target block is full or Not Valid
- Hopper is full or receiving block has been empty 1 tick and receiving slept for 1 tick
Please sign in to leave a comment.
0 Comments