diff --git a/platform-forge-1.20.1/build.gradle b/platform-forge-1.20.1/build.gradle index 5fa3a32..fc89928 100644 --- a/platform-forge-1.20.1/build.gradle +++ b/platform-forge-1.20.1/build.gradle @@ -5,6 +5,8 @@ plugins { id 'net.minecraftforge.gradle' version '[6.0,6.2)' } +mod_version = "${mod_version}-${minecraft_version}-FORGE" + version = mod_version group = mod_group_id diff --git a/platform-forge-1.20.1/gradle.properties b/platform-forge-1.20.1/gradle.properties index 035e8ae..c60de30 100644 --- a/platform-forge-1.20.1/gradle.properties +++ b/platform-forge-1.20.1/gradle.properties @@ -48,7 +48,7 @@ mod_name=Fake Players # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ -mod_version=0.7.6+1.20.1 +mod_version=0.7.7 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/platform-forge-1.20.1/src/main/java/com/duzo/fakeplayers/client/screens/FPSkinScreen.java b/platform-forge-1.20.1/src/main/java/com/duzo/fakeplayers/client/screens/FPSkinScreen.java index 487440b..77836bd 100644 --- a/platform-forge-1.20.1/src/main/java/com/duzo/fakeplayers/client/screens/FPSkinScreen.java +++ b/platform-forge-1.20.1/src/main/java/com/duzo/fakeplayers/client/screens/FPSkinScreen.java @@ -41,10 +41,10 @@ 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")); this.input.setValue(this.humanoid.getURL()); @@ -55,40 +55,49 @@ protected void init() { if (FPClientConfigs.USES_FILES.get()) { this.input.setValue("PUT FILE PATH HERE!"); } - - this.chatBox = new EditBox(this.minecraft.fontFilterFishy, (i) + (this.imageWidth/2) - j + (j/2),l + 20,j, 12, Component.translatable("screen.fakeplayers.chatbox")); + int after_input_edit_box_y = this.input.getY() + this.input.getHeight() + ((int) (this.height * 0.01)); + + 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(100); this.chatBox.setBordered(true); this.addWidget(this.chatBox); + int after_chat_edit_box_y = this.chatBox.getY() + this.chatBox.getHeight() + ((int) (this.height * 0.02)); + this.send = new Button.Builder(Component.translatable("screens.fakeplayers.send"), (p_96786_) -> { this.pressSendChatButton(); - }).bounds((i) + (this.imageWidth/2) - (98/2),l + 40,98,20).build(); + }).bounds((i) + (this.imageWidth/2) - (98/2),after_chat_edit_box_y,98,20).build(); this.addRenderableWidget(this.send); - this.confirm = new Button.Builder(Component.translatable("screens.fakeplayers.done"), (p_96786_) -> { - this.pressDoneButton(); - }).bounds((i) + (this.imageWidth/2) - (98/2),l + (128),98,20).build(); - this.addRenderableWidget(this.confirm); - + int after_send_button_y = this.send.getY() + this.send.getHeight() + ((int) (this.height * 0.05)); + this.sitting = new Button.Builder(Component.translatable("screens.fakeplayers.sit"), (p_96786_) -> { this.pressToggleSit(); - }).bounds((i) + (this.imageWidth/2) - (23), l + 80,46,20).build(); + }).bounds((i) + (this.imageWidth/2) - (23), after_send_button_y,46,20).build(); this.addRenderableWidget(this.sitting); + + int after_sitting_button_y = this.sitting.getY() + this.sitting.getHeight(); this.stayPut = new Button.Builder(Component.translatable("screens.fakeplayers.stayPut"), (p_96786_) -> { this.pressStayPut(); - }).bounds((i) + (this.imageWidth/2) - 23, l + 100,46,20).build(); + }).bounds((i) + (this.imageWidth/2) - 23, after_sitting_button_y,46,20).build(); this.addRenderableWidget(this.stayPut); this.wander = new Button.Builder(Component.translatable("screens.fakeplayers.wander"), (p_96786_) -> { this.pressWanderButton(); - }).bounds((i) + (this.imageWidth/2) - (23*3), l + 100,46,20).build(); + }).bounds((i) + (this.imageWidth/2) - (23*3), after_sitting_button_y,46,20).build(); this.addRenderableWidget(this.wander); this.follow = new Button.Builder(Component.translatable("screens.fakeplayers.follow"), (p_96786_) -> { this.pressFollowButton(); - }).bounds((i) + (this.imageWidth/2) + 23, l + 100,46,20).build(); + }).bounds((i) + (this.imageWidth/2) + 23, after_sitting_button_y,46,20).build(); this.addRenderableWidget(this.follow); + + int after_other_buttons_y = this.follow.getY() + this.follow.getHeight() + ((int) (this.height * 0.02)); + + this.confirm = new Button.Builder(Component.translatable("screens.fakeplayers.done"), (p_96786_) -> { + this.pressDoneButton(); + }).bounds((i) + (this.imageWidth/2) - (98/2),after_other_buttons_y,98,20).build(); + this.addRenderableWidget(this.confirm); }