how can i check it though?
edit: found this
public boolean isBuffed(EntityLivingBase player) {
if(getAtAtr(player).getModifiersByOperation(1).contains(RED_TEARSTONE_RING_BUFF) == true) {
return true;
}else {
return false;
}
}
hope this works
edit2: it works thank you
Dos someone have an idea for a bow work-around?
The
onWornTick
method from Baubles applies the modifer in a loop which leads to a crash, because you can't apply a modifier that already is applied. Can you test for a certain modifier?
I want to create the Red Tearstone Ring from Dark Souls 1 using the Baubles API. This is what the Ring does: Increase the attack rating of equipped weapons by 50% when the player's health is under 20%. Baubles gives me this method
/**
* This method is called once per tick if the bauble is being worn by a player
*/
public void onWornTick(ItemStack itemstack, EntityLivingBase player) {
}
I have a few questions:
How do i get the damage of the equipped weapon? How do I modify that? Does that work for bows, too?