From 5ac5bada9dfc5fa6afee42531e9a0945f9709ab6 Mon Sep 17 00:00:00 2001 From: GiantLuigi4 <49770992+GiantLuigi4@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:52:26 -0400 Subject: [PATCH] vivecraft support's back --- README.md | 22 +++++++------------ TODO.md | 12 ++++++++++ build.gradle | 8 +------ .../montoyo/wd/client/gui/GuiKeyboard.java | 14 +++++++----- 4 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 TODO.md diff --git a/README.md b/README.md index e270dc5..e19d6e3 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,10 @@ -# WebDisplays for Minecraft 1.19.2 -This is a fork of the Web Displays mod from 1.12, updated to work in newer versions, and with some bug fixes and reworking. +# CinemaMod WebDisplays +This is a fork of the WebDisplays mod from 1.12, updated to work in newer versions, and with some bug fixes and reworking. + +Cinemamod WebDisplays also uses CinemaMod's [MCEF](https://github.com/CinemaMod/mcef) and [JCEF](https://github.com/CinemaMod/java-cef), which should allow for WD to be a bit more seamless than [Chromium's JCEF](https://github.com/chromiumembedded/java-cef) would allow for. + +# WebDisplays +WebDisplays adds a screen block, which allows you to browse the internet in minecraft. ### Wiki -* The Wiki that details all blocks/items can be found on my website https://montoyo.net/wdwiki/ - -### Delayed things -* Plugin API -* The Shop (what) -* Center camera to screen when using keyboard -* minePad management: check GuiContainer.draggedStack for minePad -* In-game command to add/remove blacklisted domains -* Config: RPMP (Real pixels per Minecraft pixels) (what) -* CC Interface (for when it's actually possible, since the screens are client only currently, but a config option is planned to change that) -* Redstone controls (same reason as CC interface) -* Redo minisrv logic? +* A Wiki which details all blocks/items can be found on [montoyo's website](https://montoyo.net/wdwiki/). However, a lot of stuff has changed since that wiki was written. diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..155c7b9 --- /dev/null +++ b/TODO.md @@ -0,0 +1,12 @@ +### Delayed things +* Plugin API +* Center camera to screen when using keyboard + * Allow actual cursor to be used via aiming it at the screen + * maybe aim at the focused element instead of the center of the screen, depends on if that information can be extracted +* minePad management: check GuiContainer.draggedStack for minePad +* In-game command to add/remove blacklisted domains +* CC Interface (for when it's actually possible, since the screens are client only currently, but a config option is planned to change that) +* Redstone controls (same reason as CC interface) +* Potentially redo minisrv logic? + * Perhaps hook it up to vanilla networking + * Maybe don't use it at all in single player diff --git a/build.gradle b/build.gradle index 84deebd..3498e50 100644 --- a/build.gradle +++ b/build.gradle @@ -80,14 +80,8 @@ dependencies { minecraft 'net.neoforged:forge:1.20.1-47.1.65' annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' -// implementation fg.deobf("com.github.Mysticpasta1:mcef-forge:2ec6581622") -// implementation fg.deobf("curse.maven:SU-370704:4485052") // implementation fg.deobf("curse.maven:spark-361579:4381167") - -// implementation fg.deobf("flatdir.lib:mcef:2.x") -// implementation fg.deobf("flatdir.lib:smallerunits:2.1.3") - -// compileOnly fg.deobf("curse.maven:vivecraft-667903:4409427") + compileOnly fg.deobf("curse.maven:vivecraft-667903:4794431") implementation fg.deobf("com.cinemamod:mcef-forge:2.0.1-1.20.1") { transitive = false diff --git a/src/main/java/net/montoyo/wd/client/gui/GuiKeyboard.java b/src/main/java/net/montoyo/wd/client/gui/GuiKeyboard.java index 9bfacd7..04c8e95 100644 --- a/src/main/java/net/montoyo/wd/client/gui/GuiKeyboard.java +++ b/src/main/java/net/montoyo/wd/client/gui/GuiKeyboard.java @@ -25,6 +25,8 @@ import net.montoyo.wd.utilities.Log; import net.montoyo.wd.utilities.TypeData; import net.montoyo.wd.utilities.Util; import org.lwjgl.glfw.GLFW; +import org.vivecraft.client_vr.gameplay.VRPlayer; +import org.vivecraft.client_vr.gameplay.screenhandlers.KeyboardHandler; //import org.vivecraft.gameplay.VRPlayer; //import org.vivecraft.gameplay.screenhandlers.KeyboardHandler; @@ -136,16 +138,16 @@ public class GuiKeyboard extends WDScreen { defaultBackground = showWarning; syncTicks = 5; -// if (vivecraftPresent) -// if (VRPlayer.get() != null) -// KeyboardHandler.setOverlayShowing(true); + if (vivecraftPresent) + if (VRPlayer.get() != null) + KeyboardHandler.setOverlayShowing(true); } @Override public void onClose() { -// if (vivecraftPresent) -// if (VRPlayer.get() != null) -// KeyboardHandler.setOverlayShowing(false); + if (vivecraftPresent) + if (VRPlayer.get() != null) + KeyboardHandler.setOverlayShowing(false); super.onClose(); }