From 6f412fcb3529b00f5ea41417f9728781eba86962 Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Fri, 6 Jun 2025 20:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=B8=BA1.?= =?UTF-8?q?0.5-fix=20Forge=E6=9C=80=E4=BD=8E=E7=89=88=E6=9C=AC=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=B8=BA47.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 6 +++--- .../blasttravelreborn/BlastTravelReborn.java | 5 +++-- .../blasttravelreborn/content/entity/BTREntityTypes.java | 2 +- .../content/entity/cannon/CannonBehavior.java | 2 +- src/main/resources/META-INF/mods.toml | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3506e21..568e1a1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ minecraft_version=1.20.1 # as they do not follow standard versioning conventions. minecraft_version_range=[1.20.1,1.21) # The Forge version must agree with the Minecraft version to get a valid artifact -forge_version=47.4.1 +forge_version=47.3.5 # The Forge version range can use any version of Forge as bounds or match the loader version range forge_version_range=[47,) # The loader version range can only use the major version of Forge/FML as bounds @@ -38,8 +38,8 @@ mod_name=BlastTravel-Reborn # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=1.0.5+1.20.1-forge -jsonem_version=0.2.1+1.20-fabrge +mod_version=1.0.5+1.20.1-forge-fix +jsonem_version=0.2.2+1.20-fabrge # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/com/leisuretimedock/blasttravelreborn/BlastTravelReborn.java b/src/main/java/com/leisuretimedock/blasttravelreborn/BlastTravelReborn.java index cf69175..e94ad6f 100644 --- a/src/main/java/com/leisuretimedock/blasttravelreborn/BlastTravelReborn.java +++ b/src/main/java/com/leisuretimedock/blasttravelreborn/BlastTravelReborn.java @@ -15,7 +15,8 @@ import org.slf4j.LoggerFactory; public class BlastTravelReborn { public static final String MOD_ID = "blasttravelreborn"; public static final Logger LOG = LoggerFactory.getLogger("Blast Travel Reborn"); - public BlastTravelReborn(FMLJavaModLoadingContext fmlJavaModLoadingContext) { + public BlastTravelReborn() { + FMLJavaModLoadingContext fmlJavaModLoadingContext = FMLJavaModLoadingContext.get(); IEventBus modEventBus = fmlJavaModLoadingContext.getModEventBus(); BTRNetwork.register(); BTRItems.register(modEventBus); @@ -25,6 +26,6 @@ public class BlastTravelReborn { } public static ResourceLocation id(String path) { - return ResourceLocation.fromNamespaceAndPath(MOD_ID, path); + return new ResourceLocation(MOD_ID, path); } } diff --git a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/BTREntityTypes.java b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/BTREntityTypes.java index d1c42b1..a8e2e3d 100644 --- a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/BTREntityTypes.java +++ b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/BTREntityTypes.java @@ -16,7 +16,7 @@ public class BTREntityTypes { "cannon", () -> EntityType.Builder.of(CannonEntity::new, MobCategory.MISC) .sized(1, 0.8f) - .build((ResourceLocation.fromNamespaceAndPath(BlastTravelReborn.MOD_ID, "cannon")).toString() + .build((BlastTravelReborn.id("cannon")).toString() )); public static void register(IEventBus eventBus) { ENTITY_TYPES.register(eventBus); diff --git a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/cannon/CannonBehavior.java b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/cannon/CannonBehavior.java index 4cd0a18..033fdc6 100644 --- a/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/cannon/CannonBehavior.java +++ b/src/main/java/com/leisuretimedock/blasttravelreborn/content/entity/cannon/CannonBehavior.java @@ -90,7 +90,7 @@ public class CannonBehavior { public ResourceLocation headTexture(CannonEntity entity) { var player = entity.getClientPlayer(); if (player == null) { - return ResourceLocation.withDefaultNamespace("missing"); + return new ResourceLocation("missing"); } return player.getSkinTextureLocation(); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 7d00743..4a8030c 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -11,7 +11,7 @@ loaderVersion = "${loader_version_range}" #mandatory This is typically bumped ev # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. license = "${mod_license}" # A URL to refer people to when problems occur with this mod -#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional +issueTrackerURL="https://github.com/LeisureTimeDock/BlastTravel_Neo_Forge" #optional # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod