use of net.minecraft.world.effect.MobEffect in project SpongeCommon by SpongePowered.
the class BeaconData method set.
private static boolean set(final BeaconBlockEntity holder, final PotionEffectType value, final BiConsumer<BeaconBlockEntityAccessor, MobEffect> setter) {
final BeaconBlockEntityAccessor accessor = (BeaconBlockEntityAccessor) holder;
final MobEffect effect = (MobEffect) value;
if (!BeaconBlockEntityAccessor.accessor$VALID_EFFECTS().contains(effect)) {
return false;
}
setter.accept(accessor, (MobEffect) value);
holder.setChanged();
return true;
}
Aggregations