kangarko / Boss

Premium custom monsters plugin with skill system, natural spawning and lots of sickest features!
https://www.mc-market.org/resources/21619/
75 stars 28 forks source link

Skeleton Spawns #166

Closed Blobbyguy closed 5 years ago

Blobbyguy commented 5 years ago

There seems to be a weird issue with only skeletons where I have the transformation rate at 100% and it is still spawning normal skeletons.

I have the exact same settings replicated with 3 other mobs and they're working fine, it just seems to be skeletons (I have 2 different skeleton bosses and they're both doing this) and I can't seem to figure out what is going on. As a hot fix I'm using the API to cancel any spawns that aren't a boss.

These skeletons are spawning from spawners and transforming. So this could possibly have something to do with it.

Thanks! Blobbyguy.

Boss settings file for skeleton.

NOTE: I didn't have this issue previously I was a few versions behind (I think I was on 1.6.22 and updated to 1.7.10 and it broke)

Type: SKELETON
Custom_Name: '&7&lFast Skeleton'
Health: 4
Dropped_Exp: '0'
Potions: '[]'
Specific_Settings:
  Glowing: false
  Invulnerable: false
  Gravity: true
  Can_Pickup_Items: true
  Silent: false
  Targetable: false
  Auto_Target: false
  Burns_Under_Sunlight: false
  Display_Name: true
Attributes:
  Armor Toughness: 0.0
  Knockback Resistance: 0.0
  Follow Range: 16.0
  Armor: 0.0
  Movement Speed: 0.35
  Attack Damage: 2.0
Skills: '[]'
Death:
  Commands: '[]'
  Reinforcements: '[]'
  Lightning: false
Spawn:
  Commands: '[]'
Spawning:
  Worlds:
    Boss: 100% #Set to 100% but still letting normal skeletons spawn
  Biomes: {}
  Regions:
    Boss: []
    Towny: []
    Factions: []
    Residence: []
    Blacklist: false
    WorldGuard:
    - Keep_Inside: false
      Limit: -1
      Name: bossdesertarena
  Conditions:
    Rain: false
    Thunder: false
    Light: 0 - 15
    Time: 0 - 24000
    Height: 0 - 256
Sounds:
  Debug: false
  Remapped: {}
Riding: ''
Spawner_Egg:
  Lore:
  - ' '
  - '&2&l< &7Left click for menu'
  - '&2&l> &7Right click to summon'
  Material: MONSTER_EGG
  Glow: true
  Name: '&rSpawn {boss}'
Natural_Drops: false
Equipment:
  BOOTS:
    dropChance: 0.0
  Allow_Random: false
kangarko commented 5 years ago

Please also ZIP me your entire Boss/ folder. Make sure to remove MySQL part.

Blobbyguy commented 5 years ago

Blobbyguy's boss folder.zip

Blobbyguy commented 5 years ago

Also; another issue I found. Less of an issue than the one above but, villagers seem to be getting targetted by other mobs (Specifically the husk) when the 'targettable' attribute is false. The same thing happened between zombies and skeletons but I just cancelled the damage event between the two entities and thought nothing of it.

Sorry to sound like I'm being a pain. Thanks! Blobby.

kangarko commented 5 years ago

Sorry to tell but "targettable" feature does not work on 1.7.10 due to lacking methods.

Reassesing your yml file once again, I noticed this (try to remove it and restart): a

Lastly, please set Debug to [spawning]. This will place a hell lot of spam to the console but may us help to determine the cause of the problem. Try to notice the spam for a while and let me know if anything suspicious.

Blobbyguy commented 5 years ago

I think I may have found the issue, but I'm not sure if I can fix it or it may need to be left up to you or if there is a way around it, let me know ^_^

I believe this issue is only happening with skeletons as currently, it is the only boss which I have 2 of the same mob as different bosses (The fast skeleton 'desert 2' and normal skeleton 'plains 1' both have 100% chance of transforming in the world). Now I have it set up so that there are 2 regions (DesertArena and plainsArena), so essentially they should be acting as separate bosses and maps altogether.

Now the issue is that roughly 50% of JUST THE SKELETONS were not transforming correctly in either of the arenas. What I've noticed is that whenever a vanilla skeleton appears, the plugin attempts to spawn the mob that is not the correct boss for that region (E.g. the plains skeleton in the desert) it cancels itself and doesn't continue to transform it with the correct boss, leading to the vanilla mob being left behind.

For simplicity sake, here are the steps the plugin is taking (from what I can see) whenever it goes to spawn. 1) Is there a skeleton spawning 2) Pick between the 2 bosses (Explains the roughly 50-50 of normal to bosses) 3) Does this specific boss (e.g. plains2) meet the requirements to be transformed (In plains arena) Yes - Transform it No - Stop and spawn a vanilla mob

Since it this mob isn't allowed in the region, after this I think it should check the mobs after it for ones that can be spawned in the region? I'm not really sure, but it's just stopping instead of checking for the correct boss to be spawned with 100% chance.

[04:10:21] [Server thread/INFO]: BOSS // [spawning] Attempt to spawn Plains2 at Boss [230, 65, 31] for CONVERTED
--
[04:10:21] [Server thread/INFO]: BOSS // [spawning] Whitelist & Boss is not within any region.

Apologies for my terrible explanation, but I tried my best to convey it.

Thanks! Blobbyguy.

Blobbyguy commented 5 years ago

I am capable of using the API to edit the mechanics a little bit. If you've got any suggestions as to how to work around this, it'd be greatly appreciated. The best I could do is manually checking the regions myself and transforming the mob using the /boss spawn event (I couldn't seem to find a way to spawn a new boss with the API, would suggest if it's not possible). The downside of doing this through the command line is that console is spammed 24/7, something I'd like to avoid if possible!

Thanks in advanced. :)

kangarko commented 5 years ago

Hello,

apologies for a late reply. Thank you for a thoughtful explanation.

Now the issue is that roughly 50% of JUST THE SKELETONS were not transforming correctly in either of the arenas. What I've noticed is that whenever a vanilla skeleton appears, the plugin attempts to spawn the mob that is not the correct boss for that region (E.g. the plains skeleton in the desert) it cancels itself and doesn't continue to transform it with the correct boss, leading to the vanilla mob being left behind.

I see and I understand. Here is how spawning works: We pick up a random Boss of the same entity type, in this case, Skeleton, and try to spawn him. If it fails, a normal skeleton will spawn.

Without any further waiting I changed the mechanism to iterate through all installed compatible Bosses when spawning/converting ;)

I was on a seminar today and it's ~23:00 so haven't tested it much but should be good from an outer look. Please comment below if any issues.