Dragon Survival [Forge]

Dragon Survival [Forge]

1M Downloads

[1.18.2 Forge Bug]: ClientFlightHandler will yeet dragons to absurd y levels under specific circumstances

wchen1990 opened this issue · 0 comments

commented

■ Your Discord ID

BobDole#8232

■ Dragon Survival version

DragonSurvival_DragonEditor-1.18.2-0.11.5.jar

■ Single game or server?

Forge Server or host

■ Do you delete old configs before writing a bug report?

Nope (Default)

■ Do you play pure MC + DS and Geckolib or do you have some kind of modpack?

I have other mods

■ Describe the bug

As a dragon if go around flying and sprinting and you no longer meet the hunger threshold to use your wings while flying and sprinting during that time, you will be sent to absurd y values, which will eventually crash the server or single player game.

This happens with the latest commit of this repo and tested in on a dev instance.

The main culprit of this bug is ClientFlightHandler. Specifically:

I have no idea what was the initial idea behind these three lines were, but removing these lines makes it so that it doesn't yeet a dragon to outer space.

■ To Reproduce

The simplest way to reproduce this is to:

  1. Create a new world, I just made a Creative Super Flat
  2. Become a dragon using the Dragon Alter
  3. Switch your mode to Survival
  4. Fly up to a reasonable y level
  5. Give yourself Hunger 255 for 5s, /effect give @s minecraft:hunger 5 255
  6. Make sure you're facing downwards and move forward while sprinting before your food bar depletes pass the threshold
  7. If you were moving and sprinting when the food bar passes the threshold you get yeeted

■ Expected behavior

Expected behavior is that you do not get yeeted.

■ Crash Report

N/A