Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repositories {
dependencies {
// To change the versions see the gradle.properties file
minecraft(libs.minecraft)
mappings(libs.fabricYarn)
mappings(loom.officialMojangMappings())
modImplementation(libs.fabricLoader)

// Make a set of all api modules we wish to use
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.parallel=true
org.gradle.configuration-cache=true

# Mod Properties
mod_version=1.1.0-SNAPSHOT+1.21.10
mod_version=1.0.0-SNAPSHOT+1.21.11
maven_group=io.github.communityradargg.fabric
archives_base_name=communityradar-fabric

Expand Down
10 changes: 4 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
[versions]
# Plugins
fabricLoom = "1.11-SNAPSHOT"
fabricLoom = "1.14-SNAPSHOT"
spotless = "8.1.0"

# Libraries
minecraft = "1.21.10"
fabricYarn = "1.21.10+build.1"
fabricLoader = "0.17.2"
fabricApi = "0.134.1+1.21.10"
minecraft = "1.21.11"
fabricLoader = "0.18.2"
fabricApi = "0.139.4+1.21.11"

[libraries]
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
fabricYarn = { group = "net.fabricmc", name = "yarn", version.ref = "fabricYarn" }
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }

[plugins]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@

public class CommunityRadarMod implements ModInitializer {
/** The id of the mod. */
private static final String MODID = "communityradar";
private static final String MOD_ID = "communityradar";
/** The version of the mod. */
private static final String VERSION = getModVersion(MODID);
private static final String VERSION = getModVersion(MOD_ID);
private static final Logger logger = LogManager.getLogger(CommunityRadarMod.class);
private static RadarListManager listManager;

@Override
public void onInitialize() {
logger.info("Starting the mod '{}' with the version '{}'!", MODID, VERSION);
logger.info("Starting the mod '{}' with the version '{}'!", MOD_ID, VERSION);
final File directoryPath = Paths.get(new File("")
.getAbsolutePath(),"communityradar", "lists")
.toFile();
Expand All @@ -52,7 +52,7 @@ public void onInitialize() {
// Needs to be after loading public lists
listManager.loadPrivateLists();
registerCommands();
logger.info("Successfully started the mod '{}'!", MODID);
logger.info("Successfully started the mod '{}'!", MOD_ID);
}

/**
Expand All @@ -76,18 +76,18 @@ private void registerPublicLists() {
}

/**
* Gets the mod version for a given modid.
* Gets the mod version for a given mod id.
*
* @param modid The modid to get the version for.
* @param modId The mod-id to get the version for.
* @return Returns the version in a friendly String.
* @throws IllegalArgumentException Thrown, when the mod container cannot be got for the given modid.
* @throws IllegalArgumentException Thrown, when the mod container cannot be got for the given mod id.
*/
public static @NotNull String getModVersion(final @NotNull String modid) {
final Optional<ModContainer> modContainer = FabricLoader.getInstance().getModContainer(modid);
public static @NotNull String getModVersion(final @NotNull String modId) {
final Optional<ModContainer> modContainer = FabricLoader.getInstance().getModContainer(modId);
if (modContainer.isPresent()) {
return modContainer.get().getMetadata().getVersion().getFriendlyString();
}
throw new IllegalArgumentException("Cannot get the version for the given modid: " + modid);
throw new IllegalArgumentException("Cannot get the version for the given mod id: " + modId);
}

/**
Expand All @@ -100,12 +100,12 @@ private void registerPublicLists() {
}

/**
* Gets the modid.
* Gets the mod id.
*
* @return Returns the modid.
* @return Returns the mod id.
*/
public static @NotNull String getModid() {
return MODID;
public static @NotNull String getModId() {
return MOD_ID;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import java.util.UUID;

/**
* Serves as accessor for the self added field in the {@link net.minecraft.client.render.entity.PlayerEntityRenderer} class.
* Serves as accessor for the self added field in the {@link net.minecraft.client.renderer.entity.player.AvatarRenderer} class.
*/
public interface PlayerEntityRenderStateAccessor {
public interface AvatarRenderStateAccessor {
/**
* Gets the player uuid field value.
*
Expand Down
Loading