Update to 1.20 release candidate 1
This commit is contained in:
parent
b7b26a767d
commit
6a9ea0fb77
@ -20,15 +20,15 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
modApi("me.shedaniel.cloth:cloth-config-fabric:9.0.94") {
|
||||
modApi("me.shedaniel.cloth:cloth-config-fabric:11.0.97") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
include("me.shedaniel.cloth:cloth-config-fabric:9.0.94") {
|
||||
include("me.shedaniel.cloth:cloth-config-fabric:11.0.97") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
modApi("com.terraformersmc:modmenu:5.0.1")
|
||||
modApi("com.terraformersmc:modmenu:7.0.0-beta.2")
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@ -2,13 +2,13 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.19.4
|
||||
yarn_mappings=1.19.4+build.1
|
||||
loader_version=0.14.17
|
||||
minecraft_version=1.20-pre1
|
||||
yarn_mappings=1.20-pre1+build.7
|
||||
loader_version=0.14.19
|
||||
# Mod Properties
|
||||
mod_version=1.2.4
|
||||
maven_group=semmiedev
|
||||
archives_base_name=disc_jockey
|
||||
# Dependencies
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.76.0+1.19.4
|
||||
fabric_version=0.80.3+1.20
|
||||
|
@ -1,10 +1,9 @@
|
||||
package semmiedev.disc_jockey.gui;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
||||
import net.minecraft.client.gui.widget.EntryListWidget;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import semmiedev.disc_jockey.Main;
|
||||
@ -58,18 +57,22 @@ public class SongListWidget extends EntryListWidget<SongListWidget.SongEntry> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
|
||||
public void render(DrawContext context, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
|
||||
this.x = x; this.y = y; this.entryWidth = entryWidth; this.entryHeight = entryHeight;
|
||||
|
||||
if (selected) {
|
||||
fill(matrices, x, y, x + entryWidth, y + entryHeight, 0xFFFFFF);
|
||||
fill(matrices, x + 1, y + 1, x + entryWidth - 1, y + entryHeight - 1, 0x000000);
|
||||
//fill(matrices, x, y, x + entryWidth, y + entryHeight, 0xFFFFFF);
|
||||
context.fill(x, y, x + entryWidth, y + entryHeight, 0xFFFFFF);
|
||||
//fill(matrices, x + 1, y + 1, x + entryWidth - 1, y + entryHeight - 1, 0x000000);
|
||||
context.fill(x + 1, y + 1, x + entryWidth - 1, y + entryHeight - 1, 0x000000);
|
||||
}
|
||||
|
||||
drawCenteredTextWithShadow(matrices, client.textRenderer, song.displayName, x + entryWidth / 2, y + 5, selected ? 0xFFFFFF : 0x808080);
|
||||
//drawCenteredTextWithShadow(matrices, client.textRenderer, song.displayName, x + entryWidth / 2, y + 5, selected ? 0xFFFFFF : 0x808080);
|
||||
context.drawCenteredTextWithShadow(client.textRenderer, song.displayName, x + entryWidth / 2, y + 5, selected ? 0xFFFFFF : 0x808080);
|
||||
|
||||
RenderSystem.setShaderTexture(0, ICONS);
|
||||
drawTexture(matrices, x + 2, y + 2, (favorite ? 26 : 0) + (isOverFavoriteButton(mouseX, mouseY) ? 13 : 0), 0, 13, 12, 52, 12);
|
||||
//RenderSystem.setShaderTexture(0, ICONS);
|
||||
//drawTexture(matrices, x + 2, y + 2, (favorite ? 26 : 0) + (isOverFavoriteButton(mouseX, mouseY) ? 13 : 0), 0, 13, 12, 52, 12);
|
||||
context.drawTexture(ICONS, x + 2, y + 2, (favorite ? 26 : 0) + (isOverFavoriteButton(mouseX, mouseY) ? 13 : 0), 0, 13, 12, 52, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,9 +3,8 @@ package semmiedev.disc_jockey.gui.hud;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.ColorHelper;
|
||||
|
||||
@ -16,21 +15,25 @@ public class BlocksOverlay {
|
||||
|
||||
private static final ItemStack NOTE_BLOCK = Blocks.NOTE_BLOCK.asItem().getDefaultStack();
|
||||
|
||||
public static void render(MatrixStack matrices, float tickDelta) {
|
||||
public static void render(DrawContext context, float tickDelta) {
|
||||
if (itemStacks != null) {
|
||||
DrawableHelper.fill(matrices, 2, 2, 62, (itemStacks.length + 1) * 20 + 7, ColorHelper.Argb.getArgb(255, 22, 22, 27));
|
||||
DrawableHelper.fill(matrices, 4, 4, 60, (itemStacks.length + 1) * 20 + 5, ColorHelper.Argb.getArgb(255, 42, 42, 47));
|
||||
context.fill(2, 2, 62, (itemStacks.length + 1) * 20 + 7, ColorHelper.Argb.getArgb(255, 22, 22, 27));
|
||||
context.fill(4, 4, 60, (itemStacks.length + 1) * 20 + 5, ColorHelper.Argb.getArgb(255, 42, 42, 47));
|
||||
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
TextRenderer textRenderer = client.textRenderer;
|
||||
ItemRenderer itemRenderer = client.getItemRenderer();
|
||||
|
||||
textRenderer.draw(matrices, " × "+amountOfNoteBlocks, 26, 13, 0xFFFFFF);
|
||||
itemRenderer.renderInGui(matrices, NOTE_BLOCK, 6, 6);
|
||||
//textRenderer.draw(matrices, " × "+amountOfNoteBlocks, 26, 13, 0xFFFFFF);
|
||||
context.drawText(textRenderer, " × "+amountOfNoteBlocks, 26, 13, 0xFFFFFF, true);
|
||||
//itemRenderer.renderInGui(matrices, NOTE_BLOCK, 6, 6);
|
||||
context.drawItem(NOTE_BLOCK, 6, 6);
|
||||
|
||||
for (int i = 0; i < itemStacks.length; i++) {
|
||||
textRenderer.draw(matrices, " × "+amounts[i], 26, 13 + 20 * (i + 1), 0xFFFFFF);
|
||||
itemRenderer.renderInGui(matrices, itemStacks[i], 6, 6 + 20 * (i + 1));
|
||||
//textRenderer.draw(matrices, " × "+amounts[i], 26, 13 + 20 * (i + 1), 0xFFFFFF);
|
||||
context.drawText(textRenderer, " × "+amounts[i], 26, 13 + 20 * (i + 1), 0xFFFFFF, true);
|
||||
//itemRenderer.renderInGui(matrices, itemStacks[i], 6, 6 + 20 * (i + 1));
|
||||
context.drawItem(itemStacks[i], 6, 6 + 20 * (i + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package semmiedev.disc_jockey.gui.screen;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.ConfirmScreen;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.Text;
|
||||
@ -129,11 +129,13 @@ public class DiscJockeyScreen extends Screen {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
super.render(matrices, mouseX, mouseY, delta);
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
super.render(context, mouseX, mouseY, delta);
|
||||
|
||||
drawCenteredTextWithShadow(matrices, textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
|
||||
drawCenteredTextWithShadow(matrices, textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
|
||||
//drawCenteredTextWithShadow(matrices, textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
|
||||
context.drawCenteredTextWithShadow(textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
|
||||
//drawCenteredTextWithShadow(matrices, textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
|
||||
context.drawCenteredTextWithShadow(textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,7 +26,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabric": "*",
|
||||
"minecraft": "1.19.4",
|
||||
"modmenu": "*"
|
||||
"minecraft": "1.20-beta.1",
|
||||
"cloth-config": "*"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user