Skip to content

Commit

Permalink
Moved documentation related resources into documentation folder
Browse files Browse the repository at this point in the history
Renamed some classes I missed in the previous refactor
Fixed introduced bugs in third-party screens
Improved screen code and draw main title in classic login screens
  • Loading branch information
FlorianMichael committed Nov 26, 2023
1 parent 55e9c02 commit 3cd08a8
Show file tree
Hide file tree
Showing 30 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ At the time of writing, VFP is the only protocol translation platform for the cl
- Bedrock (1.20.0)

# For users
### Detailed instructions for use are available [here](.github/USAGE.md)
### Detailed instructions for use are available [here](documentation/USAGE.md)
### If you encounter any issues, please report them on the [issue tracker](https://github.com/ViaVersion/ViaFabricPlus/issues) or on the ViaVersion [Discord](https://discord.gg/viaversion)

## Known incompatibilities
Expand Down Expand Up @@ -135,7 +135,7 @@ dependencies {
</dependencies>
```

### To learn more about the API and about addons, you can simply click [here](.github/DEVELOPER_API.md)
### To learn more about the API and about addons, you can simply click [here](documentation/DEVELOPER_API.md)

## Disclaimer

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
* - Boats are probably broken. Check entity height offset fix
* - Check TO DO in MixinEntity
* - Diff ItemRegistryDiff from projects and add missing items
* - Fix third party implementations properly
*/
public class ViaFabricPlus {
private static final ViaFabricPlus instance = new ViaFabricPlus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private void addVersionSetterButton(CallbackInfo ci) {
}

// Create the button
ButtonWidget.Builder buttonBuilder = ButtonWidget.builder(forcedVersion == null ? Text.translatable("base.viafabricplus.set_version_for_this_server") : Text.literal(forcedVersion.getName()), button -> {
ButtonWidget.Builder buttonBuilder = ButtonWidget.builder(forcedVersion == null ? Text.translatable("base.viafabricplus.set_version") : Text.literal(forcedVersion.getName()), button -> {
// Store current input in case the user cancels the version selection
viaFabricPlus$nameField = serverNameField.getText();
viaFabricPlus$addressField = addressField.getText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@
public class ClassiCubeLoginScreen extends VFPScreen {
public static final ClassiCubeLoginScreen INSTANCE = new ClassiCubeLoginScreen();

private static final String CLASSI_CUBE_URL = "https://www.classicube.net/";

public ClassiCubeLoginScreen() {
super("ClassiCube Login", false);
super("ClassiCube Login", true);
}

@Override
public void open(Screen prevScreen) {
this.setupSubtitle(
Text.translatable("classicube.viafabricplus.account"),
ConfirmLinkScreen.opening(CLASSI_CUBE_URL, this, true)
ConfirmLinkScreen.opening(ClassiCubeHandler.CLASSICUBE_ROOT_URI.toString(), this, true)
);
super.open(prevScreen);
}
Expand Down Expand Up @@ -106,14 +104,16 @@ public void handleException(Throwable throwable) {

@Override
public void close() {
// The user wasn't logged in when opening this screen, so he cancelled the login process, so we can safely unset the account
ViaFabricPlus.global().getSaveManager().getAccountsSave().setClassicubeAccount(null);
MainScreen.INSTANCE.open(prevScreen);
}

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
this.renderTitle(context);

context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 70, 16777215);
this.renderSubtitle(context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@ public void handleException(Throwable throwable) {

@Override
public void close() {
// The user wasn't logged in when opening this screen, so he cancelled the login process, so we can safely unset the account
ViaFabricPlus.global().getSaveManager().getAccountsSave().setClassicubeAccount(null);
MainScreen.INSTANCE.open(prevScreen);
}

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
this.renderTitle(context);

context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 70, 16777215);
this.renderSubtitle(context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

import java.awt.*;

public class ProtocolSyncBooleanSettingRenderer extends VFPListEntry {
public class VersionedBooleanSettingRenderer extends VFPListEntry {
private final VersionedBooleanSetting value;

public ProtocolSyncBooleanSettingRenderer(VersionedBooleanSetting value) {
public VersionedBooleanSettingRenderer(VersionedBooleanSetting value) {
this.value = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import com.google.gson.JsonObject;
import de.florianmichael.viafabricplus.screen.base.VFPListEntry;
import de.florianmichael.viafabricplus.screen.settings.ProtocolSyncBooleanSettingRenderer;
import de.florianmichael.viafabricplus.screen.settings.VersionedBooleanSettingRenderer;
import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
import net.minecraft.text.MutableText;
import net.raphimc.vialoader.util.VersionRange;
Expand All @@ -41,7 +41,7 @@ public VersionedBooleanSetting(SettingGroup parent, MutableText name, VersionRan

@Override
public VFPListEntry makeSettingRenderer() {
return new ProtocolSyncBooleanSettingRenderer(this);
return new VersionedBooleanSettingRenderer(this);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via translates to: %s",
"base.viafabricplus.server_version": "Server version: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Set version for this server",
"base.viafabricplus.set_version": "Set version",
"base.viafabricplus.vanilla_and_modded": "Vanilla and Modded",
"base.viafabricplus.vanilla_only": "Vanilla only",
"base.viafabricplus.kick": "Kick",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_cl.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_ec.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_uy.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/es_ve.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via se traduce a: %s",
"base.viafabricplus.server_version": "Versión del servidor: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Asignar la versión para este servidor",
"base.viafabricplus.set_version": "Asignar la versión para este servidor",
"base.viafabricplus.vanilla_and_modded": "Vanilla y Modificado",
"base.viafabricplus.vanilla_only": "Solo Vanilla",
"base.viafabricplus.kick": "Echar",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/hu_hu.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"modmenu.descriptionTranslation.viafabricplus": "Fabric mod, mellyel MINDEN Minecraft szerververzióhoz (Release, Beta, Alpha, Classic, Snapshotok, Bedrock) csatlakozhatsz, életminőségi javításokkal a játékmenethez",

"base.viafabricplus.set_version_for_this_server": "Verzió beállítása erre a szerverre",
"base.viafabricplus.set_version": "Verzió beállítása erre a szerverre",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.cancel": "Mégse",
"base.viafabricplus.cancel_and_reset": "Mégse és visszaállítás",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/pl_pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via tłumaczy na: %s",
"base.viafabricplus.server_version": "Wersja serwera: %s",
"base.viafabricplus.auto": "Auto",
"base.viafabricplus.set_version_for_this_server": "Ustaw wersję dla tego serwera",
"base.viafabricplus.set_version": "Ustaw wersję dla tego serwera",
"base.viafabricplus.vanilla_and_modded": "Vanilla i modyfikacje",
"base.viafabricplus.vanilla_only": "Tylko vanilla",
"base.viafabricplus.kick": "Wyrzuć",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/uk_ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "Via переклади до: %s",
"base.viafabricplus.server_version": "Версія серверу: %s",
"base.viafabricplus.auto": "Автоматично",
"base.viafabricplus.set_version_for_this_server": "Встановити версію для цього серверу",
"base.viafabricplus.set_version": "Встановити версію для цього серверу",
"base.viafabricplus.vanilla_and_modded": "Ванілла та з Модами",
"base.viafabricplus.vanilla_only": "Тільки Ванілла",
"base.viafabricplus.kick": "Викинути",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "连接所用版本:%s",
"base.viafabricplus.server_version": "服务器版本:%s",
"base.viafabricplus.auto": "自动",
"base.viafabricplus.set_version_for_this_server": "更改当前服务器版本",
"base.viafabricplus.set_version": "更改当前服务器版本",
"base.viafabricplus.vanilla_and_modded": "原版和模组",
"base.viafabricplus.vanilla_only": "仅原版",
"base.viafabricplus.kick": "踢出",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/zh_hk.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"base.viafabricplus.via_translates_to": "轉換為:%s",
"base.viafabricplus.server_version": "伺服器版本:%s",
"base.viafabricplus.auto": "自動",
"base.viafabricplus.set_version_for_this_server": "設置此伺服器嘅版本",
"base.viafabricplus.set_version": "設置此伺服器嘅版本",
"base.viafabricplus.vanilla_and_modded": "原版和模組嘅",
"base.viafabricplus.vanilla_only": "僅原版",
"base.viafabricplus.kick": "踢出",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/viafabricplus/lang/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"base.viafabricplus.via_translates_to": "轉換為:%s",
"base.viafabricplus.server_version": "伺服器版本:%s",
"base.viafabricplus.auto": "自動",
"base.viafabricplus.set_version_for_this_server": "設定這個伺服器的版本",
"base.viafabricplus.set_version": "設定這個伺服器的版本",
"base.viafabricplus.vanilla_and_modded": "原版和模組",
"base.viafabricplus.vanilla_only": "僅原版",
"base.viafabricplus.kick": "踢出",
Expand Down

0 comments on commit 3cd08a8

Please sign in to comment.