Maim Trap Kill player in creative...
Fireztonez opened this issue ยท 4 comments
Hello,
I tests somes traps plates from Dark Utilities in my creative world, and I saw the Maim Trap, I wonder what it does, so I have place one in the ground and walk on it, when I'm in creative, and les than a second later, I die...
So, I think, you should look to add verification if player is in creative, question to not kill it...
Thank's for your good mod and work!
Fireztonez
Why not just add a quick blacklist statement?
if (entity.getMaxHealth() > 1.0f && entity.isNonBoss() && !(entity instanceof EntityPlayer)) {
final IAttributeInstance inst = entity.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH);
inst.setBaseValue(Math.max(inst.getBaseValue() - 1.0f, 1.0f));
}
else if (entity instanceof EntityPlayer)
if !(EntityPlayer)entity.isCreative()
entity.attackEntityFrom(DamageSource.OUT_OF_WORLD, 4f);;
else {
entity.attackEntityFrom(DamageSource.OUT_OF_WORLD, 4f);
}
}
Thanks for reporting this, but this is an intended mechanic. For mobs it will permanently lower their maximum health. Since this effect would be really bad for players, it does 4 void damage instead. Creative mode players are affected by void damage in the vanilla game.
@Sewef Because killing creative mode players, and players with armor that provide similar effects is specifically intended.
I really don't like the idea of killing creative player with a trap... Killing player with armor giving similar effect I can understand, but, player in creative should not be able to take any damage... I still think like Sewef, adding a verification if player is in creative should be a good thing...
But if really this is an intended thing, and you don't want to change that, I think I will simply disable from my modpack...
Thank's for your reply