Skip to content

Commit a8317ea

Browse files
authored
Merge pull request #5 from UselessSolutions/nightly
Updated to 7.3pre2
2 parents 21984b7 + 8919a5b commit a8317ea

53 files changed

Lines changed: 414 additions & 335 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ServerLibe
22
A server side mod library for listening to and interracting with an event system
33

4-
Include in project with
4+
_________________________________________________________
5+
Include in project with:
56
```gradle
6-
implementation "com.github.UselessSolutions:<release-tag>"
7+
modImplementation "com.github.UselessSolutions:serverlibe:<release-tag>"
78
```

build.gradle

Lines changed: 76 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
plugins {
2-
id 'babric-loom' version '1.4.+'
2+
id 'fabric-loom' version '1.7.bta'
33
id 'java'
44
}
55

6+
import org.gradle.internal.os.OperatingSystem
7+
8+
project.ext.lwjglVersion = "3.3.4"
9+
10+
switch (OperatingSystem.current()) {
11+
case OperatingSystem.LINUX:
12+
project.ext.lwjglNatives = "natives-linux"
13+
break
14+
case OperatingSystem.WINDOWS:
15+
project.ext.lwjglNatives = "natives-windows"
16+
break
17+
case OperatingSystem.MAC_OS:
18+
project.ext.lwjglNatives = "natives-macos"
19+
}
20+
621
group = project.mod_group
722
archivesBaseName = project.mod_name
823
version = project.mod_version
924

1025
loom {
11-
gluedMinecraftJar()
1226
noIntermediateMappings()
13-
customMinecraftManifest.set("https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json")
27+
customMinecraftMetadata.set("https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json")
1428
}
1529

