Skip to content

feat(AutoMount): Add AutoMount module#240

Open
IceTank wants to merge 3 commits intolambda-client:1.21.11from
IceTank:feature/module/automount
Open

feat(AutoMount): Add AutoMount module#240
IceTank wants to merge 3 commits intolambda-client:1.21.11from
IceTank:feature/module/automount

Conversation

@IceTank
Copy link
Contributor

@IceTank IceTank commented Feb 2, 2026

Add AutoMount module to automatically mount or remount entities

@IceTank
Copy link
Contributor Author

IceTank commented Feb 2, 2026

Not tested yet

@IceTank
Copy link
Contributor Author

IceTank commented Feb 3, 2026

Works now

@IceTank IceTank marked this pull request as ready for review February 3, 2026 21:02
@beanbag44 beanbag44 self-requested a review February 22, 2026 10:36
transitive-accessible field net/minecraft/registry/SimpleRegistry frozen Z

# AutoMount
accessible method net/minecraft/entity/Entity canAddPassenger (Lnet/minecraft/entity/Entity;)Z
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be placed under the # Entity group

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still could be moved

if (autoMountEntities && player.vehicle == null) {
runSafeAutomated {
val entity = fastEntitySearch<Entity>(10.0) {
autoMountEntityList.contains(it.type) && canRide(it) && it.findRotation(range, player.eyePos) != null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its best to have a rotation setting as currently this checks if its possible for a valid rotation but doesnt perform it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is only to check if the entity is within range as all the other checks I tried didn't work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but this module wont work on grim tho? Might as well have an option for rotations as you already have the logic for getting the rotation

}

private fun SafeContext.interactEntity(entity: Entity) {
mc.networkHandler?.sendPacket(PlayerInteractEntityC2SPacket.interactAt(entity, false, Hand.MAIN_HAND, Vec3d(0.5, 0.5, 0.5)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally we should fill the parameters with accurate data like player.isSneaking instead of false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would cause the module to fail to mount entities while the player is sneaking

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this potentially cause anticheat conflicts tho? Maybe a setting for override sneak or something

@beanbag44
Copy link
Member

oh yeah, also use connection inside of SafeContext rather than mc.networkHandler

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.

2 participants