Skip to content

Commit

Permalink
Applied screen scaling fix to the forge 1.19.2 version and ofc the gr…
Browse files Browse the repository at this point in the history
…adle changes
  • Loading branch information
Creativious committed Sep 30, 2023
1 parent fdeaca6 commit e2d03a6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 45 deletions.
5 changes: 2 additions & 3 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules/fakeplayers.iml

This file was deleted.

11 changes: 2 additions & 9 deletions .idea/modules/fakeplayers.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions .idea/modules/fakeplayers.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion platform-forge-1.19.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'net.minecraftforge.gradle' version '5.1.+'
}
group = 'com.duzo.fakeplayers'
version = '0.7.8+1.19.2'
version = "${mod_version}-${minecraft_version}-FORGE"
archivesBaseName = "fakeplayers"

// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
Expand Down
3 changes: 3 additions & 0 deletions platform-forge-1.19.2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=1.19.2
mod_version=0.7.9
2 changes: 0 additions & 2 deletions platform-forge-1.19.2/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ pluginManagement {
maven { url = 'https://maven.minecraftforge.net/' }
}
}

rootProject.name = 'fakeplayers'
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public FPSkinScreen(Component component, FakePlayerEntity humanoid, Player playe
@Override
protected void init() {
super.init();
int l = this.height / 4 + 48;
int l = ((this.height - this.imageHeight) / 2) + (int) (this.imageHeight * 0.05);
int i = (this.width - this.imageWidth) / 2;
int j = (this.height - this.imageWidth) / 2;
int j = this.imageWidth - (int) ( this.imageWidth * 0.1);

assert this.minecraft != null;
this.input = new EditBox(this.minecraft.fontFilterFishy, (i) + (this.imageWidth/2) - j + (j/2),l,j, 12, Component.translatable("screen.fakeplayers.skin"));
Expand All @@ -53,48 +53,57 @@ protected void init() {
if (FPClientConfigs.USES_FILES.get()) {
this.input.setValue("PUT FILE PATH HERE!");
}
int after_input_edit_box_y = this.input.y + this.input.getHeight() + ((int) (this.height * 0.01));

this.chatBox = new EditBox(this.minecraft.fontFilterFishy, (i) + (this.imageWidth/2) - j + (j/2),l + 20,j, 12, Component.translatable("screen.fakeplayers.chatbox"));
this.chatBox = new EditBox(this.minecraft.fontFilterFishy, (i) + (this.imageWidth/2) - j + (j/2),after_input_edit_box_y,j, 12, Component.translatable("screen.fakeplayers.chatbox"));
this.chatBox.setValue("Input chat message here!");
this.chatBox.setEditable(true);
this.chatBox.setMaxLength(256);
this.chatBox.setBordered(true);
this.addWidget(this.chatBox);
int after_chat_edit_box_y = this.chatBox.y + this.chatBox.getHeight() + ((int) (this.height * 0.02));

this.send = new Button((i) + (this.imageWidth/2) - (98/2),l + 40,98,20,Component.translatable("screens.fakeplayers.send"), (p_96786_) -> {
this.send = new Button((i) + (this.imageWidth/2) - (98/2),after_chat_edit_box_y,98,20,Component.translatable("screens.fakeplayers.send"), (p_96786_) -> {
this.pressSendChatButton();
});
this.addRenderableWidget(this.send);

this.confirm = new Button((i) + (this.imageWidth/2) - (98/2),l + (128),98,20,Component.translatable("screens.fakeplayers.done"), (p_96786_) -> {
this.pressDoneButton();
});
this.addRenderableWidget(this.confirm);
int after_send_button_y = this.send.y + this.send.getHeight() + ((int) (this.height * 0.05));

this.sitting = new Button((i) + (this.imageWidth/2) - (23), l + 60,46,20,Component.translatable("screens.fakeplayers.sit"), (p_96786_) -> {
this.sitting = new Button((i) + (this.imageWidth/2) - (23), after_send_button_y,46,20,Component.translatable("screens.fakeplayers.sit"), (p_96786_) -> {
this.pressToggleSit();
});
this.addRenderableWidget(this.sitting);

this.nametagShown = new Button((i) + (this.imageWidth/2) - (43), l + 80,86,20,Component.translatable("screens.fakeplayers.nametagShown"), (p_96786_) -> {
int after_sitting_button_y = this.sitting.y + this.sitting.getHeight();

this.nametagShown = new Button((i) + (this.imageWidth/2) - (43), after_sitting_button_y,86,20,Component.translatable("screens.fakeplayers.nametagShown"), (p_96786_) -> {
this.pressNameTagShown();
});
this.addRenderableWidget(this.nametagShown);
int after_nametag_shown_button_y = this.nametagShown.y + this.nametagShown.getHeight();


this.stayPut = new Button((i) + (this.imageWidth/2) - 23, l + 100,46,20,Component.translatable("screens.fakeplayers.stayPut"), (p_96786_) -> {
this.stayPut = new Button((i) + (this.imageWidth/2) - 23, after_nametag_shown_button_y,46,20,Component.translatable("screens.fakeplayers.stayPut"), (p_96786_) -> {
this.pressStayPut();
});
this.addRenderableWidget(this.stayPut);

this.wander = new Button((i) + (this.imageWidth/2) - (23*3), l + 100,46,20,Component.translatable("screens.fakeplayers.wander"), (p_96786_) -> {
this.wander = new Button((i) + (this.imageWidth/2) - (23*3), after_nametag_shown_button_y,46,20,Component.translatable("screens.fakeplayers.wander"), (p_96786_) -> {
this.pressWanderButton();
});
this.addRenderableWidget(this.wander);

this.follow = new Button((i) + (this.imageWidth/2) + 23, l + 100,46,20,Component.translatable("screens.fakeplayers.follow"), (p_96786_) -> {
this.follow = new Button((i) + (this.imageWidth/2) + 23, after_nametag_shown_button_y,46,20,Component.translatable("screens.fakeplayers.follow"), (p_96786_) -> {
this.pressFollowButton();
});
this.addRenderableWidget(this.follow);
int after_other_buttons_y = this.follow.y + this.follow.getHeight() + ((int) (this.height * 0.02));

this.confirm = new Button((i) + (this.imageWidth/2) - (98/2),after_other_buttons_y,98,20,Component.translatable("screens.fakeplayers.done"), (p_96786_) -> {
this.pressDoneButton();
});
this.addRenderableWidget(this.confirm);
}


Expand Down

0 comments on commit e2d03a6

Please sign in to comment.