Caltinor / Project-MMO-2.0

A continuation of Harmony's Project MMO project
38 stars 22 forks source link

[1.19.2] Zombie won't respect XP reward value changes (auto values off) #313

Closed NewbulaCo closed 1 year ago

NewbulaCo commented 1 year ago

Describe the bug After turning both Auto XP values off, and removing default XP rewards for DEAL_MELEE_DAMAGE and DEAL_RANGED_DAMAGE in the pmmo-server.toml config, every mob (modded or otherwise) will respect the config and not give any XP, except zombie-type entities. This includes: zombies, zombie villagers, husks, drowneds.

I also attempted to override the XP reward value in the form of datapack with no results. This will work for any other mob, however.

datapack/data/minecraft/pmmo/entities/zombie.json {"override":true, "xp_values":{ "RANGED_TO_MOBS": { "archery": 0 }

I noticed this because I was trying to add values for gunslinging for Crayfish Gun Mod projectiles, which seemed to work fine except for zombies. Whenever I would shoot they they also gave archery reward xp despite me turning off archery completely in the configs.

Expected behavior Zombie-type mobs should respect the XP configs or datapacks.

To Reproduce Steps to reproduce the behavior:

  1. Generate a world and log out of it.

  2. In world config, change auto values to false and change this line in pmmo-server.toml

        [XP_Gains.Event_XP_Specifics.Damage_Dealt."DEAL_MELEE_DAMAGE Skills and Ratios"]
            combat = 0
    
        [XP_Gains.Event_XP_Specifics.Damage_Dealt."DEAL_RANGED_DAMAGE SKills and Ratios"]
            archery = 0
  3. Go in the world, and attempt to attack or shoot mobs. Every mob besides zombie-type mobs will not generate reward XP.

Screenshots vs Blaze vs Zombie

Versions:

Caltinor commented 1 year ago

I am unable to reproduce this error. I suspect there is some configuration for zombies or weapons that is being overlooked. XP awarded from damaging entities can come from the entity itself, the item held while the damage is dealt, and the projectile which deals the damage. With the projectile, if it is a member of the "pmmo:ranged" damage type tag or the nested "minecraft:is_projectile" tag, then the projectile entity is factored in, otherwise it defaults to the player's configuration.