Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added French translation #31

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
48cdabd
Ported to 1.19.2
MisterJulsen May 5, 2024
7b628ff
Ported to 1.20.1
MisterJulsen May 5, 2024
7c085f3
Added Dutch and Polish translation
MisterJulsen May 5, 2024
2b0fb54
Added Dutch and Polish translation
MisterJulsen May 5, 2024
2ffcd2a
Updated DragonLib
MisterJulsen May 7, 2024
e64a217
Updated mappings
MisterJulsen May 7, 2024
804a22c
Updated version
MisterJulsen May 7, 2024
8adc667
Fixed project setup
MisterJulsen May 7, 2024
8a3c61a
Updated mappings
MisterJulsen May 7, 2024
c5e5ee7
Added Create as dependency
MisterJulsen May 7, 2024
1727963
Fixed tooltip stays visible in route settings
MisterJulsen May 7, 2024
18dd283
Fixed rendering
MisterJulsen May 7, 2024
a8b42d4
Fixed dependencies
MisterJulsen May 7, 2024
82f923b
Updated dependencies
MisterJulsen May 7, 2024
3fe94d4
Merge remote-tracking branch 'origin/1.18.2-dev' into 1.19.2-Multiloader
MisterJulsen May 7, 2024
a73036e
Updated Version
MisterJulsen May 7, 2024
b4a7102
Updated dependencies
MisterJulsen May 7, 2024
a3cf721
Merge remote-tracking branch 'origin/1.18.2-dev' into 1.20.1-Multiloader
MisterJulsen May 7, 2024
e8a9a5d
Updated version
MisterJulsen May 7, 2024
4bb2982
removed unused print
MisterJulsen May 7, 2024
90635ae
Removed unused print
MisterJulsen May 7, 2024
69c2b51
Update README.md
MisterJulsen May 8, 2024
d483661
Update README.md
MisterJulsen May 8, 2024
23e2493
Merge remote-tracking branch 'origin/1.18.2-fix' into 1.19.2-Multiloader
MisterJulsen May 8, 2024
b28bc84
Updated version
MisterJulsen May 8, 2024
53047f6
Merge remote-tracking branch 'origin/1.18.2-fix' into 1.20.1-Multiloader
MisterJulsen May 8, 2024
b67c900
Updated jar name
MisterJulsen May 9, 2024
dd7eea7
Updated custom translatable component
MisterJulsen May 9, 2024
f276a34
Updated jar version
MisterJulsen May 9, 2024
8d6a9b9
Updated version
MisterJulsen May 9, 2024
dfa9df0
Add half panel display
slmnio May 18, 2024
cec5d56
Fix positive double sided display z-offset
slmnio May 18, 2024
89c53c9
Merge pull request #16 from slmnio/1.20.1
MisterJulsen May 21, 2024
4982807
Merge remote-tracking branch 'origin/1.18.2-dev' into 1.19.2
MisterJulsen May 21, 2024
1ab6c52
Merge remote-tracking branch 'origin/1.19.2' into 1.20.1
MisterJulsen May 21, 2024
11627ac
Update README.md
MisterJulsen May 22, 2024
048d805
Update zh_cn.json
iaddda May 22, 2024
21e67d1
Create es_es.json
albertosaurio65 Jun 2, 2024
defad62
Update es_es.json
albertosaurio65 Jun 2, 2024
7083f63
Merge pull request #19 from iaddda/1.20.1
MisterJulsen Jun 3, 2024
fad1b48
Merge pull request #22 from albertosaurio65/1.20.1
MisterJulsen Jun 3, 2024
d061d80
add ru_ru.json
VGamerGroup Jun 13, 2024
051248f
Merge pull request #26 from VGamerGroup/1.20.1
MisterJulsen Jun 23, 2024
312fb47
Added french translation
GeoffreyGx Jul 10, 2024
aceb89e
Merge branch 'MisterJulsen:1.20.1' into 1.20.1
GeoffreyGx Jul 10, 2024
b98fb92
Corrected typos
GeoffreyGx Jul 11, 2024
469adb5
Added french to README.md
GeoffreyGx Jul 11, 2024
3a134a0
Merge remote-tracking branch 'origin/1.20.1' into 1.20.1
GeoffreyGx Jul 11, 2024
0cb54f6
Fixed another typo
GeoffreyGx Jul 11, 2024
e391f4c
Fixed another typo
GeoffreyGx Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Create Railways Navigator (Minecraft Create Mod Addon)
![Logo](https://github.com/MisterJulsen/Create-Train-Navigator/blob/1.18.2-Multiloader/icon_256px.png)
![Logo](https://github.com/MisterJulsen/Create-Train-Navigator/blob/1.20.1/icon_256px.png)

Get a list possible train connections in your world from one station to another using the Create Railways Navigator.

Expand All @@ -18,6 +18,7 @@ This mod adds a new item, the Create Railways Navigator, which is inspired by th
- German (100%)
- Dutch (100%) (by TheSatanicFlame)
- Polish (100%) (by Slasherss)
- French (100%) (by GeoffreyGx)

## **Please note!**
To protect your world from damage, you should always create a backup of your world before installing an update of this mod. Alpha versions in particular may contain critical bugs!
Expand Down
38 changes: 35 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
}

architectury {
Expand All @@ -16,9 +16,11 @@ subprojects {

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well

mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchmentmc_version}@zip")
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
}
}
}
Expand Down Expand Up @@ -56,15 +58,45 @@ allprojects {
includeGroup "curse.maven"
}
}
maven { url "https://maven.parchmentmc.org/"}


