Skip to content

issue-149: Use ItemStackUtils.spawnAsEntity when dropping robot items - #150

Open
zachanator070 wants to merge 1 commit into
North-Western-Development:1.20.1from
zachanator070:issue-149
Open

issue-149: Use ItemStackUtils.spawnAsEntity when dropping robot items#150
zachanator070 wants to merge 1 commit into
North-Western-Development:1.20.1from
zachanator070:issue-149

Conversation

@zachanator070

@zachanator070 zachanator070 commented Jul 25, 2026

Copy link
Copy Markdown

Description

This PR addresses issue #149 where the drop function from the inventory_operations device does not respect the given direction. As shown in the issue, items always spawned in the north direction. Not going to lie I'm not a forge dev by any means, so I don't entirely understand this behavior since the spawnAtLocation method doesn't accept any direction parameter.

My AI agent found and suggested to use ItemStackUtils.spawnAsEntity that you already have in the mod. It looks to spawn entities with a direction so a quick swap to use this method instead does the trick.

Technical Changes

  • Updates the InventoryOperationsModuleDevice to use the ItemStackUtils.spawnAsEntity with a direction argument in favor of entity.spawnAtLocation

Screenshot

after

See #149 for the source of test.lua. Also note that the bot is facing west whereas before all items were spawning to the north regardless of the direction argument given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant