Search in sources :

Example 1 with Hoglin

use of org.bukkit.entity.Hoglin in project RoseStacker by Rosewood-Development.

the class HoglinStackSettings method canStackWithInternal.

@Override
protected EntityStackComparisonResult canStackWithInternal(StackedEntity stack1, StackedEntity stack2) {
    Hoglin hoglin1 = (Hoglin) stack1.getEntity();
    Hoglin hoglin2 = (Hoglin) stack2.getEntity();
    if (this.dontStackIfUnhuntable && (!hoglin1.isAbleToBeHunted() || hoglin2.isAbleToBeHunted()))
        return EntityStackComparisonResult.UNHUNTABLE;
    return EntityStackComparisonResult.CAN_STACK;
}
Also used : Hoglin(org.bukkit.entity.Hoglin)

Aggregations

Hoglin (org.bukkit.entity.Hoglin)1