Skip to content

Commit

Permalink
Update textures/models for interface and pattern provider
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Sep 8, 2023
1 parent dfbb385 commit e54f1cc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 21 deletions.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions fabric/src/data/java/gripe/_90/megacells/datagen/ModelProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,24 +350,24 @@ private VariantProperties.Rotation rotationByAngle(int angle) {

private void interfaceOrProviderPart(ItemModelGenerators generator, ItemDefinition<?> part) {
var partName = part.id().getPath().substring(6);
var frontTexture = MEGACells.makeId("block/" + partName);
var monitorBack = MEGACells.makeId("part/mega_monitor_back");
var monitorSides = MEGACells.makeId("part/mega_monitor_sides");
var front = MEGACells.makeId("part/" + partName);
var back = MEGACells.makeId("part/" + partName + "_back");
var sides = MEGACells.makeId("part/" + partName + "_sides");
INTERFACE.create(
MEGACells.makeId("part/" + partName),
new TextureMapping()
.put(SIDES_STATUS, MEGACells.makeId("part/mega_monitor_sides_status"))
.put(SIDES, monitorSides)
.put(TextureSlot.BACK, monitorBack)
.put(TextureSlot.FRONT, frontTexture)
.put(TextureSlot.PARTICLE, monitorBack),
.put(SIDES, sides)
.put(TextureSlot.BACK, back)
.put(TextureSlot.FRONT, front)
.put(TextureSlot.PARTICLE, back),
generator.output);
CABLE_INTERFACE.create(
MEGACells.makeId("item/" + part.id().getPath()),
new TextureMapping()
.put(SIDES, monitorSides)
.put(TextureSlot.FRONT, frontTexture)
.put(TextureSlot.BACK, monitorBack),
.put(SIDES, sides)
.put(TextureSlot.FRONT, front)
.put(TextureSlot.BACK, back),
generator.output);
}

Expand Down
23 changes: 12 additions & 11 deletions forge/src/data/java/gripe/_90/megacells/datagen/ModelProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ protected void registerModels() {

cells.forEach(this::cellModel);

interfaceOrProviderPart(MEGAItems.MEGA_INTERFACE, MEGABlocks.MEGA_INTERFACE);
interfaceOrProviderPart(MEGAItems.MEGA_PATTERN_PROVIDER, MEGABlocks.MEGA_PATTERN_PROVIDER);
interfaceOrProviderPart(MEGAItems.MEGA_INTERFACE);
interfaceOrProviderPart(MEGAItems.MEGA_PATTERN_PROVIDER);
}

private void cellModel(ItemDefinition<?> cell) {
Expand All @@ -154,11 +154,12 @@ private void driveCell(String texture) {
withExistingParent(path, DRIVE_CELL).texture("cell", path);
}

private void interfaceOrProviderPart(ItemDefinition<?> part, BlockDefinition<?> equivalentBlock) {
withExistingParent(part.id().getPath(), CABLE_INTERFACE)
.texture("back", "part/mega_monitor_back")
.texture("front", "block/" + equivalentBlock.id().getPath())
.texture("sides", "part/mega_monitor_sides");
private void interfaceOrProviderPart(ItemDefinition<?> part) {
var partPath = part.id().getPath().substring(6);
withExistingParent(partPath, CABLE_INTERFACE)
.texture("back", "part/" + partPath + "_back")
.texture("front", "part/" + partPath)
.texture("sides", "part/" + partPath + "_sides");
}
}

Expand Down Expand Up @@ -311,10 +312,10 @@ protected void registerModels() {
private void interfaceOrPatternProvider(ItemDefinition<?> part) {
var partName = part.id().getPath().substring(6);
withExistingParent("part/" + partName, INTERFACE)
.texture("back", "part/mega_monitor_back")
.texture("front", "block/" + partName)
.texture("particle", "part/mega_monitor_back")
.texture("sides", "part/mega_monitor_sides")
.texture("back", "part/" + partName + "_back")
.texture("front", "part/" + partName)
.texture("particle", "part/" + partName + "_back")
.texture("sides", "part/" + partName + "_sides")
.texture("sidesStatus", "part/mega_monitor_sides_status");
}
}
Expand Down

0 comments on commit e54f1cc

Please sign in to comment.