diff --git a/build.gradle b/build.gradle index cf54aff..75247e5 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ architectury { } group = maven_group -version = "${mod_version}+mc1.19.2" +version = "${mod_version}+mc1.18.2" subprojects { apply plugin: "dev.architectury.loom" diff --git a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/ModConfig.java b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/ModConfig.java index ad7dfe6..0fc7034 100644 --- a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/ModConfig.java +++ b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/ModConfig.java @@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import java.io.IOException; @@ -75,10 +76,10 @@ private static ModConfig loadConfig() { public static Screen createConfigScreen(Screen parent) { var builder = ConfigBuilder.create() .setParentScreen(parent) - .setTitle(Component.translatable("title.create_train_perspective.config")) + .setTitle(new TranslatableComponent("title.create_train_perspective.config")) .setSavingRunnable(INSTANCE::save); - var general = builder.getOrCreateCategory(Component.translatable( + var general = builder.getOrCreateCategory(new TranslatableComponent( "category.create_train_perspective.general" )); @@ -86,104 +87,104 @@ public static Screen createConfigScreen(Screen parent) { general.addEntry(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.enabled"), + new TranslatableComponent("option.create_train_perspective.enabled"), INSTANCE.enabled) - .setTooltip(Component.translatable("option.create_train_perspective.enabled.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.enabled.tooltip")) .setSaveConsumer(value -> INSTANCE.enabled = value) .setDefaultValue(true) .build()); - var leaning = entryBuilder.startSubCategory(Component.translatable( + var leaning = entryBuilder.startSubCategory(new TranslatableComponent( "category.create_train_perspective.leaning" )); leaning.add(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.leaning.enabled"), + new TranslatableComponent("option.create_train_perspective.leaning.enabled"), INSTANCE.leanEnabled) - .setTooltip(Component.translatable("option.create_train_perspective.leaning.enabled.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.leaning.enabled.tooltip")) .setSaveConsumer(value -> INSTANCE.leanEnabled = value) .setDefaultValue(true) .build()); leaning.add(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.leaning.roll_enabled"), + new TranslatableComponent("option.create_train_perspective.leaning.roll_enabled"), INSTANCE.rollEnabled) - .setTooltip(Component.translatable("option.create_train_perspective.leaning.roll_enabled.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.leaning.roll_enabled.tooltip")) .setSaveConsumer(value -> INSTANCE.rollEnabled = value) .setDefaultValue(true) .build()); general.addEntry(leaning.build()); - var multiplayer = entryBuilder.startSubCategory(Component.translatable( + var multiplayer = entryBuilder.startSubCategory(new TranslatableComponent( "category.create_train_perspective.multiplayer" )); multiplayer.add(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.multiplayer.apply_to_others"), + new TranslatableComponent("option.create_train_perspective.multiplayer.apply_to_others"), INSTANCE.applyToOthers) - .setTooltip(Component.translatable("option.create_train_perspective.multiplayer.apply_to_others.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.multiplayer.apply_to_others.tooltip")) .setSaveConsumer(value -> INSTANCE.applyToOthers = value) .setDefaultValue(true) .build()); general.addEntry(multiplayer.build()); - var advanced = entryBuilder.startSubCategory(Component.translatable( + var advanced = entryBuilder.startSubCategory(new TranslatableComponent( "category.create_train_perspective.advanced" )); advanced.add(entryBuilder .startFloatField( - Component.translatable("option.create_train_perspective.advanced.lean_magnitude"), + new TranslatableComponent("option.create_train_perspective.advanced.lean_magnitude"), INSTANCE.leanMagnitude) - .setTooltip(Component.translatable("option.create_train_perspective.advanced.lean_magnitude.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.advanced.lean_magnitude.tooltip")) .setSaveConsumer(value -> INSTANCE.leanMagnitude = value) .setDefaultValue(1.0f) .build()); advanced.add(entryBuilder .startFloatField( - Component.translatable("option.create_train_perspective.advanced.roll_magnitude"), + new TranslatableComponent("option.create_train_perspective.advanced.roll_magnitude"), INSTANCE.rollMagnitude) - .setTooltip(Component.translatable("option.create_train_perspective.advanced.roll_magnitude.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.advanced.roll_magnitude.tooltip")) .setSaveConsumer(value -> INSTANCE.rollMagnitude = value) .setDefaultValue(1.0f) .build()); advanced.add(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.advanced.apply_to_entities"), + new TranslatableComponent("option.create_train_perspective.advanced.apply_to_entities"), INSTANCE.applyToNonPlayerEntities) - .setTooltip(Component.translatable("option.create_train_perspective.advanced.apply_to_entities.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.advanced.apply_to_entities.tooltip")) .setSaveConsumer(value -> INSTANCE.applyToNonPlayerEntities = value) .setDefaultValue(true) .build()); advanced.add(entryBuilder .startStrList( - Component.translatable("option.create_train_perspective.advanced.blocked_entities"), + new TranslatableComponent("option.create_train_perspective.advanced.blocked_entities"), INSTANCE.blockedEntities.stream().map(ResourceLocation::toString).toList()) - .setTooltip(Component.translatable("option.create_train_perspective.advanced.blocked_entities.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.advanced.blocked_entities.tooltip")) .setSaveConsumer(value -> INSTANCE.blockedEntities = value.stream().map(ResourceLocation::new).toList()) .setDefaultValue(new ArrayList<>()) .build()); - var debug = entryBuilder.startSubCategory(Component.translatable("category.create_train_perspective.debug")); + var debug = entryBuilder.startSubCategory(new TranslatableComponent("category.create_train_perspective.debug")); debug.add(entryBuilder - .startTextDescription(Component.translatable("category.create_train_perspective.debug.description").withStyle(ChatFormatting.BOLD)) + .startTextDescription(new TranslatableComponent("category.create_train_perspective.debug.description").withStyle(ChatFormatting.BOLD)) .build()); debug.add(entryBuilder .startBooleanToggle( - Component.translatable("option.create_train_perspective.debug.standing_transforms"), + new TranslatableComponent("option.create_train_perspective.debug.standing_transforms"), INSTANCE.dbgShowStandingTransforms) .setSaveConsumer(value -> INSTANCE.dbgShowStandingTransforms = value) - .setTooltip(Component.translatable("option.create_train_perspective.debug.standing_transforms.tooltip")) + .setTooltip(new TranslatableComponent("option.create_train_perspective.debug.standing_transforms.tooltip")) .setDefaultValue(false) .build()); diff --git a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java index 4ca33d4..0b1fada 100644 --- a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java +++ b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/mixin/CameraMixin.java @@ -8,6 +8,7 @@ import net.minecraft.client.Camera; import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.BlockGetter; @@ -101,7 +102,7 @@ public void modifyPosition(Camera instance, var newV = MixinUtil.applyStandingCameraTranslation(clientPlayer, x, y, z, persp, f); if (ModConfig.INSTANCE.dbgShowStandingTransforms) { - clientPlayer.displayClientMessage(Component.literal("%f, %f, %f".formatted(x - newV.x, y - newV.y, z - newV.z)), true); + clientPlayer.displayClientMessage(new TextComponent("%f, %f, %f".formatted(x - newV.x, y - newV.y, z - newV.z)), true); } setPosition(newV.x, newV.y, newV.z); diff --git a/fabric/gradle.properties b/fabric/gradle.properties index 6a83fa7..bf8ebd3 100644 --- a/fabric/gradle.properties +++ b/fabric/gradle.properties @@ -1,3 +1,3 @@ loom.platform=fabric -create_version=0.5.1-f-build.1416+mc1.19.2 +create_version=0.5.1-f-build.1333+mc1.18.2 flywheel_version=0.6.10-2 diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 7d1dab3..dc2ae80 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -34,24 +34,29 @@ "depends": { "architectury": "*", "create": [ - "0.5.0.f-776+1.19.2", - "0.5.0.g-791+1.19.2", - "0.5.0.g-796+1.19.2", - "0.5.0.i-925+1.19.2", - "0.5.0.i-946+1.19.2", - "0.5.0.i-961+1.19.2", - "0.5.0.i-989+1.19.2", - "0.5.0.i-991+1.19.2", - "0.5.0.i-1003+1.19.2", - "0.5.0.i-1017+1.19.2", - "0.5.1-b-build.1075+mc1.19.2", - "0.5.1-b-build.1079+mc1.19.2", - "0.5.1-b-build.1089+mc1.19.2", - "0.5.1-c-build.1160+mc1.19.2", - "0.5.1-f-build.1334+mc1.19.2", - "0.5.1-f-build.1416+mc1.19.2" + "0.5.0.c-708+1.18.2", + "0.5.0.d-728+1.18.2", + "0.5.0.d-730+1.18.2", + "0.5.0.d-731+1.18.2", + "0.5.0.e-733+1.18.2", + "0.5.0.g-788+1.18.2", + "0.5.0.g-792+1.18.2", + "0.5.0.i-921+1.18.2", + "0.5.0.i-944+1.18.2", + "0.5.0.i-960+1.18.2", + "0.5.0.i-963+1.18.2", + "0.5.0.i-979+1.18.2", + "0.5.0.i-988+1.18.2", + "0.5.0.i-1002+1.18.2", + "0.5.0.i-1016+1.18.2", + "0.5.1-b-build.1070+mc1.18.2", + "0.5.1-b-build.1078+mc1.18.2", + "0.5.1-b-build.1088+mc1.18.2", + "0.5.1-c-build.1159+mc1.18.2", + "0.5.1-f-build.1333+mc1.18.2", + "0.5.1-f-build.1415+mc1.18.2" ], - "minecraft": "1.19.2", - "cloth-config": ">=8" + "minecraft": "1.18.2", + "cloth-config": ">=6" } } \ No newline at end of file diff --git a/forge/src/main/java/net/derfruhling/minecraft/create/trainperspective/forge/ModForgeEntrypoint.java b/forge/src/main/java/net/derfruhling/minecraft/create/trainperspective/forge/ModForgeEntrypoint.java index 10ed3d2..70c49f6 100644 --- a/forge/src/main/java/net/derfruhling/minecraft/create/trainperspective/forge/ModForgeEntrypoint.java +++ b/forge/src/main/java/net/derfruhling/minecraft/create/trainperspective/forge/ModForgeEntrypoint.java @@ -2,10 +2,7 @@ import dev.architectury.platform.forge.EventBuses; import net.derfruhling.minecraft.create.trainperspective.CreateTrainPerspectiveMod; -import net.derfruhling.minecraft.create.trainperspective.ModConfig; -import net.minecraftforge.client.ConfigScreenHandler; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @@ -16,8 +13,8 @@ public class ModForgeEntrypoint { public ModForgeEntrypoint() { MinecraftForge.EVENT_BUS.addListener(this::onClientSetupEvent); - ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> - new ConfigScreenHandler.ConfigScreenFactory((minecraft, screen) -> ModConfig.createConfigScreen(screen))); + /*ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> + new ConfigScreenHandler.ConfigScreenFactory((minecraft, screen) -> ModConfig.createConfigScreen(screen)));*/ } private void onClientSetupEvent(FMLClientSetupEvent event) { diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 30d6835..b52d442 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -6,7 +6,7 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader = "javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[43,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. license = "MIT" @@ -50,7 +50,7 @@ Moves your camera (and body!) with the Create Mod train you're riding to increas # Does this dependency have to exist - if not, ordering below must be specified mandatory=true #mandatory # The version range of the dependency - versionRange="[43,)" #mandatory + versionRange="[40,)" #mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory # BEFORE - This mod is loaded BEFORE the dependency # AFTER - This mod is loaded AFTER the dependency @@ -61,7 +61,7 @@ Moves your camera (and body!) with the Create Mod train you're riding to increas modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version - versionRange="[1.19,1.20)" + versionRange="[1.18,1.19)" ordering="NONE" side="BOTH" [[dependencies."${mod_id}"]] @@ -73,18 +73,12 @@ Moves your camera (and body!) with the Create Mod train you're riding to increas [[dependencies."${mod_id}"]] modId="architectury" mandatory=true - versionRange="[6,)" + versionRange="[4,)" ordering="NONE" side="BOTH" [[dependencies."${mod_id}"]] modId="cloth_config" mandatory=true - versionRange="[8.0.0,)" + versionRange="[6.2,)" ordering="NONE" side="BOTH" -[[dependencies."${mod_id}"]] -modId = "cloth_config" -mandatory = true -versionRange = "[8.0.0,)" -ordering = "NONE" -side = "BOTH" diff --git a/gradle.properties b/gradle.properties index c49a57c..309d289 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,27 +1,27 @@ org.gradle.jvmargs=-Xmx3G # minecraft & architectury versions -minecraft_version=1.19.2 -architectury_version=6.6.92 +minecraft_version=1.18.2 +architectury_version=4.12.94 enabled_platforms=fabric,forge # forge -forge_version=1.19.2-43.3.0 +forge_version=1.18.2-40.2.21 # fabric fabric_loader_version=0.15.7 -fabric_api_version=0.77.0+1.19.2 +fabric_api_version=0.77.0+1.18.2 # public info mod_id=create_train_perspective mod_version=0.5.0 maven_group=net.derfruhling.minecraft archives_base_name=create-train-perspective # mod dependency versions -create_minecraft_version = 1.19.2 -flywheel_minecraft_version = 1.19.2 -create_version = 0.5.1.f-46 -flywheel_version = 0.6.10-20 -registrate_version = MC1.19-1.1.5 -cloth_config_version=8.3.115 -mod_menu_version=4.1.2 +create_minecraft_version = 1.18.2 +flywheel_minecraft_version = 1.18.2 +create_version = 0.5.1.f-332 +flywheel_version = 0.6.10-105 +registrate_version = MC1.18.2-1.1.3 +cloth_config_version=6.5.102 +mod_menu_version=3.2.5 # modrinth project info modrinth_project_id=create-train-perspective modrinth_version_type=beta -modrinth_game_versions=1.19.2 +modrinth_game_versions=1.18.2