Skip to content

Commit

Permalink
Various assorted refactors (easier add-on integration, fixed drive ce…
Browse files Browse the repository at this point in the history
…ll models etc.)
  • Loading branch information
62832 committed Nov 5, 2024
1 parent b799907 commit f1e999d
Show file tree
Hide file tree
Showing 32 changed files with 233 additions and 1,144 deletions.
29 changes: 15 additions & 14 deletions src/data/java/gripe/_90/megacells/datagen/MEGAModelProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,18 @@ protected void registerStatesAndModels() {
basicItem(MEGAItems.GREATER_ENERGY_CARD);
basicItem(MEGAItems.COMPRESSION_CARD);

MEGAItems.getItemCells().forEach(this::cell);
MEGAItems.getFluidCells().forEach(this::cell);
MEGAItems.getChemicalCells().forEach(this::cell);
MEGAItems.getSourceCells().forEach(this::cell);
for (var cell : MEGAItems.getTieredCells()) {
if (cell.portable()) {
portable(cell.item(), cell.keyType());
} else {
cell(cell.item());
}
}

cell(MEGAItems.BULK_ITEM_CELL);
cell(MEGAItems.RADIOACTIVE_CHEMICAL_CELL);

MEGAItems.getItemPortables().forEach(cell -> portable(cell, "item"));
MEGAItems.getFluidPortables().forEach(cell -> portable(cell, "fluid"));
MEGAItems.getChemicalPortables().forEach(cell -> portable(cell, "chemical"));
MEGAItems.getSourcePortables().forEach(cell -> portable(cell, "source"));

MEGAItems.getAllCells().forEach(this::driveCell);
MEGAItems.getTieredCells().forEach(this::driveCell);
driveCell(MEGAItems.BULK_ITEM_CELL, 0);
driveCell(MEGAItems.RADIOACTIVE_CHEMICAL_CELL, 2);

Expand Down Expand Up @@ -216,10 +215,12 @@ private void portable(ItemDefinition<?> portable, String housingType) {
}

private void driveCell(MEGAItems.CellDefinition cell) {
driveCell(
cell.tier().namePrefix() + "_" + cell.keyType() + "_cell",
"mega_" + cell.keyType() + "_cell",
(cell.tier().index() - 6) * 2);
if (!cell.portable()) {
driveCell(
cell.tier().namePrefix() + "_" + cell.keyType() + "_cell",
"mega_" + cell.keyType() + "_cell",
(cell.tier().index() - 6) * 2);
}
}

private void driveCell(ItemDefinition<?> cell, int offset) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-10-20T15:17:33.818816604 Block States / Models
// 1.21.1 2024-11-04T23:24:20.773958326 Block States / Models
8d69a3c391bcb75b5aac370510d15fa9c367b200 assets/megacells/blockstates/16m_crafting_storage.json
6b8ebbdecbd556e59c1c0d9abb4222d5de046e9a assets/megacells/blockstates/1m_crafting_storage.json
c716f5bd44bda4274f6e5f2c2f2b09f6223a8de7 assets/megacells/blockstates/256m_crafting_storage.json
Expand Down Expand Up @@ -29,26 +29,26 @@ bb279ec5c0a166e1b7f0d11ab67408f29e7b37d8 assets/megacells/models/block/crafting/
bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f assets/megacells/models/block/crafting/monitor_formed.json
75fdc6d6aad6a4d9403b71994b38f1ec774ce7d1 assets/megacells/models/block/crafting/unit.json
bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f assets/megacells/models/block/crafting/unit_formed.json
b5aed244ba024e0cf6e01d55c7337d3a78bdc343 assets/megacells/models/block/drive/cells/16m_chemical_cell.json
ac19152e615ec413b01f03ea64b9c97202c69b93 assets/megacells/models/block/drive/cells/16m_fluid_cell.json
c162baa8189635e58888371831e5be75effe7f15 assets/megacells/models/block/drive/cells/16m_item_cell.json
14e7780f287bf480ff3a9caf2c879be6bbf8da4f assets/megacells/models/block/drive/cells/16m_source_cell.json
5a321e8155aabd5f762a1388459dbbdd25760caf assets/megacells/models/block/drive/cells/1m_chemical_cell.json
4e95d9b0ba21cfe132def34adb29b7a6bea6dc31 assets/megacells/models/block/drive/cells/1m_fluid_cell.json
f760556eae133ae2dbea5045f640357a46e846f4 assets/megacells/models/block/drive/cells/1m_item_cell.json
75010741839fc22e84ff4e60834757f87ef01875 assets/megacells/models/block/drive/cells/1m_source_cell.json
194b46a5585d4876d49d04c03a939848258d2ff4 assets/megacells/models/block/drive/cells/256m_chemical_cell.json
46f51bb7d95664321c22cc3285af668fbae2568f assets/megacells/models/block/drive/cells/256m_fluid_cell.json
edea8ebddb6bdb2463fdebd36e60b8df5d451316 assets/megacells/models/block/drive/cells/256m_item_cell.json
6582a7db52b90af087fd7a6331d94e6098b222a4 assets/megacells/models/block/drive/cells/256m_source_cell.json
88032aac24f37379725c45870b0dcc01c67af508 assets/megacells/models/block/drive/cells/4m_chemical_cell.json
e1930c2351da19d57397450fb8d485184e58e349 assets/megacells/models/block/drive/cells/4m_fluid_cell.json
721100216b33d4ee9476a16e0afd6193e28c7424 assets/megacells/models/block/drive/cells/4m_item_cell.json
c03477c6fad692f52e0c09a35ab4f8bf0cbfcaf5 assets/megacells/models/block/drive/cells/4m_source_cell.json
1856d503102c60f0796c8273149f74095285b437 assets/megacells/models/block/drive/cells/64m_chemical_cell.json
1f0566b718fcf79a27c65f53848249f803224c49 assets/megacells/models/block/drive/cells/64m_fluid_cell.json
7d68f252b72cf9bfce7fbd0d19c87338baca97d5 assets/megacells/models/block/drive/cells/64m_item_cell.json
de75e0aaa0ca780926bcb7bdd78e02562a8158ed assets/megacells/models/block/drive/cells/64m_source_cell.json
26317a4644e39aa2969c0cb96f22aeabfa71dc0a assets/megacells/models/block/drive/cells/16m_chemical_cell.json
94fdbfb6fbc077e6f2bab148c0610262d25d572f assets/megacells/models/block/drive/cells/16m_fluid_cell.json
9078b6d2e74a5bd70a9fa1103872dcb80a784fa7 assets/megacells/models/block/drive/cells/16m_item_cell.json
6ab6d197ba96ae79c2f95447f8a18f85528ed5e2 assets/megacells/models/block/drive/cells/16m_source_cell.json
482e5ad8e0a58973889ddd9fafde6192d1802d46 assets/megacells/models/block/drive/cells/1m_chemical_cell.json
6175e319046dc30dbc35b8a4f42b970f1ae6c9a8 assets/megacells/models/block/drive/cells/1m_fluid_cell.json
708afd20ab2e26b1c5562d5a91e78a9935037b11 assets/megacells/models/block/drive/cells/1m_item_cell.json
ad12a43236b72410a95ec24025dae5b953782ac6 assets/megacells/models/block/drive/cells/1m_source_cell.json
98a69f5c0231d12190988b5472416937548a32b0 assets/megacells/models/block/drive/cells/256m_chemical_cell.json
038a71241b32272946b009ef64cd95ae62f89f45 assets/megacells/models/block/drive/cells/256m_fluid_cell.json
317cb3d8a4d3a62d82314f67a778f7016e626201 assets/megacells/models/block/drive/cells/256m_item_cell.json
4712cbd93e5c84d375f8519894f685064d684f8c assets/megacells/models/block/drive/cells/256m_source_cell.json
2d74a4ad8d13573667fca88dcb2feeb4b88187db assets/megacells/models/block/drive/cells/4m_chemical_cell.json
5802ae26a5f84d3b467d1e0fe7743788983158c2 assets/megacells/models/block/drive/cells/4m_fluid_cell.json
a2e1c94fec6eeb6cc033c1efe88315d1e846ce88 assets/megacells/models/block/drive/cells/4m_item_cell.json
1338ae5a2e832dfb7162d435de4dc67866af517c assets/megacells/models/block/drive/cells/4m_source_cell.json
ebc4df02c9e6ca3d37c0d1afb5950a8138cbdb8d assets/megacells/models/block/drive/cells/64m_chemical_cell.json
e7ea3d2617b666f955a0fa0623101139d8d5ce7e assets/megacells/models/block/drive/cells/64m_fluid_cell.json
cca14905b3a7cefbda9022e2bd3dd3fa2d4cb0eb assets/megacells/models/block/drive/cells/64m_item_cell.json
10629fb2f5f657e85847374913e771df235c4153 assets/megacells/models/block/drive/cells/64m_source_cell.json
9923abfaabaf29512ab6ffc57e6631201612cd02 assets/megacells/models/block/drive/cells/bulk_item_cell.json
44c1cec7b57b70d8eee95fb5ca8c94a6270d7f62 assets/megacells/models/block/drive/cells/radioactive_chemical_cell.json
5e974aa730bec68d50d47c26f432bddefb0eea5a assets/megacells/models/block/mega_energy_cell_0.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
{
"ambientocclusion": false,
"elements": [
{
"faces": {
"down": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
},
"north": {
"cullface": "north",
"texture": "#cell",
"uv": [
0.0,
4.0,
6.0,
6.0
]
},
"up": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
}
},
"from": [
0,
0,
0
],
"to": [
6,
2,
2
]
},
{
"faces": {
"down": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
{
"ambientocclusion": false,
"elements": [
{
"faces": {
"down": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
},
"north": {
"cullface": "north",
"texture": "#cell",
"uv": [
0.0,
4.0,
6.0,
6.0
]
},
"up": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
}
},
"from": [
0,
0,
0
],
"to": [
6,
2,
2
]
},
{
"faces": {
"down": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
{
"ambientocclusion": false,
"elements": [
{
"faces": {
"down": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
},
"north": {
"cullface": "north",
"texture": "#cell",
"uv": [
0.0,
4.0,
6.0,
6.0
]
},
"up": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
}
},
"from": [
0,
0,
0
],
"to": [
6,
2,
2
]
},
{
"faces": {
"down": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
{
"ambientocclusion": false,
"elements": [
{
"faces": {
"down": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
},
"north": {
"cullface": "north",
"texture": "#cell",
"uv": [
0.0,
4.0,
6.0,
6.0
]
},
"up": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
4.0,
0.0,
6.0
]
}
},
"from": [
0,
0,
0
],
"to": [
6,
2,
2
]
},
{
"faces": {
"down": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,6 @@
{
"ambientocclusion": false,
"elements": [
{
"faces": {
"down": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
0.0,
0.0,
2.0
]
},
"north": {
"cullface": "north",
"texture": "#cell",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"cullface": "north",
"texture": "#cell",
"uv": [
6.0,
0.0,
0.0,
2.0
]
}
},
"from": [
0,
0,
0
],
"to": [
6,
2,
2
]
},
{
"faces": {
"down": {
Expand Down
Loading

0 comments on commit f1e999d

Please sign in to comment.