maven { // Create Forge and Registrate Forge
url = "https://maven.tterrag.com/"
content {
includeGroup("com.tterrag.registrate")
includeGroup("com.simibubi.create")
}
}

maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
maven { url = "https://maven.blamejared.com/" } // JEI
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API Port
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM
maven { url = "https://maven.tterrag.com/" } // Flywheel
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}

publishing {
repositories {
maven {
name "GitHub"
url "file://${System.getProperty('user.home')}/.m2/github/modsrepo/maven"
}
}
}

java {
withSourcesJar()
withJavadocJar()
}
}
23 changes: 7 additions & 16 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,14 @@ loom {
accessWidenerPath = file("src/main/resources/createrailwaysnavigator.accesswidener")
}

repositories {
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
maven { url = "https://maven.blamejared.com/" } // JEI
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API Port
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM
maven { url = "https://maven.tterrag.com/" } // Flywheel
}

dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}"))


modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}"))
modCompileOnly("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}")

}

publishing {
Expand All @@ -35,6 +24,8 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import de.mrjulsen.crn.network.packets.stc.TrainDataResponsePacket;
import de.mrjulsen.crn.registry.ModBlockEntities;
import de.mrjulsen.crn.registry.ModBlocks;
import de.mrjulsen.crn.registry.ModCreativeModeTab;
import de.mrjulsen.crn.registry.ModExtras;
import de.mrjulsen.crn.registry.ModItems;
import de.mrjulsen.mcdragonlib.net.NetworkManagerBase;
Expand Down Expand Up @@ -77,6 +78,7 @@ public static void load() {}

public static void init() {

ModCreativeModeTab.setup();
ModBlocks.register();
ModItems.register();
ModBlockEntities.register();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.Collection;
import java.util.List;
import java.util.Random;

import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
Expand All @@ -23,6 +22,7 @@
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
Expand Down Expand Up @@ -211,7 +211,7 @@ public void updateNeighbours(BlockState pState, Level pLevel, BlockPos pPos) {
}

@Override
public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, Random pRandom) {
public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) {
if (pState.getBlock() != this)
return;
BlockPos belowPos = pPos.relative(Direction.fromAxisAndDirection(getConnectionAxis(pState), AxisDirection.NEGATIVE));
Expand Down Expand Up @@ -307,7 +307,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla
if (dye != null) {
pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F);
blockEntity.applyToAll(be -> {
be.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMaterialColor().col);
be.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMapColor().col);
be.notifyUpdate();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla
DyeColor dye = dyeItem.getDyeColor();
if (dye != null) {
pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F);
blockEntity.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMaterialColor().col);
blockEntity.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMapColor().col);

if (pLevel.isClientSide) {
blockEntity.getRenderer().update(pLevel, pPos, pState, blockEntity, EUpdateReason.BLOCK_CHANGED);
Expand Down
10 changes: 5 additions & 5 deletions common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import de.mrjulsen.crn.data.GlobalSettingsManager;
import de.mrjulsen.crn.network.packets.stc.ServerErrorPacket;
import de.mrjulsen.mcdragonlib.client.gui.DLScreen;
import de.mrjulsen.mcdragonlib.util.TextUtils;
import dev.architectury.networking.NetworkManager.PacketContext;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.toasts.SystemToast;
import net.minecraft.client.gui.components.toasts.SystemToast.SystemToastIds;
import net.minecraft.client.resources.language.ClientLanguage;
import net.minecraft.client.resources.language.LanguageInfo;
import net.minecraft.locale.Language;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.world.level.Level;

public class ClientWrapper {
Expand All @@ -45,7 +45,7 @@ public static void showRouteOverlaySettingsGui(RouteDetailsOverlayScreen overlay
}

public static void handleErrorMessagePacket(ServerErrorPacket packet, Supplier<PacketContext> ctx) {
Minecraft.getInstance().getToasts().addToast(new SystemToast(SystemToastIds.PERIODIC_NOTIFICATION, Constants.TEXT_SERVER_ERROR, new TextComponent(packet.message)));
Minecraft.getInstance().getToasts().addToast(new SystemToast(SystemToastIds.PERIODIC_NOTIFICATION, Constants.TEXT_SERVER_ERROR, TextUtils.text(packet.message)));
}

public static void showAdvancedDisplaySettingsScreen(AdvancedDisplayBlockEntity blockEntity) {
Expand All @@ -59,11 +59,11 @@ public static void updateLanguage(ELanguage lang, boolean force) {

LanguageInfo info = lang == ELanguage.DEFAULT ? null : Minecraft.getInstance().getLanguageManager().getLanguage(lang.getCode());
if (info == null) {
info = Minecraft.getInstance().getLanguageManager().getSelected();
info = Minecraft.getInstance().getLanguageManager().getLanguage(Minecraft.getInstance().getLanguageManager().getSelected());
}
currentLanguage = lang;
currentClientLanguage = ClientLanguage.loadFrom(Minecraft.getInstance().getResourceManager(), List.of(info));
CreateRailwaysNavigator.LOGGER.info("Updated custom language to: " + (info == null ? null : info.getName()));
currentClientLanguage = ClientLanguage.loadFrom(Minecraft.getInstance().getResourceManager(), List.of(lang == ELanguage.DEFAULT ? Minecraft.getInstance().getLanguageManager().getSelected() : lang.getCode()), false);
CreateRailwaysNavigator.LOGGER.info("Updated custom language to: " + (info == null ? null : info.name()));
}

public static Language getCurrentClientLanguage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.function.Supplier;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.mojang.math.Axis;

import de.mrjulsen.crn.block.AbstractAdvancedDisplayBlock;
import de.mrjulsen.crn.block.AbstractAdvancedSidedDisplayBlock;
Expand Down Expand Up @@ -115,22 +115,22 @@ public void render(BlockEntityRendererContext context, AdvancedDisplayBlockEntit

pPoseStack.pushPose();
pPoseStack.translate(offset.getFirst(), offset.getSecond(), zOffset.getFirst());
pPoseStack.mulPose(Vector3f.XP.rotationDegrees(rotation.getFirst()));
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(rotation.getSecond()));
pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(rotation.getThird()));
pPoseStack.mulPose(Axis.XP.rotationDegrees(rotation.getFirst()));
pPoseStack.mulPose(Axis.YP.rotationDegrees(rotation.getSecond()));
pPoseStack.mulPose(Axis.ZP.rotationDegrees(rotation.getThird()));
pPoseStack.scale(scale, scale, 1);
renderSubtype.renderAdditional(context, pBlockEntity, this, pPartialTicks, pPoseStack, pBufferSource, light, pOverlay, false);
labels.forEach(x -> x.render(pPoseStack, pBufferSource, light));
pPoseStack.popPose();

if (!(pBlockEntity.getBlockState().getBlock() instanceof AbstractAdvancedSidedDisplayBlock) || pBlockEntity.getBlockState().getValue(AbstractAdvancedSidedDisplayBlock.SIDE) == ESide.BOTH) {
pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180));
pPoseStack.mulPose(Axis.YP.rotationDegrees(180));
pPoseStack.translate(-pBlockEntity.getXSize() * 16, 0, -16);
pPoseStack.translate(offset.getFirst(), offset.getSecond(), zOffset.getSecond());
pPoseStack.mulPose(Vector3f.XP.rotationDegrees(rotation.getFirst()));
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(rotation.getSecond()));
pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(rotation.getThird()));
pPoseStack.mulPose(Axis.XP.rotationDegrees(rotation.getFirst()));
pPoseStack.mulPose(Axis.YP.rotationDegrees(rotation.getSecond()));
pPoseStack.mulPose(Axis.ZP.rotationDegrees(rotation.getThird()));
pPoseStack.scale(scale, scale, 1);
renderSubtype.renderAdditional(context, pBlockEntity, this, pPartialTicks, pPoseStack, pBufferSource, light, pOverlay, true);
labels.forEach(x -> x.render(pPoseStack, pBufferSource, light));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.mrjulsen.crn.client.ber;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.mojang.math.Axis;

import de.mrjulsen.crn.CreateRailwaysNavigator;
import de.mrjulsen.crn.block.be.TrainStationClockBlockEntity;
Expand Down Expand Up @@ -32,30 +32,30 @@ public void render(BlockEntityRendererContext context, TrainStationClockBlockEnt
context.renderUtils().renderTexture(DIAL_TEXTURE, pBufferSource, pBlockEntity, pPoseStack, !pBlockEntity.isGlowing(), -7, -7, -0.2f, 14, 14, 0, 0, 1, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), (0xFF << 24) | (pBlockEntity.getColor()), pBlockEntity.isGlowing() ? LightTexture.FULL_BRIGHT : pPackedLight);

pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000)));
pPoseStack.mulPose(Axis.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000)));
context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF191919, pPoseStack, -0.5f, -0.5f, 0, 6, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight);
pPoseStack.popPose();

pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000)));
pPoseStack.mulPose(Axis.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000)));
context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF222222, pPoseStack, -0.5f, -0.5f, 0.1f, 7, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight);
pPoseStack.popPose();

pPoseStack.translate(0, 0, -z * 2);
pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180));
pPoseStack.mulPose(Axis.YP.rotationDegrees(180));
context.renderUtils().renderTexture(DIAL_TEXTURE, pBufferSource, pBlockEntity, pPoseStack, !pBlockEntity.isGlowing(), -7, -7, -0.2f, 14, 14, 0, 0, 1, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING).getOpposite(), (0xFF << 24) | (pBlockEntity.getColor()), pBlockEntity.isGlowing() ? LightTexture.FULL_BRIGHT : pPackedLight);
pPoseStack.popPose();

pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000)));
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180));
pPoseStack.mulPose(Axis.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000)));
pPoseStack.mulPose(Axis.YP.rotationDegrees(180));
context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF191919, pPoseStack, -0.5f, -0.5f, 0, 6, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight);
pPoseStack.popPose();

pPoseStack.pushPose();
pPoseStack.mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000)));
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180));
pPoseStack.mulPose(Axis.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000)));
pPoseStack.mulPose(Axis.YP.rotationDegrees(180));
context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF222222, pPoseStack, -0.5f, -0.5f, 0.1f, 7, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight);
pPoseStack.popPose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private void renderTextInBounds(PoseStack pPoseStack, FontUtils fontUtils, Multi

for (int i = 0; i < text.getString().length(); i++) {
int charCode = text.getString().charAt(i);
GlyphInfo info = fontUtils.fontSet.getGlyphInfo(charCode);
GlyphInfo info = fontUtils.fontSet.getGlyphInfo(charCode, false);
float glyphWidth = info.getAdvance(text.getStyle().isBold());
float oldX = newX;
newX += glyphWidth;
Expand Down
18 changes: 14 additions & 4 deletions common/src/main/java/de/mrjulsen/crn/client/gui/ModGuiIcons.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import de.mrjulsen.crn.CreateRailwaysNavigator;
import de.mrjulsen.mcdragonlib.client.util.Graphics;
import de.mrjulsen.mcdragonlib.client.util.GuiUtils;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;

public enum ModGuiIcons {
Expand Down Expand Up @@ -90,19 +90,29 @@ public AllIcons getAsCreateIcon() {
}

public void render(Graphics graphics, int x, int y) {
GuiUtils.drawTexture(ModGuiIcons.ICON_LOCATION, graphics, x, y, getU(), getV(), ICON_SIZE, ICON_SIZE);
graphics.graphics().blit(ModGuiIcons.ICON_LOCATION, x, y, getU(), getV(), ICON_SIZE, ICON_SIZE);
}

public static class ModAllIcons extends AllIcons {

int u, v;

public ModAllIcons(int x, int y) {
super(x, y);
this.u = x * ICON_SIZE;
this.v = y * ICON_SIZE;
}



@Override
public void render(GuiGraphics graphics, int x, int y) {
graphics.blit(ICON_LOCATION, x, y, 0, u, v, ICON_SIZE, ICON_SIZE, 256, 256);
}

@Override
public void bind() {
RenderSystem.setShaderTexture(0, ICON_LOCATION);
}

}
}
}
Loading