Skip to content

Commit

Permalink
Update to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
PotatoPresident committed Nov 27, 2021
1 parent dda0f76 commit 7e9e8c3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk 16
- name: setup jdk 17
uses: actions/setup-java@v1
with:
java-version: 16
java-version: 17
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.10.+'
id 'maven-publish'
}

Expand All @@ -8,8 +8,8 @@ repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.14
loader_version=0.11.6
minecraft_version=1.18-rc3
yarn_mappings=1.18-rc3+build.1
loader_version=0.12.5
# Mod Properties
mod_version=1.1.3
mod_version=1.1.4
maven_group=us.potatoboy
archives_base_name=htm
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.37.0+1.17
translation_version=1.4.3+1.17
fabric_version=0.43.1+1.18
translation_version=1.4.8+1.18-pre1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.github.fabricservertools.htm.api.LockType;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import org.jetbrains.annotations.Nullable;

import java.util.HashSet;
import java.util.Optional;
Expand Down Expand Up @@ -35,7 +34,7 @@ public static String getLockId(LockType<?> lockType) {
return id == null ? "ERROR" : id;
}

public static @Nullable Optional<Lock> getLock(String name) {
public static Optional<Lock> getLock(String name) {
LockType<?> lockType = lockTypes.get(name);
return Optional.ofNullable(lockType.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void execute(ServerPlayerEntity player, World world, BlockPos pos, HTMCon
return;
}

Optional<GameProfile> owner = player.getServerWorld().getServer().getUserCache().getByUuid(lock.getOwner());
Optional<GameProfile> owner = player.server.getUserCache().getByUuid(lock.getOwner());

if (owner.isEmpty()) {
HTM.LOGGER.error("Can't find lock owner: " + lock.getOwner());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void execute(ServerPlayerEntity player, World world, BlockPos pos)
}

public static HTMContainerLock getLock(ServerPlayerEntity player, BlockPos pos) {
HTMContainerLock lock = getLock(player.getServerWorld(), pos);
HTMContainerLock lock = getLock(player.getWorld(), pos);
if (lock == null) {
player.sendMessage(new TranslatableText("text.htm.error.unlockable"), false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ private void init(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockSt
}

@Inject(method = "writeNbt", at = @At("HEAD"))
private void toTag(NbtCompound tag, CallbackInfoReturnable<NbtCompound> cir) {
htmContainerLock.toTag(tag);
private void toTag(NbtCompound nbt, CallbackInfo ci) {
htmContainerLock.toTag(nbt);
}

@Inject(method = "readNbt", at = @At("HEAD"))
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"htm.mixins.json"
],
"depends": {
"fabricloader": ">=0.10.8",
"fabricloader": ">=0.12.3",
"fabric": "*",
"minecraft": "1.17.x"
"minecraft": "1.18.x"
}
}

0 comments on commit 7e9e8c3

Please sign in to comment.