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

Smooth AOTE #963

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

Smooth AOTE #963

wants to merge 39 commits into from

Conversation

olim88
Copy link
Contributor

@olim88 olim88 commented Aug 28, 2024

adds smoothing when using the aspect of the end or other teleports

it works out where hypixel is sending the player based on the distance they are going to teleport and then looks at the players ping and uses this as a goal to be end the predicted position in the time of the players ping (when they will receive a teleport packet from hypixel) then there is just a mixed to the Camera class that moves it to the position corresponding to how far though the allotted me the player is.

tests

only tested with aspect of the void and aspect of the end. however this should work with everything else

small bugs

  • the prediction of where the player is going to be teleported to is not perfect if there are blocks in the way. (if this is fixed it needs to be fixed in the overlay as well as this is also not always right)
  • manna can sometimes be lagged behind client side so sometimes the animation is played when there is not enough manna to teleport

@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Aug 28, 2024
@AzureAaron AzureAaron added the new feature This issue or PR is a new feature label Aug 28, 2024
@x-yingcan-x
Copy link
Contributor

x-yingcan-x commented Aug 28, 2024

I tried a bit and found bugs

  1. click too fast cause the animation break, the anim for 1st tp cut off and 2nd anim not play.
  2. Etherwarp logic incorrectly, when enableEtherTransmission is false but enableInstantTransmission is true, Etherwarp will use anim of instant tp instead.
  3. wither impact tp doesnt check if it has wither impact.
  • always send ping packet regardless What server you're in/Is in Skyblock/Are all related settings off

Copy link
Collaborator

@viciscat viciscat left a comment

Choose a reason for hiding this comment

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

Very epic as usual

private boolean shouldShowPacketSizeAndPingCharts(DebugHud instance, Operation<Boolean> original) {
//make the f3+3 screen always send ping packets even when closed
//this is needed to make smooth AOTE work
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe only on skyblock? To avoid spamming other servers and using more bandwidth.

Comment on lines 760 to 778
"skyblocker.config.uiAndVisuals.smoothAOTE": "Smooth AOTE",
"skyblocker.config.uiAndVisuals.smoothAOTE.@Tooltip": "Smooths out teleporting with right click teleport ability's",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableEtherTransmission": "Enable Ether Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableInstantTransmission": "Enable Instant Transmission ",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableSinrecallTransmission": "Enable Sinrecall Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWeirdTransmission": "Enable Weird Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWitherImpact": "Enable Wither Impact",
Copy link
Collaborator

Choose a reason for hiding this comment

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

specifying which item(s) that is in tooltip for smoof brained people like me would be nice

private static final MinecraftClient CLIENT = MinecraftClient.getInstance();

private static final Pattern MANA_LORE = Pattern.compile("Mana Cost: (\\d+)");
private static final long maxTeleportTime = 1000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

UPPER_SNAKE_CASE like the static final variable just above

@AzureAaron AzureAaron added this to the 1.23.0 milestone Aug 28, 2024
@x-yingcan-x
Copy link
Contributor

Critical Issue: (no location check) Works in F7/M7 Boss Fight / Glacite Minshaft or anywhere that blocked teleport

@olim88
Copy link
Contributor Author

olim88 commented Aug 29, 2024

Critical Issue: (no location check) Works in F7/M7 Boss Fight / Glacite Minshaft or anywhere that blocked teleport

i have hopefully disabled it in those locations but i can not find a list of locations were its not allowed so i do not know if there are any more places like that

@x-yingcan-x
Copy link
Contributor

i have hopefully disabled it in those locations but i can not find a list of locations were its not allowed so i do not know if there are any more places like that

I suddenly think of what I forgot.

  • Jungle Temple in Crystal Hollows
  • Teleport Maze Puzzle/Boulder Puzzle/Trap Room in Dungeon
  • While doing parkour and Item Abilities is Disabled

@x-yingcan-x
Copy link
Contributor

strange, Latest build crashes immediately.
latest.log

@viciscat
Copy link
Collaborator

ah, olim goofed a mixin. I can quickly commit a fix if olim doesn't have time

@olim88
Copy link
Contributor Author

olim88 commented Aug 29, 2024

ah, olim goofed a mixin. I can quickly commit a fix if olim doesn't have time

Sure I probably can't get to fix this for at least a few hours

return false;
} else if (Utils.getLocation() == Location.PRIVATE_ISLAND && !Utils.getIslandArea().equals("⏣ Your Island")) { //do not allow it when visiting
return false;
} else if (Utils.getLocation() == Location.PRIVATE_ISLAND && !Utils.getIslandArea().equals("⏣ Your Island")) { //do not allow it when visiting garden
Copy link
Contributor

Choose a reason for hiding this comment

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

forget? or I misunderstand something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

forget. i was going to do the same check for the garden the realised it was not as easy. oops

@AzureAaron AzureAaron added the merge conflicts This PR has merge conflicts that need solving. label Sep 3, 2024
@LifeIsAParadox LifeIsAParadox removed the merge conflicts This PR has merge conflicts that need solving. label Sep 4, 2024
@LifeIsAParadox LifeIsAParadox added merge conflicts This PR has merge conflicts that need solving. and removed reviews needed This PR needs reviews labels Sep 14, 2024
@LifeIsAParadox LifeIsAParadox added reviews needed This PR needs reviews and removed merge conflicts This PR has merge conflicts that need solving. labels Sep 14, 2024
@olim88
Copy link
Contributor Author

olim88 commented Sep 14, 2024

I have re written the raycast to be more like hypixel. it seams to be correct 95+% of the time now

kevinthegreat1
kevinthegreat1 previously approved these changes Sep 15, 2024
@LifeIsAParadox LifeIsAParadox added merge me please Pull requests that are ready to merge and removed reviews needed This PR needs reviews labels Sep 15, 2024
}
long gap = System.currentTimeMillis() - startTime;
//make sure the player is actually getting teleported if not disable teleporting until they are teleported again
if (System.currentTimeMillis() - lastTeleportTime > 1000) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, it might make sense to use ping here? Maybe two times so it's not too strict. Like this:

