BukkitOldCombatMechanics icon indicating copy to clipboard operation
BukkitOldCombatMechanics copied to clipboard

Chorus fruits tp randomly inside blocks

Open Bafy78 opened this issue 1 year ago • 3 comments
trafficstars

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 avatar Aug 27 '24 18:08 Bafy78

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.

kernitus avatar Oct 26 '24 12:10 kernitus

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.

Bafy78 avatar Oct 26 '24 12:10 Bafy78

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

kernitus avatar Dec 26 '24 19:12 kernitus