Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
diskree committed May 17, 2024
0 parents commit 95cf9b4
Show file tree
Hide file tree
Showing 22 changed files with 1,130 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gradle/
.idea/
build/
run/
src/main/generated/
local.properties
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2024 diskree

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AdvancementsFullscreen

This simple mod expands the advancements window to full screen. It does not require Fabric API or other mods.

### Any extra features?

Never. This is made for those who only want a large window without any additional functionality.

### Support with other mods?

Never. I believe that all existing popular mods that do anything in the advancements window are designed incorrectly. They add several functions at once, some of which the player may not need.

Instead, I will be developing [my own set of mods for advancements window](https://modrinth.com/collection/zUiqKAl3). Each of them will add by one feature and will be fully compatible with each other.
80 changes: 80 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
plugins {
id 'fabric-loom' version "${loomVersion}-SNAPSHOT"
}

def modId = project.modName.toLowerCase()
def repoUrl = "https://github.com/${author}/${modName}"

version = "mc${minMinecraftVersion}+${modVersion}"
group = "com." + project.author

base {
archivesName = modId
}

repositories {
mavenCentral()
}

dependencies {
minecraft "com.mojang:minecraft:${minMinecraftVersion}"
mappings "net.fabricmc:yarn:${minMinecraftVersion}+build.${mappingsBuild}:v2"
modImplementation "net.fabricmc:fabric-loader:${minLoaderVersion}"
}

processResources {
def propertyMap = [
'modId' : modId,
'modVersion' : modVersion,
'modName' : modName,
'author' : author,
'repoUrl' : repoUrl,
'minJavaVersion' : minJavaVersion,
'minMinecraftVersion': minMinecraftVersion,
'minLoaderVersion' : minLoaderVersion
]
inputs.properties(propertyMap)
filesMatching("fabric.mod.json") {
expand(propertyMap)
}
}

sourceSets {
main {
resources.srcDirs += ['src/main/generated']
java.srcDirs += ['src/main/generated/java']
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release.set(minJavaVersion.toInteger())
}

tasks.register('generateBuildConfig', DefaultTask) {
doLast {
def templateFile = file("$projectDir/gradle/BuildConfig.java.txt")
def configFile = file("$projectDir/src/main/generated/java/com/${author}/${modId}/BuildConfig.java")
configFile.getParentFile().mkdirs()

configFile.text = templateFile.text
.replace('${author}', author)
.replace('${modId}', modId)
.replace('${modName}', modName)
}
}

java {
sourceCompatibility = targetCompatibility = minJavaVersion.toInteger()
}

jar {
from('LICENSE') {
rename { "${it}_${modId}" }
}
compileJava.dependsOn(generateBuildConfig)
}

loom {
accessWidenerPath.set(file("src/main/resources/${modId}.accesswidener"))
}
12 changes: 12 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true

author=diskree
modName=AdvancementsFullscreen
modVersion=1.0

minJavaVersion=21
minMinecraftVersion=1.20.5
mappingsBuild=1
minLoaderVersion=0.15.11
loomVersion=1.6
6 changes: 6 additions & 0 deletions gradle/BuildConfig.java.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.${author}.${modId};

public class BuildConfig {
public static final String MOD_NAME = "${modName}";
public static final String MOD_ID = "${modId}";
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 95cf9b4

Please sign in to comment.