Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'fabric-loom' version '1.1-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
version = "${project.mod_version}-mc${project.minecraft_version}"
group = project.maven_group

dependencies {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
# Mod Properties
mod_version=1.3.2
maven_group=me.techchrism
archives_base_name=ticktock
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.48.0+1.18.2
fabric_version=0.89.0+1.20.1
7 changes: 5 additions & 2 deletions src/main/java/me/techchrism/ticktock/Ticktock.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ private void tick(ServerWorld world)
Profiler profiler = world.getProfiler();
int startX = chunk.getPos().getStartX();
int startZ = chunk.getPos().getStartZ();
for(ChunkSection chunkSection : chunk.getSectionArray())
int bottomY = chunk.getBottomY();
ChunkSection[] chunkSections = chunk.getSectionArray();
for (int i = 0; i < chunkSections.length; i++)
{
ChunkSection chunkSection = chunkSections[i];
if(chunkSection != null && chunkSection.hasRandomTicks())
{
int yOffset = chunkSection.getYOffset();
int yOffset = bottomY + i * 16;
for(int m = 0; m < randomTickSpeed; m++)
{
BlockPos randomPosInChunk = world.getRandomPosInChunk(startX, yOffset, startZ, 15);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"depends": {
"fabricloader": ">=0.10.1+build.209",
"fabric": "*",
"minecraft": "1.18.2"
"minecraft": ">=1.20.1"
},
"mixins": [
"ticktock.mixins.json"
Expand Down