Skip to content

Commit 29304df

Browse files
committed
Use float instead of double without casting
1 parent 5a93ec0 commit 29304df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

purpur-server/minecraft-patches/sources/net/minecraft/world/clock/ServerClockManager.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- this.clocks.values().forEach(ServerClockManager.ClockInstance::tick);
88
+ this.clocks.forEach(((worldClockHolder, clockInstance) -> { // Purpur start - Configurable daylight cycle
99
+ ServerLevel l = level != null ? level : server.overworld();
10-
+ float incrementTicks = (float) (12000D / (l.isBrightOutside() ? l.purpurConfig.daytimeTicks : l.purpurConfig.nighttimeTicks));
10+
+ float incrementTicks = 12000F / (l.isBrightOutside() ? l.purpurConfig.daytimeTicks : l.purpurConfig.nighttimeTicks);
1111
+ float rate = clockInstance.rate;
1212
+ clockInstance.rate *= incrementTicks;
1313
+ clockInstance.tick();

0 commit comments

Comments
 (0)