use of org.spongepowered.api.data.property.block.LightEmissionProperty in project SpongeForge by SpongePowered.
the class ForgeLightEmissionPropertyStore method getFor.
@Override
public Optional<LightEmissionProperty> getFor(Location<World> location) {
net.minecraft.world.World world = (net.minecraft.world.World) location.getExtent();
Block block = (Block) location.getBlockType();
final BlockState blockState = location.getBlock();
return Optional.of(new LightEmissionProperty(block.getLightValue(BlockUtil.toNative(blockState), world, VecHelper.toBlockPos(location))));
}
Aggregations