Skip to content
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

Player use fastclick X #1725

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

silnarm
Copy link
Contributor

@silnarm silnarm commented May 11, 2023

Alternative implementation of what is implemented in #1678 and (upcoming) TIS as /player foo use perTick X, but implemented here as /player bar use fastclick X and interpolating position and rotation between ticks, giving a result very similar to a real player using the fastclick tweak or an autoclicker.

@ncolyer11 may want chime in to explain the use case better, but essentially it is very high speed planting; with the player moving at somewhere near 3 blocks per tick, which explains why the interpolation is required.

silnarm added 4 commits May 7, 2023 21:09
* Add perTick arg to player use continuous
* attempt use (on block) that many times per tick, interpolating player position for each.
* fix interpolation (reset prev pos/rot)
* commented logging spam
* Record last tick positions and rotations in a better way
* remove highly inappropriate hyjacking of 'continuous' action, introduce 'fastclick' action
* add new mixins and interface for fastclick support and move things there (from wherever I previously added them)
* clean commented log spam
@ncolyer11
Copy link

ncolyer11 commented May 11, 2023

In addition to Silnarm's description, the proposed feature would allow for carpet bots to better emulate real players' actions as it'd let them place at positions in between ticks in a sense.

Imagine a bot moving at 5 blocks per tick, but only able to place a block on the 5th block as it misses the other 4 in between ticks. With this fastclick feature, that same bot could place a block on all 5 blocks, given the uses per tick value is set sufficiently, giving us greater flexibility and control over its actions and making the bot more intuitive to use as it'd align with what we already see with real players moving at high speeds using fast right click.

A genuine use case for this is in testing tree farms that use multiple cores, where the player must travel between different areas at high speeds. Currently, carpet bots are unable to plant saplings "in between" ticks, making it impossible to test these farms effectively as they consistently miss planting at certain cores due to the player's position at the end of a tick not aligning with the planting window for that core. However, with this new feature, bots would be able to plant saplings at the precise locations required, enabling a new level of automation for testing and running these farms.

Importantly, this feature wouldn't affect any other aspect of carpet but would open the doors for a high level of automation for testing these types of high player speed-reliant farms.

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