DevotedMC / HiddenOre

Allows after-map generation positive rebalance via fine-control over custom drops - Anti-Xray - Built for Minecraft and Paper 1.16.4
https://www.devotedmc.com/hiddenore.html
MIT License
11 stars 29 forks source link

Feature Req: Permission node checks for boosted ore rates. #37

Open Convoy20 opened 3 years ago

Convoy20 commented 3 years ago

Inside the hiddenore config I'd like to allow inside of the 'state' specification, permission specification to enable boosted drop rates.

For instance, current config:

states:
# These allow modification of drop chance based on the player's state
 hasteDebuff:
 # Give each "set" of modifications a name
  haste: [0.8, 0.5]
  # For each specific type of player state (haste / fatigue / nausea, etc) provide an array
  # The chance is picked from this array by matching Level of effect to the named effect.
  # So for [0.8, 0.5] -- haste I has a 0.8 reduction, haste II has a 0.5 reduction.
 fatigueBuff:
  fatigue: [1.2, 1.5]
 generalRebalance:
  haste: [0.9, 0.7]
  fatigue: [1.1, 1.3]
  nausea: [0.5, 0.3, 0.1]
  luck: [2.0, 3.0, 4.0]
  badluck: [0.1, 0.01, 0.002]
  blindness: [0.0, 0.0, 0.0]

I'd like to add in a new feature to the config to make the differentiation, a permission node. So, like this:

states:
# These allow modification of drop chance based on the player's state
 hasteDebuff:
 # Give each "set" of modifications a name
  haste: [0.8, 0.5]
  # For each specific type of player state (haste / fatigue / nausea, etc) provide an array
  # The chance is picked from this array by matching Level of effect to the named effect.
  # So for [0.8, 0.5] -- haste I has a 0.8 reduction, haste II has a 0.5 reduction.
 fatigueBuff:
  fatigue: [1.2, 1.5]
 generalRebalance:
  haste: [0.9, 0.7]
  fatigue: [1.1, 1.3]
  nausea: [0.5, 0.3, 0.1]
  luck: [2.0, 3.0, 4.0]
  badluck: [0.1, 0.01, 0.002]
  blindness: [0.0, 0.0, 0.0]
 permissions:
  devoted.boostedore: [1.1]
  devoted.boostedore2: [1.2]
  devoted.boostedore3: [1.3] 

This would boost hiddenore rates of any player with the permission node devoted.boostedore by 10%. Any player with devoted.boostedore2 would get a 20% increase, and a player with both devoted.boostedore and devoted.boostedore2 would get 10% applied then 20% applied after that.