Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.client.gui.narration.NarratableEntry;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderPipelines;
import net.minecraft.locale.Language;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.FormattedText;
Expand Down Expand Up @@ -50,7 +50,7 @@ public static void drawWrappedString(GuiGraphics matrices, String string, int x,
int width = CLIENT.font.width(line);
x1 += (float) (wrapWidth - width);
}
matrices.drawString(CLIENT.font, line, x1, y + i * CLIENT.font.lineHeight, color, false);
matrices.drawString(CLIENT.font, line, x1, y + i * CLIENT.font.lineHeight, color);
}
}

Expand All @@ -60,8 +60,8 @@ public static void runAtUI(Runnable o) {
}

public static void drawTexture(GuiGraphics context, ResourceLocation texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) {
RenderSystem.setShaderTexture(0, Minecraft.getInstance().getTextureManager().getTexture(texture).getTexture());
context.blit(RenderType::guiTextured, texture, x, y, u, v, width, height, textureWidth, textureHeight);
RenderSystem.setShaderTexture(0, Minecraft.getInstance().getTextureManager().getTexture(texture).getTextureView());
context.blit(RenderPipelines.GUI_TEXTURED, texture, x, y, u, v, width, height, textureWidth, textureHeight);
}

// in 1.20.2(and later maybe) not needed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void render(GuiGraphics context, int index, int y, int x, int entryWidth,
txt = name;
}
Component text = Component.literal(txt);
context.drawString(ContentsList.this.minecraft.font, text, (x - 50), y+10, 16777215, false);
context.drawString(ContentsList.this.minecraft.font, text, (x - 50), y+10, 0xFFFFFFFF);
this.stateButton.setX(x+entryWidth-140);
this.stateButton.setY(y);
this.stateButton.render(context, mouseX, mouseY, tickDelta);
Expand Down Expand Up @@ -161,7 +161,7 @@ public void render(GuiGraphics context, int index, int y, int x, int entryWidth,
txt = name;
}
Component text = Component.literal(txt);
context.drawString(ContentsList.this.minecraft.font, text, (x - 50), y+10, 16777215, false);
context.drawString(ContentsList.this.minecraft.font, text, (x - 50), y+10, 0xFFFFFFFF);
this.stateButton.setX(x+entryWidth-140);
this.stateButton.setY(y);
this.stateButton.render(context, mouseX, mouseY, tickDelta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public boolean shouldCloseOnEsc() {
public void render(@NotNull GuiGraphics context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
contentsList.render(context, mouseX, mouseY, delta);
Compat.drawCenteredString(context, this.font, this.title, this.width / 2, 8, 16777215);
Compat.drawCenteredString(context, this.font, this.title, this.width / 2, 8, 0xFFFFFFFF);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void startManuallySync(DynamicResourcePack pack) {
@Override
public String getCurrentGameVersion() {
SharedConstants.tryDetectVersion();
return SharedConstants.getCurrentVersion().getName();
return SharedConstants.getCurrentVersion().name();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public void render(@NotNull GuiGraphics context, int mouseX, int mouseY, float d
}

int h = 20;
Compat.drawString(context, this.font, this.title, 20, 8, 16777215);
Compat.drawWrappedString(context, Component.translatable("dynamicpack.screen.pack.description").getString(999), 20, 20 + h, width - 125, 2, ChatFormatting.GREEN.getColor());
Compat.drawString(context, this.font, Component.translatable("dynamicpack.screen.pack.remote_type", pack.getRemoteType()), 20, 40 + h, 16777215);
Compat.drawString(context, this.font, this.title, 20, 8, 0xFFFFFFFF);
Compat.drawWrappedString(context, Component.translatable("dynamicpack.screen.pack.description").getString(999), 20, 20 + h, width - 125, 2, 0xFF55FF55);
Compat.drawString(context, this.font, Component.translatable("dynamicpack.screen.pack.remote_type", pack.getRemoteType()), 20, 40 + h, 0xFFFFFFFF);

if (SyncingTask.isSyncing()) {
Compat.drawWrappedString(context, SyncingTask.getLogs(), 20, 78+30 + h, 500, 99, 0xCCCCCC);
Compat.drawWrappedString(context, SyncingTask.getLogs(), 20, 78+30 + h, 500, 99, 0xFFCCCCCC);

StringBuilder asciiPercentage = new StringBuilder();
int percentage = 0;
Expand All @@ -88,13 +88,13 @@ public void render(@NotNull GuiGraphics context, int mouseX, int mouseY, float d
if ((latestUpdated = pack.getLatestUpdated()) > 0) {
Date date = new Date(latestUpdated * 1000);
String string = DateFormat.getDateTimeInstance().format(date);
Compat.drawString(context, this.font, Component.translatable("dynamicpack.screen.pack.latestUpdated", string), 20, 52 + h, 16777215);
Compat.drawString(context, this.font, Component.translatable("dynamicpack.screen.pack.latestUpdated", string), 20, 52 + h, 0xFFFFFFFF);
}

h += 4;
Exception exception = pack.getLatestException();
if (exception != null) {
Compat.drawWrappedString(context, Component.translatable("dynamicpack.screen.pack.latestException", TranslatableException.getComponentFromException(exception)).getString(512), 20, 78 + h, width - 40, 4, 0xff2222);
Compat.drawWrappedString(context, Component.translatable("dynamicpack.screen.pack.latestException", TranslatableException.getComponentFromException(exception)).getString(512), 20, 78 + h, width - 40, 4, 0xFFFF2222);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ base {


dependencies {
modImplementation "com.terraformersmc:modmenu:14.0.0-rc.2"
modImplementation("dev.isxander:yet-another-config-lib:3.6.6+1.21.5-fabric")
include(modImplementation("io.gitlab.jfronny.libjf:libjf-resource-pack-entry-widgets-v0:3.18.5"))
modImplementation "com.terraformersmc:modmenu:15.0.0-beta.2"
modImplementation("dev.isxander:yet-another-config-lib:3.7.1+1.21.6-fabric")
include(modImplementation("io.gitlab.jfronny.libjf:libjf-resource-pack-entry-widgets-v0:3.18.7"))

minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ version=1.1
group=com.adamcalculator.dynamicpack

# Common
minecraft_version=1.21.5
minecraft_version=1.21.6
mod_name=DynamicPack
mod_author=AdamCalculator
mod_id=dynamicpack
license=MIT
credits=
description=Adds auto-update support for resource packs
minecraft_version_range=[1.21.5, 1.22)
minecraft_version_range=[1.21.6, 1.22)

# Fabric
fabric_version=0.119.5+1.21.5
fabric_version=0.127.1+1.21.6
fabric_loader_version=0.16.14
fabric_minecraft_version=>=1.21.5
fabric_minecraft_version=>=1.21.6

# NeoForge
neoforge_version=20.5.86
neoforge_version=20.6.11-beta
neoforge_loader_version_range=[2,)

# Gradle
Expand Down