Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixuge committed Jun 29, 2023
0 parents commit 17ab917
Show file tree
Hide file tree
Showing 18 changed files with 666 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

# idea
out
*.ipr
*.iws
*.iml
.idea

# gradle
build
.gradle

# other
eclipse
run

# dev
dev
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "Run Client (debug)"
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"java.configuration.updateBuildConfiguration": "disabled",
"java.compile.nullAnalysis.mode": "disabled",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx6G -Xms100m -Xlog:disable"
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Client (debug)",
"command": {
"quoting": "escape",
"value": [
"./gradlew"
]
},
"problemMatcher": [],
"type": "shell",
"args": [
"runClient",
"--debug-jvm"
],
"isBackground": true,
}
]
}
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

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 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.

For more information, please refer to <http://unlicense.org/>
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Serverlist Buffer Fixer
A mod that fixes the slow/infinite server data loading in the multiplayer menu.

Also prevents you from spamming "refresh" too much.

### Note that this "behavior" *(read bug)* is still present as of the latest versions (1.20.1 currently).
99 changes: 99 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
buildscript {
repositories {
mavenCentral()
maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "https://repo.spongepowered.org/maven" }
}
dependencies {
classpath files('forgegradle/ForgeGradle-2.1.2.jar')
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'eclipse'

version = mod_version
group = mod_group
archivesBaseName = mod_id

sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
version = "${minecraft_version}-${forge_version}"
runDir = "run"
mappings = mappings_version
String resolved_core_plugin = mod_core_plugin.replace('${mod_group}', mod_group).replace('${mod_id}', mod_id)
clientJvmArgs += "-Dfml.coreMods.load=${resolved_core_plugin}"
serverJvmArgs += "-Dfml.coreMods.load=${resolved_core_plugin}"
String resolved_core_config = mod_mixin_configs.replace('${mod_id}', mod_id)
clientRunArgs += "--mixin ${resolved_core_config}"
serverRunArgs += "--mixin ${resolved_core_config}"
}

runClient {
args = ["--username", dev_username]
}

repositories {
mavenCentral()
maven { url = "https://repo.spongepowered.org/maven" }
}

configurations {
embed
compile.extendsFrom(embed)
}

dependencies {
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
exclude module: 'guava'
exclude module: 'commons-io'
exclude module: 'gson'
}
annotationProcessor 'org.spongepowered:mixin:0.7.11-SNAPSHOT'

compileOnly 'org.projectlombok:lombok:1.18.18'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
}

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

expand 'mod_id': mod_id, 'mod_name': mod_name, 'version': project.version,
'mcversion': project.minecraft.version, 'mod_description': mod_description,
'mod_author': mod_author
}

from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

mixin {
add sourceSets.main, mod_mixin_refmap.replace('${mod_id}', mod_id)
}

jar {
from(configurations.embed.collect {
it.isDirectory() ? it : zipTree(it)
}) {
exclude "LICENSE.txt", "META-INF/MANIFSET.MF", "META-INF/maven/**", "META-INF/*.RSA", "META-INF/*.SF"
}

manifest {
attributes "FMLCorePlugin": mod_core_plugin.replace('${mod_group}', mod_group)
// attributes "FMLCorePluginContainsFMLMod": "true"
attributes "ForceLoadAsMod": "true"
attributes "TweakClass": "org.spongepowered.asm.launch.MixinTweaker"
attributes "MixinConfigs": mod_mixin_configs.replace('${mod_id}', mod_id)

}
}
Binary file added forgegradle/ForgeGradle-2.1.2.jar
Binary file not shown.
15 changes: 15 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mod_id=serverlistbufferfixer
mod_name=Serverlist Buffer Fixer
mod_group=me.nixuge.serverlistbufferfixer
mod_version=1.0.0
mod_author=["Nixuge"]
mod_description=A mod that fixes the slow/infinite server data loading in the multiplayer menu. Also prevents you from spamming "refresh" too much.
minecraft_version=1.8.9
forge_version=11.15.1.2318-1.8.9
mappings_version=stable_22
dev_username=ElNixuDev
mod_core_plugin=${mod_group}.mixins.MixinLoader
mod_mixin_configs=mixins.${mod_id}.json
mod_mixin_refmap=refmap.${mod_id}.json
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx3G
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 17ab917

Please # to comment.