Skip to content

Commit

Permalink
feat: add Maw Hopper block
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Mar 21, 2023
1 parent 58924c3 commit dc78a44
Show file tree
Hide file tree
Showing 19 changed files with 1,313 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ protected void addTables() {

dropSelf(ModBlocks.PRIMORDIAL_CRADLE.get());
dropSelf(ModBlocks.TONGUE.get());
dropSelf(ModBlocks.MAW_HOPPER.get());
add(ModBlocks.STORAGE_SAC.get(), ModBlockLoot::dropWithInventory);

add(ModBlocks.BIO_FORGE.get(), BlockLoot::createNameableBlockEntityTable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,14 @@ private void registerBioForgeRecipes(Consumer<FinishedRecipe> consumer) {
.setCategory(ModBioForgeTabs.MACHINES)
.unlockedBy(ModItems.LIVING_FLESH.get()).save(consumer);

BioForgeRecipeBuilder.create(ModItems.MAW_HOPPER.get())
.addIngredient(ModItems.LIVING_FLESH.get())
.addIngredient(ModItems.FLESH_BITS.get(), 5)
.addIngredient(ModItems.BONE_FRAGMENTS.get(), 3)
.addIngredient(ModItems.ELASTIC_FIBERS.get(), 10)
.setCategory(ModBioForgeTabs.MACHINES)
.unlockedBy(ModItems.LIVING_FLESH.get()).save(consumer);

BioForgeRecipeBuilder.create(new ItemData(ModItems.FLESHKIN_PRESSURE_PLATE.get()))
.addIngredient(ModItems.LIVING_FLESH.get())
.addIngredient(ModItems.BONE_FRAGMENTS.get(), 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ private void addBlockTranslations() {

addBlock(ModBlocks.VOICE_BOX, "Modular Larynx", EMPTY_STRING);
addBlock(ModBlocks.TONGUE, "Tongue", "Extracts up to 3 items of the same type every 24 ticks from containers its attached to and drops them on the ground.");
addBlock(ModBlocks.MAW_HOPPER, "Maw Hopper", "A fleshy sister of the hopper. Transfers up to 16 items every 24 ticks.");

addBlock(ModBlocks.STORAGE_SAC, "Storage Sac", "Cheap Shulker-like storage sac that also works like a bundle.");

Expand Down
190 changes: 96 additions & 94 deletions src/generated/resources/assets/biomancy/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"itemGroup.biomancy": "Biomancy 2",
"key.categories.biomancy": "Biomancy 2 Mod",
"key.biomancy.item_default": "Default Item Action",
"item.biomancy.mob_sinew": "Sinew",
"item.biomancy.mob_sinew.tooltip": "Tissue made of Elastic Fibers.",
"item.biomancy.mob_fang": "Sharp Fang",
"item.biomancy.mob_fang.tooltip": "Cutting tooth made of Bone tissue rich in Bio-Minerals.",
"item.biomancy.mob_claw": "Sharp Claw",
"item.biomancy.mob_claw.tooltip": "Hardened Claw made of tough fibers and rich in Bio-Minerals.",
"item.biomancy.mob_marrow": "Bone Marrow",
"item.biomancy.mob_marrow.tooltip": "Marrow extracted from the bones of your victims. Rich in Hormones and Bio-Minerals. ",
"item.biomancy.withered_mob_marrow": "Withered Bone Marrow",
"item.biomancy.withered_mob_marrow.tooltip": "Withered Marrow, some dark fluid is oozing out of it.\nMaybe you should suck it dry...",
"item.biomancy.mob_gland": "Bile Gland",
"item.biomancy.mob_gland.tooltip": "Organ sac filled with bile to the brim.",
"itemGroup.biomancy": "Biomancy 2",
"key.categories.biomancy": "Biomancy 2 Mod",
"key.biomancy.item_default": "Default Item Action",
"item.biomancy.mob_sinew": "Sinew",
"item.biomancy.mob_sinew.tooltip": "Tissue made of Elastic Fibers.",
"item.biomancy.mob_fang": "Sharp Fang",
"item.biomancy.mob_fang.tooltip": "Cutting tooth made of Bone tissue rich in Bio-Minerals.",
"item.biomancy.mob_claw": "Sharp Claw",
"item.biomancy.mob_claw.tooltip": "Hardened Claw made of tough fibers and rich in Bio-Minerals.",
"item.biomancy.mob_marrow": "Bone Marrow",
"item.biomancy.mob_marrow.tooltip": "Marrow extracted from the bones of your victims. Rich in Hormones and Bio-Minerals. ",
"item.biomancy.withered_mob_marrow": "Withered Bone Marrow",
"item.biomancy.withered_mob_marrow.tooltip": "Withered Marrow, some dark fluid is oozing out of it.\nMaybe you should suck it dry...",
"item.biomancy.mob_gland": "Bile Gland",
"item.biomancy.mob_gland.tooltip": "Organ sac filled with bile to the brim.",
"item.biomancy.toxin_gland": "Toxin Gland",
"item.biomancy.toxin_gland.tooltip": "A organ full of toxin, maybe you should drink this...",
"item.biomancy.volatile_gland": "Volatile Gland",
Expand Down Expand Up @@ -120,45 +120,47 @@
"item.biomancy.absorption_boost": "Absorption Stimulant",
"serum.biomancy.absorption_boost.tooltip": "Grants stackable absorption health points for Mobs and Players.",
"serum.biomancy.insomnia_cure": "Insomnia Cure",
"item.biomancy.insomnia_cure": "Insomnia Cure",
"serum.biomancy.insomnia_cure.tooltip": "Resets the last slept time, no need to sleep for quite some time.",
"item.biomancy.mascot_patterns": "Banner Pattern",
"item.biomancy.mascot_patterns.desc": "Biomancy Mascot",
"item.biomancy.hungry_flesh_blob_spawn_egg": "Hungry Flesh Blob Spawn Egg",
"item.biomancy.flesh_blob_spawn_egg": "Flesh Blob Spawn Egg",
"item.biomancy.malignant_flesh_blob_spawn_egg": "Malignant Flesh Blob Spawn Egg",
"block.biomancy.primordial_cradle": "Primordial Cradle",
"block.biomancy.primordial_cradle.tooltip": "Offer adequate Tributes to the cradle and summon forth primordial messengers of exquisite flesh.",
"block.biomancy.decomposer": "Decomposer",
"block.biomancy.decomposer.tooltip": "A bio-machine that deconstructs items into their base components.\nThe bio-machine consumes nutrients to function.",
"block.biomancy.digester": "Digester",
"block.biomancy.digester.tooltip": "A machine born from flesh that converts food and plants into nutrients.",
"block.biomancy.bio_forge": "Bio-Forge",
"block.biomancy.bio_forge.tooltip": "Crafting Station",
"block.biomancy.bio_lab": "Bio-Lab",
"block.biomancy.bio_lab.tooltip": "Bio-alchemical Brewer",
"block.biomancy.voice_box": "Modular Larynx",
"block.biomancy.voice_box.tooltip": "",
"block.biomancy.tongue": "Tongue",
"block.biomancy.tongue.tooltip": "Extracts up to 3 items of the same type every 24 ticks from containers its attached to and drops them on the ground.",
"block.biomancy.storage_sac": "Storage Sac",
"block.biomancy.storage_sac.tooltip": "Cheap Shulker-like storage sac that also works like a bundle.",
"block.biomancy.fleshkin_chest": "Fleshkin Chest",
"block.biomancy.fleshkin_chest.tooltip": "A fleshkin forged into the shape of a chest with sharp teeth and a resilient stomach allowing it to keeps its contents when mined.\nOnly its master may open and takes its content without repercussion.\n\nIt's fangs look awfully sharp...",
"block.biomancy.fleshkin_door": "Fleshkin Door",
"block.biomancy.fleshkin_door.tooltip": "",
"block.biomancy.fleshkin_trapdoor": "Fleshkin Trap Door",
"block.biomancy.fleshkin_trapdoor.tooltip": "",
"block.biomancy.fleshkin_pressure_plate": "Fleshkin Pressure Sensor",
"block.biomancy.fleshkin_pressure_plate.tooltip": "Fleshkin pancake. Yummy...\nIt has two behaviors, either it only activates for its owner or it only works for everyone else.\n\nSneak click to change its behavior.",
"block.biomancy.flesh": "Flesh Block",
"block.biomancy.flesh.tooltip": "A generic block of flesh... Don't bother me with this!",
"block.biomancy.flesh_slab": "Flesh Slab",
"block.biomancy.flesh_slab.tooltip": "A generic slab of flesh... Don't bother me with this!",
"block.biomancy.flesh_stairs": "Flesh Stairs",
"block.biomancy.flesh_stairs.tooltip": "Stairs made of generic flesh... Don't bother me with this!",
"block.biomancy.flesh_wall": "Flesh Wall",
"block.biomancy.flesh_wall.tooltip": "A generic wall of flesh.",
"item.biomancy.insomnia_cure": "Insomnia Cure",
"serum.biomancy.insomnia_cure.tooltip": "Resets the last slept time, no need to sleep for quite some time.",
"item.biomancy.mascot_patterns": "Banner Pattern",
"item.biomancy.mascot_patterns.desc": "Biomancy Mascot",
"item.biomancy.hungry_flesh_blob_spawn_egg": "Hungry Flesh Blob Spawn Egg",
"item.biomancy.flesh_blob_spawn_egg": "Flesh Blob Spawn Egg",
"item.biomancy.malignant_flesh_blob_spawn_egg": "Malignant Flesh Blob Spawn Egg",
"block.biomancy.primordial_cradle": "Primordial Cradle",
"block.biomancy.primordial_cradle.tooltip": "Offer adequate Tributes to the cradle and summon forth primordial messengers of exquisite flesh.",
"block.biomancy.decomposer": "Decomposer",
"block.biomancy.decomposer.tooltip": "A bio-machine that deconstructs items into their base components.\nThe bio-machine consumes nutrients to function.",
"block.biomancy.digester": "Digester",
"block.biomancy.digester.tooltip": "A machine born from flesh that converts food and plants into nutrients.",
"block.biomancy.bio_forge": "Bio-Forge",
"block.biomancy.bio_forge.tooltip": "Crafting Station",
"block.biomancy.bio_lab": "Bio-Lab",
"block.biomancy.bio_lab.tooltip": "Bio-alchemical Brewer",
"block.biomancy.voice_box": "Modular Larynx",
"block.biomancy.voice_box.tooltip": "",
"block.biomancy.tongue": "Tongue",
"block.biomancy.tongue.tooltip": "Extracts up to 3 items of the same type every 24 ticks from containers its attached to and drops them on the ground.",
"block.biomancy.maw_hopper": "Maw Hopper",
"block.biomancy.maw_hopper.tooltip": "A fleshy sister of the hopper. Transfers up to 16 items every 24 ticks.",
"block.biomancy.storage_sac": "Storage Sac",
"block.biomancy.storage_sac.tooltip": "Cheap Shulker-like storage sac that also works like a bundle.",
"block.biomancy.fleshkin_chest": "Fleshkin Chest",
"block.biomancy.fleshkin_chest.tooltip": "A fleshkin forged into the shape of a chest with sharp teeth and a resilient stomach allowing it to keeps its contents when mined.\nOnly its master may open and takes its content without repercussion.\n\nIt's fangs look awfully sharp...",
"block.biomancy.fleshkin_door": "Fleshkin Door",
"block.biomancy.fleshkin_door.tooltip": "",
"block.biomancy.fleshkin_trapdoor": "Fleshkin Trap Door",
"block.biomancy.fleshkin_trapdoor.tooltip": "",
"block.biomancy.fleshkin_pressure_plate": "Fleshkin Pressure Sensor",
"block.biomancy.fleshkin_pressure_plate.tooltip": "Fleshkin pancake. Yummy...\nIt has two behaviors, either it only activates for its owner or it only works for everyone else.\n\nSneak click to change its behavior.",
"block.biomancy.flesh": "Flesh Block",
"block.biomancy.flesh.tooltip": "A generic block of flesh... Don't bother me with this!",
"block.biomancy.flesh_slab": "Flesh Slab",
"block.biomancy.flesh_slab.tooltip": "A generic slab of flesh... Don't bother me with this!",
"block.biomancy.flesh_stairs": "Flesh Stairs",
"block.biomancy.flesh_stairs.tooltip": "Stairs made of generic flesh... Don't bother me with this!",
"block.biomancy.flesh_wall": "Flesh Wall",
"block.biomancy.flesh_wall.tooltip": "A generic wall of flesh.",
"block.biomancy.packed_flesh": "Packed Flesh Block",
"block.biomancy.packed_flesh.tooltip": "Tenacious Block of flesh. Is it tough enough?",
"block.biomancy.packed_flesh_slab": "Packed Flesh Slab",
Expand Down Expand Up @@ -229,26 +231,26 @@
"tooltip.biomancy.bile_fuel": "Bile",
"tooltip.biomancy.contains_unique_dna": "Contains Unique Genetic Sequences",
"tooltip.biomancy.press_button_to": "Press %1$s to %2$s",
"tooltip.biomancy.owner": "Owner: %1$s",
"tooltip.biomancy.slots": "Slots",
"tooltip.biomancy.drops_from": "Drops from",
"tooltip.biomancy.and_more": "and more...",
"tooltip.biomancy.action.show_info": "show info",
"tooltip.biomancy.action.self_inject": "inject yourself",
"tooltip.biomancy.action.self_extract": "extract from yourself",
"tooltip.biomancy.action.open_inventory": "open its inventory",
"tooltip.biomancy.action.activate": "activate",
"tooltip.biomancy.action.deactivate": "deactivate",
"tooltip.biomancy.action.reload": "reload",
"tooltip.biomancy.action.cycle": "cycle",
"tooltip.biomancy.fire_rate": "Fire Rate",
"tooltip.biomancy.accuracy": "Accuracy",
"tooltip.biomancy.ammo": "Ammo",
"tooltip.biomancy.reload_time": "Reload Time",
"tooltip.biomancy.projectile_damage": "Projectile Damage",
"tooltip.biomancy.living_tool_state_is": "The Tool is %1$s",
"state.biomancy.living_tool.dormant": "Dormant",
"state.biomancy.living_tool.awake": "Awake",
"tooltip.biomancy.owner": "Owner: %1$s",
"tooltip.biomancy.slots": "Slots",
"tooltip.biomancy.drops_from": "Drops from",
"tooltip.biomancy.and_more": "and more...",
"tooltip.biomancy.action.show_info": "show info",
"tooltip.biomancy.action.self_inject": "inject yourself",
"tooltip.biomancy.action.self_extract": "extract from yourself",
"tooltip.biomancy.action.open_inventory": "open its inventory",
"tooltip.biomancy.action.activate": "activate",
"tooltip.biomancy.action.deactivate": "deactivate",
"tooltip.biomancy.action.reload": "reload",
"tooltip.biomancy.action.cycle": "cycle",
"tooltip.biomancy.fire_rate": "Fire Rate",
"tooltip.biomancy.accuracy": "Accuracy",
"tooltip.biomancy.ammo": "Ammo",
"tooltip.biomancy.reload_time": "Reload Time",
"tooltip.biomancy.projectile_damage": "Projectile Damage",
"tooltip.biomancy.living_tool_state_is": "The Tool is %1$s",
"state.biomancy.living_tool.dormant": "Dormant",
"state.biomancy.living_tool.awake": "Awake",
"state.biomancy.living_tool.exalted": "Exalted",
"msg.biomancy.not_sleepy": "You don't feel sleepy...",
"msg.biomancy.set_behavior_command": "%1$s will now execute the %2$s command",
Expand Down Expand Up @@ -281,26 +283,26 @@
"sounds.biomancy.fleshkin_chest.close": "Close Fleshy Chest",
"sounds.biomancy.fleshkin_chest.bite_attack": "Fleshy Chest Bite Attack",
"sounds.biomancy.fleshkin_chest.no": "Fleshy Chest says No",
"sounds.biomancy.block.creator.spawn_mob": "Primordial Cradle Spawns a Mob",
"sounds.biomancy.block.creator.became_full": "Primordial Cradle became full",
"sounds.biomancy.block.creator.eat": "Primordial Cradle Eating",
"sounds.biomancy.block.creator.no": "Primordial Cradle says No",
"sounds.biomancy.ui.storage_sac.open": "Open Menu of Storage Sac",
"sounds.biomancy.ui.bio_forge.open": "Open Menu of Bio-Forge",
"sounds.biomancy.ui.bio_forge.select_recipe": "Select Recipe in Bio-Forge",
"sounds.biomancy.ui.bio_forge.take_result": "Craft Item in Bio-Forge",
"sounds.biomancy.block.decomposer.crafting": "Decomposer is crafting",
"sounds.biomancy.ui.decomposer.open": "Open Menu of Decomposer",
"sounds.biomancy.block.decomposer.eat": "Decomposer is eating",
"sounds.biomancy.block.decomposer.crafting_random": "Decomposer is burping",
"sounds.biomancy.block.decomposer.crafting_completed": "Decomposer finished crafting",
"sounds.biomancy.block.bio_lab.crafting": "Bio-Lab is crafting",
"sounds.biomancy.ui.bio_lab.open": "Open Menu of Bio-Lab",
"sounds.biomancy.block.bio_lab.crafting_random": "Bio-Lab is slurping",
"sounds.biomancy.block.bio_lab.crafting_completed": "Bio-Lab finished crafting",
"sounds.biomancy.block.digester.crafting": "Digester is crafting",
"sounds.biomancy.ui.digester.open": "Open Menu of Digester",
"sounds.biomancy.block.digester.crafting_random": "Digester is burping",
"sounds.biomancy.block.creator.spawn_mob": "Primordial Cradle Spawns a Mob",
"sounds.biomancy.block.creator.became_full": "Primordial Cradle became full",
"sounds.biomancy.block.creator.eat": "Primordial Cradle Eating",
"sounds.biomancy.block.creator.no": "Primordial Cradle says No",
"sounds.biomancy.ui.storage_sac.open": "Open Menu of Storage Sac",
"sounds.biomancy.ui.bio_forge.open": "Open Menu of Bio-Forge",
"sounds.biomancy.ui.bio_forge.select_recipe": "Select Recipe in Bio-Forge",
"sounds.biomancy.ui.bio_forge.take_result": "Craft Item in Bio-Forge",
"sounds.biomancy.block.decomposer.crafting": "Decomposer is crafting",
"sounds.biomancy.ui.decomposer.open": "Open Menu of Decomposer",
"sounds.biomancy.block.decomposer.eat": "Decomposer is eating",
"sounds.biomancy.block.decomposer.crafting_random": "Decomposer is burping",
"sounds.biomancy.block.decomposer.crafting_completed": "Decomposer finished crafting",
"sounds.biomancy.block.bio_lab.crafting": "Bio-Lab is crafting",
"sounds.biomancy.ui.bio_lab.open": "Open Menu of Bio-Lab",
"sounds.biomancy.block.bio_lab.crafting_random": "Bio-Lab is slurping",
"sounds.biomancy.block.bio_lab.crafting_completed": "Bio-Lab finished crafting",
"sounds.biomancy.block.digester.crafting": "Digester is crafting",
"sounds.biomancy.ui.digester.open": "Open Menu of Digester",
"sounds.biomancy.block.digester.crafting_random": "Digester is burping",
"sounds.biomancy.block.digester.crafting_completed": "Digester finished crafting",
"sounds.biomancy.entity.flesh_blob.jump": "Flesh Blob Jump",
"sounds.biomancy.entity.flesh_blob.hurt": "Flesh Blob Hurt",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.github.elenterius.biomancy.client.render.block.mawhopper;

import com.github.elenterius.biomancy.BiomancyMod;
import com.github.elenterius.biomancy.world.block.mawhopper.MawHopperBlockEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib3.model.AnimatedGeoModel;

public class MawHopperModel extends AnimatedGeoModel<MawHopperBlockEntity> {
@Override
public ResourceLocation getModelResource(MawHopperBlockEntity blockEntity) {
return BiomancyMod.createRL("geo/block/maw_hopper.geo.json");
}

@Override
public ResourceLocation getTextureResource(MawHopperBlockEntity blockEntity) {
return BiomancyMod.createRL("textures/block/maw_hopper.png");
}

@Override
public ResourceLocation getAnimationResource(MawHopperBlockEntity blockEntity) {
return BiomancyMod.createRL("animations/block/maw_hopper.animation.json");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.github.elenterius.biomancy.client.render.block.mawhopper;

import com.github.elenterius.biomancy.client.render.block.CustomGeoBlockRenderer;
import com.github.elenterius.biomancy.world.block.mawhopper.MawHopperBlockEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;

public class MawHopperRenderer extends CustomGeoBlockRenderer<MawHopperBlockEntity> {
public MawHopperRenderer(BlockEntityRendererProvider.Context context) {
super(context, new MawHopperModel());
}

@Override
protected void rotateBlock(Direction facing, PoseStack poseStack) {
poseStack.translate(0, 0.5, 0);
poseStack.mulPose(facing.getRotation());
poseStack.translate(0, -0.5, 0);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.github.elenterius.biomancy.world.block.digester.DigesterBlockEntity;
import com.github.elenterius.biomancy.world.block.entity.BlockEntityDelegator;
import com.github.elenterius.biomancy.world.block.fleshkinchest.FleshkinChestBlockEntity;
import com.github.elenterius.biomancy.world.block.mawhopper.MawHopperBlockEntity;
import com.github.elenterius.biomancy.world.block.modularlarynx.VoiceBoxBlockEntity;
import com.github.elenterius.biomancy.world.block.ownable.OwnableBlockEntity;
import com.github.elenterius.biomancy.world.block.storagesac.StorageSacBlockEntity;
Expand All @@ -32,6 +33,7 @@ public final class ModBlockEntities {
public static final RegistryObject<BlockEntityType<DigesterBlockEntity>> DIGESTER = register(ModBlocks.DIGESTER, DigesterBlockEntity::new);

public static final RegistryObject<BlockEntityType<TongueBlockEntity>> TONGUE = register(ModBlocks.TONGUE, TongueBlockEntity::new);
public static final RegistryObject<BlockEntityType<MawHopperBlockEntity>> MAW_HOPPER = register(ModBlocks.MAW_HOPPER, MawHopperBlockEntity::new);
public static final RegistryObject<BlockEntityType<StorageSacBlockEntity>> STORAGE_SAC = register(ModBlocks.STORAGE_SAC, StorageSacBlockEntity::new);
public static final RegistryObject<BlockEntityType<FleshkinChestBlockEntity>> FLESHKIN_CHEST = register(ModBlocks.FLESHKIN_CHEST, FleshkinChestBlockEntity::new);
public static final RegistryObject<BlockEntityType<VoiceBoxBlockEntity>> VOICE_BOX = register(ModBlocks.VOICE_BOX, VoiceBoxBlockEntity::new);
Expand Down
Loading

0 comments on commit dc78a44

Please sign in to comment.