Skip to content

Commit

Permalink
✏️ Tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Jun 24, 2024
1 parent bbde080 commit 4b34a5c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ allprojects {
maven { url = "https://jitpack.io/" }
maven { url = "https://maven.terraformersmc.com/" }
maven { url = "https://maven.shedaniel.me/" }
maven { url = "https://maven.ziyuesinicization.site/" }
maven { url = "https://maven.ziyuesinicization.site/releases/" }
}

tasks.withType(JavaCompile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public static NativeImage generateStationNameEntrance(long stationId, long selec
final NativeImage nativeImage = new NativeImage(NativeImage.Format.RGBA, Math.max(width, totalWidth.get()), size, false);
nativeImage.fillRect(0, 0, width, size, backgroundColor);

final AtomicInteger currentX = new AtomicInteger(iconOffset + iconSize + (isBMT ? iconOffset : 0));
final AtomicInteger currentX = new AtomicInteger(iconOffset + iconSize);
if (!routes.isEmpty()) currentX.addAndGet(iconOffset);
routes.forEach(route -> {
nativeImage.fillRect(currentX.get(), iconOffset, padding * 3 + route.getA().width(), iconSize, invertColor(ARGB_BLACK | route.getB()));
Expand All @@ -601,10 +601,10 @@ public static NativeImage generateStationNameEntrance(long stationId, long selec
});
if (!routes.isEmpty()) currentX.addAndGet(padding * -3);
if (selectedId != -1) currentX.addAndGet(-iconOffset - exit.width());
drawResource(nativeImage, isBMT ? TRAIN_BMT_LOGO_RESOURCE : TRAIN_LOGO_RESOURCE, iconOffset + (isBMT ? iconOffset : 0), iconOffset, iconSize, iconSize, false, 0, 1, 0, true);
drawResource(nativeImage, isBMT ? TRAIN_BMT_LOGO_RESOURCE : TRAIN_LOGO_RESOURCE, iconOffset, iconOffset, iconSize, iconSize, false, 0, 1, 0, true);
drawString(nativeImage, text, (Math.max(width, totalWidth.get()) + currentX.get()) / 2, size / 2, HorizontalAlignment.CENTER, VerticalAlignment.CENTER, backgroundColor, ARGB_WHITE, false);
if (selectedId != -1)
drawString(nativeImage, exit, Math.max(width, totalWidth.get()) - iconOffset - (isBMT ? iconOffset : 0), size / 2, HorizontalAlignment.RIGHT, VerticalAlignment.CENTER, backgroundColor, ARGB_WHITE, false);
drawString(nativeImage, exit, Math.max(width, totalWidth.get()) - iconOffset, size / 2, HorizontalAlignment.RIGHT, VerticalAlignment.CENTER, backgroundColor, ARGB_WHITE, false);
clearColor(nativeImage, invertColor(backgroundColor));

return nativeImage;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "tjmetro:item/station_name_entrance_tianjin_bmt"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "tjmetro:item/station_name_entrance_tianjin_bmt"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/resources/assets/tjmetro/textures/item/wrench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b34a5c

Please sign in to comment.