Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colored terminals #263

Draft
wants to merge 40 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
db9c886
add color codec
Mari023 May 7, 2024
97f42a3
register an item property for color
Mari023 May 7, 2024
67c8eea
working on datagen
Mari023 May 8, 2024
cd3e6d7
add model overrides
Mari023 May 9, 2024
b0c3bdf
prepare for lit / unlit ledStatus
Mari023 May 9, 2024
ea5f133
generate textures (color mapping isn't implemented yet)
Mari023 May 10, 2024
0836ca4
fix model gen trying to load existing models instead of using the new…
Mari023 May 10, 2024
7898106
fix ColorMap
Mari023 May 10, 2024
626be2f
fix color format being wrong
Mari023 May 10, 2024
94b869b
use colors the image actually has instead of the ones it is supposed …
Mari023 May 10, 2024
866d66a
inline argb conversion
Mari023 May 10, 2024
69c5731
remove dead code
Mari023 May 10, 2024
7de4800
add copyright notices for files copied from MIs datagen
Mari023 May 10, 2024
18eb2fa
remove leftover files
Mari023 May 10, 2024
9165df5
actually use datagened files
Mari023 May 10, 2024
fcb51c2
make sure datagened files are always commited
Mari023 May 10, 2024
c5f415e
append modname to textures datagen name
Mari023 May 10, 2024
f7390fa
add datagen cache to .gitignore
Mari023 May 10, 2024
d3138c7
add datagened files to git
Mari023 May 10, 2024
e657e2d
run datagen before publishing
Mari023 May 10, 2024
d0c2598
spotless
Mari023 May 10, 2024
9ec6a6c
move recipe package
Mari023 May 10, 2024
64923c2
add coloring recipe
Mari023 May 10, 2024
ea1e43b
add coloring recipe datagen
Mari023 May 10, 2024
b8abaa1
store ItemStack instead of Holder<Item>
Mari023 May 10, 2024
7d5c814
use proper tag for color removal recipe
Mari023 May 10, 2024
27be186
use the codec to serialize the color of the recipe
Mari023 May 10, 2024
efb8479
add coloring recipe datagen output
Mari023 May 11, 2024
0f68d86
use the right housing for the wireless terminal
Mari023 May 11, 2024
e8e485f
remove redundant pixels from housing
Mari023 May 11, 2024
2ddd80a
"temporary" copy models of ae2 terminal from datagen to normal resour…
Mari023 May 11, 2024
444b014
make ledstatus codec transient
Mari023 May 11, 2024
63eb5af
set led status... in theorie
Mari023 May 11, 2024
c034c87
fix status led being in wrong order, before it would only use the fir…
Mari023 May 11, 2024
cee5c8e
fix led crashing the universal terminal
Mari023 May 11, 2024
c5fa4e8
spotless
Mari023 May 11, 2024
2f114e2
fix colors used in base image
Mari023 May 11, 2024
84480a4
optimize pngs
Mari023 May 11, 2024
687b3e2
use commit hash and move copyright notice to the top of file
Mari023 May 13, 2024
c49992e
fix typo
Mari023 May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ jobs:
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Generate assets
run: ./gradlew runData
- name: Check that datagen ran
run: test -d ./src/generated/resources/.cache
- name: Make sure that datagened files in the repo are up-to-date
run: |
# Print status for easier debugging
git status
if [ -n "$(git status --porcelain)" ]; then exit 1; fi
- name: Build with Gradle
run: ./gradlew build
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Generate assets
run: ./gradlew runData
- name: Check that datagen ran
run: test -d ./src/generated/resources/.cache

- name: Build with Gradle
run: ./gradlew build
env:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ gradle-app.setting
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
!gradle-wrapper.jar
/src/generated/resources/.cache/
14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ tasks {
}
}

sourceSets {
main {
resources.srcDir(file("src/generated/resources"))
}
}

