Java Code Examples for net.minecraft.world.World#getCelestialAngle()

The following examples show how to use net.minecraft.world.World#getCelestialAngle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdapterDaylightSensor.java    From OpenPeripheral-Integration with MIT License 4 votes vote down vote up
@ScriptCallable(returnTypes = ReturnType.NUMBER, description = "Get angle of sun (in degrees, 0 is zenith)")
public float getCelestialAngle(TileEntityDaylightDetector target) {
	World world = target.getWorldObj();
	return world.getCelestialAngle(1) * 360;
}