use of org.spongepowered.common.interfaces.IMixinTileEntityBeacon in project SpongeCommon by SpongePowered.
the class BeaconDataProcessor method set.
@SuppressWarnings("unchecked")
@Override
protected boolean set(TileEntityBeacon dataHolder, Map<Key<?>, Object> keyValues) {
Potion primary = ((Optional<Potion>) keyValues.get(Keys.BEACON_PRIMARY_EFFECT)).orElse(null);
Potion secondary = ((Optional<Potion>) keyValues.get(Keys.BEACON_SECONDARY_EFFECT)).orElse(null);
((IMixinTileEntityBeacon) dataHolder).forceSetPrimaryEffect(primary);
((IMixinTileEntityBeacon) dataHolder).forceSetSecondaryEffect(secondary);
dataHolder.markDirty();
return true;
}
Aggregations