Skip to content

Commit

Permalink
feat: add undead-permeable membrane
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Dec 5, 2023
1 parent eb763b2 commit 0902a3b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ private void addBlockTranslations() {
addBlock(ModBlocks.BABY_PERMEABLE_MEMBRANE, "Baby-Permeable Membrane", "Gelatinous-like membrane reinforced with elastic fibers.\n\nBaby mobs can diffuse through the membrane.");
addBlock(ModBlocks.ADULT_PERMEABLE_MEMBRANE, "Adult-Permeable Membrane", "Gelatinous-like membrane reinforced with elastic fibers.\n\nAdult mobs can diffuse through the membrane.");
addBlock(ModBlocks.PRIMAL_PERMEABLE_MEMBRANE, "Primal Membrane", "Gelatinous-like membrane reinforced with elastic fibers.\n\nOnly mobs that are alive can diffuse through the membrane.");
addBlock(ModBlocks.UNDEAD_PERMEABLE_MEMBRANE, "Phantom Membrane", "Gelatinous-like membrane reinforced with elastic fibers.\n\nOnly mobs that are undead can diffuse through the membrane.");

addBlock(ModBlocks.PRIMAL_FLESH, "Primal Flesh Block", "Primitive and pure, you better not touch this with your dirty mitts.");
addBlock(ModBlocks.PRIMAL_FLESH_SLAB, "Primal Flesh Slab", "Primitive and pure, you better not touch this with your dirty mitts.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ protected void addTables() {
dropSelf(ModBlocks.BABY_PERMEABLE_MEMBRANE.get());
dropSelf(ModBlocks.ADULT_PERMEABLE_MEMBRANE.get());
dropSelf(ModBlocks.PRIMAL_PERMEABLE_MEMBRANE.get());
dropSelf(ModBlocks.UNDEAD_PERMEABLE_MEMBRANE.get());
dropSelf(ModBlocks.FLESH_IRIS_DOOR.get());
dropSelf(ModBlocks.FLESH_FENCE.get());
dropSelf(ModBlocks.FLESH_FENCE_GATE.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ protected void registerStatesAndModels() {
membraneWithItem(ModBlocks.BABY_PERMEABLE_MEMBRANE);
membraneWithItem(ModBlocks.ADULT_PERMEABLE_MEMBRANE);
membraneWithItem(ModBlocks.PRIMAL_PERMEABLE_MEMBRANE);
membraneWithItem(ModBlocks.UNDEAD_PERMEABLE_MEMBRANE);
bioLantern(ModBlocks.YELLOW_BIO_LANTERN);
bioLantern(ModBlocks.BLUE_BIO_LANTERN);
bioLantern(ModBlocks.PRIMORDIAL_BIO_LANTERN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,13 @@ private void registerBioForgeRecipes(Consumer<FinishedRecipe> consumer) {
.setCategory(ModBioForgeTabs.MISC)
.unlockedBy(ModItems.ELASTIC_FIBERS.get()).save(consumer);

BioForgeRecipeBuilder.create(ModItems.UNDEAD_PERMEABLE_MEMBRANE.get())
.addIngredient(ModItems.ELASTIC_FIBERS.get(), 4)
.addIngredient(ModItems.BILE.get(), 4)
.addIngredient(Items.PHANTOM_MEMBRANE, 1)
.setCategory(ModBioForgeTabs.MISC)
.unlockedBy(Items.PHANTOM_MEMBRANE).save(consumer);

BioForgeRecipeBuilder.create(ModItems.FLESH_FENCE.get(), 4)
.addIngredient(ModItems.FLESH_BITS.get(), fleshBlockCost)
.addIngredient(ModItems.BONE_FRAGMENTS.get(), 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ protected void addTags() {
ModBlocks.IMPERMEABLE_MEMBRANE.get(),
ModBlocks.BABY_PERMEABLE_MEMBRANE.get(),
ModBlocks.ADULT_PERMEABLE_MEMBRANE.get(),
ModBlocks.PRIMAL_PERMEABLE_MEMBRANE.get()
ModBlocks.PRIMAL_PERMEABLE_MEMBRANE.get(),
ModBlocks.UNDEAD_PERMEABLE_MEMBRANE.get()
);
}

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 @@ -213,6 +213,8 @@
"block.biomancy.adult_permeable_membrane.tooltip": "Gelatinous-like membrane reinforced with elastic fibers.\n\nAdult mobs can diffuse through the membrane.",
"block.biomancy.primal_permeable_membrane": "Primal Membrane",
"block.biomancy.primal_permeable_membrane.tooltip": "Gelatinous-like membrane reinforced with elastic fibers.\n\nOnly mobs that are alive can diffuse through the membrane.",
"block.biomancy.undead_permeable_membrane": "Phantom Membrane",
"block.biomancy.undead_permeable_membrane.tooltip": "Gelatinous-like membrane reinforced with elastic fibers.\n\nOnly mobs that are undead can diffuse through the membrane.",
"block.biomancy.primal_flesh": "Primal Flesh Block",
"block.biomancy.primal_flesh.tooltip": "Primitive and pure, you better not touch this with your dirty mitts.",
"block.biomancy.primal_flesh_slab": "Primal Flesh Slab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public interface IgnoreEntityCollisionPredicate {
IgnoreEntityCollisionPredicate IS_BABY_MOB = (state, level, pos, entity) -> entity instanceof LivingEntity livingEntity && livingEntity.isBaby();
IgnoreEntityCollisionPredicate IS_ADULT_MOB = (state, level, pos, entity) -> entity instanceof LivingEntity livingEntity && !livingEntity.isBaby();
IgnoreEntityCollisionPredicate IS_ALIVE_MOB = (state, level, pos, entity) -> entity instanceof LivingEntity livingEntity && livingEntity.getMobType() != MobType.UNDEAD;
IgnoreEntityCollisionPredicate IS_UNDEAD_MOB = (state, level, pos, entity) -> entity instanceof LivingEntity livingEntity && livingEntity.getMobType() == MobType.UNDEAD;
IgnoreEntityCollisionPredicate IS_ITEM = (state, level, pos, entity) -> entity instanceof ItemEntity;
IgnoreEntityCollisionPredicate NEVER = (state, level, pos, entity) -> false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public final class ModBlocks {
public static final RegistryObject<MembraneBlock> BABY_PERMEABLE_MEMBRANE = registerMembrane("baby_permeable_membrane", MembraneBlock.IgnoreEntityCollisionPredicate.IS_BABY_MOB);
public static final RegistryObject<MembraneBlock> ADULT_PERMEABLE_MEMBRANE = registerMembrane("adult_permeable_membrane", MembraneBlock.IgnoreEntityCollisionPredicate.IS_ADULT_MOB);
public static final RegistryObject<MembraneBlock> PRIMAL_PERMEABLE_MEMBRANE = registerMembrane("primal_permeable_membrane", MembraneBlock.IgnoreEntityCollisionPredicate.IS_ALIVE_MOB);
public static final RegistryObject<MembraneBlock> UNDEAD_PERMEABLE_MEMBRANE = registerMembrane("undead_permeable_membrane", MembraneBlock.IgnoreEntityCollisionPredicate.IS_UNDEAD_MOB);

public static final RegistryObject<LadderBlock> FLESH_LADDER = register("flesh_ladder", () -> new LadderBlock(createFleshyBoneProperties().noOcclusion()));
public static final RegistryObject<FleshFenceBlock> FLESH_FENCE = register("flesh_fence", FleshFenceBlock::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public final class ModItems {
public static final RegistryObject<SimpleBlockItem> BABY_PERMEABLE_MEMBRANE = registerSimpleBlockItem(ModBlocks.BABY_PERMEABLE_MEMBRANE);
public static final RegistryObject<SimpleBlockItem> ADULT_PERMEABLE_MEMBRANE = registerSimpleBlockItem(ModBlocks.ADULT_PERMEABLE_MEMBRANE);
public static final RegistryObject<SimpleBlockItem> PRIMAL_PERMEABLE_MEMBRANE = registerSimpleBlockItem(ModBlocks.PRIMAL_PERMEABLE_MEMBRANE);
public static final RegistryObject<SimpleBlockItem> UNDEAD_PERMEABLE_MEMBRANE = registerSimpleBlockItem(ModBlocks.UNDEAD_PERMEABLE_MEMBRANE);
public static final RegistryObject<SimpleBlockItem> FLESH_LADDER = registerSimpleBlockItem(ModBlocks.FLESH_LADDER);
public static final RegistryObject<SimpleBlockItem> FLESH_FENCE = registerSimpleBlockItem(ModBlocks.FLESH_FENCE);
public static final RegistryObject<SimpleBlockItem> FLESH_FENCE_GATE = registerSimpleBlockItem(ModBlocks.FLESH_FENCE_GATE);
Expand Down

0 comments on commit 0902a3b

Please sign in to comment.