Player Heads

Player Heads

897k Downloads

Charged Creeper Issue/Feature

TerdyTheTerd opened this issue ยท 4 comments

commented

I feel like this is already a feature, but I cannot get other mobs to drop their heads when a charged creeper kills them, only the vanilla mobs (zombie/skelli etc) drop the heads. I tried using the different options in the config for charged creepers:
vanilla|ignore|replace and none of them seem to have any effect. I bumped up the modifier to a crazy number to ensure it would drop.

Am I missing something? Is this supposed to work?

commented

We are using PlayerHeads version 5.2.15 (current snapshot) https://ci.meme.tips/job/PlayerHeads-5.x/1136/
this build should not contain significant changes to drop behaviors from 5.2.14
and here is our config: https://gist.github.com/crashdemons/d816d117bfd688c19fca0fc026fed53c
on Paper 1.16.5

I was able to get a head drop with ignore regardless of chargedcreepermodifier or droprate (0.0 or 1.0) since the vanilla drop is ignored (allowed) with that behavior.

EDIT: I reread your post and saw you mentioned you wanted head drops for nonvanilla mobs (SEE BELOW)
I was able to get a husk head using:
chargedcreeperbehavior: ignore
chargedcreepermodifier: 10000.0 (see note)
mobpkonly: false

image
image
image

the reason for the high modifier in our case was we have a very low droprate on our server (less than a percent), and modifiers are applied as a multiplier of the base drop rate (0.001 can be raised to 1.0 with a modifier of 10000) you do not need a modifier this high normally, this was just to force a drop without changing other settings.


for clarity let me review the relevant confiig entries:
mobpkonly: false (allows mobs to drop heads when killed by other mobs when false)
considermobkillers: true (allows the killer entity to be determined even if it is not a player)
chargedcreeperbehavior: vanilla (only allows normal vanilla drops if the killer was a charged creeper- nonvanilla mobdrops cannot occur with in this situation)
chargedcreeperbehavior: ignore (allows normal vanilla drops. If a PH drop is successful, it is added)
chargedcreeperbehavior: replace (blocks normal vanilla drops when a charged creeper is the killer. All drops must be a successful PH drop)

chargedcreepermodifier: 1.0 (multiplies against the PH droprate for the dying mob if a charged creeper was the killer, 1.0 implies no change to the droprate, 2.0 would double the droprate)

chargedcreeper- settings require considermobkillers to be enabled in order to function or else they will not apply any modification to the behavior.

[Note: blocking non-creeper-related drops for PH mobs is not officially supported but you could probably do something hacky like setting the mob droprate to -1.0 (vanilla behavior only) then setting the charged creeper modifier to -1.0 so that when they are multiplied, the droprate becomes 1.0 only when killed by a charged creeper)]

commented

it should work fine with ignore (any mobs) or vanilla (only for vanilla mobs) or replace (any PH-supported mobdrop)
(remember to use either /ph config set or /ph config reload if you modify the config file itself)

I can verify that this is still working on our server later, but in the past I've not had any issue with this working.

note: setting chargedcreeperbehavior to vanilla forces playerheads to avoid interacting with the drop at all - so mobs that normally drop heads would drop heads then - you would need ignore or replace for PH mob drops.

commented

I will check back in when I have the time, I may have been missing the
mobpkonly: false value. Thanks for the detailed response. A player and I spent hours gathering many of the more rare mobs so that we could finish our mob head collection, just for no heads to be dropped. I then tested several config options in creative to no avail, so hopefully with your post I can get them working as we need :D

commented

I was missing a config setting, everything seems to work now, thanks!