Suggested change
if (System.currentTimeMillis() - lastTeleportTime > 1000) {
if (System.currentTimeMillis() - lastTeleportTime > Math.min(2 * lastPing, MAX_TELEPORT_TIME)) {

@@ -765,6 +765,19 @@

"skyblocker.config.uiAndVisuals.showEquipmentInInventory": "Show Equipment in Inventory",

"skyblocker.config.uiAndVisuals.smoothAOTE": "Smooth AOTE",
"skyblocker.config.uiAndVisuals.smoothAOTE.@Tooltip": "Smooths out teleporting with right click teleport ability's",
Copy link
Collaborator

Choose a reason for hiding this comment

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

abilities

"skyblocker.config.uiAndVisuals.smoothAOTE.enableSinrecallTransmission": "Enable Sinrecall Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableSinrecallTransmission.@Tooltip": "for: Sinseeker Scythe",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWeirdTransmission": "Enable Weird Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWeirdTransmission.@Tooltip": "for: Aspect of the Leech 1 and 2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to mention the AOTL variants? probably doesn't matter

"skyblocker.config.uiAndVisuals.smoothAOTE.enableWeirdTransmission": "Enable Weird Transmission",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWeirdTransmission.@Tooltip": "for: Aspect of the Leech 1 and 2",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWitherImpact": "Enable Wither Impact",
"skyblocker.config.uiAndVisuals.smoothAOTE.enableWitherImpact.@Tooltip": "for: Necron Blade, Hyperion, Scylla, Valkyrie",
Copy link
Collaborator

Choose a reason for hiding this comment

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

For: Necron's Blade, Hyperion, Astraea, Scylla, and Valkyrie.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Some of the sentences don't start with capitols, need periods at the end. Some option a names/descriptions have trailing space too.

SmoothAOTE.playerTeleported();
}

@WrapOperation(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/DebugHud;shouldShowPacketSizeAndPingCharts()Z"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be an @ModifyExpressionValue

private boolean shouldShowPacketSizeAndPingCharts(DebugHud instance, Operation<Boolean> original) {
//make the f3+3 screen always send ping packets even when closed
//this is needed to make smooth AOTE work
if (Utils.isOnSkyblock()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should also check for smoothing being enabled

@LifeIsAParadox LifeIsAParadox added changes requested This PR need changes and removed merge me please Pull requests that are ready to merge labels Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested This PR need changes new feature This issue or PR is a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants