Skip to content

Commit

Permalink
Update for 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
AlurienFlame committed Jul 25, 2024
1 parent 00d8224 commit ea2a142
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# gradle
remappedSrc/

# gradle
.gradle/
build/
out/
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -27,16 +27,16 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 21
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.21
minecraft_version=1.21
yarn_mappings=1.21+build.9
loader_version=0.15.11

# Mod Properties
mod_version=1.0.8
mod_version=1.0.9
maven_group=net.torchkey
archives_base_name=torchkey

# Dependencies
fabric_version=0.83.0+1.20
fabric_version=0.100.7+1.21
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions src/main/java/net/torchkey/Torchkey.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public void onInitializeClient() {

// TODO: Find a more reliable/extensible way of detecting item type
private void placeTorch(MinecraftClient client) {
PlayerInventory inv = client.player.getInventory();

PlayerInventory inv = client.player.getInventory();
// Find target
HitResult target = client.crosshairTarget;
if (target.getType() != HitResult.Type.BLOCK) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/torchkey/TorchkeyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TorchkeyConfig {
static Path configDir = FabricLoader.getInstance().getConfigDir();
static Path configPath = configDir.resolve(configFilename);
static File configFile = configPath.toFile();
static String defaultConfig = "{\"validTorches\": [\"torch\", \"redstone_torch\", \"stone_torch\", \"soul_torch\"]}";
static String defaultConfig = "{\"validTorches\": [\"minecraft:torch\", \"minecraft:redstone_torch\", \"minecraft:stone_torch\", \"minecraft:soul_torch\"]}";

public TorchkeyConfig() {
if (!Files.exists(configPath)) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "torchkey",
"version": "1.0.8",
"version": "1.0.9",

"name": "Torchkey",
"description": "Adds a hotkey to place a torch from your hotbar.",
Expand All @@ -27,9 +27,9 @@
],

"depends": {
"fabricloader": ">=0.11.3",
"fabricloader": ">=0.15.11",
"fabric": "*",
"minecraft": "1.20.*",
"minecraft": ">=1.21",
"java": ">=17"
},
"suggests": {
Expand Down

0 comments on commit ea2a142

Please sign in to comment.