fix server crash

This commit is contained in:
Robin 2024-07-07 15:02:54 +02:00
parent 73e0284107
commit 0b8e03a10f
4 changed files with 6 additions and 5 deletions

View File

@ -6,7 +6,7 @@ plugins {
idea
`maven-publish`
id("io.freefair.lombok") version "8.6"
id ("net.neoforged.gradle.userdev") version ("7.0.152")
id ("net.neoforged.gradle.userdev") version ("7.0.153")
id("com.diffplug.spotless") version "7.0.0.BETA1"
id("com.palantir.git-version") version "3.1.0"
}
@ -48,7 +48,7 @@ val details = versionDetails()
val snapshot = "-SNAPSHOT"
val subversion = ".${details.commitDistance}"
val noTag = !details.lastTag.contains(Regex("""\d+\.\d+"""))
val end = if (noTag) snapshot else "${details.commitDistance}${snapshot}"
val end = if (noTag) snapshot else ".${details.commitDistance}${snapshot}"
val modVersion: String = "${details.lastTag}${if (details.commitDistance > 0 || noTag) end else ""}"
val release = details.commitDistance == 0 && !noTag

View File

@ -12,7 +12,7 @@ minecraftVersion=1.21.0
# as they do not follow standard versioning conventions.
minecraftVersionRange=[1.21.0,1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact
neoVersion=21.0.42-beta
neoVersion=21.0.65-beta
# The Neo version range can use any version of Neo as bounds
neoVersionRange=[21,)
# The loader version range can only use the major version of FML as bounds

View File

@ -16,6 +16,7 @@
*/
package xyz.robaertschi.environmenttech.client;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
@ -35,7 +36,7 @@ import xyz.robaertschi.environmenttech.level.item.ETItems;
import xyz.robaertschi.environmenttech.level.particle.ETParticles;
import xyz.robaertschi.environmenttech.menu.ETMenus;
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD)
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, modid = ET.MODID, value = Dist.CLIENT)
public class ETClient {
@SubscribeEvent

View File

@ -40,7 +40,7 @@ public class ETChunkEvents {
return;
}
int random = event.getLevel().getRandom().nextIntBetweenInclusive(Config.minEnvForNewChunk, Config.maxEnvForNewChunk);
log.debug("New Chunk at pos {}, set random to {}", event.getChunk().getPos(), random);
// log.debug("New Chunk at pos {}, set random to {}", event.getChunk().getPos(), random);
event.getChunk().setData(ETAttachments.ENV, (long)random);
} else if (!event.getChunk().hasData(ETAttachments.ENV)) {
int random = event.getLevel().getRandom().nextIntBetweenInclusive(Config.minEnvForNewChunk, Config.maxEnvForNewChunk);