Skip to content

Commit

Permalink
fix: Fix Minecraft 1.19.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveplays28 committed Dec 1, 2023
1 parent 8ba1f74 commit 82f68f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
exclude(group: "net.fabricmc.fabric-api")
}

modImplementation include("fr.catcore:server-translations-api:${project.server_translation_api_version}")
modImplementation include("xyz.nucleoid:server-translations-api:${project.server_translation_api_version}")
}

processResources {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.10

# Mod Properties
Expand All @@ -14,7 +14,7 @@ archives_base_name=realisticsleep
supported_minecraft_version=1.19.x

# Dependencies
fabric_version=0.72.0+1.19.3
fabric_version=0.76.0+1.19.4
cloth_config_version=9.1.104
modmenu_version=5.1.0
server_translation_api_version=1.4.16+1.19
server_translation_api_version=2.0.0-beta.2+1.19.4-pre2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.entity.LightningEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.network.packet.s2c.play.WorldTimeUpdateS2CPacket;
import net.minecraft.registry.DynamicRegistryManager;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.MinecraftServer;
Expand Down Expand Up @@ -102,8 +103,11 @@ public abstract class ServerWorldMixin extends World implements ServerWorldExten
@Final
private static int MAX_TICKS;

protected ServerWorldMixin(MutableWorldProperties properties, RegistryKey<World> registryRef, RegistryEntry<DimensionType> dimension, Supplier<Profiler> profiler, boolean isClient, boolean debugWorld, long seed, int maxChainedNeighborUpdates) {
super(properties, registryRef, dimension, profiler, isClient, debugWorld, seed, maxChainedNeighborUpdates);
protected ServerWorldMixin(MutableWorldProperties properties, RegistryKey<World> registryRef, DynamicRegistryManager registryManager, RegistryEntry<DimensionType> dimensionEntry, Supplier<Profiler> profiler, boolean isClient, boolean debugWorld, long biomeAccess, int maxChainedNeighborUpdates) {
super(
properties, registryRef, registryManager, dimensionEntry, profiler, isClient, debugWorld, biomeAccess,
maxChainedNeighborUpdates
);
}

@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/GameRules;getInt(Lnet/minecraft/world/GameRules$Key;)I"))
Expand Down Expand Up @@ -373,7 +377,7 @@ private void tickChunkInject(WorldChunk chunk, int randomTickSpeed, CallbackInfo
);
var randomBlockInChunk = randomBlockStateInChunk.getBlock();
var biome = this.getBiome(randomPosInChunk).value();
var precipitation = biome.getPrecipitation();
var precipitation = biome.getPrecipitation(randomPosInChunk);

if (precipitation == Biome.Precipitation.RAIN && biome.isCold(randomPosInChunk)) {
precipitation = Biome.Precipitation.SNOW;
Expand Down

0 comments on commit 82f68f5

Please sign in to comment.