-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 3 additions & 15 deletions
18
common/src/main/java/net/blf02/vrapi/debug/DebugSubscriber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
package net.blf02.vrapi.debug; | ||
|
||
import net.blf02.vrapi.api.data.IVRData; | ||
import net.blf02.vrapi.common.VRAPI; | ||
import net.minecraft.core.particles.ParticleTypes; | ||
import net.minecraft.world.entity.player.Player; | ||
|
||
public class DebugSubscriber { | ||
|
||
public static void onPlayerTick(Player player) { | ||
if (VRAPI.VRAPIInstance.playerInVR(player)) { | ||
IVRData hmd = VRAPI.VRAPIInstance.getVRPlayer(player).getHMD(); | ||
player.level.addParticle(ParticleTypes.SNOWFLAKE, | ||
hmd.position().x, hmd.position().y, hmd.position().z, | ||
0.01, 0.01, 0.01); | ||
IVRData left = VRAPI.VRAPIInstance.getVRPlayer(player).getController1(); | ||
player.level.addParticle(ParticleTypes.ANGRY_VILLAGER, | ||
left.position().x, left.position().y, left.position().z, | ||
0.01, 0.01, 0.01); | ||
IVRData right = VRAPI.VRAPIInstance.getVRPlayer(player).getController0(); | ||
player.level.addParticle(ParticleTypes.FALLING_WATER, | ||
right.position().x, right.position().y, right.position().z, | ||
0.01, 0.01, 0.01); | ||
if (VRAPI.VRAPIInstance.playerInVR(player) && player.level.isClientSide) { | ||
VRAPI.VRAPIInstance.triggerHapticPulse(1, 0.05f, | ||
null); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters