From 2d82d080b70b8bae15a5f38037eced6adaf271f2 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sun, 31 Mar 2024 17:47:30 -0400 Subject: [PATCH] General cleanup --- build.gradle | 9 +-------- .../java/dev/ithundxr/railwaystweaks/RailwaysTweaks.java | 5 +++++ .../mixin/createdeco/CatwalkRailingBlockMixin.java | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index ccd0395..ae9a2ed 100644 --- a/build.gradle +++ b/build.gradle @@ -57,10 +57,6 @@ processResources { def targetJavaVersion = 17 tasks.withType(JavaCompile).configureEach { - // ensure that the encoding is set to UTF-8, no matter what the system default is - // this fixes some edge cases with special characters not displaying correctly - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html - // If Javadoc is generated, this must be specified in that task too. it.options.encoding = "UTF-8" if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { it.options.release.set(targetJavaVersion) @@ -72,14 +68,11 @@ java { if (JavaVersion.current() < javaVersion) { toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) } - // 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() } jar { from("LICENSE") { - rename { "${it}_${project.archivesBaseName}"} + rename { "${it}_${archives_base_name}"} } } diff --git a/src/main/java/dev/ithundxr/railwaystweaks/RailwaysTweaks.java b/src/main/java/dev/ithundxr/railwaystweaks/RailwaysTweaks.java index 7a3031e..3f11eb7 100644 --- a/src/main/java/dev/ithundxr/railwaystweaks/RailwaysTweaks.java +++ b/src/main/java/dev/ithundxr/railwaystweaks/RailwaysTweaks.java @@ -1,8 +1,10 @@ package dev.ithundxr.railwaystweaks; import net.fabricmc.api.ModInitializer; +import net.fabricmc.loader.api.FabricLoader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.spongepowered.asm.mixin.MixinEnvironment; public class RailwaysTweaks implements ModInitializer { public static final String MODID = "railwaystweaks"; @@ -11,5 +13,8 @@ public class RailwaysTweaks implements ModInitializer { @Override public void onInitialize() { LOGGER.info("Railways Tweaks is loading..."); + + if (FabricLoader.getInstance().isDevelopmentEnvironment()) + MixinEnvironment.getCurrentEnvironment().audit(); } } diff --git a/src/main/java/dev/ithundxr/railwaystweaks/mixin/createdeco/CatwalkRailingBlockMixin.java b/src/main/java/dev/ithundxr/railwaystweaks/mixin/createdeco/CatwalkRailingBlockMixin.java index be73bec..b1204b5 100644 --- a/src/main/java/dev/ithundxr/railwaystweaks/mixin/createdeco/CatwalkRailingBlockMixin.java +++ b/src/main/java/dev/ithundxr/railwaystweaks/mixin/createdeco/CatwalkRailingBlockMixin.java @@ -9,7 +9,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.Vec3; @@ -19,7 +18,7 @@ import org.spongepowered.asm.mixin.Shadow; @Mixin(CatwalkRailingBlock.class) -public abstract class CatwalkRailingBlockMixin implements IWrenchable { +public class CatwalkRailingBlockMixin implements IWrenchable { @Shadow public static BooleanProperty fromDirection(Direction face) { throw new AssertionError(); } @Shadow @Final public static BooleanProperty EAST_FENCE;