eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

This commit is contained in:
BRanulf 2025-07-16 12:59:07 +08:00
parent 2334a12f19
commit 7bed25b441
9 changed files with 33 additions and 17 deletions

View File

@ -1,5 +1,5 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.4
@ -8,7 +8,7 @@ loader_version=0.16.10
mod_name=Disc Jockey Revive
mod_id=disc_jockey_revive
# Mod Properties
mod_version=1.14.514.046
mod_version=1.14.514.047
maven_group=semmiedev
archives_base_name=disc_jockey_revive
# Dependencies

View File

@ -31,6 +31,14 @@ public record Note(NoteBlockInstrument instrument, byte note) {
NoteBlockInstrument.BANJO,
NoteBlockInstrument.PLING,
NoteBlockInstrument.ZOMBIE,
NoteBlockInstrument.SKELETON,
NoteBlockInstrument.CREEPER,
NoteBlockInstrument.DRAGON,
NoteBlockInstrument.WITHER_SKELETON,
NoteBlockInstrument.PIGLIN,
NoteBlockInstrument.CUSTOM_HEAD
};
static {
@ -50,5 +58,13 @@ public record Note(NoteBlockInstrument instrument, byte note) {
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.BIT, Blocks.EMERALD_BLOCK);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.BANJO, Blocks.HAY_BLOCK);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.PLING, Blocks.GLOWSTONE);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.ZOMBIE, Blocks.ZOMBIE_HEAD);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.SKELETON, Blocks.SKELETON_SKULL);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.CREEPER, Blocks.CREEPER_HEAD);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.DRAGON, Blocks.DRAGON_HEAD);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.WITHER_SKELETON, Blocks.WITHER_SKELETON_SKULL);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.PIGLIN, Blocks.PIGLIN_HEAD);
INSTRUMENT_BLOCKS.put(NoteBlockInstrument.CUSTOM_HEAD, Blocks.PLAYER_HEAD);
}
}

View File

@ -89,9 +89,9 @@ public class KeyMappingListWidget extends EntryListWidget<KeyMappingListWidget.K
MinecraftClient client = MinecraftClient.getInstance();
int textY = y + (entryHeight - client.textRenderer.fontHeight) / 2;
Text keyText = Text.translatable(key.getTranslationKey());
context.drawTextWithShadow(client.textRenderer, keyText, x + 5, textY, 0xFFFFFF);
context.drawTextWithShadow(client.textRenderer, keyText, x + 5, textY, 0xFFFFFFFF);
String noteDisplayName = KeyMappingManager.getNoteDisplayName(note);
context.drawTextWithShadow(client.textRenderer, noteDisplayName, x + 100, textY, 0xAAAAAA);
context.drawTextWithShadow(client.textRenderer, noteDisplayName, x + 100, textY, 0xFFAAAAAA);
int buttonWidth = 50;
int buttonHeight = 18;
int buttonY = y + (entryHeight - buttonHeight) / 2;

View File

@ -6,7 +6,7 @@ import net.minecraft.client.gui.DrawContext;
public class ProgressBarRenderer {
private static final int BACKGROUND_COLOR = 0x80808080;
// private static final int PROGRESS_COLOR = 0x8000FF00;
private static final int TEXT_COLOR = 0xFFFFFF;
private static final int TEXT_COLOR = 0xEEFFFFFF;
public void renderProgressBar(DrawContext context, int x, int y, int width, int height, float progress, String timeText, int PROGRESS_COLOR) {
context.fill(x, y, x + width, y + height, BACKGROUND_COLOR);

View File

@ -70,7 +70,7 @@ public class SongListWidget extends EntryListWidget<SongListWidget.Entry> {
client.textRenderer,
emoji,
x + 4, y + 6,
favorite ? 0xFFD700 : 0x808080
favorite ? 0xFFFFD700 : 0xFF808080
);
// 歌曲名称靠左显示从收藏图标右侧开始
@ -81,7 +81,7 @@ public class SongListWidget extends EntryListWidget<SongListWidget.Entry> {
client.textRenderer,
displayText,
textX, y + 6,
selected ? 0xFFFFFF : 0x808080
selected ? 0xFFFFFFFF : 0xFF808080
);
}
@ -159,7 +159,7 @@ public class SongListWidget extends EntryListWidget<SongListWidget.Entry> {
client.textRenderer,
displayText,
x + 6, y + 6,
selected ? 0xFFFFFF : 0x808080
selected ? 0xFFFFFFFF : 0xFF808080
);
}

View File

@ -315,12 +315,12 @@ public class DiscJockeyScreen extends Screen {
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, DROP_HINT, width / 2, 5, 0xFFFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, SELECT_SONG, width / 2, 20, 0xFFFFFFFF);
// 显示当前文件夹和播放模式
String folderName = currentFolder == null ? "/" : currentFolder.name;
context.drawTextWithShadow(textRenderer, CURRENT_FOLDER.getString() + ": " + folderName, 35, 15, 0xFFFFFF);
context.drawTextWithShadow(textRenderer, CURRENT_FOLDER.getString() + ": " + folderName, 35, 15, 0xFFFFFFFF);
// context.drawTextWithShadow(textRenderer, PLAY_MODE.getString() + ":", width - 220, 15, 0xFFFFFF);
int screenWidth = context.getScaledWindowWidth();

View File

@ -135,11 +135,11 @@ public class EditKeyMappingsScreen extends Screen {
@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFFFF);
if (waitingForKeyPress) {
context.fill(0, 0, this.width, this.height, 0x80000000);
context.drawCenteredTextWithShadow(textRenderer, PRESS_KEY_INSTRUCTION, this.width / 2, this.height / 2 - 10, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, PRESS_KEY_INSTRUCTION, this.width / 2, this.height / 2 - 10, 0xFFFFFFFF);
}
mappingListWidget.render(context, mouseX, mouseY, delta);
}

View File

@ -58,8 +58,8 @@ public class LiveDjScreen extends Screen {
@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, INSTRUCTIONS, this.width / 2, 30, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, INSTRUCTIONS, this.width / 2, 30, 0xFFFFFFFF);
Text tuningStatusText;
if (Main.LIVE_DJ_PLAYER.getNoteBlocks() == null) {
@ -112,7 +112,7 @@ public class LiveDjScreen extends Screen {
startTuningButton.active = false;
startTuningButton.visible = false;
}
context.drawCenteredTextWithShadow(textRenderer, tuningStatusText, this.width / 2, 50, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, tuningStatusText, this.width / 2, 50, 0xFFFFFFFF);
if (!Main.LIVE_DJ_PLAYER.missingInstrumentBlocks.isEmpty()) {

View File

@ -147,7 +147,7 @@ public class SelectNoteScreen extends Screen {
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, TITLE, this.width / 2, 10, 0xFFFFFFFF);
context.drawCenteredTextWithShadow(textRenderer, Text.translatable(Main.MOD_ID + ".screen.select_note.mapping_key", Text.translatable(keyToMap.getTranslationKey())), this.width / 2, 30, 0xFFFFFF);
}