Implement an option to disable Elytra while in combat #5

Closed
SzczurekYT wants to merge 3 commits from 1.19.x-anti-elytra into 1.19.x
SzczurekYT commented 2023-02-01 09:12:47 -06:00 (Migrated from github.com)

This adds a functionality that prevent's you from using elytra in combat.
It adds two new config values.
First one, disableElytra allows you to enable / disable the new feature.
Disabled by default.
Second one, attackerNoFly is important when fighting with bows for example.
You are flying on elytra, and you shoot another player. When arrow hits him there are two cases:

  1. attackerNoFly = false: You can still fly on you elytra, until you land (stop flying) or until the other player damages you.
  2. attackerNoFly = true: You elytra gets diasbled mid fly, and you fall.
    I also needed to refactor the code in CombatCheck a bit, to make it usable, and I also removed few unnecesary casts.
This adds a functionality that prevent's you from using elytra in combat. It adds two new config values. First one, `disableElytra` allows you to enable / disable the new feature. Disabled by default. Second one, `attackerNoFly` is important when fighting with bows for example. You are flying on elytra, and you shoot another player. When arrow hits him there are two cases: 1. `attackerNoFly` = `false`: You can still fly on you elytra, until you land (stop flying) or until the other player damages you. 2. `attackerNoFly` = `true`: You elytra gets diasbled mid fly, and you fall. I also needed to refactor the code in CombatCheck a bit, to make it usable, and I also removed few unnecesary casts.
SzczurekYT commented 2023-02-01 09:13:31 -06:00 (Migrated from github.com)

Closes #3

Closes #3
tesseract-two commented 2023-04-07 17:01:18 -05:00 (Migrated from github.com)

Thank you!

Thank you!

Pull request closed

Sign in to join this conversation.
No description provided.