Skip to content

Commit

Permalink
fix: im going insane
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Dec 31, 2024
1 parent 4aae9c1 commit 8def5b9
Showing 1 changed file with 3 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ public void dungeonBlock(Block block, Block baseBlock, String location) {
public void cropGrowable(Block block, String location, IntegerProperty ageProperty) {
this.getVariantBuilder(block).forAllStates((state) -> {
int stage = state.getValue(ageProperty);
BlockModelBuilder cross = models().withExistingParent(this.name(block) + "_stage" + stage, Unity.loc(ModelProvider.BLOCK_FOLDER + "/template/crop/crop_lowered"))
BlockModelBuilder cross = models().withExistingParent(this.name(block) + "_stage" + stage, Redux.loc(ModelProvider.BLOCK_FOLDER + "/template/crop/crop_lowered"))
.texture("plant", this.texture(this.name(block) + "_stage" + stage, location)).renderType("cutout");
return ConfiguredModel.builder().modelFile(cross).build();
});
}

public void cropOccluded(Block block, String location) {
BlockModelBuilder cross = models().withExistingParent(this.name(block), Unity.loc(ModelProvider.BLOCK_FOLDER + "/template/crop/crop_occluded"))
BlockModelBuilder cross = models().withExistingParent(this.name(block), Redux.loc(ModelProvider.BLOCK_FOLDER + "/template/crop/crop_occluded"))
.texture("plant", this.texture(this.name(block), location)).renderType("cutout");
this.crossBlock(block, cross);
}
Expand All @@ -185,7 +185,7 @@ public void lantern(Block block, String location) {
}

public void chain(Block block, String location) {
BlockModelBuilder chain = models().withExistingParent(this.name(block), Unity.loc("block/template/construction/chain"))
BlockModelBuilder chain = models().withExistingParent(this.name(block), Redux.loc("block/template/construction/chain"))
.texture("chain", this.texture(this.name(block), location)).renderType("cutout");
this.getVariantBuilder(block).forAllStates((state -> {
Direction.Axis axis = state.getValue(ChainBlock.AXIS);
Expand Down Expand Up @@ -249,53 +249,6 @@ public void metalBars(Block block, String location) {
}
}

public void potAlt(Block block, Block flower, String location) {
this.potPrefix(block, flower, location, "potted_");
}

public void potPrefix(Block block, Block flower, String location, String prefix) {
ModelFile pot = this.models().withExistingParent(this.name(block), mcLoc("block/flower_pot_cross"))
.texture("plant", this.modLoc("block/" + location + prefix + this.name(flower))).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}

public void tintedPotDualGloverlay(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted_dual_gloverlay"))
.texture("plant", this.modLoc("block/" + location + this.name(flower)))
.texture("glow", this.modLoc("block/" + location + this.name(flower) + "_glow"))
.texture("overlay", this.modLoc("block/" + location + this.name(flower) + "_overlay")).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}
public void tintedPotGlowOverlay(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted_glowing_overlay"))
.texture("plant", this.modLoc("block/" + location + this.name(flower)))
.texture("overlay", this.modLoc("block/" + location + this.name(flower) + "_glow")).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}
public void tintedPotGlowOverlayAlt(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted_glowing_overlay"))
.texture("plant", this.modLoc("block/" + location + "potted_" + this.name(flower)))
.texture("overlay", this.modLoc("block/" + location + "potted_" + this.name(flower) + "_glow")).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}
public void tintedPotOverlay(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted_overlay"))
.texture("plant", this.modLoc("block/" + location + this.name(flower)))
.texture("overlay", this.modLoc("block/" + location + this.name(flower) + "_overlay")).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}
public void tintedPot(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted"))
.texture("plant", this.modLoc("block/" + location + this.name(flower))).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}
public void tintedPotOverlayAlt(Block block, Block flower, String location) {
ModelFile pot = this.models().withExistingParent(this.name(block), Unity.loc("block/template/pot/flower_pot_tinted_overlay"))
.texture("plant", this.modLoc("block/" + location + "potted_" + this.name(flower)))
.texture("overlay", this.modLoc("block/" + location + "potted_" + this.name(flower) + "_overlay")).renderType("cutout");
this.getVariantBuilder(block).partialState().addModels(new ConfiguredModel(pot));
}

// Other

public void flowerbed(Block block, String location) {
Expand Down Expand Up @@ -372,12 +325,4 @@ public void logicator(Block block, String location) {
.rotationY(d.get2DDataValue() * 90).build();
});
}




public ResourceLocation texture(Block block, String location) {
return ResourceLocation.fromNamespaceAndPath(BuiltInRegistries.BLOCK.getKey(block).getNamespace(), "block/" + location + name(block));
}

}

0 comments on commit 8def5b9

Please sign in to comment.