-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: amethyst golem tweaks #1545
base: main
Are you sure you want to change the base?
Conversation
makes the golems not respect claims - current behaviour causes them to drop the items but not break the block which results in an unintentional buff. also changes their harvesting behaviour: if they do not have a home (not sure if even possible) or their home is not an inventory, they will drop the drops as item entities. if they do have a home and it is an inventory, they will insert the dropped items directly into the home if there is free space or skip harvesting the cluster otherwise. it will continue trying other clusters in the latter case.
This comment was marked as outdated.
This comment was marked as outdated.
level.addFreshEntity(new ItemEntity(level, pos.getX(), pos.getY(), pos.getZ(), drop)); | ||
} | ||
} else { | ||
IItemHandler iItemHandler = golem.level.getCapability(Capabilities.ItemHandler.BLOCK, golem.getHome(), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This itemstack logic to insert or drop is handled by InventoryManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly different semantics here, we want to insert the full stack or do nothing at all, unless the golem has no home or isnt allowed to access its home
makes the golems not respect claims - current behaviour causes them to drop the items but not break the block which results in an unintentional buff.
also changes their harvesting behaviour:
if they do not have a home (not sure if even possible) or their home is not an inventory, they will drop the drops as item entities.
if they do have a home and it is an inventory, they will insert the dropped items directly into the home if there is free space or skip harvesting the cluster otherwise. it will continue trying other clusters in the latter case.