Skip to content

Commit

Permalink
Rename API Impl Classes to Match API Classes
Browse files Browse the repository at this point in the history
  • Loading branch information
hammy275 committed Jan 13, 2025
1 parent 9fbf6e5 commit 86c0fa6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/org/vivecraft/api/VivecraftAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import net.minecraft.world.entity.player.Player;
import org.vivecraft.api.data.VRData;
import org.vivecraft.common.api_impl.APIImpl;
import org.vivecraft.common.api_impl.VivecraftAPIImpl;

import javax.annotation.Nullable;

Expand All @@ -12,7 +12,7 @@ public interface VivecraftAPI {
* @return The Vivecraft API instance for interacting with Vivecraft's API.
*/
static VivecraftAPI getInstance() {
return APIImpl.INSTANCE;
return VivecraftAPIImpl.INSTANCE;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import net.minecraft.world.InteractionHand;
import org.vivecraft.api.client.data.VRPoseHistory;
import org.vivecraft.api.data.VRData;
import org.vivecraft.client.api_impl.ClientAPIImpl;
import org.vivecraft.client.api_impl.VivecraftClientAPIImpl;
import org.vivecraft.client_vr.render.RenderPass;

import javax.annotation.Nullable;

public interface VivecraftClientAPI {

static VivecraftClientAPI getInstance() {
return ClientAPIImpl.INSTANCE;
return VivecraftClientAPIImpl.INSTANCE;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
import org.vivecraft.client_vr.gameplay.screenhandlers.KeyboardHandler;
import org.vivecraft.client_vr.provider.ControllerType;
import org.vivecraft.client_vr.render.RenderPass;
import org.vivecraft.client_vr.settings.VRSettings;
import org.vivecraft.client_xr.render_pass.RenderPassType;

public final class ClientAPIImpl implements VivecraftClientAPI {
public final class VivecraftClientAPIImpl implements VivecraftClientAPI {

public static final ClientAPIImpl INSTANCE = new ClientAPIImpl();
public static final VivecraftClientAPIImpl INSTANCE = new VivecraftClientAPIImpl();

private final VRPoseHistoryImpl hmdHistory = new VRPoseHistoryImpl();
private VRPoseHistoryImpl c0History = new VRPoseHistoryImpl();
private VRPoseHistoryImpl c1History = new VRPoseHistoryImpl();

private ClientAPIImpl() {
private VivecraftClientAPIImpl() {
}

public void clearHistories() {
Expand Down
5 changes: 2 additions & 3 deletions common/src/main/java/org/vivecraft/client_vr/VRState.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import org.apache.commons.lang3.StringUtils;
import org.vivecraft.api.client.Tracker;
import org.vivecraft.client.Xplat;
import org.vivecraft.client.gui.screens.ErrorScreen;
import org.vivecraft.client.gui.screens.GarbageCollectorScreen;
import org.vivecraft.client.utils.TextUtils;
import org.vivecraft.client_vr.gameplay.VRPlayer;
import org.vivecraft.client.api_impl.ClientAPIImpl;
import org.vivecraft.client.api_impl.VivecraftClientAPIImpl;
import org.vivecraft.client_vr.menuworlds.MenuWorldRenderer;
import org.vivecraft.client_vr.provider.nullvr.NullVR;
import org.vivecraft.client_vr.provider.openvr_lwjgl.MCOpenVR;
Expand Down Expand Up @@ -154,6 +153,6 @@ public static void destroyVR(boolean disableVRSetting) {
// this reloads any PostChain, at least in vanilla
Minecraft.getInstance().levelRenderer.onResourceManagerReload(Minecraft.getInstance().getResourceManager());
}
ClientAPIImpl.INSTANCE.clearHistories();
VivecraftClientAPIImpl.INSTANCE.clearHistories();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.joml.Vector3fc;
import org.vivecraft.api.client.Tracker;
import org.vivecraft.client.VivecraftVRMod;
import org.vivecraft.client.api_impl.ClientAPIImpl;
import org.vivecraft.client.api_impl.VivecraftClientAPIImpl;
import org.vivecraft.client_vr.ClientDataHolderVR;
import org.vivecraft.common.VRServerPerms;
import org.vivecraft.client.network.ClientNetworking;
Expand All @@ -44,8 +44,6 @@
import org.vivecraft.common.utils.MathUtils;
import org.vivecraft.data.ItemTags;

import java.util.ArrayList;

public class VRPlayer {
private final Minecraft mc = Minecraft.getInstance();
private final ClientDataHolderVR dh = ClientDataHolderVR.getInstance();
Expand Down Expand Up @@ -239,7 +237,7 @@ public void preTick() {
this.dh.vrSettings.worldRotation = this.dh.vr.seatedRot;
}

ClientAPIImpl.INSTANCE.addPosesToHistory(this.vrdata_world_pre.asVRData());
VivecraftClientAPIImpl.INSTANCE.addPosesToHistory(this.vrdata_world_pre.asVRData());
}

public void postTick() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
import org.vivecraft.client.ClientVRPlayers;
import org.jetbrains.annotations.Nullable;
import org.vivecraft.api.data.VRData;
import org.vivecraft.client_vr.ClientDataHolderVR;
import org.vivecraft.server.ServerVRPlayers;

public final class APIImpl implements VivecraftAPI {
public final class VivecraftAPIImpl implements VivecraftAPI {

public static final APIImpl INSTANCE = new APIImpl();
public static final VivecraftAPIImpl INSTANCE = new VivecraftAPIImpl();

private APIImpl() {
private VivecraftAPIImpl() {
}

@Override
Expand Down

0 comments on commit 86c0fa6

Please sign in to comment.