Compare commits

..

No commits in common. "master" and "1.21.5" have entirely different histories.

3 changed files with 18 additions and 11 deletions

View File

@ -4,17 +4,17 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.6
yarn_mappings=1.21.6+build.1
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
loader_version=0.16.14
loom_version=1.10-SNAPSHOT
# Fabric API
fabric_version=0.127.0+1.21.6
fabric_version=0.127.0+1.21.5
# Mod Properties
mod_version = 1.1.2+1.21.6
mod_version = 1.1.2+1.21.5
maven_group = ru.themixray
archives_base_name = repeating-mod
# Compatible with: 1.21.6
# Compatible with: 1.21.5

View File

@ -51,7 +51,7 @@ public class RepeatingScreen extends Screen {
@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
// renderBackground(context, mouseX, mouseY, delta);
renderBackground(context, mouseX, mouseY, delta);
for (RenderListener l : render_listeners) {
if (l.beforeRender()) {

View File

@ -1,6 +1,5 @@
package ru.themixray.repeating_mod.widget;
import lombok.Getter;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.Drawable;
import net.minecraft.client.gui.tooltip.Tooltip;
@ -19,7 +18,6 @@ import java.util.List;
import java.util.function.Consumer;
public class RecordWidget implements Drawable, Widget {
@Getter
private RecordState record;
private List<ClickableWidget> children;
@ -152,13 +150,22 @@ public class RecordWidget implements Drawable, Widget {
children.add(replay_button);
}
public void drawText(int x, int y, DrawContext ctx, List<Text> lines, int line_height, boolean shadow) {
public RecordState getRecord() {
return record;
}
public void drawText(int x, int y, DrawContext ctx, List<Text> lines, float size, int line_height, boolean shadow) {
ctx.getMatrices().push();
ctx.getMatrices().scale(size, size, size);
int now_y = y;
for (Text line : lines) {
ctx.drawText(Main.client.textRenderer, line, x, now_y, 0xff000000 + line.getStyle().getColor().getRgb(), shadow);
ctx.drawText(Main.client.textRenderer, line, (int) (x / size), (int) (now_y / size), line.getStyle().getColor().getRgb(), shadow);
now_y += line_height;
}
ctx.getMatrices().pop();
}
@Override
@ -183,7 +190,7 @@ public class RecordWidget implements Drawable, Widget {
.append(": ")
.styled((s) -> s.withColor(0xbbbbbb)),
Text.literal(record.getAuthor()).styled((s) -> s.withColor(0xffffff))
),
), 1,
9,
false);