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

Backwards Compatible backport and rewrite. #7

Merged
merged 183 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from 174 commits
Commits
Show all changes
183 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
a600a87
fix keybinds
Lyfts Oct 3, 2023
bc1ffa5
fix right click crash when logging is turned on
Lyfts Oct 3, 2023
2bf08ca
fix sidebar buttons not rendering in NEI creative+ gui
Lyfts Oct 3, 2023
8ccdbfe
disable this for now and add todo
Lyfts Oct 3, 2023
97f7925
merge assets
Lyfts Oct 3, 2023
3513b20
merge part 1/?
Lyfts Oct 3, 2023
0d1377b
fix GuiClientConfig
Lyfts Oct 7, 2023
f4975ed
remove bad SidebarButtonManager fix
Lyfts Oct 7, 2023
3259058
spotless
Lyfts Oct 8, 2023
4348e36
no longer needed
Lyfts Oct 8, 2023
1edfcc3
oops
Lyfts Oct 8, 2023
dbb8579
unify notifications
Lyfts Oct 8, 2023
bb65c7c
fix rtp
Lyfts Oct 8, 2023
e35273e
that's reversed
Lyfts Oct 8, 2023
10ad393
update bs
Lyfts Oct 8, 2023
bfcb3ed
accidentally nuked this
Lyfts Oct 9, 2023
687434e
fix /my_settings not getting correct value
Lyfts Oct 9, 2023
2248d71
switch to mclo.gs api
Lyfts Oct 10, 2023
9d2f877
use old invsee
Lyfts Oct 12, 2023
54f2b14
add error message to /nbtedit block
Lyfts Oct 12, 2023
c12cce1
update bs
Lyfts Oct 17, 2023
6f03083
accidentally removed this
Lyfts Oct 19, 2023
18343e3
fix show_playtime
Lyfts Oct 19, 2023
0bb0312
provide chunk perms by default
Lyfts Oct 19, 2023
ff4fcbd
make sure /rtp tps to a safe block
Lyfts Oct 19, 2023
c3ee627
update bs & enable modern syntax
Lyfts Oct 19, 2023
d75a590
that was from an old test oops
Lyfts Oct 19, 2023
aa62a4c
fix wrong colors on chunk map
Lyfts Oct 20, 2023
280a04e
replace missing I18n.haskey with LanguageRegistry check
Lyfts Oct 20, 2023
627bd4c
give sidebar config a toggle button in config menu + lang
Lyfts Oct 20, 2023
1059494
not relevant for 1.7.10
Lyfts Oct 20, 2023
de11447
add option to draw sidebar buttons above potion label
Lyfts Oct 20, 2023
2074fe3
Add ability to choose between chat notification, standard or disable …
Lyfts Oct 20, 2023
ccec913
Modern switch & instanceof + some cleanup. might have broken somethin…
Lyfts Oct 20, 2023
5d52703
update README.md
Lyfts Oct 20, 2023
ca0025a
missed this
Lyfts Oct 21, 2023
482b278
Add a command to dump a txt file of all permissions
Lyfts Oct 21, 2023
acaeebe
Use locally stored css file for Aurora pages
Lyfts Oct 22, 2023
6f86488
Add player attack logging
Lyfts Oct 22, 2023
d52dd02
Add chat logging
Lyfts Oct 22, 2023
8dd9cc7
Backup improvements, ability to set custom backup name
Lyfts Oct 22, 2023
f3e7991
Backwards compatibility for homes, chunks and warps
Lyfts Oct 23, 2023
77f9b40
small cleanup
Lyfts Oct 23, 2023
7fae142
This is certainly incompatible with Crucible
Lyfts Oct 24, 2023
ddeffd9
Merge into one mod, tidy up the package
Lyfts Oct 24, 2023
a996ead
Move onConfigChanged to client and fix some stuff
Lyfts Oct 24, 2023
0c4daa2
no need for dep on waila
Lyfts Oct 24, 2023
240bc07
fix commands registering multiple times...
Lyfts Oct 24, 2023
bdcb189
unused and hopefully unnecessary
Lyfts Oct 24, 2023
c19589f
Provide home permissions by default
Lyfts Oct 24, 2023
acff6cf
update README.md. I suck at articulating...
Lyfts Oct 24, 2023
a6299e4
fix "starting_items" config
Lyfts Oct 24, 2023
5887683
Don't launch with FTBU OR FTBL
Lyfts Oct 25, 2023
a81258c
Don't auto delete backups with custom name
Lyfts Oct 25, 2023
a6d8ca9
Better solution for "starting_items"
Lyfts Oct 25, 2023
d53758d
Backwards compat for config files
Lyfts Oct 25, 2023
fc52a0b
Does this clear checks?
Lyfts Oct 25, 2023
8c0ef5d
this works
Lyfts Oct 25, 2023
aadd862
Add file check for FTBU config file
Caedis Oct 25, 2023
06e222d
More compat logging and one more check
Lyfts Oct 27, 2023
54752a6
Draw dotted lines on loaded chunks
Lyfts Oct 27, 2023
73ee309
Show ∞ sign for max claimed chunks if player has CLAIMS_BYPASS_LIMITS…
Lyfts Oct 27, 2023
d91c781
Move teamsgui into gui package
Lyfts Oct 27, 2023
eaa23c5
Remove itemhandler, doesn't work and ripped from forge
Lyfts Oct 28, 2023
1e983ef
grab some stuff from old InvUtils
Lyfts Oct 28, 2023
5c2da91
make "starting_items" able to deal with stack sizes higher than 1
Lyfts Oct 28, 2023
ba99e3e
oops
Lyfts Oct 31, 2023
02dc2ca
fix /back sending you to the void
Lyfts Nov 4, 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
  •  
  •  
  •  
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
SeverUtilities
ServerUtilities
===============
ServerUtilities for server owners. Fork and Rebrand of FTBUtilities, FTBLibrary, and LatCore 1.7.10.
ServerUtilities for server owners. Backport and Rebrand of the 1.12.2 version of FTBUtilities, FTBLibrary, and Aurora for 1.7.10.

Fully backwards compatible with homes, chunks and warps. These will be loaded from FTBU on first load.

Utilizes a permission system to handle whether a player can use certain commands and do certain things.
A full list of permissions along with their description can be dumped using the command /dump_permissions,
the file will be placed at .minecraft/serverutilities/server/.
They can also be viewed using the Aurora webapi.

### License

Expand All @@ -18,7 +24,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: 1697697256
/*
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.1'
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.17')
}

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
7 changes: 6 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Add your dependencies here

dependencies {
api("com.github.GTNewHorizons:waila:1.6.0:dev")

compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.81-GTNH:dev")

runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.6.2:dev")

shadowCompile("it.unimi.dsi:fastutil:8.5.12")
}
14 changes: 9 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
modName = ServerUtilities

# This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId = ServerUtilities
modId = serverutilities

modGroup = serverutils.utils
modGroup = serverutils

# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
Expand All @@ -21,12 +21,16 @@ forgeVersion = 10.13.4.1614
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
developmentEnvironmentUserName = Developer

# Enables using modern java syntax (up to version 17) via Jabel, while still targetting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true

# Define a source file of your project with:
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = ServerUtilitiesFinals.java
replaceGradleTokenInFile = ServerUtilities.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
Expand All @@ -39,7 +43,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 +61,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.

Loading