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

Re-Textures #122

Merged
merged 5 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions src/data/java/gripe/_90/megacells/datagen/MEGAModelProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,13 @@ protected void registerStatesAndModels() {
MEGAItems.getFluidCells().forEach(this::cell);
cell(MEGAItems.BULK_ITEM_CELL);

var itemPortableHousing = AppEng.makeId("item/portable_cell_item_housing");
var fluidPortableHousing = AppEng.makeId("item/portable_cell_fluid_housing");
var itemPortableHousing = MEGACells.makeId("item/cell/portable/portable_cell_item_housing");
var fluidPortableHousing = MEGACells.makeId("item/cell/portable/portable_cell_fluid_housing");
existing.trackGenerated(itemPortableHousing, ModelProvider.TEXTURE);
existing.trackGenerated(fluidPortableHousing, ModelProvider.TEXTURE);
existing.trackGenerated(AppEng.makeId("item/portable_cell_led"), ModelProvider.TEXTURE);
MEGAItems.getItemPortables().forEach(cell -> portable(cell, "item", itemPortableHousing));
MEGAItems.getFluidPortables().forEach(cell -> portable(cell, "fluid", fluidPortableHousing));

existing.trackGenerated(AppEng.makeId("block/drive/drive_cell"), MODEL);
driveCell("mega_item_cell");
driveCell("mega_fluid_cell");
driveCell("bulk_item_cell");
MEGAItems.getItemPortables().forEach(cell -> portable(cell, itemPortableHousing));
MEGAItems.getFluidPortables().forEach(cell -> portable(cell, fluidPortableHousing));

var craftingPattern =
AppEng.makeId("item/" + AEItems.CRAFTING_PATTERN.id().getPath());
Expand Down Expand Up @@ -199,7 +194,10 @@ protected void registerStatesAndModels() {
basicItem(AppMekItems.MEGA_CHEMICAL_CELL_HOUSING);

AppMekItems.getCells().forEach(this::cell);
AppMekItems.getPortables().forEach(this::portable);

var chemicalPortableHousing = MEGACells.makeId("item/cell/portable/portable_cell_chemical_housing");
existing.trackGenerated(chemicalPortableHousing, ModelProvider.TEXTURE);
AppMekItems.getPortables().forEach(cell -> portable(cell, chemicalPortableHousing));

basicItem(AppMekItems.RADIOACTIVE_CELL_COMPONENT);
cell(AppMekItems.RADIOACTIVE_CHEMICAL_CELL);
Expand All @@ -221,19 +219,15 @@ private void cell(ItemDefinition<?> cell) {
.texture("layer1", AppEng.makeId("item/storage_cell_led"));
}

private void portable(ItemDefinition<?> portable, String screenType, ResourceLocation housing) {
private void portable(ItemDefinition<?> portable, ResourceLocation housing) {
var id = portable.id().getPath();
var tierSuffix = id.substring(id.lastIndexOf('_'));
existing.trackGenerated(housing, ModelProvider.TEXTURE);

itemModels()
.singleTexture(
id,
mcLoc("item/generated"),
"layer0",
MEGACells.makeId("item/cell/portable/portable_cell_" + screenType + "_screen"))
.singleTexture(id, mcLoc("item/generated"), "layer0", housing)
.texture("layer1", AppEng.makeId("item/portable_cell_led"))
.texture("layer2", housing)
.texture("layer2", MEGACells.makeId("item/cell/portable/portable_cell_screen"))
.texture("layer3", MEGACells.makeId("item/cell/portable/portable_cell_side" + tierSuffix));
}

Expand All @@ -246,11 +240,6 @@ private void portable(ItemDefinition<?> portable) {
}
*/

private void driveCell(String texture) {
var path = "block/drive/cells/" + texture;
models().singleTexture(path, AppEng.makeId("block/drive/drive_cell"), "cell", MEGACells.makeId(path));
}

private void interfaceOrProviderPart(ItemDefinition<?> part) {
var id = part.id().getPath();
var partName = id.substring(id.indexOf('_') + 1);
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/gripe/_90/megacells/definition/MEGAItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,15 @@ private static ItemDefinition<MEGAPortableCell> itemPortable(StorageTier tier) {
return item(
tier.namePrefix().toUpperCase() + " Portable Item Cell",
"portable_item_cell_" + tier.namePrefix(),
p -> new MEGAPortableCell(p, tier, AEKeyType.items(), MEStorageMenu.PORTABLE_ITEM_CELL_TYPE, 0x353535));
p -> new MEGAPortableCell(p, tier, AEKeyType.items(), MEStorageMenu.PORTABLE_ITEM_CELL_TYPE, 0x80caff));
}

private static ItemDefinition<MEGAPortableCell> fluidPortable(StorageTier tier) {
return item(
tier.namePrefix().toUpperCase() + " Portable Fluid Cell",
"portable_fluid_cell_" + tier.namePrefix(),
p -> new MEGAPortableCell(p, tier, AEKeyType.fluids(), MEStorageMenu.PORTABLE_FLUID_CELL_TYPE, 0xF1C5));
p -> new MEGAPortableCell(
p, tier, AEKeyType.fluids(), MEStorageMenu.PORTABLE_FLUID_CELL_TYPE, 0x80caff));
}

private static <T extends IPart> ItemDefinition<PartItem<T>> part(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_chemical_cell",
"cell": "megacells:block/drive/cells/mega_chemical_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 4, 6, 6],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_fluid_cell",
"cell": "megacells:block/drive/cells/mega_fluid_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 4, 6, 6],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_item_cell",
"cell": "megacells:block/drive/cells/mega_item_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 4, 6, 6],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_mana_cell",
"cell": "megacells:block/drive/cells/mega_mana_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 4, 6, 6],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_source_cell",
"cell": "megacells:block/drive/cells/mega_source_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 4, 6, 6],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 4, 0, 6], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_chemical_cell",
"cell": "megacells:block/drive/cells/mega_chemical_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 0, 6, 2],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_fluid_cell",
"cell": "megacells:block/drive/cells/mega_fluid_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 0, 6, 2],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_item_cell",
"cell": "megacells:block/drive/cells/mega_item_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 0, 6, 2],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_mana_cell",
"cell": "megacells:block/drive/cells/mega_mana_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 0, 6, 2],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_source_cell",
"cell": "megacells:block/drive/cells/mega_source_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 0, 6, 2],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 0, 0, 2], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_chemical_cell",
"cell": "megacells:block/drive/cells/mega_chemical_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 8, 6, 10],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 8, 0, 10], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 8, 0, 10], "texture": "#cell", "cullface": "north" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"textures": {
"particle": "megacells:block/drive/cells/mega_fluid_cell",
"cell": "megacells:block/drive/cells/mega_fluid_cell"
},
"elements": [
{
"name": "Cell Backdrop",
"from": [0, 0, 0],
"to": [6, 2, 2],
"rotation": { "angle": 0, "axis": "y", "origin": [9, 8, 8] },
"faces": {
"north": {
"uv": [0, 8, 6, 10],
"texture": "#cell",
"cullface": "north"
},
"up": { "uv": [6, 8, 0, 10], "texture": "#cell", "cullface": "north" },
"down": { "uv": [6, 8, 0, 10], "texture": "#cell", "cullface": "north" }
}
}
]
}
Loading
Loading