Skip to content

Commit 2fc619c

Browse files
Update to 1.20.3, lectern support is still disabled
1 parent d9ca6c8 commit 2fc619c

File tree

6 files changed

+55
-31
lines changed

6 files changed

+55
-31
lines changed

build.gradle

+23-13
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ minecraft {
7474
// You can set various levels here.
7575
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
7676
property 'forge.logging.console.level', 'debug'
77-
78-
mods {
79-
"${mod_id}" {
80-
source sourceSets.main
81-
}
82-
}
8377
}
8478

8579
client {
@@ -170,13 +164,12 @@ tasks.named('processResources', ProcessResources).configure {
170164
tasks.named('jar', Jar).configure {
171165
manifest {
172166
attributes([
173-
'Specification-Title' : mod_id,
174-
'Specification-Vendor' : mod_authors,
175-
'Specification-Version' : '1', // We are version 1 of ourselves
176-
'Implementation-Title' : project.name,
177-
'Implementation-Version' : project.jar.archiveVersion,
178-
'Implementation-Vendor' : mod_authors,
179-
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
167+
'Specification-Title' : mod_id,
168+
'Specification-Vendor' : mod_authors,
169+
'Specification-Version' : '1', // We are version 1 of ourselves
170+
'Implementation-Title' : project.name,
171+
'Implementation-Version' : project.jar.archiveVersion,
172+
'Implementation-Vendor' : mod_authors
180173
])
181174
}
182175

@@ -206,3 +199,20 @@ publishing {
206199
tasks.withType(JavaCompile).configureEach {
207200
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
208201
}
202+
203+
eclipse {
204+
// Run everytime eclipse builds the code
205+
//autoBuildTasks genEclipseRuns
206+
// Run when importing the project
207+
synchronizationTasks 'genEclipseRuns'
208+
}
209+
210+
// Merge the resources and classes into the same directory.
211+
// This is done because java expects modules to be in a single directory.
212+
// And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem
213+
// This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later.
214+
sourceSets.each {
215+
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
216+
it.output.resourcesDir = dir
217+
it.java.destinationDirectory = dir
218+
}

gradle.properties

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ org.gradle.daemon=false
77
## Environment Properties
88

99
# The Minecraft version must agree with the Forge version to get a valid artifact
10-
minecraft_version=1.20.2
10+
minecraft_version=1.20.3
1111
# The Minecraft version range can use any release version of Minecraft as bounds.
1212
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
1313
# as they do not follow standard versioning conventions.
14-
minecraft_version_range=[1.20.2,1.21)
14+
minecraft_version_range=[1.20.3,1.21)
1515
# The Forge version must agree with the Minecraft version to get a valid artifact
16-
forge_version=48.1.0
16+
forge_version=49.0.2
1717
# The Forge version range can use any version of Forge as bounds or match the loader version range
18-
forge_version_range=[48,)
18+
forge_version_range=[0,)
1919
# The loader version range can only use the major version of Forge/FML as bounds
20-
loader_version_range=[48,)
20+
loader_version_range=[0,)
2121
# The mapping channel to use for mappings.
2222
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
2323
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
@@ -35,7 +35,7 @@ loader_version_range=[48,)
3535
mapping_channel=official
3636
# The mapping version to query from the mapping channel.
3737
# This must match the format required by the mapping channel.
38-
mapping_version=1.20.2
38+
mapping_version=1.20.3
3939

4040

4141
## Mod Properties
@@ -48,7 +48,7 @@ mod_name=Ghostwriter
4848
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
4949
mod_license=GNU GPL v3.0
5050
# The mod version. See https://semver.org/
51-
mod_version=2.4.7
51+
mod_version=2.4.8
5252
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
5353
# This should match the base package used for the mod sources.
5454
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/wafflestomper/ghostwriter/gui/screen/GhostwriterFileBrowserScreen.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ public void init() {
205205
this.children.add(this.fileSelectionList);
206206
this.populateFileList();
207207

208-
// Make sure everything is in place in case the window was resized
209-
this.fileSelectionList.updateSize(this.width, this.height, 32, this.height - 64);
208+
// Make sure everything is in place in case the window was resized.
209+
// Note that ObjectSectionList (superclass of FileSelectionList) no longer has an updateSize()
210+
// function so we just skip that call hope it happens automatically
210211
this.filenameField.x = this.width / 2 - 125;
211212
this.filenameField.y = this.height - BORDER_HEIGHT * 2 - BUTTON_HEIGHT * 2;
212213

@@ -276,6 +277,12 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
276277
else if (this.hoveringText != null) {
277278
guiGraphics.renderTooltip(this.font, Component.translatable(this.hoveringText), mouseX, mouseY);
278279
}
280+
281+
282+
}
283+
284+
public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
285+
guiGraphics.fill(0, 0, this.width, this.height, 0xFF000000);
279286
}
280287

281288

src/main/java/wafflestomper/ghostwriter/gui/widget/FileSelectionList.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class FileSelectionList extends ObjectSelectionList<FileSelectionList.Ent
2525

2626

2727
public FileSelectionList(GhostwriterFileBrowserScreen ownerIn, Minecraft mcIn, int widthIn, int heightIn, int topIn, int bottomIn, int slotHeightIn) {
28-
super(mcIn, widthIn, heightIn, topIn, bottomIn, slotHeightIn);
28+
super(mcIn, widthIn, heightIn, topIn, slotHeightIn);
2929
this.owner = ownerIn;
3030
this.parentDir = new ParentDirEntry(this.owner);
3131
}
@@ -43,8 +43,13 @@ public void updateFileList(List<File> displayFiles) {
4343
this.addEntry(n);
4444
}
4545
}
46-
47-
46+
47+
// TODO: Figure out how to use this to allow filenames to use the full width available
48+
// @Override
49+
// public int getRowWidth() {
50+
// return super.getRowWidth() + XXX;
51+
// }
52+
4853
@OnlyIn(Dist.CLIENT)
4954
public static abstract class Entry extends ObjectSelectionList.Entry<FileSelectionList.Entry> {
5055
}
@@ -68,7 +73,7 @@ public void render(GuiGraphics guiGraphics, int p_render_1_, int p_render_2_, in
6873
int mouseX, int mouseY, boolean mouseIsOver, float p_render_9_) {
6974
guiGraphics.drawString(this.mc.font, "..", p_render_3_, p_render_2_ + 1, 0x00FF00); // Params are string, x, y, color
7075
}
71-
76+
7277

7378
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_) {
7479
this.owner.setSelectedSlot(this);

src/main/resources/pack.mcmeta

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"pack": {
3-
"description": {
4-
"text": "${mod_id} resources"
5-
},
6-
"pack_format": 18
3+
"description": "${mod_id} resources",
4+
"pack_format": 22
75
}
86
}

update.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"homepage": "https://github.com/waffle-stomper/Ghostwriter/releases",
33
"promos":{
4+
"1.20.3-recommended": "2.4.8",
45
"1.20.2-recommended": "2.4.7",
56
"1.20.1-recommended": "2.4.6",
67
"1.20-recommended": "2.4.5",
@@ -27,8 +28,11 @@
2728
"1.11-recommended": "1.8.7",
2829
"1.10-recommended": "1.8.5"
2930
},
31+
"1.20.3": {
32+
"2.4.8": "Update to 1.20.3. Lectern support temporarily disabled"
33+
},
3034
"1.20.2": {
31-
"2.4.7": "Update to 1.20.1. Lectern support temporarily disabled"
35+
"2.4.7": "Update to 1.20.2. Lectern support temporarily disabled"
3236
},
3337
"1.20.1": {
3438
"2.4.6": "Update to 1.20.1. Lectern support temporarily disabled"

0 commit comments

Comments
 (0)