translation stuff, update MCEF, change homepage

This commit is contained in:
GiantLuigi4 2023-06-06 17:25:48 -04:00
parent 58bc77a72a
commit b4754dd15c
6 changed files with 27 additions and 20 deletions

View File

@ -76,11 +76,12 @@ dependencies {
minecraft 'net.minecraftforge:forge:1.19.2-43.2.10'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
implementation fg.deobf("com.github.Mysticpasta1:mcef-forge:f0c7e2e361")
// implementation fg.deobf("curse.maven:cloth_config_forge-348521:3972423")
// implementation fg.deobf("curse.maven:SU-370704:4485052")
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:smallerunits:2.1.3")
// implementation fg.deobf("flatdir.lib:mcef:1.2.4")
// implementation fg.deobf("flatdir.lib:smallerunits:2.1.3")
compileOnly fg.deobf("curse.maven:vivecraft-667903:4409427")
}

View File

@ -33,13 +33,13 @@ public class SharedProxy {
public void init() {
MinecraftForge.EVENT_BUS.addListener(this::onCefInit);
}
public void postInit() {
}
public void onCefInit(CefInitEvent event) {
}
@Deprecated(forRemoval = true)
public Level getWorld(ResourceKey<Level> dim) {
return getServer().getLevel(dim);

View File

@ -15,7 +15,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.Options;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.ContainerScreen;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.multiplayer.ClientAdvancements;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType;
@ -663,8 +663,8 @@ public class ClientProxy extends SharedProxy implements IDisplayHandler, IJSQuer
String wikiName = null;
if (mc.screen instanceof WDScreen)
wikiName = ((WDScreen) mc.screen).getWikiPageName();
else if (mc.screen instanceof ContainerScreen) {
Slot slot = ((ContainerScreen) mc.screen).getSlotUnderMouse();
else if (mc.screen instanceof AbstractContainerScreen) {
Slot slot = ((AbstractContainerScreen) mc.screen).getSlotUnderMouse();
if (slot != null && slot.hasItem() && slot.getItem().getItem() instanceof WDItem)
wikiName = ((WDItem) slot.getItem().getItem()).getWikiName(slot.getItem());

View File

@ -122,7 +122,7 @@ public class GuiServer extends WDScreen {
x = font.drawShadow(poseStack, userPrompt, x, y, 0xFFFFFFFF, false);
x = font.drawShadow(poseStack, prompt, x, y, 0xFFFFFFFF, false);
} else {
x = font.drawShadow(poseStack, "<Press DOWN to show more>", x, y, 0xFFFFFFFF, false);
x = font.drawShadow(poseStack, tr("press_for_more"), x, y, 0xFFFFFFFF, false);
}
}
@ -206,15 +206,14 @@ public class GuiServer extends WDScreen {
final int maxl = uploadWizard ? MAX_LINES : (MAX_LINES - 1); //Cuz prompt is hidden
if (!queue.isEmpty()) {
while (!queue.isEmpty()) {
if (lines.size() >= maxl) {
if (lines.size() >= maxl)
break;
}
writeLine(queue.remove(0));
}
}
while (lines.size() > maxl) {
while (lines.size() > maxl)
lines.remove(0);
}
}
@Override
@ -369,7 +368,10 @@ public class GuiServer extends WDScreen {
return;
} else if (promptLocked)
return;
if (keyCode == GLFW.GLFW_KEY_SPACE)
typedChar = ' ';
if (keyCode == GLFW.GLFW_KEY_BACKSPACE) {
if (prompt.length() > 0)
prompt = prompt.substring(0, prompt.length() - 1);
@ -785,7 +787,10 @@ public class GuiServer extends WDScreen {
ArrayList<String> queue = new ArrayList<>();
private void queueLine(String line) {
if (queueRead > 1) {
final int maxl = uploadWizard ? MAX_LINES : (MAX_LINES - 1); //Cuz prompt is hidden
if (lines.size() < maxl)
writeLine(line);
else if (queueRead > 1) {
writeLine(line);
queueRead -= 1;
} else queue.add(line);

View File

@ -44,8 +44,8 @@ public class CommonConfig {
@Name("home_page")
@Comment("The page which screens should open up to when turning on")
@Translation("config.webdisplays.home_page")
@Default(valueStr = "https://www.google.com")
public static String homepage = "https://www.google.com";
@Default(valueStr = "mod://webdisplays/main.html")
public static String homepage = "mod://webdisplays/main.html";
}
@Comment("Options for the in world screen blocks")

View File

@ -7,6 +7,7 @@
"block.webdisplays.ccinterface": "ComputerCraft Interface",
"block.webdisplays.cointerface": "OpenComputers Interface",
"block.webdisplays.redctrl": "Redstone Controller",
"block.webdisplays.redctrl": "Redstone Controller",
"block.webdisplays.server": "Server",
"item.webdisplays.screencfg": "Screen Configurator",
"item.webdisplays.ownerthief": "Ownership Thief [ADMIN]",
@ -152,6 +153,6 @@
"webdisplays.server.help.url": "Copies a file URL into your clipboard",
"webdisplays.server.help.upload": "Opens the upload wizard",
"webdisplays.server.help.rm": "Deletes a file",
"webdisplays.server.help.reconnect": "Reconnect to miniserv [DEBUG]"
"webdisplays.server.help.reconnect": "Reconnect to miniserv [DEBUG]",
"webdisplays.server.press_for_more": "<Press DOWN to show more>"
}