generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
night skip acceleration changes/more code cleanup
- Loading branch information
Showing
10 changed files
with
97 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
src/main/java/ru/aiefu/timeandwindct/mixin/SleepManagerMixins.java
This file was deleted.
Oops, something went wrong.
11 changes: 8 additions & 3 deletions
11
src/main/java/ru/aiefu/timeandwindct/tickers/DefaultTicker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package ru.aiefu.timeandwindct.tickers; | ||
|
||
import net.minecraft.world.level.Level; | ||
import ru.aiefu.timeandwindct.ITimeOperations; | ||
|
||
public class DefaultTicker implements Ticker{ | ||
|
||
@Override | ||
public void tick(ITimeOperations world, boolean nskip, int acceleration) { | ||
if(nskip) world.time_and_wind_custom_ticker$setTimeOfDayTAW(world.time_and_wind_custom_ticker$getTimeOfDayTAW() + acceleration); | ||
else world.time_and_wind_custom_ticker$setTimeOfDayTAW(world.time_and_wind_custom_ticker$getTimeOfDayTAW() + 1L); | ||
public void tick(ITimeOperations world) { | ||
world.time_and_wind_custom_ticker$setTimeOfDayTAW(world.time_and_wind_custom_ticker$getTimeOfDayTAW() + 1L); | ||
} | ||
|
||
@Override | ||
public void accelerate(Level level, int speed) { | ||
((ITimeOperations)level).time_and_wind_custom_ticker$setTimeOfDayTAW(((ITimeOperations) level).time_and_wind_custom_ticker$getTimeOfDayTAW() + speed); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package ru.aiefu.timeandwindct.tickers; | ||
|
||
import net.minecraft.world.level.Level; | ||
import ru.aiefu.timeandwindct.ITimeOperations; | ||
|
||
public interface Ticker { | ||
void tick(ITimeOperations world, boolean nskip, int acceleration); | ||
void tick(ITimeOperations world); | ||
void accelerate(Level level, int speed); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.