From 588b9f095aef7f7a2877a16f3cf7a8b5ff27d361 Mon Sep 17 00:00:00 2001 From: aws404 Date: Mon, 14 Jun 2021 15:16:50 +1000 Subject: [PATCH] Updated dependencies --- build.gradle | 2 +- gradle.properties | 8 ++++---- .../java/io/github/aws404/easypainter/EasyPainter.java | 4 +++- .../java/io/github/aws404/easypainter/PaintingItem.java | 2 -- .../java/io/github/aws404/easypainter/SelectionGui.java | 1 - .../aws404/easypainter/command/EasyPainterCommand.java | 3 --- .../github/aws404/easypainter/mixin/MapStateAccessor.java | 3 --- .../aws404/easypainter/mixin/PaintingEntityMixin.java | 2 +- .../easypainter/mixin/SeverResourceManagerMixin.java | 2 -- 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index beb4266..c47d252 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "0.8.12" + id "fabric-loom" version "0.8-SNAPSHOT" id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 5ec5dc8..9c4907e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,13 +3,13 @@ # Fabric Versions minecraft_version=1.17 - yarn_mappings=1.17+build.5 - loader_version=0.11.3 - fabric_version=0.34.9+1.17 + yarn_mappings=1.17+build.11 + loader_version=0.11.6 + fabric_version=0.35.1+1.17 # Dependency Versions sgui_version=1.0.0-pre0-1.17-pre1 - server_translations_version=1.4.2+1.17 + server_translations_version=1.4.4+1.17 # Mod Properties mod_version = 1.0.1 diff --git a/src/main/java/io/github/aws404/easypainter/EasyPainter.java b/src/main/java/io/github/aws404/easypainter/EasyPainter.java index 161811b..87b6cde 100644 --- a/src/main/java/io/github/aws404/easypainter/EasyPainter.java +++ b/src/main/java/io/github/aws404/easypainter/EasyPainter.java @@ -10,6 +10,7 @@ import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.fabricmc.fabric.api.tag.TagRegistry; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; @@ -22,7 +23,6 @@ import net.minecraft.tag.Tag; import net.minecraft.text.LiteralText; import net.minecraft.text.MutableText; -import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; import net.minecraft.util.Identifier; import net.minecraft.util.Util; @@ -49,6 +49,8 @@ public class EasyPainter implements ModInitializer { @Override public void onInitialize() { + LOGGER.info("Starting Easy Painter (Version {})", FabricLoader.getInstance().getModContainer("easy_painter").orElseThrow(() -> new IllegalStateException("initialising unloaded mod")).getMetadata().getVersion().getFriendlyString()); + CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> EasyPainterCommand.register(dispatcher)); ServerWorldEvents.LOAD.register((server, world) -> { diff --git a/src/main/java/io/github/aws404/easypainter/PaintingItem.java b/src/main/java/io/github/aws404/easypainter/PaintingItem.java index 7ec1954..14f3d93 100644 --- a/src/main/java/io/github/aws404/easypainter/PaintingItem.java +++ b/src/main/java/io/github/aws404/easypainter/PaintingItem.java @@ -1,8 +1,6 @@ package io.github.aws404.easypainter; -import fr.catcore.server.translations.api.ServerTranslations; import net.minecraft.entity.EntityType; -import net.minecraft.entity.LivingEntity; import net.minecraft.entity.decoration.AbstractDecorationEntity; import net.minecraft.entity.decoration.painting.PaintingEntity; import net.minecraft.entity.decoration.painting.PaintingMotive; diff --git a/src/main/java/io/github/aws404/easypainter/SelectionGui.java b/src/main/java/io/github/aws404/easypainter/SelectionGui.java index c3bf0f6..4c5c60b 100644 --- a/src/main/java/io/github/aws404/easypainter/SelectionGui.java +++ b/src/main/java/io/github/aws404/easypainter/SelectionGui.java @@ -14,7 +14,6 @@ import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; import net.minecraft.util.registry.Registry; -import org.apache.commons.lang3.StringUtils; import java.util.Comparator; import java.util.List; diff --git a/src/main/java/io/github/aws404/easypainter/command/EasyPainterCommand.java b/src/main/java/io/github/aws404/easypainter/command/EasyPainterCommand.java index 9bfc2eb..6951178 100644 --- a/src/main/java/io/github/aws404/easypainter/command/EasyPainterCommand.java +++ b/src/main/java/io/github/aws404/easypainter/command/EasyPainterCommand.java @@ -1,14 +1,11 @@ package io.github.aws404.easypainter.command; -import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import io.github.aws404.easypainter.custom.MotiveCacheState; -import net.minecraft.command.CommandException; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.server.command.SetBlockCommand; import net.minecraft.text.TranslatableText; import net.minecraft.util.Identifier; import net.minecraft.world.PersistentStateManager; diff --git a/src/main/java/io/github/aws404/easypainter/mixin/MapStateAccessor.java b/src/main/java/io/github/aws404/easypainter/mixin/MapStateAccessor.java index 005d742..84fd689 100644 --- a/src/main/java/io/github/aws404/easypainter/mixin/MapStateAccessor.java +++ b/src/main/java/io/github/aws404/easypainter/mixin/MapStateAccessor.java @@ -1,12 +1,9 @@ package io.github.aws404.easypainter.mixin; import net.minecraft.item.map.MapState; -import net.minecraft.util.registry.RegistryKey; -import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mutable; import org.spongepowered.asm.mixin.gen.Accessor; -import org.spongepowered.asm.mixin.gen.Invoker; @Mixin(MapState.class) public interface MapStateAccessor { diff --git a/src/main/java/io/github/aws404/easypainter/mixin/PaintingEntityMixin.java b/src/main/java/io/github/aws404/easypainter/mixin/PaintingEntityMixin.java index 0088fca..86744c8 100644 --- a/src/main/java/io/github/aws404/easypainter/mixin/PaintingEntityMixin.java +++ b/src/main/java/io/github/aws404/easypainter/mixin/PaintingEntityMixin.java @@ -117,7 +117,7 @@ public void tick() { @Inject(method = "readCustomDataFromNbt", at = @At("HEAD")) private void readCustomDataFromNbt(NbtCompound nbt, CallbackInfo ci) { - this.locked = nbt.getBoolean("locked"); + this.locked = nbt.contains("locked") && nbt.getBoolean("locked"); } @Inject(method = "writeCustomDataToNbt", at = @At("HEAD")) diff --git a/src/main/java/io/github/aws404/easypainter/mixin/SeverResourceManagerMixin.java b/src/main/java/io/github/aws404/easypainter/mixin/SeverResourceManagerMixin.java index de329b7..c69bb51 100644 --- a/src/main/java/io/github/aws404/easypainter/mixin/SeverResourceManagerMixin.java +++ b/src/main/java/io/github/aws404/easypainter/mixin/SeverResourceManagerMixin.java @@ -1,8 +1,6 @@ package io.github.aws404.easypainter.mixin; import io.github.aws404.easypainter.EasyPainter; -import net.minecraft.resource.ResourceManager; -import net.minecraft.resource.ResourcePack; import net.minecraft.resource.ServerResourceManager; import net.minecraft.server.command.CommandManager; import net.minecraft.util.Unit;