Skip to content

fix: Correctly sync Decorated Pots & Hoppers between sections #99

@Boy0000

Description

@Boy0000

Currently it is only syncing hoppers when it receives an item from a below section

/** Synchronize hopper pickups between sections */
    @EventHandler(ignoreCancelled = true)
    fun InventoryPickupItemEvent.hopperGrabEvent() {
        inventory.location?.sync { _, corresponding, section, corrSection ->
            if (corrSection.isOnTopOf(section)) {
                //if there are no leftover items, remove the itemstack
                if ((corresponding.state as? Container)?.inventory?.addItem(item.itemStack)?.isEmpty() != false)
                    item.remove()
                isCancelled = true
            }
        }
    }

there is probably a reason for this relating to chests etc but should probably get sorted

Base.Profile.2024.07.23.-.16.39.37.02.1.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions