Bumped up version to1.19.3

This commit is contained in:
Jonas_Jones 2022-12-19 23:09:04 +01:00
parent 9a1d182802
commit 5c34c3d4ee
28 changed files with 72 additions and 190 deletions

Binary file not shown.

View file

@ -1,11 +1,11 @@
commonProperties commonProperties
fabric.development=true fabric.development=true
fabric.remapClasspathFile=/home/jonas_jones/GitHub/Microcraft/.gradle/loom-cache/remapClasspath.txt fabric.remapClasspathFile=C:\Users\Jonas_Jones\GitHub\Microcraft\.gradle\loom-cache\remapClasspath.txt
log4j.configurationFile=/home/jonas_jones/GitHub/Microcraft/.gradle/loom-cache/log4j.xml log4j.configurationFile=C:\Users\Jonas_Jones\GitHub\Microcraft\.gradle\loom-cache\log4j.xml
log4j2.formatMsgNoLookups=true log4j2.formatMsgNoLookups=true
fabric.log.disableAnsi=false fabric.log.disableAnsi=false
clientArgs clientArgs
--assetIndex --assetIndex
1.19.2-1.19 1.19.3-2
--assetsDir --assetsDir
/home/jonas_jones/.gradle/caches/fabric-loom/assets C:\Users\Jonas_Jones\.gradle\caches\fabric-loom\assets

File diff suppressed because one or more lines are too long

2
.idea/gradle.xml generated
View file

@ -4,8 +4,6 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="delegatedBuild" value="false" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules"> <option name="modules">

View file

@ -16,6 +16,11 @@
<option name="name" value="MavenRepo" /> <option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" /> <option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="UserLocalRemappedMods" />
<option name="name" value="UserLocalRemappedMods" />
<option name="url" value="file:/$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
</remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="Fabric" /> <option name="id" value="Fabric" />
<option name="name" value="Fabric" /> <option name="name" value="Fabric" />
@ -26,10 +31,5 @@
<option name="name" value="Mojang" /> <option name="name" value="Mojang" />
<option name="url" value="https://libraries.minecraft.net/" /> <option name="url" value="https://libraries.minecraft.net/" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="UserLocalRemappedMods" />
<option name="name" value="UserLocalRemappedMods" />
<option name="url" value="file:$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
</remote-repository>
</component> </component>
</project> </project>

4
.idea/misc.xml generated
View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
<output url="file://$PROJECT_DIR$" />
</component>
</project> </project>

View file

@ -3,7 +3,7 @@
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" /> <option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
<module name="Microcraft.main" /> <module name="Microcraft.main" />
<option name="PROGRAM_PARAMETERS" value="" /> <option name="PROGRAM_PARAMETERS" value="" />
<option name="VM_PARAMETERS" value="-Dfabric.dli.config=/home/jonas_jones/GitHub/Microcraft/.gradle/loom-cache/launch.cfg -Dfabric.dli.env=client -Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotClient" /> <option name="VM_PARAMETERS" value="-Dfabric.dli.config=C:\Users\Jonas_Jones\GitHub\Microcraft\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=client -Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotClient" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />

View file

@ -3,7 +3,7 @@
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" /> <option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
<module name="Microcraft.main" /> <module name="Microcraft.main" />
<option name="PROGRAM_PARAMETERS" value="nogui" /> <option name="PROGRAM_PARAMETERS" value="nogui" />
<option name="VM_PARAMETERS" value="-Dfabric.dli.config=/home/jonas_jones/GitHub/Microcraft/.gradle/loom-cache/launch.cfg -Dfabric.dli.env=server -Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotServer" /> <option name="VM_PARAMETERS" value="-Dfabric.dli.config=C:\Users\Jonas_Jones\GitHub\Microcraft\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=server -Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotServer" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />

124
.idea/uiDesigner.xml generated
View file

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View file

@ -29,7 +29,6 @@
"depends": { "depends": {
"fabricloader": ">=0.14.6", "fabricloader": ">=0.14.6",
"fabric": "*",
"minecraft": "~1.19", "minecraft": "~1.19",
"java": ">=17" "java": ">=17"
}, },

View file

@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.19.2 minecraft_version=1.19.3
yarn_mappings=1.19.2+build.1 yarn_mappings=1.19.3+build.1
loader_version=0.14.8 loader_version=0.14.11
# Mod Properties # Mod Properties
mod_version = v0.0.1alpha01 mod_version = v0.0.1alpha01
@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G
archives_base_name = microcraft-fabric-quilt archives_base_name = microcraft-fabric-quilt
# Dependencies # Dependencies
fabric_version=0.58.6+1.19.2 fabric_version=0.68.1+1.19.3

View file

@ -20,16 +20,16 @@ public class BoardScreen extends Screen {
protected void init() { protected void init() {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 12, 150, 20, Text.of("Configure Microcontrollers"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcontrollers"), (button) -> {
this.client.setScreen(new SelectDevice(this)); this.client.setScreen(new SelectDevice(this));
})); }).dimensions(this.width / 2 - 155, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 12, 150, 20, Text.of("Configure Microcraft"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcraft"), (button) -> {
this.client.setScreen(new ModSettings(this)); this.client.setScreen(new ModSettings(this));
})); }).dimensions(this.width / 2 + 5, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> { this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> {
this.client.setScreen(this.parent); this.client.setScreen(this.parent);
})); }).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
this.client.setScreen(new ArduinoNanoWidget(this.parent)); this.client.setScreen(new ArduinoNanoWidget(this.parent));
} }

View file

@ -19,16 +19,16 @@ public class GuiHome extends Screen {
protected void init() { protected void init() {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 12, 150, 20, Text.of("Configure Microcontrollers"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcontrollers"), (button) -> {
this.client.setScreen(new SelectDevice(this)); this.client.setScreen(new SelectDevice(this));
})); }).dimensions( this.width / 2 - 155, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 12, 150, 20, Text.of("Configure Microcraft"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcraft"), (button) -> {
this.client.setScreen(new ModSettings(this)); this.client.setScreen(new ModSettings(this));
})); }).dimensions(this.width / 2 + 5, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> { this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> {
this.client.setScreen(this.parent); this.client.setScreen(this.parent);
})); }).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
this.addDrawableChild(new net.minecraft.client.gui.widget.CheckboxWidget(50, 50, 100, 20, Text.of("uwu checkbox"), false)); this.addDrawableChild(new net.minecraft.client.gui.widget.CheckboxWidget(50, 50, 100, 20, Text.of("uwu checkbox"), false));
} }

View file

@ -20,13 +20,13 @@ public class ModSettings extends Screen {
protected void init() { protected void init() {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 12, 150, 20, Text.of("Configure Microcontrollers"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcontrollers"), (button) -> {
this.client.setScreen(new SelectDevice(this)); this.client.setScreen(new SelectDevice(this));
})); }).dimensions(this.width / 2 - 155, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> { this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> {
this.client.setScreen(this.parent); this.client.setScreen(this.parent);
})); }).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
} }
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {

View file

@ -46,7 +46,7 @@ public class SelectDevice extends Screen {
} }
protected void init() { protected void init() {
this.client.keyboard.setRepeatEvents(true); //this.client.keyboard.setRepeatEvents(true);
this.searchBox = new TextFieldWidget(this.textRenderer, this.width / 2 - 100, 22, 200, 20, this.searchBox, Text.translatable("selectWorld.search")); this.searchBox = new TextFieldWidget(this.textRenderer, this.width / 2 - 100, 22, 200, 20, this.searchBox, Text.translatable("selectWorld.search"));
this.searchBox.setChangedListener((search) -> { this.searchBox.setChangedListener((search) -> {
//this.levelList.filter(search); //this.levelList.filter(search);
@ -55,24 +55,24 @@ public class SelectDevice extends Screen {
//this.levelList = new WorldListWidget(uwu, this.client, this.width, this.height, 48, this.height - 64, 36, this.getSearchFilter(), this.levelList); //this.levelList = new WorldListWidget(uwu, this.client, this.width, this.height, 48, this.height - 64, 36, this.getSearchFilter(), this.levelList);
this.addSelectableChild(this.searchBox); this.addSelectableChild(this.searchBox);
this.addSelectableChild(this.levelList); this.addSelectableChild(this.levelList);
this.selectButton = (ButtonWidget)this.addDrawableChild(new ButtonWidget(this.width / 2 - 154, this.height - 52, 150, 20, Text.translatable("selectWorld.select"), (button) -> { this.selectButton = (ButtonWidget)this.addDrawableChild(ButtonWidget.builder(Text.translatable("selectWorld.select"), (button) -> {
this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::play); this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::play);
})); }).dimensions(this.width / 2 - 154, this.height - 52, 150, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 + 4, this.height - 52, 150, 20, Text.translatable("selectWorld.create"), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.translatable("selectWorld.create"), (button) -> {
CreateWorldScreen.create(this.client, this); CreateWorldScreen.create(this.client, this);
})); }).dimensions(this.width / 2 + 4, this.height - 52, 150, 20).build());
this.editButton = (ButtonWidget)this.addDrawableChild(new ButtonWidget(this.width / 2 - 154, this.height - 28, 72, 20, Text.translatable("selectWorld.edit"), (button) -> { this.editButton = (ButtonWidget)this.addDrawableChild(ButtonWidget.builder(Text.translatable("selectWorld.edit"), (button) -> {
this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::edit); this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::edit);
})); }).dimensions(this.width / 2 - 154, this.height - 28, 72, 20).build());
this.deleteButton = (ButtonWidget)this.addDrawableChild(new ButtonWidget(this.width / 2 - 76, this.height - 28, 72, 20, Text.translatable("selectWorld.delete"), (button) -> { this.deleteButton = (ButtonWidget)this.addDrawableChild(ButtonWidget.builder(Text.translatable("selectWorld.delete"), (button) -> {
this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::deleteIfConfirmed); this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::deleteIfConfirmed);
})); }).dimensions(this.width / 2 - 76, this.height - 28, 72, 20).build());
this.recreateButton = (ButtonWidget)this.addDrawableChild(new ButtonWidget(this.width / 2 + 4, this.height - 28, 72, 20, Text.translatable("selectWorld.recreate"), (button) -> { this.recreateButton = (ButtonWidget)this.addDrawableChild(ButtonWidget.builder(Text.translatable("selectWorld.recreate"), (button) -> {
this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::recreate); this.levelList.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::recreate);
})); }).dimensions(this.width / 2 + 4, this.height - 28, 72, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 + 82, this.height - 28, 72, 20, ScreenTexts.CANCEL, (button) -> { this.addDrawableChild(ButtonWidget.builder(ScreenTexts.CANCEL, (button) -> {
this.client.setScreen(this.parent); this.client.setScreen(this.parent);
})); }).dimensions(this.width / 2 + 82, this.height - 28, 72, 20).build());
this.worldSelected(false); this.worldSelected(false);
this.setInitialFocus(this.searchBox); this.setInitialFocus(this.searchBox);
} }

View file

@ -21,7 +21,7 @@ public class TextureSelectScreen extends Screen {
protected void init() { protected void init() {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 12, 150, 20, Text.of("Configure Microcontrollers"), (button) -> { /*this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 12, 150, 20, Text.of("Configure Microcontrollers"), (button) -> {
this.client.setScreen(new SelectDevice(this)); this.client.setScreen(new SelectDevice(this));
})); }));
this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 12, 150, 20, Text.of("Configure Microcraft"), (button) -> { this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 12, 150, 20, Text.of("Configure Microcraft"), (button) -> {
@ -31,7 +31,20 @@ public class TextureSelectScreen extends Screen {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> { this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> {
this.client.setScreen(this.parent); this.client.setScreen(this.parent);
})); }));
this.addDrawableChild(new net.minecraft.client.gui.widget.CheckboxWidget(50, 50, 100, 20, Text.of("uwu checkbox"), false));*/
this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcontrollers"),(button) -> {
this.client.setScreen(new SelectDevice(this));
}).dimensions(this.width / 2 - 155, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(ButtonWidget.builder(Text.of("Configure Microcraft"), (button) -> {
this.client.setScreen(new ModSettings(this));
}).dimensions(this.width / 2 + 5, this.height / 6 + 12, 150, 20).build());
this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> {
this.client.setScreen(this.parent);
}).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
this.addDrawableChild(new net.minecraft.client.gui.widget.CheckboxWidget(50, 50, 100, 20, Text.of("uwu checkbox"), false)); this.addDrawableChild(new net.minecraft.client.gui.widget.CheckboxWidget(50, 50, 100, 20, Text.of("uwu checkbox"), false));
} }
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {

View file

@ -35,20 +35,19 @@ public class ArduinoNanoWidget extends Screen {
} }
protected void init() { protected void init() {
//TODO: get current profile //TODO: get current profile
addDrawableChild(new ButtonWidget(this.width / 2 - 100, 40, 200, 20, Text.of("[Profile]"), (buttonWidget) -> this.client.setScreen(new ProfileSelectionScreen(this)))); addDrawableChild(ButtonWidget.builder(Text.of("[Profile]"), (buttonWidget) -> this.client.setScreen(new ProfileSelectionScreen(this))).dimensions(this.width / 2 - 100, 40, 200, 20).build());
//TODO: make Board texture clickable to select different texture. //TODO: make Board texture clickable to select different texture.
this.addDrawableChild(new TexturedButtonWidget(this.width / 2 - 26, this.height / 2 - 65, 52, 130, 0, 0, 130, BOARD_TEXTURE, 52, 130, (buttonWidget) -> this.client.setScreen(this))); this.addDrawableChild(new TexturedButtonWidget(this.width / 2 - 26, this.height / 2 - 65, 52, 130, 0, 0, 130, BOARD_TEXTURE, 52, 130, (buttonWidget) -> this.client.setScreen(this)));
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 30, 200, 20, Text.of("About Microcraft"), (buttonWidget) -> this.client.setScreen(new ModCreditsScreen(this)))); this.addDrawableChild(ButtonWidget.builder(Text.of("About Microcraft"), (buttonWidget) -> this.client.setScreen(new ModCreditsScreen(this))).dimensions(this.width / 2 - 100, this.height - 30, 200, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 55, 200, 20, Text.of("Advanced Pin Mapping"), (buttonWidget) -> this.client.setScreen(new AdvancedPinMappingScreen(this)))); this.addDrawableChild(ButtonWidget.builder(Text.of("Advanced Pin Mapping"), (buttonWidget) -> this.client.setScreen(new AdvancedPinMappingScreen(this))).dimensions(this.width / 2 - 100, this.height - 55, 200, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 80, 200, 20, Text.of("Advanced Board Settings"), (buttonWidget) -> this.client.setScreen(new AdvancedSettingsScreen(this)))); this.addDrawableChild(ButtonWidget.builder(Text.of("Advanced Board Settings"), (buttonWidget) -> this.client.setScreen(new AdvancedSettingsScreen(this))).dimensions(this.width / 2 - 100, this.height - 80, 200, 20).build());
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 105, 200, 20, getToggleText(), (buttonWidget) -> Microcraft.toggle())); this.addDrawableChild(ButtonWidget.builder(getToggleText(), (buttonWidget) -> Microcraft.toggle()).dimensions(this.width / 2 - 100, this.height - 105, 200, 20).build());
this.addDrawableChild(new ButtonWidget(this.width - 60, this.height - 30, 50, 20, Text.of("Done"), (buttonWidget) -> this.client.setScreen(this.parent))); this.addDrawableChild(ButtonWidget.builder(Text.of("Done"), (buttonWidget) -> this.client.setScreen(this.parent)).dimensions(this.width - 60, this.height - 30, 50, 20).build());
this.addDrawableChild(new ButtonWidget(this.width - 210, this.height - 30, 140, 20, Text.of("Write Program to Board"), (buttonWidget) -> this.client.setScreen(this.parent))); this.addDrawableChild(ButtonWidget.builder(Text.of("Write Program to Board"), (buttonWidget) -> this.client.setScreen(this.parent)).dimensions(this.width - 210, this.height - 30, 140, 20).build());
this.addDrawableChild(new ButtonWidget(this.width - 210, this.height - 55, 200, 20, Text.of("Microcraft Settings"), (buttonWidget) -> this.client.setScreen(new ModSettings(this)))); this.addDrawableChild(ButtonWidget.builder(Text.of("Microcraft Settings"), (buttonWidget) -> this.client.setScreen(new ModSettings(this))).dimensions(this.width - 210, this.height - 55, 200, 20).build());
this.addDrawableChild(new )
} }
private Text getToggleText() { private Text getToggleText() {

View file

@ -27,9 +27,9 @@ public class GameMenuScreenMixin extends Screen {
int buttonX = this.width / 2 + 108; int buttonX = this.width / 2 + 108;
int buttonY = this.height / 4 + 8; int buttonY = this.height / 4 + 8;
this.addDrawableChild(new ButtonWidget(buttonX, buttonY, 20, 20, Text.of(""), (button) -> { this.addDrawableChild(ButtonWidget.builder(Text.of(""), (button) -> {
this.client.setScreen(new GuiHome(this)); this.client.setScreen(new GuiHome(this));
})); }).dimensions(buttonX, buttonY, 20, 20).build());
this.addDrawableChild( new TexturedButtonWidget(buttonX, buttonY, 20, 20, 0, 0, 0, ICON_TEXTURE, 20, 20, (buttonWidget) -> this.client.setScreen(new GuiHome(this)))); this.addDrawableChild( new TexturedButtonWidget(buttonX, buttonY, 20, 20, 0, 0, 0, ICON_TEXTURE, 20, 20, (buttonWidget) -> this.client.setScreen(new GuiHome(this))));
} }

View file

@ -1,7 +1,6 @@
package me.jonasjones.microcraft.mixin; package me.jonasjones.microcraft.mixin;
import me.jonasjones.microcraft.gui.screens.BoardScreen; import me.jonasjones.microcraft.gui.screens.BoardScreen;
import me.jonasjones.microcraft.gui.screens.GuiHome;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen; import net.minecraft.client.gui.screen.TitleScreen;
import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.gui.widget.ButtonWidget;
@ -29,9 +28,9 @@ public abstract class TitleScreenButtonMixin extends Screen {
int buttonX = this.width / 2 + 104; int buttonX = this.width / 2 + 104;
int buttonY = y + spacingY * 2; int buttonY = y + spacingY * 2;
this.addDrawableChild(new ButtonWidget(buttonX, buttonY, 20, 20, Text.of(""), (button) -> { this.addDrawableChild(ButtonWidget.builder( Text.of(""), (button) -> {
this.client.setScreen(new BoardScreen(this)); this.client.setScreen(new BoardScreen(this));
})); }).dimensions(buttonX, buttonY, 20, 20).build());
this.addDrawableChild( new TexturedButtonWidget(buttonX, buttonY, 20, 20, 0, 0, 0, ICON_TEXTURE, 20, 20, (buttonWidget) -> this.client.setScreen(new BoardScreen(this)))); this.addDrawableChild( new TexturedButtonWidget(buttonX, buttonY, 20, 20, 0, 0, 0, ICON_TEXTURE, 20, 20, (buttonWidget) -> this.client.setScreen(new BoardScreen(this))));
} }
} }