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

Chorus fruits tp randomly inside blocks #748

Open
Bafy78 opened this issue Aug 27, 2024 · 3 comments
Open

Chorus fruits tp randomly inside blocks #748

Bafy78 opened this issue Aug 27, 2024 · 3 comments
Labels
investigate We have yet to investigate this issue

Comments

@Bafy78
Copy link

Bafy78 commented Aug 27, 2024

Information

  • Server Version: 1.21.1
  • OldCombatMechanics version: dev build 238
  • Server Log File:
Server Log
nothing interesting
  • OldCombatMechanics config file:
config.yml
chorus-fruit:
  # This makes the chorus fruit behaviour configurable
  enabled: true
  # The maximum distance the fruit can teleport the player. This a PER AXIS value, so this outlines a cube with
  # 2 * max-teleportation-distance as the side length
  # Vanilla default is 8.
  # Setting this to 0 disables chorus fruit teleport.
  # Setting this to a value greater than 8 MIGHT CAUSE CONFLICTS with bukkit's internal anti cheat
  # and *potentially* any other anti-cheat you use. Please make sure this is not an issue before increasing
  # this value.
  max-teleportation-distance: 5
  # Whether to prevent eating the fruit completely. This also prevents the teleportation.
  prevent-eating: false
  # The saturation value of the chorus fruit.
  # Vanilla default is 2.4
  saturation-value: 2.4
  # The hunger value of the chorus fruit.
  # Vanilla default is 4 (2 bars)
  hunger-value: 4

Problem Description

The chorus fruits, when the module is enabled, don't work properly at all and tp inside blocks.

To Reproduce

Steps to reproduce the behavior:

  1. Enable the chorus fruits module
  2. Change the teleportation distance value to anything other than the default (8)
  3. Eat chorus fruits

Expected Behaviour

You would be tped randomly above blocks in places where you can stand, in the radius

Actual Behaviour

You are tped anywhere, inside full blocks.

@Bafy78 Bafy78 added the investigate We have yet to investigate this issue label Aug 27, 2024
@kernitus
Copy link
Owner

Maybe some of the teleportation logic from NMS needs to be ported over. Can I ask what you use this module for? From the stats it seems most OCM servers have it disabled, and it would be helpful to figure out the best approach for this.

@Bafy78
Copy link
Author

Bafy78 commented Oct 26, 2024

I have a kitpvp server, and one of the kit (enderman) has chorus fruit as their main food source. I use the module to reduce the radius of possible teleportation, to make the chorus fruits less annoying for the user and less op to flee.

@kernitus
Copy link
Owner

Would probably be a good idea to directly dig up the algorithm used in NMS for the teleportation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate We have yet to investigate this issue
Projects
None yet
Development

No branches or pull requests

2 participants