Search in sources :

Example 1 with PiglinBrute

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

the class PiglinBruteStackSettings method canStackWithInternal.

@Override
protected EntityStackComparisonResult canStackWithInternal(StackedEntity stack1, StackedEntity stack2) {
    PiglinBrute piglinBrute1 = (PiglinBrute) stack1.getEntity();
    PiglinBrute piglinBrute2 = (PiglinBrute) stack2.getEntity();
    if (this.dontStackIfConverting && (piglinBrute1.isConverting() || piglinBrute2.isConverting()))
        return EntityStackComparisonResult.CONVERTING;
    if (this.dontStackIfImmuneToZombification && (piglinBrute1.isImmuneToZombification() || piglinBrute2.isImmuneToZombification()))
        return EntityStackComparisonResult.IMMUNE_TO_ZOMBIFICATION;
    return EntityStackComparisonResult.CAN_STACK;
}
Also used : PiglinBrute(org.bukkit.entity.PiglinBrute)

Aggregations

PiglinBrute (org.bukkit.entity.PiglinBrute)1