Skip to content

Commit

Permalink
Merge pull request #5 from rotgruengelb/1.20.2
Browse files Browse the repository at this point in the history
1.20.2 Features Port
  • Loading branch information
rotgruengelb committed Nov 4, 2023
2 parents 8d9ba0f + 137a8fe commit c7ccb1b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ allprojects {
def ENV = System.getenv()
def publishType = System.getenv("PUBLISH_TYPE")

version = "${project.mod_version}+${rootProject.mod_minecraft_base_version}"
version = "${project.mod_version}+${project.mod_minecraft_base_version}"

if (publishType == "SNAPSHOT") {
version = "${project.mod_version}+${rootProject.mod_minecraft_base_version}-SNAPSHOT"
Expand All @@ -27,11 +27,17 @@ allprojects {
options.compilerArgs << "-Xlint:unchecked"
}

repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}"
include(modImplementation("net.fabricmc.fabric-api:fabric-command-api-v2:${project.fabric_command_api_version}"))
include(modImplementation(fabricApi.module("fabric-api-base", project.fabric_version)))
include(modImplementation(fabricApi.module("fabric-command-api-v2", project.fabric_version)))
include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT'))
}

processResources {
Expand Down
15 changes: 7 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx3G
org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.22
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.24

# Mod Properties
mod_version=2.0.1
mod_minecraft_base_version=1.20.X
mod_version=2.0.2
mod_minecraft_base_version=1.20.2

# Maven/Publishing
maven_group=net.rotgruengelb
archives_base_name=quirl

# Dependencies
# fabric_version=0.83.0+1.20
fabric_command_api_version=2.2.9+fb8d95da7d
fabric_version=0.90.7+1.20.2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.rotgruengelb.quirl.internal.command;

import com.mojang.brigadier.arguments.FloatArgumentType;
import me.lucko.fabric.api.permissions.v0.Permissions;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.minecraft.command.argument.EntityArgumentType;
import net.minecraft.server.command.CommandManager;
Expand All @@ -12,7 +13,7 @@ public static void registerModCommandNodes() {

var floatArgType = FloatArgumentType.floatArg();

var velocityNode = CommandManager.literal("velocity").build();
var velocityNode = CommandManager.literal("velocity").requires(Permissions.require("quirl.command.velocity", 2)).build();

var targetsArg = CommandManager.argument("targets", EntityArgumentType.entities()).build();

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 @@ -23,7 +23,7 @@
],
"depends": {
"fabricloader": ">=0.14.22",
"minecraft": "1.20.X",
"minecraft": "1.20.2",
"java": ">=17"
}
}

0 comments on commit c7ccb1b

Please sign in to comment.