Skip to content

Commit

Permalink
Update to 1.18
Browse files Browse the repository at this point in the history
Disable origins and trinkets compat until updated
  • Loading branch information
PotatoPresident committed Nov 27, 2021
1 parent 3ba95f3 commit d8c33ac
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
14 changes: 6 additions & 8 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 @@ -23,8 +23,8 @@ repositories {
maven { url 'https://jitpack.io' }
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version + "-" + project.minecraft_version + "+"
Expand All @@ -43,18 +43,20 @@ dependencies {
// You may need to force-disable transitiveness on them.
modImplementation include("eu.pb4:sgui:${project.sgui_version}")

/*
modImplementation "com.github.emilyalexandra:trinkets:main-SNAPSHOT"
modImplementation "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-base:3.0.0"
modImplementation "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-entity:3.0.0"
modImplementation ("com.github.apace100:origins-fabric:${project.origins_version}") {
exclude group: "com.terraformersmc"
}
*/

modImplementation "me.lucko:fabric-permissions-api:0.1-SNAPSHOT"
include "me.lucko:fabric-permissions-api:0.1-SNAPSHOT"

compileOnly 'net.luckperms:api:5.2'
compileOnly 'net.luckperms:api:5.3'
}

processResources {
Expand Down Expand Up @@ -83,10 +85,6 @@ jar {
from "LICENSE"
}

loom {
accessWidener "src/main/resources/invview.accesswidener"
}

// configure the maven publication
publishing {
publications {
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
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.10
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.4.6
mod_version=1.4.7
maven_group=us.potatoboy
archives_base_name=InvView
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.36.1+1.17
fabric_version=0.43.1+1.18
trinkets_version=3.0.0
origins_version=v1.0.2
sgui_version=1.0.0-rc4+1.17.1
origins_version=v1.0.3
sgui_version=1.0.0-rc6+1.18-pre5
4 changes: 4 additions & 0 deletions src/main/java/us/potatoboy/invview/InvView.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void onInitialize() {
.executes(ViewCommand::eChest))
.build();

/*
LiteralCommandNode<ServerCommandSource> trinketNode = CommandManager
.literal("trinket")
.requires(Permissions.require("invview.command.trinket", 2))
Expand All @@ -65,17 +66,20 @@ public void onInitialize() {
.then(CommandManager.argument("target", GameProfileArgumentType.gameProfile())
.executes(ViewCommand::origin))
.build();
*/


dispatcher.getRoot().addChild(viewNode);
viewNode.addChild(invNode);
viewNode.addChild(echestNode);
/*
if (isTrinkets) {
viewNode.addChild(trinketNode);
}
if (isOrigins) {
viewNode.addChild(originNode);
}
*/
});

ServerLifecycleEvents.SERVER_STARTING.register(this::onLogicalServerStarting);
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/us/potatoboy/invview/ViewCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.serialization.Dynamic;
import dev.emi.trinkets.api.TrinketComponent;
import dev.emi.trinkets.api.TrinketInventory;
import dev.emi.trinkets.api.TrinketsApi;
import eu.pb4.sgui.api.gui.SimpleGui;
import io.github.apace100.apoli.component.PowerHolderComponent;
import io.github.apace100.apoli.power.InventoryPower;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.cacheddata.CachedPermissionData;
import net.luckperms.api.util.Tristate;
Expand All @@ -27,8 +22,6 @@
import net.minecraft.world.dimension.DimensionType;
import us.potatoboy.invview.gui.SavingPlayerDataGui;

import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

public class ViewCommand {
Expand Down Expand Up @@ -77,6 +70,7 @@ public static int eChest(CommandContext<ServerCommandSource> context) throws Com
return 1;
}

/*
public static int trinkets(CommandContext<ServerCommandSource> context) throws CommandSyntaxException {
ServerPlayerEntity player = context.getSource().getPlayer();
ServerPlayerEntity requestedPlayer = getRequestedPlayer(context);
Expand Down Expand Up @@ -134,6 +128,7 @@ public static int origin(CommandContext<ServerCommandSource> context) throws Com
return 1;
}
*/

private static ServerPlayerEntity getRequestedPlayer(CommandContext<ServerCommandSource> context) throws CommandSyntaxException {
GameProfile requestedProfile = GameProfileArgumentType.getProfileArgument(context, "target").iterator().next();
Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"depends": {
"fabricloader": ">=0.7.2",
"fabric": "*",
"minecraft": ">=1.17.1"
},
"accessWidener": "invview.accesswidener"
"minecraft": "1.18.x"
}
}
3 changes: 0 additions & 3 deletions src/main/resources/invview.accesswidener

This file was deleted.

0 comments on commit d8c33ac

Please sign in to comment.