Fix 1.19.4 issues

This commit is contained in:
AxolotlMaid 2023-05-02 00:20:20 +01:00
parent 6d0fdcf720
commit 5ff6f7e844
5 changed files with 12 additions and 7 deletions

View file

@ -7,6 +7,7 @@ import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget; import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.screen.ScreenTexts; import net.minecraft.screen.ScreenTexts;
import net.minecraft.text.OrderedText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
public class EditProfileScreen extends Screen { public class EditProfileScreen extends Screen {
@ -46,8 +47,8 @@ public class EditProfileScreen extends Screen {
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
this.renderBackground(matrices); this.renderBackground(matrices);
drawCenteredText(matrices, this.textRenderer, Text.of(this.title.getString() + profileName.getString()), this.width / 2 , 8, 16777215); drawCenteredTextWithShadow(matrices, this.textRenderer, Text.of(this.title.getString() + profileName.getString()).asOrderedText(), this.width / 2 , 8, 16777215);
drawCenteredText(matrices, this.textRenderer, "Profile Name", this.width / 2 - 70, this.height / 4 + 10, 16777215); drawCenteredTextWithShadow(matrices, this.textRenderer, Text.translatable("gui.options-profiles.profile-name-text").asOrderedText(), this.width / 2 - 70, this.height / 4 + 10, 16777215);
super.render(matrices, mouseX, mouseY, delta); super.render(matrices, mouseX, mouseY, delta);
} }
} }

View file

@ -82,10 +82,12 @@ public class ProfilesListWidget extends ElementListWidget<ProfilesListWidget.Ent
Objects.requireNonNull(ProfilesListWidget.this.client.textRenderer); Objects.requireNonNull(ProfilesListWidget.this.client.textRenderer);
var10000.draw(matrices, profileName, x, (float)(var10004 - 9 / 2), 16777215); var10000.draw(matrices, profileName, x, (float)(var10004 - 9 / 2), 16777215);
this.editButton.setPos(x + 115, y); this.editButton.setX(x + 115);
this.editButton.setY(y);
this.editButton.render(matrices, mouseX, mouseY, tickDelta); this.editButton.render(matrices, mouseX, mouseY, tickDelta);
this.loadButton.setPos(x + 190, y); this.loadButton.setX(x + 190);
this.loadButton.setY(y);
this.loadButton.render(matrices, mouseX, mouseY, tickDelta); this.loadButton.render(matrices, mouseX, mouseY, tickDelta);
} }

View file

@ -5,6 +5,8 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.screen.ScreenTexts; import net.minecraft.screen.ScreenTexts;
import net.minecraft.text.MutableText;
import net.minecraft.text.OrderedText;
import net.minecraft.text.Text; import net.minecraft.text.Text;
public class ProfilesScreen extends Screen { public class ProfilesScreen extends Screen {
@ -35,7 +37,7 @@ public class ProfilesScreen extends Screen {
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
this.renderBackground(matrices); this.renderBackground(matrices);
this.profilesList.render(matrices, mouseX, mouseY, delta); this.profilesList.render(matrices, mouseX, mouseY, delta);
drawCenteredText(matrices, this.textRenderer, this.title, this.width / 2, 8, 16777215); drawCenteredTextWithShadow(matrices, this.textRenderer, this.title.asOrderedText(), this.width / 2, 8, 16777215);
super.render(matrices, mouseX, mouseY, delta); super.render(matrices, mouseX, mouseY, delta);
} }
} }

View file

@ -1,5 +1,6 @@
{ {
"gui.options-profiles.profiles-menu-text": "Profiles Menu", "gui.options-profiles.profiles-menu-text": "Profiles Menu",
"gui.options-profiles.profile-name-text": "Profile Name",
"gui.options-profiles.edit-profiles-screen-text": "Editing Profile: ", "gui.options-profiles.edit-profiles-screen-text": "Editing Profile: ",
"gui.options-profiles.delete-profile-text": "Delete Profile", "gui.options-profiles.delete-profile-text": "Delete Profile",
"gui.options-profiles.save-profile-text": "Save Profile", "gui.options-profiles.save-profile-text": "Save Profile",

View file

@ -28,6 +28,5 @@
"java": ">=17", "java": ">=17",
"fabric-api": "*" "fabric-api": "*"
}, },
"suggests": { "suggests": {}
}
} }