Skip to content

Commit 016e059

Browse files
committed
Correctly name the mod file and make it a proxy of sorts
1 parent 57ceccd commit 016e059

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package net.minecraft.src;
2+
3+
import net.minecraft.src.*;
4+
5+
import tc.oc.projectares.client.ProjectAres;
6+
7+
public final class mod_ProjectAres extends BaseMod {
8+
private static ProjectAres pa;
9+
10+
public static mod_ProjectAres get() {
11+
for(Object mod : ModLoader.getLoadedMods()) {
12+
if(mod instanceof mod_ProjectAres) {
13+
return (mod_ProjectAres) mod;
14+
}
15+
}
16+
return null;
17+
}
18+
19+
public void load() {
20+
this.pa = new ProjectAres();
21+
}
22+
23+
public void serverCustomPaylod(NetServerHandler serverHandler, Packet250CustomPayload packet) {
24+
this.pa.onCustomPacket(serverHandler, packet.channel, packet.length, packet.data);
25+
}
26+
27+
public String getVersion() {
28+
return "0.1";
29+
}
30+
}
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
package tc.oc.projectares.client;
22

3-
import net.minecraft.src.BaseMod;
3+
import net.minecraft.src.NetServerHandler;
44

5-
public final class ProjectAres extends BaseMod {
5+
public final class ProjectAres {
6+
private static ProjectAres pa;
67

7-
public void load() {}
8+
public static ProjectAres get() {
9+
return pa;
10+
}
811

9-
public String getVersion() {
10-
return "0.1";
12+
public ProjectAres() {
13+
pa = this;
1114
}
12-
}
15+
16+
public void onCustomPacket(NetServerHandler serverHandler, String channel, int length, byte[] data) {}
17+
}

0 commit comments

Comments
 (0)