Skip to content

Commit

Permalink
chore: Fix #54
Browse files Browse the repository at this point in the history
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
  • Loading branch information
Awakened-Redstone authored and Gegy committed Jul 21, 2024
1 parent 1aa9762 commit f41cc37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/xyz/nucleoid/fantasy/RuntimeWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.util.ProgressListener;
import net.minecraft.util.Util;
import net.minecraft.util.math.random.RandomSequencesState;
import net.minecraft.world.GameRules;
import net.minecraft.world.World;
import net.minecraft.world.biome.source.BiomeAccess;
import net.minecraft.world.dimension.DimensionOptions;
Expand Down Expand Up @@ -61,6 +62,15 @@ public void save(@Nullable ProgressListener progressListener, boolean flush, boo
}
}

@Override
protected void tickTime() {
if (this.shouldTickTime) {
if (this.properties.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) {
this.setTimeOfDay(this.properties.getTimeOfDay() + 1L);
}
}
}

@Override
public boolean isFlat() {
return this.flat;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/fantasy.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ accessWidener v1 named
accessible class net/minecraft/server/world/ServerChunkLoadingManager$EntityTracker

accessible field net/minecraft/world/GameRules$IntRule value I
accessible field net/minecraft/server/world/ServerWorld shouldTickTime Z

0 comments on commit f41cc37

Please sign in to comment.