Skip to content

Commit

Permalink
feat: add primordial bio lantern
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Aug 16, 2023
1 parent 0da0681 commit a03a408
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ private void addBlockTranslations() {
addBlock(ModBlocks.FLESH_LADDER, "Flesh Ladder", "Ladder mainly made of bones and a little bit of flesh...");
addBlock(ModBlocks.YELLOW_BIO_LANTERN, "Yellow Bio-Lantern", "A bioluminescent light source that is energy-efficient and environmentally friendly.");
addBlock(ModBlocks.BLUE_BIO_LANTERN, "Blue Bio-Lantern", "A bioluminescent light source. This one is blue!");
addBlock(ModBlocks.PRIMORDIAL_BIO_LANTERN, "Primordial Bio-Lantern", "A primal light source. This one is magenta!");
addBlock(ModBlocks.TENDON_CHAIN, "Tendon Chain", "A chain made of tendons.");
addBlock(ModBlocks.VIAL_HOLDER, "Vial Holder", "Display and organize your serums.");
addBlock(ModBlocks.IMPERMEABLE_MEMBRANE, "Impermeable Membrane", "Gelatinous-like membrane reinforced with elastic fibers.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ protected void addTables() {
dropSelf(ModBlocks.FLESH_FENCE_GATE.get());
dropSelf(ModBlocks.FLESH_LADDER.get());
dropSelf(ModBlocks.YELLOW_BIO_LANTERN.get());
dropSelf(ModBlocks.PRIMORDIAL_BIO_LANTERN.get());
dropSelf(ModBlocks.BLUE_BIO_LANTERN.get());
dropSelf(ModBlocks.TENDON_CHAIN.get());
dropSelf(ModBlocks.VIAL_HOLDER.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ protected void registerStatesAndModels() {
membraneWithItem(ModBlocks.ITEM_PERMEABLE_MEMBRANE);
bioLantern(ModBlocks.YELLOW_BIO_LANTERN);
bioLantern(ModBlocks.BLUE_BIO_LANTERN);
bioLantern(ModBlocks.PRIMORDIAL_BIO_LANTERN);
tendonChain(ModBlocks.TENDON_CHAIN);
vialHolder(ModBlocks.VIAL_HOLDER);

Expand Down Expand Up @@ -456,8 +457,8 @@ public void bioLantern(FleshLanternBlock block) {
ResourceLocation texture = blockAsset(block);
ResourceLocation template = BiomancyMod.createRL("block/template_bio_lantern");

ModelFile model = models().singleTexture(path, template, texture);
ModelFile hangingModel = models().singleTexture(path + "_hanging", extend(template, "_hanging"), texture);
ModelFile model = models().singleTexture(path, template, texture).renderType("cutout");
ModelFile hangingModel = models().singleTexture(path + "_hanging", extend(template, "_hanging"), texture).renderType("cutout");

getVariantBuilder(block)
.forAllStatesExcept(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,24 @@ private void registerWorkbenchRecipes(Consumer<FinishedRecipe> consumer) {
.pattern("VVV")
.unlockedBy(hasName(ModItems.MALIGNANT_FLESH_VEINS.get()), has(ModItems.MALIGNANT_FLESH_VEINS.get()))
.save(consumer);

WorkbenchRecipeBuilder.shaped(ModItems.PRIMORDIAL_BIO_LANTERN.get())
.define('F', ModItems.YELLOW_BIO_LANTERN.get())
.define('V', ModItems.MALIGNANT_FLESH_VEINS.get())
.pattern("VVV")
.pattern("VFV")
.pattern("VVV")
.unlockedBy(hasName(ModItems.MALIGNANT_FLESH_VEINS.get()), has(ModItems.MALIGNANT_FLESH_VEINS.get()))
.save(consumer, getConversionRecipeId(ModItems.PRIMORDIAL_BIO_LANTERN.get(), ModItems.YELLOW_BIO_LANTERN.get()));

WorkbenchRecipeBuilder.shaped(ModItems.PRIMORDIAL_BIO_LANTERN.get())
.define('F', ModItems.BLUE_BIO_LANTERN.get())
.define('V', ModItems.MALIGNANT_FLESH_VEINS.get())
.pattern("VVV")
.pattern("VFV")
.pattern("VVV")
.unlockedBy(hasName(ModItems.PRIMORDIAL_BIO_LANTERN.get()), has(ModItems.BLUE_BIO_LANTERN.get()))
.save(consumer);
}

private void registerDigestingRecipes(Consumer<FinishedRecipe> consumer) {
Expand Down
2 changes: 2 additions & 0 deletions src/generated/resources/assets/biomancy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
"block.biomancy.bio_lantern_yellow.tooltip": "A bioluminescent light source that is energy-efficient and environmentally friendly.",
"block.biomancy.bio_lantern_blue": "Blue Bio-Lantern",
"block.biomancy.bio_lantern_blue.tooltip": "A bioluminescent light source. This one is blue!",
"block.biomancy.primordial_bio_lantern": "Primordial Bio-Lantern",
"block.biomancy.primordial_bio_lantern.tooltip": "A primal light source. This one is magenta!",
"block.biomancy.tendon_chain": "Tendon Chain",
"block.biomancy.tendon_chain.tooltip": "A chain made of tendons.",
"block.biomancy.vial_holder": "Vial Holder",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public final class ModBlocks {
public static final RegistryObject<FleshSpikeBlock> FLESH_SPIKE = register("flesh_spike", () -> new FleshSpikeBlock(createFleshyBoneProperties().noOcclusion()));
public static final RegistryObject<FleshLanternBlock> YELLOW_BIO_LANTERN = register("bio_lantern_yellow", properties -> new FleshLanternBlock(properties.sound(SoundType.SHROOMLIGHT).lightLevel(x -> 15).noOcclusion()));
public static final RegistryObject<FleshLanternBlock> BLUE_BIO_LANTERN = register("bio_lantern_blue", properties -> new FleshLanternBlock(properties.sound(SoundType.SHROOMLIGHT).lightLevel(x -> 15).noOcclusion()));
public static final RegistryObject<FleshLanternBlock> PRIMORDIAL_BIO_LANTERN = register("primordial_bio_lantern", properties -> new FleshLanternBlock(properties.sound(SoundType.SHROOMLIGHT).lightLevel(x -> 15).noOcclusion()));
public static final RegistryObject<FleshChainBlock> TENDON_CHAIN = register("tendon_chain", properties -> new FleshChainBlock(properties.noOcclusion()));
public static final RegistryObject<VialHolderBlock> VIAL_HOLDER = register("vial_holder", VialHolderBlock::new);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public final class ModItems {
public static final RegistryObject<SimpleBlockItem> FLESH_SPIKE = registerSimpleBlockItem(ModBlocks.FLESH_SPIKE);
public static final RegistryObject<SimpleBlockItem> YELLOW_BIO_LANTERN = registerSimpleBlockItem(ModBlocks.YELLOW_BIO_LANTERN);
public static final RegistryObject<SimpleBlockItem> BLUE_BIO_LANTERN = registerSimpleBlockItem(ModBlocks.BLUE_BIO_LANTERN);
public static final RegistryObject<SimpleBlockItem> PRIMORDIAL_BIO_LANTERN = registerSimpleBlockItem(ModBlocks.PRIMORDIAL_BIO_LANTERN);
public static final RegistryObject<FleshChainBlockItem> TENDON_CHAIN = registerBlockItem(ModBlocks.TENDON_CHAIN, FleshChainBlockItem::new);
public static final RegistryObject<SimpleBlockItem> VIAL_HOLDER = registerSimpleBlockItem(ModBlocks.VIAL_HOLDER);

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a03a408

Please sign in to comment.