Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] - Primary Addin and rewrite of functions in Serverlib #5

Closed
wants to merge 115 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
f8a9c1d
Primary Addin and rewrite of functions
Ethryan Sep 24, 2023
bcf099a
Merge branch 'master' into Serverlib-Features-Port
Ethryan Sep 24, 2023
fd70743
More editing
Ethryan Sep 24, 2023
9e498b7
More edits
Ethryan Sep 24, 2023
4a32e80
more edits 2
Ethryan Sep 24, 2023
2533cc7
more edits 3
Ethryan Sep 24, 2023
0086961
more edits 4
Ethryan Sep 24, 2023
feda04f
WiP
Ethryan Sep 24, 2023
93687c6
WiP 2
Ethryan Sep 24, 2023
03d722f
WiP Sidebar button manager
Ethryan Sep 24, 2023
bca0c2c
math
Ethryan Sep 24, 2023
318554c
math ticks
Ethryan Sep 24, 2023
335328a
Command Client
Ethryan Sep 24, 2023
502bd74
team commands
Ethryan Sep 24, 2023
97a0bc8
command main
Ethryan Sep 24, 2023
ee661c3
events
Ethryan Sep 24, 2023
0788ed6
Net folder
Ethryan Sep 24, 2023
42afc0c
lib.block
Ethryan Sep 24, 2023
8b93bf2
lib.client
Ethryan Sep 24, 2023
f563744
lib.command
Ethryan Sep 24, 2023
5064e0d
lib.config
Ethryan Sep 24, 2023
3a716f2
lib.data
Ethryan Sep 24, 2023
c196f71
lib.gui
Ethryan Sep 25, 2023
0a78434
lib.icon
Ethryan Sep 25, 2023
acc8458
lib.io
Ethryan Sep 25, 2023
f009a19
lib.util
Ethryan Sep 25, 2023
3945a3d
lib.item + math
Ethryan Sep 25, 2023
ef956e4
lib.net + tile
Ethryan Sep 25, 2023
2c342e4
lib.Main
Ethryan Sep 25, 2023
076da26
Removed Integration with JEI
Ethryan Sep 25, 2023
0bac171
Rename and move to lib folder + Refactor of names
Ethryan Sep 25, 2023
0b7fb20
Refactor
Ethryan Sep 25, 2023
46f8327
ServerUtils added Finally
Ethryan Sep 25, 2023
75d4ab2
Renaming and Redirects
Ethryan Sep 25, 2023
511a06e
renaming
Ethryan Sep 25, 2023
b0c4fd8
Time for testing
Ethryan Sep 25, 2023
78bfb70
Misseed 1 field
Ethryan Sep 25, 2023
73a9950
spotless
Ethryan Sep 25, 2023
1bef803
Calculate guiLeft and guiTop since they are protected
Ethryan Sep 25, 2023
4667814
fixing errors
Ethryan Sep 25, 2023
f0e2d63
Temp Removal
Ethryan Sep 25, 2023
1dc5982
Errorfixing
Ethryan Sep 25, 2023
0285853
duh... this sure would cause an error...
Ethryan Sep 25, 2023
b531647
add AT
Lyfts Sep 25, 2023
49b23fc
Fixes and rollbacks due to adding AT
Lyfts Sep 25, 2023
ad3465b
fix npe
Lyfts Sep 25, 2023
de068e0
fix too long id error
Lyfts Sep 25, 2023
99ad370
Fix Misdirected resource adress
Ethryan Sep 25, 2023
582de99
Fix missing resource folder
Ethryan Sep 25, 2023
7e6885f
Derp, missed the Library Assets
Ethryan Sep 26, 2023
8e904d3
spotless
Ethryan Sep 26, 2023
fd94fdf
Fix json file again...
Ethryan Sep 26, 2023
b941f71
Moved config files
Ethryan Sep 26, 2023
ab90062
revert
Ethryan Sep 26, 2023
24b2a34
rename langs
Lyfts Sep 26, 2023
feff6f5
buttons at last... but they're doubled?
Lyfts Sep 26, 2023
cd5a905
load configs
Lyfts Sep 26, 2023
5695ab3
revert some vertex changes
Lyfts Sep 26, 2023
7bc773e
fix crash in chunk claim gui
Lyfts Sep 26, 2023
0204b66
change the local directory
Ethryan Sep 26, 2023
11bba1b
spotless
Ethryan Sep 26, 2023
e252fdc
revert my "fix"
Ethryan Sep 26, 2023
b104364
more reverts
Ethryan Sep 26, 2023
668ecfd
more reverts 2
Ethryan Sep 26, 2023
a523f0d
bad fix for double sidebar buttons
Lyfts Sep 26, 2023
ca486f2
revert nbt
Lyfts Sep 26, 2023
c2b710e
typo
Lyfts Sep 26, 2023
cc4665e
Integrating Aurora
Ethryan Sep 26, 2023
2895a30
Reenable Aurora Integration
Ethryan Sep 26, 2023
21b836a
typo
Ethryan Sep 26, 2023
43e8198
Fix startup
Ethryan Sep 26, 2023
c4092a6
spotless, again...
Ethryan Sep 26, 2023
a3b21f4
store data in same folder
Lyfts Sep 26, 2023
685dcb6
chat notification for various commands
Lyfts Sep 26, 2023
bbbfab4
forgot spotless :(
Lyfts Sep 26, 2023
12359fb
Disable broken commands
Lyfts Sep 26, 2023
6e1edcc
Update README.md
Ethryan Sep 26, 2023
2764348
Add Aurora License
Ethryan Sep 27, 2023
a3ca501
Bugfix
Ethryan Sep 27, 2023
55fb730
Merge branch 'Serverlib-Features-Port' of https://github.com/GTNewHor…
Ethryan Sep 27, 2023
4f251e1
Duh, do the check in the correct spot Me
Ethryan Sep 27, 2023
c3675de
Backup added
Lyfts Sep 27, 2023
f4368d1
cleanup 1
Lyfts Sep 27, 2023
fce8dae
switch to notification system
Lyfts Sep 27, 2023
116b73d
autobackup seems to be working
Lyfts Sep 27, 2023
105636f
typo in readme
Lyfts Sep 27, 2023
92a8748
cleanup 2
Lyfts Sep 27, 2023
dc418bf
missed this
Lyfts Sep 27, 2023
f03ab61
Can't get the config to work, and the server is still blue...
Ethryan Sep 27, 2023
e3e0c92
Spotless, again...
Ethryan Sep 27, 2023
6b8a984
Fix Aurora, Now it works
Ethryan Sep 27, 2023
2176c1b
Spotless and TODO
Ethryan Sep 27, 2023
1a88a55
Aurora config fix
Lyfts Sep 27, 2023
c0563d2
Aurora config fix 2.0
Lyfts Sep 27, 2023
e3c4b1c
spotless
Lyfts Sep 27, 2023
6a8b0c1
Add Valid values tooltip
Ethryan Sep 27, 2023
7d475f9
Spotless
Ethryan Sep 27, 2023
1cac5b9
Add modid to Aurora modpage
Lyfts Sep 27, 2023
e3073b6
Add support to config for Server Utilities Pages
Ethryan Sep 27, 2023
ca971bf
Move the pages to a different part of the config file
Ethryan Sep 27, 2023
b6757c8
Why was this commented out?
Ethryan Sep 28, 2023
4195342
spotless
Ethryan Sep 28, 2023
e8c19a4
Disable the achievement list command
Ethryan Sep 29, 2023
85e01d0
make CommandListPage use correct config option
Lyfts Sep 28, 2023
132d05c
fix backup when compression level is 0
Lyfts Sep 29, 2023
1257b42
unbind keys by default
Lyfts Sep 29, 2023
b4479df
backup silent mode and cleanup
Lyfts Sep 29, 2023
4f6d13c
fix sidebar button text rendering under armor slots
Lyfts Sep 29, 2023
11ea4c3
Fix Server crash when rightclicking
Ethryan Sep 30, 2023
6275c3c
Spotless... Sigh...
Ethryan Sep 30, 2023
f014654
backupNotification has the check
Lyfts Sep 29, 2023
2be7454
fix getContainerListeners &
Lyfts Oct 1, 2023
b6b34e0
give gui a working background
Lyfts Oct 1, 2023
7f131cb
spotless....
Lyfts Oct 1, 2023
2684331
fix name.chat.format permission not applying color to username
Lyfts Oct 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SeverUtilities
ServerUtilities
===============
ServerUtilities for server owners. Fork and Rebrand of FTBUtilities, FTBLibrary, and LatCore 1.7.10.

Expand All @@ -18,7 +18,10 @@ Original code Copyright (c) 2016 LatvianModder and licensed MIT (Based on LatMod
![Lat MIT License](lat-mit-license.png)
![Lat FTBU License](lat-ftbu-license-discord.png)

* [FTB Utilities wayback machine license](https://web.archive.org/web/20190418033327/https://minecraft.curseforge.com/projects/ftb-utilities)
* [FTB Utilities wayback machine license](https://web.archive.org/web/20190624234434/https://minecraft.curseforge.com/projects/ftb-utilities)
![FTB Utilities License CF Wayback](ftbu-license-wayback.png)
* [FTB Library wayback machine license](https://web.archive.org/web/20190418011645/https://minecraft.curseforge.com/projects/ftblib)
![FTB Library License CF Wayback](ftbl-license-wayback.png)

* Aurora License
![image](https://github.com/GTNewHorizons/ServerUtilities/assets/3237986/eecd36d3-6b77-4286-9767-3f4aa2dd008f)
73 changes: 53 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1692122114
//version: 1695474595
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -89,6 +89,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
def projectJavaVersion = JavaLanguageVersion.of(8)

boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false

final String CHECKSTYLE_CONFIG = """
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- Use CHECKSTYLE:OFF and CHECKSTYLE:ON comments to suppress checkstyle lints in a block -->
<module name="SuppressionCommentFilter"/>
<module name="AvoidStarImport">
<!-- Allow static wildcard imports for cases like Opcodes and LWJGL classes, these don't get created accidentally by the IDE -->
<property name="allowStaticMemberImports" value="true"/>
</module>
</module>
</module>
"""

checkPropertyExists("modName")
checkPropertyExists("modId")
Expand Down Expand Up @@ -140,6 +157,17 @@ if (!disableSpotless) {
apply from: Blowdryer.file('spotless.gradle')
}

if (!disableCheckstyle) {
apply plugin: 'checkstyle'
tasks.named("checkstylePatchedMc") { enabled = false }
tasks.named("checkstyleMcLauncher") { enabled = false }
tasks.named("checkstyleIdeVirtualMain") { enabled = false }
tasks.named("checkstyleInjectedTags") { enabled = false }
checkstyle {
config = resources.text.fromString(CHECKSTYLE_CONFIG)
}
}

String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
String kotlinSourceDir = "src/main/kotlin/"
Expand Down Expand Up @@ -600,15 +628,10 @@ repositories {
}
maven {
name = "ic2"
url = "https://maven.ic2.player.to/"
metadataSources {
mavenPom()
artifact()
url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
content {
includeGroup "net.industrial-craft"
}
}
maven {
name = "ic2-mirror"
url = "https://maven2.ic2.player.to/"
metadataSources {
mavenPom()
artifact()
Expand Down Expand Up @@ -770,23 +793,14 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}

dependencies {
def lwjgl3ifyVersion = '1.4.0'
def asmVersion = '9.4'
def lwjgl3ifyVersion = '1.5.0'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.5')
}

java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
}

Expand Down Expand Up @@ -1576,6 +1590,25 @@ def getSecondaryArtifacts() {
return secondaryArtifacts
}

def getURL(String main, String fallback) {
return pingURL(main, 10000) ? main : fallback
}

// credit: https://stackoverflow.com/a/3584332
def pingURL(String url, int timeout) {
url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates.
try {
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection()
connection.setConnectTimeout(timeout)
connection.setReadTimeout(timeout)
connection.setRequestMethod("HEAD")
int responseCode = connection.getResponseCode()
return 200 <= responseCode && responseCode <= 399
} catch (IOException ignored) {
return false
}
}

// For easier scripting of things that require variables defined earlier in the buildscript
if (file('addon.late.gradle.kts').exists()) {
apply from: 'addon.late.gradle.kts'
Expand Down
2 changes: 2 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

dependencies {
api("com.github.GTNewHorizons:waila:1.6.0:dev")
api('curse.maven:journeymap-32274:4500659')
shadowCompile("it.unimi.dsi:fastutil:8.5.12")
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apiPackage =

# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
accessTransformersFile =
accessTransformersFile = serverutil_at.cfg

# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
Expand All @@ -57,7 +57,7 @@ containsMixinsAndOrCoreModOnly = false

# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
usesShadowedDependencies = true

# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
Expand Down
143 changes: 0 additions & 143 deletions src/main/java/latmod/lib/Bits.java

This file was deleted.

43 changes: 0 additions & 43 deletions src/main/java/latmod/lib/ByteCompressor.java

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/java/latmod/lib/ByteCount.java

This file was deleted.

Loading