Skip to content

Commit

Permalink
Made the mod actually work.
Browse files Browse the repository at this point in the history
  • Loading branch information
Provismet committed Oct 1, 2023
1 parent 06ae58d commit 5df1205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/provismet/vmcmc/ClientVMC.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static Identifier identifier (String path) {

@Override
public void onInitializeClient () {
PacketSender.initPort(35404);
PacketSender.initPort("127.0.0.1", 35404);
CaptureRegistry.registerStandardEvents();

ClientTickEvents.END_CLIENT_TICK.register(client -> {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/provismet/vmcmc/vmc/PacketSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
public class PacketSender {
private static OSCPortOut portOut;

public static void initPort (int port) {
public static void initPort (String host, int port) {
try {
portOut = new OSCPortOut(InetAddress.getLocalHost(), port);
ClientVMC.LOGGER.info("Created VMC socket at port: " + port);
portOut = new OSCPortOut(InetAddress.getByName(host), port); // Use 127.0.0.1 and NOT InetAddress.getLocalHost(), the latter does not work.
ClientVMC.LOGGER.info("Created VMC socket at " + host + ":" + port);
}
catch (IOException e) {
ClientVMC.LOGGER.error("Failed to create port:", e);
Expand Down

0 comments on commit 5df1205

Please sign in to comment.