1630
repositories {
@@ -24,6 +38,14 @@ repositories {
2438
name = 'Fabric'
2539
url = 'https://maven.fabricmc.net/'
2640
}
41+
maven {
42+
name = 'SignalumMavenInfrastructure'
43+
url = 'https://maven.thesignalumproject.net/infrastructure'
44+
}
45+
maven {
46+
name = 'SignalumMavenReleases'
47+
url = 'https://maven.thesignalumproject.net/releases'
48+
}
2749
ivy {
2850
url = "https://github.com/Better-than-Adventure"
2951
patternLayout {
@@ -33,57 +55,86 @@ repositories {
3355
metadataSources { artifact() }
3456
}
3557
ivy {
36-
url = "https://piston-data.mojang.com"
58+
url = "https://downloads.betterthanadventure.net/bta-client/${project.bta_channel}/"
3759
patternLayout {
38-
artifact "v1/[organisation]/[revision]/[module].jar"
60+
artifact "/v[revision]/client.jar"
61+
m2compatible = true
62+
}
63+
metadataSources { artifact() }
64+
}
65+
ivy {
66+
url = "https://downloads.betterthanadventure.net/bta-server/${project.bta_channel}/"
67+
patternLayout {
68+
artifact "/v[revision]/server.jar"
3969
m2compatible = true
4070
}
4171
metadataSources { artifact() }
4272
}
4373
ivy {
44-
url = "https://github.com/MartinSVK12"
74+
url = "https://piston-data.mojang.com"
4575
patternLayout {
46-
artifact "[organisation]/releases/download/[revision]/[module]-[revision].jar"
76+
artifact "v1/[organisation]/[revision]/[module].jar"
4777
m2compatible = true
4878
}
4979
metadataSources { artifact() }
5080
}
5181
}
5282

5383
dependencies {
54-
// BTA jar
55-
minecraft "bta-download-repo:bta:${project.bta_version}"
84+
minecraft "::${project.bta_version}"
5685
mappings loom.layered() {}
5786

58-
// Beta mc jar
5987
modRuntimeOnly "objects:client:43db9b498cb67058d2e12d394e6507722e71bb45" // https://piston-data.mojang.com/v1/objects/43db9b498cb67058d2e12d394e6507722e71bb45/client.jar
60-
// Fabric loader
61-
modImplementation "fabric-loader:fabric-loader:${project.loader_version}"
88+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
89+
90+
// Nightly builds are highly unstable, it is very likely that even these base mods might not work!
91+
// Uncomment at your own risk.
92+
93+
// Helper library
94+
// If you do not need Halplibe you can comment this line out or delete this line
95+
//modImplementation "com.github.Turnip-Labs:bta-halplibe:${project.halplibe_version}"
96+
97+
//modImplementation "ModMenu:ModMenu:2.0.6"
6298

63-
// Json processing
6499
implementation 'com.google.guava:guava:33.0.0-jre'
65100
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
66101

67102
include(implementation "org.yaml:snakeyaml:2.2")
68103

69-
// Logging
104+
70105
implementation "org.slf4j:slf4j-api:1.8.0-beta4"
71106
implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
72-
// var log4jVersion = "2.20.0"
73-
var log4jVersion = "2.17.2"
107+
108+
implementation 'com.google.guava:guava:33.0.0-jre'
109+
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
110+
var log4jVersion = "2.20.0"
74111
implementation("org.apache.logging.log4j:log4j-core:${log4jVersion}")
75112
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
76113
implementation("org.apache.logging.log4j:log4j-1.2-api:${log4jVersion}")
77114

78-
// Apache commons, I believe is used for some string processing by some things
79-
implementation("org.apache.commons:commons-lang3:3.12.0")
115+
include(implementation("org.apache.commons:commons-lang3:3.12.0"))
116+
117+
modImplementation("com.github.zarzelcow:legacy-lwjgl3:1.0.4")
118+
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
119+
120+
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
121+
runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
122+
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
123+
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
124+
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
125+
runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
126+
implementation "org.lwjgl:lwjgl:$lwjglVersion"
127+
implementation "org.lwjgl:lwjgl-assimp:$lwjglVersion"
128+
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
129+
implementation "org.lwjgl:lwjgl-openal:$lwjglVersion"
130+
implementation "org.lwjgl:lwjgl-opengl:$lwjglVersion"
131+
implementation "org.lwjgl:lwjgl-stb:$lwjglVersion"
80132
}
81133

82134
java {
83135
sourceCompatibility = JavaVersion.VERSION_1_8
84136
targetCompatibility = JavaVersion.VERSION_1_8
85137
withSourcesJar()
86-
withJavadocJar()
87138
}
88139

89140
tasks.withType(JavaCompile).configureEach {
@@ -96,10 +147,16 @@ jar {
96147
rename { "${it}_${archivesBaseName}" }
97148
}
98149
}
150+
99151
sourcesJar{
100152
exclude('org/useless/test/**')
101153
}
102154

155+
configurations.configureEach {
156+
// Removes LWJGL2 dependencies
157+
exclude group: "org.lwjgl.lwjgl"
158+
}
159+
103160
processResources {
104161
inputs.property "version", version
105162

gradle.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
org.gradle.jvmargs=-Xmx2G
22

33
# BTA
4-
bta_version=7.2_01
4+
bta_version=7.3-pre2
5+
bta_channel=prerelease
56

67
# Loader & Mod Menu
7-
loader_version=0.15.6-babric.6-bta
8+
loader_version=0.15.6-bta.7
89

910
# Mod
10-
mod_version=beta.2.2
11+
mod_version=beta.2.6-7.3pre2
1112
mod_group=useless
1213
mod_name=serverlibe
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
pluginManagement {
22
repositories {
3+
gradlePluginPortal()
34
maven {
45
name = 'Fabric'
56
url = 'https://maven.fabricmc.net/'
67
}
7-
gradlePluginPortal()
88
maven {
99
name = 'Jitpack'
1010
url = 'https://jitpack.io'
@@ -13,5 +13,9 @@ pluginManagement {
1313
name = 'Babric'
1414
url = 'https://maven.glass-launcher.net/babric'
1515
}
16+
maven {
17+
name = 'signalumMaven'
18+
url = 'https://maven.thesignalumproject.net/infrastructure'
19+
}
1620
}
17-
}
21+
}

src/main/java/org/useless/serverlibe/ServerLibe.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import org.useless.serverlibe.api.ServerLibeEntrypoint;
1010
import org.useless.serverlibe.api.annotations.EventListener;
1111
import org.useless.serverlibe.internal.EventContainer;
12+
import org.useless.test.DebugInfoListener;
13+
import org.useless.test.GuiTestListener;
14+
import org.useless.test.TestFeatureListener;
1215

1316
import java.io.IOException;
1417
import java.lang.reflect.InvocationTargetException;
@@ -31,6 +34,9 @@ public void onInitialize() {
3134
}
3235
}
3336
LOGGER.info("ServerLibe initialized.");
37+
//registerListener(new DebugInfoListener());
38+
//registerListener(new GuiTestListener());
39+
//registerListener(new TestFeatureListener());
3440
}
3541

3642
/**

src/main/java/org/useless/serverlibe/api/event/player/PlayerChatEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.useless.serverlibe.api.event.player;
22

3-
import net.minecraft.core.entity.player.EntityPlayer;
3+
import net.minecraft.core.entity.player.Player;
44
import org.jetbrains.annotations.NotNull;
55
import org.useless.serverlibe.api.event.Cancellable;
66
import org.useless.serverlibe.internal.EventContainer;
@@ -15,7 +15,7 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable {
1515

1616
public PlayerChatEvent
1717
(
18-
@NotNull final EntityPlayer player,
18+
@NotNull final Player player,
1919
@NotNull final String message
2020
)
2121
{

src/main/java/org/useless/serverlibe/api/event/player/PlayerDigEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.useless.serverlibe.api.event.player;
22

3-
import net.minecraft.core.entity.player.EntityPlayer;
3+
import net.minecraft.core.entity.player.Player;
44
import net.minecraft.core.util.helper.Side;
55
import net.minecraft.core.world.World;
66
import org.jetbrains.annotations.NotNull;
@@ -23,7 +23,7 @@ public class PlayerDigEvent extends PlayerEvent implements Cancellable {
2323
public final int status;
2424
public PlayerDigEvent
2525
(
26-
@NotNull final EntityPlayer player,
26+
@NotNull final Player player,
2727
@NotNull final World world,
2828
final int x,
2929
final int y,

src/main/java/org/useless/serverlibe/api/event/player/PlayerEntityInteractEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.useless.serverlibe.api.event.player;
22

33
import net.minecraft.core.entity.Entity;
4-
import net.minecraft.core.entity.player.EntityPlayer;
4+
import net.minecraft.core.entity.player.Player;
55
import net.minecraft.core.item.ItemStack;
66
import net.minecraft.core.world.World;
77
import org.jetbrains.annotations.NotNull;
@@ -24,7 +24,7 @@ public class PlayerEntityInteractEvent extends PlayerEvent implements Cancellabl
2424

2525
public PlayerEntityInteractEvent
2626
(
27-
@NotNull final EntityPlayer player,
27+
@NotNull final Player player,
2828
@NotNull final World world,
2929
@Nullable final ItemStack itemstack,
3030
@NotNull final Entity targetEntity,

src/main/java/org/useless/serverlibe/api/event/player/PlayerEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package org.useless.serverlibe.api.event.player;
22

3-
import net.minecraft.core.entity.player.EntityPlayer;
3+
import net.minecraft.core.entity.player.Player;
44
import org.jetbrains.annotations.NotNull;
55
import org.useless.serverlibe.api.event.Event;
66

77
import java.util.Objects;
88

99
class PlayerEvent extends Event {
1010
@NotNull
11-
public final EntityPlayer player;
12-
public PlayerEvent(@NotNull final EntityPlayer player){
11+
public final Player player;
12+
public PlayerEvent(@NotNull final Player player){
1313

1414
this.player = Objects.requireNonNull(player);
1515
}

0 commit comments

Comments
 (0)