File tree 6 files changed +36
-14
lines changed
src/main/java/com/kevinthegreat/skyblockmod
6 files changed +36
-14
lines changed Original file line number Diff line number Diff line change
1
+ ## Skyblock Mod 1.10.1 for 1.20.4
2
+
3
+ Improve Skyblocker compatibility
4
+
5
+
1
6
## Skyblock Mod 1.10.0 for 1.20.4
2
7
3
8
Add waypoints.
Original file line number Diff line number Diff line change @@ -17,13 +17,18 @@ loom {
17
17
}
18
18
19
19
repositories {
20
- // Add repositories to retrieve artifacts from in here.
21
- // You should only use this when depending on other mods because
22
- // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
23
- // See https://docs.gradle.org/current/userguide/declaring_repositories.html
24
- // for more information about repositories.
25
-
26
20
maven { url " https://maven.terraformersmc.com/releases/" }
21
+ exclusiveContent {
22
+ forRepository {
23
+ maven {
24
+ name = " Modrinth"
25
+ url = " https://api.modrinth.com/maven"
26
+ }
27
+ }
28
+ filter {
29
+ includeGroup " maven.modrinth"
30
+ }
31
+ }
27
32
maven { url " https://jitpack.io" }
28
33
}
29
34
@@ -36,13 +41,16 @@ dependencies {
36
41
// Fabric API.
37
42
modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
38
43
39
- include modImplementation(" org.eclipse.jgit:org.eclipse.jgit:${ project.jgit_version} " )
40
-
41
44
modImplementation " com.terraformersmc:modmenu:${ project.modmenu_version} "
45
+
46
+ modCompileOnly " maven.modrinth:skyblocker-liap:v${ project.skyblocker_version} +${ project.minecraft_version} "
47
+
42
48
include modImplementation(" com.github.0x3C50:Renderer:${ project.renderer_version} " ) {
43
49
exclude group : " io.github.ladysnake" exclude module : " satin"
44
50
}
45
51
52
+ include modImplementation(" org.eclipse.jgit:org.eclipse.jgit:${ project.jgit_version} " )
53
+
46
54
// Apache Commons Math
47
55
include implementation(" org.apache.commons:commons-math3:${ project.commons_math_version} " )
48
56
Original file line number Diff line number Diff line change @@ -8,13 +8,14 @@ org.gradle.jvmargs = -Xmx1G
8
8
loader_version = 0.15.3
9
9
10
10
# Mod Properties
11
- mod_version = 1.10.0
11
+ mod_version = 1.10.1
12
12
maven_group = com.kevinthegreat.skyblockmod
13
13
archives_base_name = skyblock-mod
14
14
15
15
# Dependencies
16
16
fabric_version = 0.92.0+1.20.4
17
17
modmenu_version = 9.0.0
18
+ skyblocker_version = 1.20.2
18
19
jgit_version = 6.8.0.202311291450-r
19
20
renderer_version = master-SNAPSHOT
20
21
# # Apache Commons Math (https://mvnrepository.com/artifact/org.apache.commons/commons-math3)
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ private void registerEvents() {
83
83
mythologicalRitual .init ();
84
84
HudRenderCallback .EVENT .register (dungeonMap ::render );
85
85
ClientReceiveMessageEvents .ALLOW_GAME .register (this ::onChatMessage );
86
+ ClientReceiveMessageEvents .GAME_CANCELED .register (this ::onChatMessage );
86
87
ScreenEvents .AFTER_INIT .register (experiments ::start );
87
88
Waypoints .init ();
88
89
}
Original file line number Diff line number Diff line change 4
4
import com .google .gson .JsonParser ;
5
5
import com .kevinthegreat .skyblockmod .SkyblockMod ;
6
6
import net .fabricmc .fabric .api .networking .v1 .PacketSender ;
7
+ import net .fabricmc .loader .api .FabricLoader ;
7
8
import net .minecraft .client .MinecraftClient ;
8
9
import net .minecraft .client .network .ClientPlayNetworkHandler ;
9
10
import net .minecraft .client .network .PlayerListEntry ;
15
16
16
17
public class Info implements ChatListener {
17
18
private static final String PROFILE_PREFIX = "§r§e§lProfile: §r§a" ;
19
+ public static final boolean SKYBLOCKER_LOADED = FabricLoader .getInstance ().isModLoaded ("skyblocker" );
18
20
public boolean hypixel = false ;
19
21
public boolean skyblock = false ;
20
22
public boolean catacombs = false ;
@@ -109,7 +111,7 @@ private void updateFromScoreboard(MinecraftClient client) {
109
111
private void updateLocRaw () {
110
112
if (hypixel ) {
111
113
long currentTime = System .currentTimeMillis ();
112
- if (!sentLocRaw && currentTime > clientWorldJoinTime + 1000 && currentTime > lastLocRaw + 15000 ) {
114
+ if (!sentLocRaw && currentTime > clientWorldJoinTime + 1000 && currentTime > lastLocRaw + 15000 && ! SKYBLOCKER_LOADED ) {
113
115
SkyblockMod .skyblockMod .message .sendMessageAfterCooldown ("/locraw" );
114
116
sentLocRaw = true ;
115
117
lastLocRaw = currentTime ;
Original file line number Diff line number Diff line change 1
1
package com .kevinthegreat .skyblockmod .util ;
2
2
3
+ import de .hysky .skyblocker .utils .scheduler .MessageScheduler ;
3
4
import net .minecraft .client .MinecraftClient ;
4
5
import net .minecraft .text .Text ;
5
6
import net .minecraft .util .Pair ;
@@ -119,11 +120,15 @@ public void addMessage(Text message) {
119
120
}
120
121
121
122
public void sendMessageAfterCooldown (String message ) {
122
- if (lastMessage + 200 < System .currentTimeMillis ()) {
123
- sendMessage (message );
124
- lastMessage = System .currentTimeMillis ();
123
+ if (Info .SKYBLOCKER_LOADED ) {
124
+ MessageScheduler .INSTANCE .sendMessageAfterCooldown (message );
125
125
} else {
126
- messageQueue .add (new Pair <>(message , 0 ));
126
+ if (lastMessage + 200 < System .currentTimeMillis ()) {
127
+ sendMessage (message );
128
+ lastMessage = System .currentTimeMillis ();
129
+ } else {
130
+ messageQueue .add (new Pair <>(message , 0 ));
131
+ }
127
132
}
128
133
}
129
134
You can’t perform that action at this time.
0 commit comments