Skip to content

Commit

Permalink
Update to Minecraft 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed Jun 10, 2023
1 parent 00a4c2a commit cebeffd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ dependencies {
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation"net.fabricmc.fabric-api:fabric-game-rule-api-v1:${project.fabric_game_rule_v1_version}"
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.

Set<String> fabricApiModules = [
"fabric-game-rule-api-v1"
]
// Add each fabric api module as a compile only dependency
fabricApiModules.forEach {
modImplementation(fabricApi.module(it, "${project.fabric_version}"))
}
}

loom {
Expand All @@ -54,8 +57,7 @@ tasks.withType(JavaCompile).configureEach {
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
it.options.release = 17
}

java {
Expand Down
12 changes: 5 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
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
loader_version=0.14.14
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.21
# Dependencies
fabric_version=0.83.0+1.20
# Mod Properties
mod_version=1.5.0
maven_group=_2no2name
archives_base_name=Worldthreader
# Dependencies
# check this on https://modmuss50.me/fabric.html
#fabric_version=0.44.0+1.18
fabric_game_rule_v1_version=1.0.19+1899036192

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ItemEntityMixin(EntityType<?> type, World world) {

@Override
public void onArrivedInWorld() {
if (!this.world.isClient) {
if (!this.getWorld().isClient) {
this.tryMerge();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import _2no2name.worldthreader.common.ServerWorldTicking;
import _2no2name.worldthreader.common.mixin_support.interfaces.MinecraftServerExtended;
import net.minecraft.registry.DynamicRegistryManager;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.MinecraftServer;
Expand All @@ -20,8 +21,8 @@
@Mixin(ServerWorld.class)
public abstract class ServerWorldMixin extends World {

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);
}

@Shadow
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 @@ -17,6 +17,6 @@
"accessWidener": "worldthreader.accesswidener",
"depends": {
"fabricloader": ">=0.12.8",
"minecraft": "1.19.3"
"minecraft": "1.20"
}
}

0 comments on commit cebeffd

Please sign in to comment.