mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-18 12:24:27 +00:00
Move GUI sprites to the sprites/ folder
This is where vanilla will read the sprites from in future versions, so means we have a consistent layout between versions. Also move the turtle "selected slot" texture to a sprite sheet. It would be good to do more of these in the future (e.g. printer progress, maybe bits of printouts). Sorry to resource pack artists for causing trouble again.
This commit is contained in:
14 files changed
+17
-11
No files matched your search
@@ -32,10 +32,13 @@ public final class GuiSprites extends TextureAtlasHolder {
|
||||
public static final ComputerTextures COMPUTER_COMMAND = computer("command", false, true);
|
||||
public static final ComputerTextures COMPUTER_COLOUR = computer("colour", true, false);
|
||||
|
||||
public static final ResourceLocation TURTLE_NORMAL_SELECTED_SLOT = new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/sprites/turtle_normal_selected_slot");
|
||||
public static final ResourceLocation TURTLE_ADVANCED_SELECTED_SLOT = new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/sprites/turtle_advanced_selected_slot");
|
||||
|
||||
private static ButtonTextures button(String name) {
|
||||
return new ButtonTextures(
|
||||
new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/buttons/" + name),
|
||||
new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/buttons/" + name + "_hover")
|
||||
new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/sprites/buttons/" + name),
|
||||
new ResourceLocation(ComputerCraftAPI.MOD_ID, "gui/sprites/buttons/" + name + "_hover")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ public class TurtleScreen extends AbstractComputerScreen<TurtleMenu> {
|
||||
if (slot >= 0) {
|
||||
var slotX = slot % 4;
|
||||
var slotY = slot / 4;
|
||||
graphics.blit(texture,
|
||||
leftPos + TURTLE_START_X - 2 + slotX * 18, topPos + PLAYER_START_Y - 2 + slotY * 18, 0,
|
||||
0, 217, 24, 24, FULL_TEX_SIZE, FULL_TEX_SIZE
|
||||
graphics.blit(
|
||||
leftPos + TURTLE_START_X - 2 + slotX * 18, topPos + PLAYER_START_Y - 2 + slotY * 18, 0, 22, 22,
|
||||
GuiSprites.get(advanced ? GuiSprites.TURTLE_ADVANCED_SELECTED_SLOT : GuiSprites.TURTLE_NORMAL_SELECTED_SLOT)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ public final class DataProviders {
|
||||
LecternPrintoutModel.TEXTURE
|
||||
)));
|
||||
out.accept(GuiSprites.SPRITE_SHEET, makeSprites(
|
||||
Stream.of(GuiSprites.TURTLE_NORMAL_SELECTED_SLOT, GuiSprites.TURTLE_ADVANCED_SELECTED_SLOT),
|
||||
// Buttons
|
||||
GuiSprites.TURNED_OFF.textures(),
|
||||
GuiSprites.TURNED_ON.textures(),
|
||||
|
||||
+8
-6
@@ -1,11 +1,13 @@
|
||||
{
|
||||
"sources": [
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/turned_off"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/turned_off_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/turned_on"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/turned_on_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/terminate"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/buttons/terminate_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/turtle_normal_selected_slot"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/turtle_advanced_selected_slot"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/turned_off"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/turned_off_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/turned_on"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/turned_on_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/terminate"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sprites/buttons/terminate_hover"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/border_normal"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/pocket_bottom_normal"},
|
||||
{"type": "minecraft:single", "resource": "computercraft:gui/sidebar_normal"},
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 461 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 476 B |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
Reference in new issue
Block a user