runs {
configureEach {
workingDirectory(file("run"))
Expand All @@ -162,6 +168,14 @@ runs {

create("client")
create("server")
create("data") {
programArguments.addAll(
"--mod", "ae2wtlib",
"--all",
"--output", file("src/generated/resources/").absolutePath,
"--existing", file("src/main/resources/").absolutePath
)
}
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
{
"parent": "minecraft:item/generated",
"overrides": [
{
"model": "ae2wtlib:item/wireless_crafting_terminal_white_unlit",
"predicate": {
"ae2wtlib:color": 0.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_white_lit",
"predicate": {
"ae2wtlib:color": 0.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_orange_unlit",
"predicate": {
"ae2wtlib:color": 1.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_orange_lit",
"predicate": {
"ae2wtlib:color": 1.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_magenta_unlit",
"predicate": {
"ae2wtlib:color": 2.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_magenta_lit",
"predicate": {
"ae2wtlib:color": 2.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_light_blue_unlit",
"predicate": {
"ae2wtlib:color": 3.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_light_blue_lit",
"predicate": {
"ae2wtlib:color": 3.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_yellow_unlit",
"predicate": {
"ae2wtlib:color": 4.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_yellow_lit",
"predicate": {
"ae2wtlib:color": 4.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_lime_unlit",
"predicate": {
"ae2wtlib:color": 5.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_lime_lit",
"predicate": {
"ae2wtlib:color": 5.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_pink_unlit",
"predicate": {
"ae2wtlib:color": 6.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_pink_lit",
"predicate": {
"ae2wtlib:color": 6.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_gray_unlit",
"predicate": {
"ae2wtlib:color": 7.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_gray_lit",
"predicate": {
"ae2wtlib:color": 7.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_light_gray_unlit",
"predicate": {
"ae2wtlib:color": 8.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_light_gray_lit",
"predicate": {
"ae2wtlib:color": 8.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_cyan_unlit",
"predicate": {
"ae2wtlib:color": 9.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_cyan_lit",
"predicate": {
"ae2wtlib:color": 9.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_purple_unlit",
"predicate": {
"ae2wtlib:color": 10.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_purple_lit",
"predicate": {
"ae2wtlib:color": 10.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_blue_unlit",
"predicate": {
"ae2wtlib:color": 11.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_blue_lit",
"predicate": {
"ae2wtlib:color": 11.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_brown_unlit",
"predicate": {
"ae2wtlib:color": 12.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_brown_lit",
"predicate": {
"ae2wtlib:color": 12.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_green_unlit",
"predicate": {
"ae2wtlib:color": 13.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_green_lit",
"predicate": {
"ae2wtlib:color": 13.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_red_unlit",
"predicate": {
"ae2wtlib:color": 14.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_red_lit",
"predicate": {
"ae2wtlib:color": 14.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_black_unlit",
"predicate": {
"ae2wtlib:color": 15.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_black_lit",
"predicate": {
"ae2wtlib:color": 15.0,
"ae2wtlib:led_status": 1.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_fluix_unlit",
"predicate": {
"ae2wtlib:color": 16.0,
"ae2wtlib:led_status": 0.0
}
},
{
"model": "ae2wtlib:item/wireless_crafting_terminal_fluix_lit",
"predicate": {
"ae2wtlib:color": 16.0,
"ae2wtlib:led_status": 1.0
}
}
],
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_fluix",
"layer2": "ae2wtlib:item/wireless_terminal_led_fluix_lit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_black",
"layer2": "ae2wtlib:item/wireless_terminal_led_black_lit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_black",
"layer2": "ae2wtlib:item/wireless_terminal_led_black_unlit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_blue",
"layer2": "ae2wtlib:item/wireless_terminal_led_blue_lit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_blue",
"layer2": "ae2wtlib:item/wireless_terminal_led_blue_unlit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_brown",
"layer2": "ae2wtlib:item/wireless_terminal_led_brown_lit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_brown",
"layer2": "ae2wtlib:item/wireless_terminal_led_brown_unlit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_cyan",
"layer2": "ae2wtlib:item/wireless_terminal_led_cyan_lit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ae2wtlib:item/common_terminal_housing",
"layer1": "ae2wtlib:item/wireless_crafting_terminal_cyan",
"layer2": "ae2wtlib:item/wireless_terminal_led_cyan_unlit"
}
}
Loading
Loading