From 08ec7926b5201b137ba83c0256dae0458b3a9ba8 Mon Sep 17 00:00:00 2001 From: thepigcat <benpospo@gmail.com> Date: Fri, 20 Dec 2024 14:14:54 +0100 Subject: [PATCH] more wrok on analyzer --- .../4d58d921702f57799841730d3d537abc5ea398a2 | 4 +- .../76a19663e3d8e02fd582710c2facdc314b5575a1 | 8 +- .../blockstates/bacterial_analyzer.json | 19 ++ .../blockstates/bacterial_analyzer_top.json | 19 ++ .../bacterial_containment_shield.json | 7 + .../nautec/blockstates/bio_reactor.json | 19 ++ .../block/bacterial_containment_shield.json | 6 + .../nautec/models/block/bio_reactor.json | 7 + .../models/item/bacterial_analyzer.json | 3 - .../item/bacterial_containment_shield.json | 3 + .../portingdeadmods/nautec/NautecClient.java | 23 +- .../renderer/blockentities/NTBERenderer.java | 20 ++ .../blockentities/AnchorBERenderer.java | 11 +- .../BacterialAnalyzerBERenderer.java | 33 +++ .../screen/BacterialAnalyzerScreen.java | 15 ++ .../BacterialAnalyzerBlockEntity.java | 50 +++- .../FishingStationBlockEntity.java | 6 +- .../nautec/content/blocks/AnchorBlock.java | 27 ++- .../blocks/BacterialAnalyzerBlock.java | 64 +++++ .../blocks/BacterialAnalyzerTopBlock.java | 95 ++++++++ .../content/blocks/BioReactorBlock.java | 22 ++ .../content/menus/BacterialAnalyzerMenu.java | 5 +- .../nautec/datagen/BlockModelProvider.java | 6 + .../nautec/datagen/ItemModelProvider.java | 10 + .../nautec/registries/NTBlocks.java | 7 +- .../nautec/registries/NTCreativeTabs.java | 23 +- .../models/block/bacterial_analyzer.json | 123 ++++++++++ .../models/block/bacterial_analyzer_top.json | 82 +++++++ .../models/item/bacterial_analyzer.json | 225 ++++++++++++++++++ .../textures/block/bacterial_analyzer.png | Bin 0 -> 532 bytes .../textures/block/bacterial_analyzer1.png | Bin 0 -> 359 bytes .../block/bacterial_containment_shield.png | Bin 0 -> 660 bytes .../nautec/textures/block/bio_reactor_top.png | Bin 0 -> 514 bytes .../nautec/textures/block/bioreactor_top.png | Bin 0 -> 514 bytes .../block/multiblock/bio_reactor/side.png | Bin 0 -> 898 bytes .../block/multiblock/bio_reactor/top.png | Bin 0 -> 450 bytes .../textures/gui/bacterial_analyzer.png | Bin 0 -> 1311 bytes .../bacterial_analyzer/progress_arrow.png | Bin 0 -> 259 bytes 38 files changed, 891 insertions(+), 51 deletions(-) create mode 100644 src/generated/resources/assets/nautec/blockstates/bacterial_analyzer.json create mode 100644 src/generated/resources/assets/nautec/blockstates/bacterial_analyzer_top.json create mode 100644 src/generated/resources/assets/nautec/blockstates/bacterial_containment_shield.json create mode 100644 src/generated/resources/assets/nautec/blockstates/bio_reactor.json create mode 100644 src/generated/resources/assets/nautec/models/block/bacterial_containment_shield.json create mode 100644 src/generated/resources/assets/nautec/models/block/bio_reactor.json delete mode 100644 src/generated/resources/assets/nautec/models/item/bacterial_analyzer.json create mode 100644 src/generated/resources/assets/nautec/models/item/bacterial_containment_shield.json create mode 100644 src/main/java/com/portingdeadmods/nautec/api/client/renderer/blockentities/NTBERenderer.java create mode 100644 src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/BacterialAnalyzerBERenderer.java create mode 100644 src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerTopBlock.java create mode 100644 src/main/resources/assets/nautec/models/block/bacterial_analyzer.json create mode 100644 src/main/resources/assets/nautec/models/block/bacterial_analyzer_top.json create mode 100644 src/main/resources/assets/nautec/models/item/bacterial_analyzer.json create mode 100644 src/main/resources/assets/nautec/textures/block/bacterial_analyzer.png create mode 100644 src/main/resources/assets/nautec/textures/block/bacterial_analyzer1.png create mode 100644 src/main/resources/assets/nautec/textures/block/bacterial_containment_shield.png create mode 100644 src/main/resources/assets/nautec/textures/block/bio_reactor_top.png create mode 100644 src/main/resources/assets/nautec/textures/block/bioreactor_top.png create mode 100644 src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/side.png create mode 100644 src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/top.png create mode 100644 src/main/resources/assets/nautec/textures/gui/bacterial_analyzer.png create mode 100644 src/main/resources/assets/nautec/textures/gui/sprites/container/bacterial_analyzer/progress_arrow.png diff --git a/src/generated/resources/.cache/4d58d921702f57799841730d3d537abc5ea398a2 b/src/generated/resources/.cache/4d58d921702f57799841730d3d537abc5ea398a2 index f6739f1a..3454d0b9 100644 --- a/src/generated/resources/.cache/4d58d921702f57799841730d3d537abc5ea398a2 +++ b/src/generated/resources/.cache/4d58d921702f57799841730d3d537abc5ea398a2 @@ -1,4 +1,4 @@ -// 1.21.1 2024-12-16T16:09:32.176187626 Item Models: nautec +// 1.21.1 2024-12-18T15:31:36.54862117 Item Models: nautec 53692692f57914fc54eb6ebf416ce1cb7789e57b assets/nautec/models/item/air_bottle.json cc6ee3887ec6e0c53216dc681ac7b32b34182253 assets/nautec/models/item/anchor.json 2e336fce57acffa1d0eb621baa30a26f665b4924 assets/nautec/models/item/aquarine_steel_axe.json @@ -24,7 +24,7 @@ f60b23b8ca6d44e339c9c415f53102833b4ff633 assets/nautec/models/item/atlantic_gold a95dff0d56139e74443ee5069394ccbe31bc875a assets/nautec/models/item/atlantic_gold_nugget.json 6338d151fe16332a6bd885776f58d9c9a4ffad62 assets/nautec/models/item/augmentation_station.json f616877025b33a5d417689bd59cba3385b11e5c9 assets/nautec/models/item/augmentation_station_extension.json -77496bd37cb0cd85dfb77e146366322e44bfcd63 assets/nautec/models/item/bacterial_analyzer.json +8d57f0feda40d2aa883370a346a266cf9d149895 assets/nautec/models/item/bacterial_containment_shield.json cd68bca3502f5a671aa5c4bbd828397047b19b8b assets/nautec/models/item/bio_reactor.json b1e3c9080ae5a0f78b06fa90f3c5da5b3805f842 assets/nautec/models/item/broken_whisk.json cf1524c962ddbbf1cb5e8782d764e71888a03eb1 assets/nautec/models/item/brown_polymer.json diff --git a/src/generated/resources/.cache/76a19663e3d8e02fd582710c2facdc314b5575a1 b/src/generated/resources/.cache/76a19663e3d8e02fd582710c2facdc314b5575a1 index 0bcfd90b..b75fd69f 100644 --- a/src/generated/resources/.cache/76a19663e3d8e02fd582710c2facdc314b5575a1 +++ b/src/generated/resources/.cache/76a19663e3d8e02fd582710c2facdc314b5575a1 @@ -1,9 +1,13 @@ -// 1.21.1 2024-12-16T17:24:06.931934604 Block States: nautec +// 1.21.1 2024-12-18T15:54:48.056222408 Block States: nautec 3f3049296b6ec6590b05af441a717618bb232b69 assets/nautec/blockstates/aquarine_steel_block.json 414381329d7663eb1d1db8c3f42df8d9932d2cfe assets/nautec/blockstates/aquatic_catalyst.json 920d567f0ae8731bc428c8970aac5400741ea87d assets/nautec/blockstates/augmentation_station.json e7796e8fce418c4dbe7aa3bb43424741ca161694 assets/nautec/blockstates/augmentation_station_extension.json 13de9de23d402708fc1201b11b07efb3bbcab7a1 assets/nautec/blockstates/augmentation_station_part.json +04f333842004de776dbf6785e490f29b29b160bc assets/nautec/blockstates/bacterial_analyzer.json +ce3bb14be3cdc0660b0783f7a3b137d1a4ed9844 assets/nautec/blockstates/bacterial_analyzer_top.json +0455aaf72b6e9f465b26bd889be0f1a90e5a78cd assets/nautec/blockstates/bacterial_containment_shield.json +f039da742f94682623b29fcdaff6724bdf3c82af assets/nautec/blockstates/bio_reactor.json dfb8c1c3f9d27e155f65fb8bbb49239248175485 assets/nautec/blockstates/brown_polymer_block.json 95e42b0dd95027fc74e0ddf4cc4460e2d724ae2a assets/nautec/blockstates/charger.json 25d8fc96fc916e569c72c56d1f6a5faaab599b84 assets/nautec/blockstates/chiseled_dark_prismarine.json @@ -33,6 +37,8 @@ e0c219d97f7659b22b353e5d09e49deaf601f473 assets/nautec/models/block/aquatic_cata 98354e0a660994d556449c5fc6782400d5d20c15 assets/nautec/models/block/augmentation_station.json 4cd777b593be834a619c30850292c016be6e7341 assets/nautec/models/block/augmentation_station_extension.json 4b041c67e6dfb342c778f9f65997ae038f7144c5 assets/nautec/models/block/augmentation_station_part_0.json +d574e320f67de42ee56fc0e8b90950471d8a4177 assets/nautec/models/block/bacterial_containment_shield.json +afad72d5fcb7e5ea6c9634fdea0701b01413d723 assets/nautec/models/block/bio_reactor.json 16146ea12fe66045ff8ed608419b4ee09bb3ce03 assets/nautec/models/block/brown_polymer_block.json dbb2de853fc70f313a4493a20f1c81a7d477a132 assets/nautec/models/block/chiseled_dark_prismarine.json af047960d1c2a98ff7e2daae55eec22f59ca111f assets/nautec/models/block/creative_power_source.json diff --git a/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer.json b/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer.json new file mode 100644 index 00000000..81b03a17 --- /dev/null +++ b/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer.json @@ -0,0 +1,19 @@ +{ + "variants": { + "facing=east": { + "model": "nautec:block/bacterial_analyzer", + "y": 90 + }, + "facing=north": { + "model": "nautec:block/bacterial_analyzer" + }, + "facing=south": { + "model": "nautec:block/bacterial_analyzer", + "y": 180 + }, + "facing=west": { + "model": "nautec:block/bacterial_analyzer", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer_top.json b/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer_top.json new file mode 100644 index 00000000..edd3ee95 --- /dev/null +++ b/src/generated/resources/assets/nautec/blockstates/bacterial_analyzer_top.json @@ -0,0 +1,19 @@ +{ + "variants": { + "facing=east": { + "model": "nautec:block/bacterial_analyzer_top", + "y": 90 + }, + "facing=north": { + "model": "nautec:block/bacterial_analyzer_top" + }, + "facing=south": { + "model": "nautec:block/bacterial_analyzer_top", + "y": 180 + }, + "facing=west": { + "model": "nautec:block/bacterial_analyzer_top", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/blockstates/bacterial_containment_shield.json b/src/generated/resources/assets/nautec/blockstates/bacterial_containment_shield.json new file mode 100644 index 00000000..ca39ed83 --- /dev/null +++ b/src/generated/resources/assets/nautec/blockstates/bacterial_containment_shield.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "nautec:block/bacterial_containment_shield" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/blockstates/bio_reactor.json b/src/generated/resources/assets/nautec/blockstates/bio_reactor.json new file mode 100644 index 00000000..c41dbf4e --- /dev/null +++ b/src/generated/resources/assets/nautec/blockstates/bio_reactor.json @@ -0,0 +1,19 @@ +{ + "variants": { + "facing=east": { + "model": "nautec:block/bio_reactor", + "y": 90 + }, + "facing=north": { + "model": "nautec:block/bio_reactor" + }, + "facing=south": { + "model": "nautec:block/bio_reactor", + "y": 180 + }, + "facing=west": { + "model": "nautec:block/bio_reactor", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/models/block/bacterial_containment_shield.json b/src/generated/resources/assets/nautec/models/block/bacterial_containment_shield.json new file mode 100644 index 00000000..bf00c86e --- /dev/null +++ b/src/generated/resources/assets/nautec/models/block/bacterial_containment_shield.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "nautec:block/bacterial_containment_shield" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/models/block/bio_reactor.json b/src/generated/resources/assets/nautec/models/block/bio_reactor.json new file mode 100644 index 00000000..3239980d --- /dev/null +++ b/src/generated/resources/assets/nautec/models/block/bio_reactor.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_top", + "textures": { + "side": "nautec:block/polished_prismarine", + "top": "nautec:block/bio_reactor_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/models/item/bacterial_analyzer.json b/src/generated/resources/assets/nautec/models/item/bacterial_analyzer.json deleted file mode 100644 index fa63900c..00000000 --- a/src/generated/resources/assets/nautec/models/item/bacterial_analyzer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "nautec:block/bacterial_analyzer" -} \ No newline at end of file diff --git a/src/generated/resources/assets/nautec/models/item/bacterial_containment_shield.json b/src/generated/resources/assets/nautec/models/item/bacterial_containment_shield.json new file mode 100644 index 00000000..44cd66e2 --- /dev/null +++ b/src/generated/resources/assets/nautec/models/item/bacterial_containment_shield.json @@ -0,0 +1,3 @@ +{ + "parent": "nautec:block/bacterial_containment_shield" +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/nautec/NautecClient.java b/src/main/java/com/portingdeadmods/nautec/NautecClient.java index 9a735be6..fae1f556 100644 --- a/src/main/java/com/portingdeadmods/nautec/NautecClient.java +++ b/src/main/java/com/portingdeadmods/nautec/NautecClient.java @@ -3,21 +3,16 @@ import com.mojang.blaze3d.shaders.FogShape; import com.mojang.blaze3d.systems.RenderSystem; import com.portingdeadmods.nautec.api.bacteria.Bacteria; -import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity; import com.portingdeadmods.nautec.api.client.renderer.blockentities.LaserBlockEntityRenderer; import com.portingdeadmods.nautec.api.client.renderer.items.AnchorItemRenderer; import com.portingdeadmods.nautec.api.client.renderer.items.PrismarineCrystalItemRenderer; import com.portingdeadmods.nautec.api.fluids.BaseFluidType; -import com.portingdeadmods.nautec.api.items.ICurioItem; -import com.portingdeadmods.nautec.api.items.IFluidItem; -import com.portingdeadmods.nautec.api.items.IPowerItem; -import com.portingdeadmods.nautec.capabilities.NTCapabilities; -import com.portingdeadmods.nautec.capabilities.power.ItemPowerWrapper; import com.portingdeadmods.nautec.client.hud.DivingSuitOverlay; import com.portingdeadmods.nautec.client.hud.PrismMonocleOverlay; import com.portingdeadmods.nautec.client.model.augment.DolphinFinModel; import com.portingdeadmods.nautec.client.model.augment.GuardianEyeModel; import com.portingdeadmods.nautec.client.model.block.*; +import com.portingdeadmods.nautec.client.renderer.blockentities.BacterialAnalyzerBERenderer; import com.portingdeadmods.nautec.client.renderer.augments.GuardianEyeRenderer; import com.portingdeadmods.nautec.client.renderer.augments.SimpleAugmentRenderer; import com.portingdeadmods.nautec.client.renderer.blockentities.*; @@ -38,27 +33,17 @@ import net.minecraft.client.renderer.FogRenderer; import net.minecraft.client.renderer.entity.ThrownTridentRenderer; import net.minecraft.client.renderer.item.ItemProperties; -import net.minecraft.core.BlockPos; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManagerReloadListener; import net.minecraft.util.FastColor; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.entity.BlockEntityType; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.IEventBus; -import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.ModContainer; import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; import net.neoforged.neoforge.client.event.*; import net.neoforged.neoforge.client.extensions.common.IClientFluidTypeExtensions; import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; @@ -67,16 +52,11 @@ import net.neoforged.neoforge.client.gui.IConfigScreenFactory; import net.neoforged.neoforge.client.model.DynamicFluidContainerModel; import net.neoforged.neoforge.fluids.FluidType; -import net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack; -import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.NeoForgeRegistries; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.joml.Vector3f; import org.joml.Vector4i; -import top.theillusivec4.curios.api.CuriosCapability; -import top.theillusivec4.curios.api.SlotContext; -import top.theillusivec4.curios.api.type.capability.ICurio; @Mod(value = NautecClient.MODID, dist = Dist.CLIENT) public final class NautecClient { @@ -181,6 +161,7 @@ private void registerBERenderers(EntityRenderersEvent.RegisterRenderers event) { event.registerBlockEntityRenderer(NTBlockEntityTypes.DRAIN_PART.get(), DrainBERenderer::new); event.registerBlockEntityRenderer(NTBlockEntityTypes.AUGMENTATION_STATION_EXTENSION.get(), AugmentStationExtensionBERenderer::new); event.registerBlockEntityRenderer(NTBlockEntityTypes.ANCHOR.get(), AnchorBERenderer::new); + event.registerBlockEntityRenderer(NTBlockEntityTypes.BACTERIAL_ANALYZER.get(), BacterialAnalyzerBERenderer::new); event.registerBlockEntityRenderer(NTBlockEntityTypes.FISHING_STATION.get(), FishingStationBERenderer::new); AugmentLayerRenderer.registerRenderer(NTAugments.DOLPHIN_FIN.get(), ctx -> new SimpleAugmentRenderer<>(DolphinFinModel::new, DolphinFinModel.LAYER_LOCATION, DolphinFinModel.MATERIAL, true, ctx)); diff --git a/src/main/java/com/portingdeadmods/nautec/api/client/renderer/blockentities/NTBERenderer.java b/src/main/java/com/portingdeadmods/nautec/api/client/renderer/blockentities/NTBERenderer.java new file mode 100644 index 00000000..c6e46d78 --- /dev/null +++ b/src/main/java/com/portingdeadmods/nautec/api/client/renderer/blockentities/NTBERenderer.java @@ -0,0 +1,20 @@ +package com.portingdeadmods.nautec.api.client.renderer.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.world.level.block.entity.BlockEntity; + +public abstract class NTBERenderer<T extends BlockEntity> implements BlockEntityRenderer<T> { + protected final BlockEntityRendererProvider.Context context; + + public NTBERenderer(BlockEntityRendererProvider.Context context) { + this.context = context; + } + + @Override + public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + + } +} diff --git a/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/AnchorBERenderer.java b/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/AnchorBERenderer.java index 0be386a0..da01c98d 100644 --- a/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/AnchorBERenderer.java +++ b/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/AnchorBERenderer.java @@ -4,6 +4,7 @@ import com.mojang.math.Axis; import com.portingdeadmods.nautec.client.model.block.AnchorModel; import com.portingdeadmods.nautec.content.blockentities.AnchorBlockEntity; +import com.portingdeadmods.nautec.content.blocks.AnchorBlock; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; @@ -19,8 +20,12 @@ public AnchorBERenderer(BlockEntityRendererProvider.Context context) { @Override public void render(AnchorBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - - model.renderToBuffer(poseStack, AnchorModel.MATERIAL.buffer(bufferSource, RenderType::entitySolid), packedLight, packedOverlay); - + poseStack.pushPose(); + { + poseStack.translate(0.5, 0, 0.5); + poseStack.mulPose(Axis.YP.rotationDegrees(blockEntity.getBlockState().getValue(AnchorBlock.FACING).toYRot())); + model.renderToBuffer(poseStack, AnchorModel.MATERIAL.buffer(bufferSource, RenderType::entitySolid), packedLight, packedOverlay); + } + poseStack.popPose(); } } diff --git a/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/BacterialAnalyzerBERenderer.java b/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/BacterialAnalyzerBERenderer.java new file mode 100644 index 00000000..98049d94 --- /dev/null +++ b/src/main/java/com/portingdeadmods/nautec/client/renderer/blockentities/BacterialAnalyzerBERenderer.java @@ -0,0 +1,33 @@ +package com.portingdeadmods.nautec.client.renderer.blockentities; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Axis; +import com.portingdeadmods.nautec.api.client.renderer.blockentities.NTBERenderer; +import com.portingdeadmods.nautec.content.blockentities.BacterialAnalyzerBlockEntity; +import com.portingdeadmods.nautec.content.blocks.BacterialAnalyzerBlock; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; + +public class BacterialAnalyzerBERenderer extends NTBERenderer<BacterialAnalyzerBlockEntity> { + public BacterialAnalyzerBERenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + public void render(BacterialAnalyzerBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + ItemStack stack = blockEntity.getItemHandler().getStackInSlot(0); + + poseStack.pushPose(); + { + poseStack.translate(0.5, 1.14f, 0.5); + poseStack.mulPose(Axis.YP.rotationDegrees(blockEntity.getBlockState().getValue(BacterialAnalyzerBlock.FACING).getOpposite().toYRot())); + poseStack.mulPose(Axis.XP.rotationDegrees(90)); + poseStack.scale(0.35f, 0.35f, 0.35f); + context.getItemRenderer() + .renderStatic(stack, ItemDisplayContext.FIXED, packedLight, packedOverlay, poseStack, bufferSource, blockEntity.getLevel(), 42); + } + poseStack.popPose(); + } +} diff --git a/src/main/java/com/portingdeadmods/nautec/client/screen/BacterialAnalyzerScreen.java b/src/main/java/com/portingdeadmods/nautec/client/screen/BacterialAnalyzerScreen.java index d6268a6f..6a1ffa8e 100644 --- a/src/main/java/com/portingdeadmods/nautec/client/screen/BacterialAnalyzerScreen.java +++ b/src/main/java/com/portingdeadmods/nautec/client/screen/BacterialAnalyzerScreen.java @@ -5,19 +5,34 @@ import com.portingdeadmods.nautec.api.menu.NTAbstractContainerMenu; import com.portingdeadmods.nautec.content.blockentities.BacterialAnalyzerBlockEntity; import com.portingdeadmods.nautec.content.blockentities.multiblock.part.AugmentationStationExtensionBlockEntity; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; import net.minecraft.world.entity.player.Inventory; import org.jetbrains.annotations.NotNull; public class BacterialAnalyzerScreen extends NTAbstractContainerScreen<BacterialAnalyzerBlockEntity> { public static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath(Nautec.MODID, "textures/gui/bacterial_analyzer.png"); + public static final ResourceLocation PROGRESS_ARROW = Nautec.rl("container/bacterial_analyzer/progress_arrow"); public BacterialAnalyzerScreen(NTAbstractContainerMenu<BacterialAnalyzerBlockEntity> menu, Inventory playerInventory, Component title) { super(menu, playerInventory, title); this.titleLabelY = 4; } + @Override + protected void renderBg(GuiGraphics guiGraphics, float delta, int mouseX, int mouseY) { + super.renderBg(guiGraphics, delta, mouseX, mouseY); + int i = this.leftPos; + int j = this.topPos; + + int progress = menu.blockEntity.getProgress(); + + int j1 = Mth.ceil(((float) progress / BacterialAnalyzerBlockEntity.MAX_PROGRESS) * 24.0F); + guiGraphics.blitSprite(PROGRESS_ARROW, 24, 24, 0, 0, i + 76, j + 29, j1, 24); + } + @Override public @NotNull ResourceLocation getBackgroundTexture() { return TEXTURE; diff --git a/src/main/java/com/portingdeadmods/nautec/content/blockentities/BacterialAnalyzerBlockEntity.java b/src/main/java/com/portingdeadmods/nautec/content/blockentities/BacterialAnalyzerBlockEntity.java index 062ecbb7..318f0594 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blockentities/BacterialAnalyzerBlockEntity.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blockentities/BacterialAnalyzerBlockEntity.java @@ -2,9 +2,13 @@ import com.portingdeadmods.nautec.api.blockentities.LaserBlockEntity; import com.portingdeadmods.nautec.capabilities.IOActions; +import com.portingdeadmods.nautec.capabilities.NTCapabilities; +import com.portingdeadmods.nautec.content.items.PetriDishItem; import com.portingdeadmods.nautec.content.menus.BacterialAnalyzerMenu; import com.portingdeadmods.nautec.content.menus.MutatorMenu; +import com.portingdeadmods.nautec.data.NTDataComponents; import com.portingdeadmods.nautec.registries.NTBlockEntityTypes; +import com.portingdeadmods.nautec.registries.NTItems; import it.unimi.dsi.fastutil.Pair; import it.unimi.dsi.fastutil.objects.ObjectSet; import net.minecraft.core.BlockPos; @@ -14,6 +18,7 @@ import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; import net.neoforged.neoforge.capabilities.BlockCapability; import org.jetbrains.annotations.Nullable; @@ -21,16 +26,57 @@ import java.util.Map; public class BacterialAnalyzerBlockEntity extends LaserBlockEntity implements MenuProvider { + public static final int MAX_PROGRESS = 60; + public static final int POWER_USAGE = 5; + private boolean hasRecipe; + private int progress; public BacterialAnalyzerBlockEntity(BlockPos blockPos, BlockState blockState) { super(NTBlockEntityTypes.BACTERIAL_ANALYZER.get(), blockPos, blockState); - addItemHandler(1); + addItemHandler(2, 1, (slot, stack) -> (slot == 0 && stack.getItem() instanceof PetriDishItem) || slot == 1); + } + + @Override + protected void onItemsChanged(int slot) { + super.onItemsChanged(slot); + + ItemStack stack = getItemHandler().getStackInSlot(0); + ItemStack resultStack = getItemHandler().getStackInSlot(1); + this.hasRecipe = stack.getCapability(NTCapabilities.BacteriaStorage.ITEM) != null + && Boolean.FALSE.equals(stack.get(NTDataComponents.ANALYZED)) + && resultStack.isEmpty(); + } + + @Override + public void commonTick() { + super.commonTick(); + + if (hasRecipe) { + if (getPower() >= POWER_USAGE) { + if (progress >= MAX_PROGRESS) { + ItemStack extracted = getItemHandler().extractItem(0, 1, false); + + ItemStack result = extracted.copy(); + result.set(NTDataComponents.ANALYZED, true); + + getItemHandler().insertItem(1, result, false); + } else { + progress++; + } + } + } else { + progress = 0; + } + } + + public int getProgress() { + return progress; } @Override public ObjectSet<Direction> getLaserInputs() { - return ObjectSet.of(Direction.UP, Direction.DOWN); + return ObjectSet.of(Direction.DOWN); } @Override diff --git a/src/main/java/com/portingdeadmods/nautec/content/blockentities/FishingStationBlockEntity.java b/src/main/java/com/portingdeadmods/nautec/content/blockentities/FishingStationBlockEntity.java index 93ae84ba..845105dc 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blockentities/FishingStationBlockEntity.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blockentities/FishingStationBlockEntity.java @@ -52,7 +52,7 @@ public <T> Map<Direction, Pair<IOActions, int[]>> getSidedInteractions(BlockCapa private boolean canRun(){ BlockPos start = worldPosition.offset(-NTConfig.fisherRadius,-NTConfig.fisherDepth,-NTConfig.fisherRadius); BlockPos end = worldPosition.offset(NTConfig.fisherRadius,-1,NTConfig.fisherRadius); - for (BlockPos pos: BlockPos.betweenClosed(start,end)) { + for (BlockPos pos : BlockPos.betweenClosed(start,end)) { if (!level.getBlockState(pos).is(Blocks.WATER)) return false; } return true; @@ -69,7 +69,9 @@ public void commonTick() { spawnLoot(); } counter++; - } else running = canRun(); + } else { + running = canRun(); + } } } diff --git a/src/main/java/com/portingdeadmods/nautec/content/blocks/AnchorBlock.java b/src/main/java/com/portingdeadmods/nautec/content/blocks/AnchorBlock.java index d94f6efe..d93fbfa7 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blocks/AnchorBlock.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blocks/AnchorBlock.java @@ -3,21 +3,29 @@ import com.mojang.serialization.MapCodec; import com.portingdeadmods.nautec.content.blockentities.AnchorBlockEntity; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; public class AnchorBlock extends BaseEntityBlock { - public static final VoxelShape SHAPE = Block.box(8, 8, 8, 12, 12, 12); + public static final VoxelShape SHAPE_N = Block.box(0, 0, 6, 16, 16, 10); + public static final VoxelShape SHAPE_E = Block.box(6, 0, 0, 10, 16, 16); + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public AnchorBlock(Properties properties) { super(properties); + registerDefaultState(defaultBlockState().setValue(FACING, Direction.NORTH)); } @Override @@ -32,11 +40,26 @@ protected RenderShape getRenderShape(BlockState state) { @Override protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { - return SHAPE; + return switch (state.getValue(FACING)) { + case NORTH, SOUTH -> SHAPE_N; + case EAST, WEST -> SHAPE_E; + default -> super.getShape(state, level, pos, context); + }; } @Override public @Nullable BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new AnchorBlockEntity(pos, state); } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { + super.createBlockStateDefinition(builder.add(FACING)); + } + + @Override + public @Nullable BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState state = super.getStateForPlacement(context); + return state != null ? state.setValue(FACING, context.getHorizontalDirection()) : null; + } } diff --git a/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerBlock.java b/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerBlock.java index 2b384bdd..4f62f94a 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerBlock.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerBlock.java @@ -4,12 +4,76 @@ import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity; import com.portingdeadmods.nautec.api.blocks.blockentities.LaserBlock; import com.portingdeadmods.nautec.registries.NTBlockEntityTypes; +import com.portingdeadmods.nautec.registries.NTBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +import java.util.stream.Stream; public class BacterialAnalyzerBlock extends LaserBlock { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + public static final VoxelShape SHAPE = Stream.of( + Block.box(2, 0, 9, 7, 13, 14), + Block.box(9, 0, 9, 14, 13, 14), + Block.box(9, 0, 2, 14, 13, 7), + Block.box(1, 13, 1, 15, 16, 15), + Block.box(2, 0, 2, 7, 13, 7), + Block.box(7, 0, 4, 9, 13, 12), + Block.box(9, 0, 7, 12, 13, 9), + Block.box(4, 0, 7, 7, 13, 9) + ).reduce(Shapes::or).get(); + public BacterialAnalyzerBlock(Properties properties) { super(properties); + registerDefaultState(defaultBlockState().setValue(FACING, Direction.NORTH)); + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return SHAPE; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { + super.createBlockStateDefinition(builder.add(FACING)); + } + + @Override + public @Nullable BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState state = super.getStateForPlacement(context); + + if (context.getLevel().getBlockState(context.getClickedPos().above()).canBeReplaced()) { + return state != null ? state.setValue(FACING, context.getHorizontalDirection().getOpposite()) : null; + } + return null; + } + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { + super.onPlace(state, level, pos, oldState, movedByPiston); + + level.setBlockAndUpdate(pos.above(), NTBlocks.BACTERIAL_ANALYZER_TOP.get().defaultBlockState().setValue(FACING, state.getValue(FACING))); + } + + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { + super.onRemove(state, level, pos, newState, movedByPiston); + + level.removeBlock(pos.above(), false); } @Override diff --git a/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerTopBlock.java b/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerTopBlock.java new file mode 100644 index 00000000..9b4163e3 --- /dev/null +++ b/src/main/java/com/portingdeadmods/nautec/content/blocks/BacterialAnalyzerTopBlock.java @@ -0,0 +1,95 @@ +package com.portingdeadmods.nautec.content.blocks; + +import com.portingdeadmods.nautec.content.blockentities.BacterialAnalyzerBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Nullable; + +import java.util.stream.Stream; + +public class BacterialAnalyzerTopBlock extends Block { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + public static final VoxelShape SHAPE_N = Stream.of( + Block.box(5, 0, 5, 11, 2, 12), + Block.box(7, 2, 10, 9, 12, 12), + Block.box(7, 4, 7, 9, 5, 9), + Block.box(6, 5, 6, 10, 9, 10) + ).reduce(Shapes::or).get(); + public static final VoxelShape SHAPE_E = Stream.of( + Block.box(4, 0, 5, 11, 2, 11), + Block.box(4, 2, 7, 6, 12, 9), + Block.box(7, 4, 7, 9, 5, 9), + Block.box(6, 5, 6, 10, 9, 10), + Block.box(7, 5, 7, 9, 9, 9) + ).reduce(Shapes::or).get(); + public static final VoxelShape SHAPE_S = Stream.of( + Block.box(5, 0, 4, 11, 2, 11), + Block.box(7, 2, 4, 9, 12, 6), + Block.box(7, 4, 7, 9, 5, 9), + Block.box(6, 5, 6, 10, 9, 10), + Block.box(7, 5, 7, 9, 9, 9) + ).reduce(Shapes::or).get(); + public static final VoxelShape SHAPE_W = Stream.of( + Block.box(5, 0, 5, 12, 2, 11), + Block.box(10, 2, 7, 12, 12, 9), + Block.box(7, 4, 7, 9, 5, 9), + Block.box(6, 5, 6, 10, 9, 10), + Block.box(7, 5, 7, 9, 9, 9) + ).reduce(Shapes::or).get(); + + public BacterialAnalyzerTopBlock(Properties properties) { + super(properties); + registerDefaultState(defaultBlockState().setValue(FACING, Direction.NORTH)); + } + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (level.getBlockEntity(pos.below()) instanceof BacterialAnalyzerBlockEntity be) { + player.openMenu(be, pos); + return InteractionResult.SUCCESS; + } + return super.useWithoutItem(state, level, pos, player, hitResult); + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return switch (state.getValue(FACING)) { + case NORTH -> SHAPE_N; + case EAST -> SHAPE_E; + case SOUTH -> SHAPE_S; + case WEST -> SHAPE_W; + default -> super.getShape(state, level, pos, context); + }; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { + super.createBlockStateDefinition(builder.add(FACING)); + } + + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { + super.onRemove(state, level, pos, newState, movedByPiston); + + level.removeBlock(pos.below(), false); + } + + @Override + public @Nullable PushReaction getPistonPushReaction(BlockState state) { + return PushReaction.IGNORE; + } +} diff --git a/src/main/java/com/portingdeadmods/nautec/content/blocks/BioReactorBlock.java b/src/main/java/com/portingdeadmods/nautec/content/blocks/BioReactorBlock.java index 504c1933..5522dbb4 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blocks/BioReactorBlock.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blocks/BioReactorBlock.java @@ -4,12 +4,28 @@ import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity; import com.portingdeadmods.nautec.api.blocks.blockentities.LaserBlock; import com.portingdeadmods.nautec.registries.NTBlockEntityTypes; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import org.jetbrains.annotations.Nullable; public class BioReactorBlock extends LaserBlock { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + public BioReactorBlock(Properties properties) { super(properties); + registerDefaultState(defaultBlockState().setValue(FACING, Direction.NORTH)); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { + super.createBlockStateDefinition(builder.add(FACING)); } @Override @@ -21,4 +37,10 @@ public BlockEntityType<? extends ContainerBlockEntity> getBlockEntityType() { protected MapCodec<? extends BaseEntityBlock> codec() { return simpleCodec(BioReactorBlock::new); } + + @Override + public @Nullable BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState state = super.getStateForPlacement(context); + return state != null ? state.setValue(FACING, context.getHorizontalDirection()) : null; + } } diff --git a/src/main/java/com/portingdeadmods/nautec/content/menus/BacterialAnalyzerMenu.java b/src/main/java/com/portingdeadmods/nautec/content/menus/BacterialAnalyzerMenu.java index b27211a9..d06aeedb 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/menus/BacterialAnalyzerMenu.java +++ b/src/main/java/com/portingdeadmods/nautec/content/menus/BacterialAnalyzerMenu.java @@ -18,7 +18,8 @@ public BacterialAnalyzerMenu(int containerId, @NotNull Inventory inv, @NotNull B super(NTMenuTypes.BACTERIAL_ANALYZER.get(), containerId, inv, blockEntity); // Catalyst - addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 0, 80, 35)); + addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 0, 53, 38)); + addSlot(new SlotItemHandler(blockEntity.getItemHandler(), 1, 107, 38)); addPlayerInventory(inv, 84); addPlayerHotbar(inv, 142); @@ -26,6 +27,6 @@ public BacterialAnalyzerMenu(int containerId, @NotNull Inventory inv, @NotNull B @Override protected int getMergeableSlotCount() { - return 1; + return 2; } } diff --git a/src/main/java/com/portingdeadmods/nautec/datagen/BlockModelProvider.java b/src/main/java/com/portingdeadmods/nautec/datagen/BlockModelProvider.java index db002f9a..f9611abd 100644 --- a/src/main/java/com/portingdeadmods/nautec/datagen/BlockModelProvider.java +++ b/src/main/java/com/portingdeadmods/nautec/datagen/BlockModelProvider.java @@ -64,7 +64,10 @@ protected void registerStatesAndModels() { augmentationStationController(NTBlocks.AUGMENTATION_STATION.get()); augmentationStationPart(NTBlocks.AUGMENTATION_STATION_PART.get(), IntegerRange.of(0, 8)); augmentationStationExtension(NTBlocks.AUGMENTATION_STATION_EXTENSION.get()); + simpleBlock(NTBlocks.BACTERIAL_CONTAINMENT_SHIELD.get()); + horizontalBlock(NTBlocks.BIO_REACTOR.get(), models() + .cubeTop(name(NTBlocks.BIO_REACTOR.get()), blockTexture(NTBlocks.POLISHED_PRISMARINE.get()), blockTexture(NTBlocks.BIO_REACTOR.get(), "_top"))); simpleBlock(NTBlocks.DRAIN_WALL.get()); simpleBlock(NTBlocks.BROWN_POLYMER_BLOCK.get()); @@ -79,6 +82,9 @@ protected void registerStatesAndModels() { blockTexture(NTBlocks.OIL_BARREL.get(), "_bottom"), blockTexture(NTBlocks.OIL_BARREL.get(), "_open") )); + + horizontalBlock(NTBlocks.BACTERIAL_ANALYZER.get(), models().getExistingFile(existingModelFile(NTBlocks.BACTERIAL_ANALYZER.get()))); + horizontalBlock(NTBlocks.BACTERIAL_ANALYZER_TOP.get(), models().getExistingFile(existingModelFile(NTBlocks.BACTERIAL_ANALYZER_TOP.get()))); } private void augmentationStationController(AugmentationStationBlock augmentationStationBlock) { diff --git a/src/main/java/com/portingdeadmods/nautec/datagen/ItemModelProvider.java b/src/main/java/com/portingdeadmods/nautec/datagen/ItemModelProvider.java index a0cf9194..e81093bf 100644 --- a/src/main/java/com/portingdeadmods/nautec/datagen/ItemModelProvider.java +++ b/src/main/java/com/portingdeadmods/nautec/datagen/ItemModelProvider.java @@ -11,9 +11,11 @@ import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; import net.neoforged.neoforge.client.model.generators.ItemModelBuilder; import net.neoforged.neoforge.client.model.generators.ModelFile; +import net.neoforged.neoforge.client.model.generators.ModelProvider; import net.neoforged.neoforge.client.model.generators.loaders.DynamicFluidContainerModelBuilder; import net.neoforged.neoforge.common.data.ExistingFileHelper; import org.jetbrains.annotations.NotNull; @@ -180,4 +182,12 @@ public ItemModelBuilder basicItem(Item item, String suffix) { .parent(new ModelFile.UncheckedModelFile("item/generated")) .texture("layer0", ResourceLocation.fromNamespaceAndPath(location.getNamespace(), "item/" + location.getPath())); } + + private String name(ItemLike item) { + return key(item).getPath(); + } + + private ResourceLocation extend(ResourceLocation rl, String suffix) { + return ResourceLocation.fromNamespaceAndPath(rl.getNamespace(), rl.getPath() + suffix); + } } diff --git a/src/main/java/com/portingdeadmods/nautec/registries/NTBlocks.java b/src/main/java/com/portingdeadmods/nautec/registries/NTBlocks.java index 9b23772a..8f017327 100644 --- a/src/main/java/com/portingdeadmods/nautec/registries/NTBlocks.java +++ b/src/main/java/com/portingdeadmods/nautec/registries/NTBlocks.java @@ -62,7 +62,7 @@ public final class NTBlocks { public static final DeferredBlock<PrismarineCrystalPartBlock> PRISMARINE_CRYSTAL_PART = BLOCKS.registerBlock("prismarine_crystal_part", PrismarineCrystalPartBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.SEA_LANTERN)); public static final DeferredBlock<AnchorBlock> ANCHOR = registerBlockAndItem("anchor", AnchorBlock::new, - BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK).sound(SoundType.ANVIL)); + BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK).sound(SoundType.ANVIL).noOcclusion()); public static final DeferredBlock<ChargerBlock> CHARGER = registerBlockAndItem("charger", ChargerBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK)); public static final DeferredBlock<FishingStationBlock> FISHING_STATION = registerBlockAndItem("fishing_station", FishingStationBlock::new, @@ -76,6 +76,8 @@ public final class NTBlocks { public static final DeferredBlock<BioReactorBlock> BIO_REACTOR = registerBlockAndItem("bio_reactor", BioReactorBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK)); public static final DeferredBlock<BacterialAnalyzerBlock> BACTERIAL_ANALYZER = registerBlockAndItem("bacterial_analyzer", BacterialAnalyzerBlock::new, + BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK), true, false); + public static final DeferredBlock<BacterialAnalyzerTopBlock> BACTERIAL_ANALYZER_TOP = BLOCKS.registerBlock("bacterial_analyzer_top", BacterialAnalyzerTopBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK)); // MULTIBLOCKS @@ -96,6 +98,9 @@ public final class NTBlocks { AugmentationStationExtensionBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.DARK_PRISMARINE)); + public static final DeferredBlock<Block> BACTERIAL_CONTAINMENT_SHIELD = registerBlockAndItem("bacterial_containment_shield", Block::new, + BlockBehaviour.Properties.ofFullCopy(Blocks.PRISMARINE)); + public static final DeferredBlock<CreativePowerSourceBlock> CREATIVE_POWER_SOURCE = registerBlockAndItem("creative_power_source", CreativePowerSourceBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK), false, true); diff --git a/src/main/java/com/portingdeadmods/nautec/registries/NTCreativeTabs.java b/src/main/java/com/portingdeadmods/nautec/registries/NTCreativeTabs.java index 7c070637..e9643626 100644 --- a/src/main/java/com/portingdeadmods/nautec/registries/NTCreativeTabs.java +++ b/src/main/java/com/portingdeadmods/nautec/registries/NTCreativeTabs.java @@ -9,10 +9,8 @@ import com.portingdeadmods.nautec.capabilities.NTCapabilities; import com.portingdeadmods.nautec.capabilities.power.IPowerStorage; import com.portingdeadmods.nautec.compat.modonomicon.ModonomiconCompat; -import com.portingdeadmods.nautec.data.NTDataAttachments; import com.portingdeadmods.nautec.data.NTDataComponents; import com.portingdeadmods.nautec.data.components.ComponentBacteriaStorage; -import com.portingdeadmods.nautec.data.components.ComponentPowerStorage; import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; @@ -22,7 +20,6 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ItemLike; -import net.minecraft.world.level.block.Blocks; import net.neoforged.fml.ModList; import net.neoforged.neoforge.registries.DeferredItem; import net.neoforged.neoforge.registries.DeferredRegister; @@ -49,16 +46,9 @@ public final class NTCreativeTabs { if (lookup.isPresent()) { Stream<ResourceKey<Bacteria>> resourceKeyStream = lookup.get().listElementIds(); resourceKeyStream.forEach(elem -> { - if (elem != NTBacterias.EMPTY) { - ItemStack stack = new ItemStack(item); - stack.set(NTDataComponents.BACTERIA, new ComponentBacteriaStorage(elem, 1)); - stack.set(NTDataComponents.ANALYZED, true); - output.accept(stack); - } + addPetriDish(output, item, elem, false); + addPetriDish(output, item, elem, true); }); - } else { - params.holders().listRegistries().forEach(elem -> Nautec.LOGGER.debug("Registry: {}", elem)); - Nautec.LOGGER.error("Cannot find bacteria registry"); } } } @@ -78,6 +68,15 @@ public final class NTCreativeTabs { }) .build()); + private static void addPetriDish(CreativeModeTab.Output output, ItemLike item, ResourceKey<Bacteria> elem, boolean analyzed) { + if (elem != NTBacterias.EMPTY) { + ItemStack stack = new ItemStack(item); + stack.set(NTDataComponents.BACTERIA, new ComponentBacteriaStorage(elem, 1)); + stack.set(NTDataComponents.ANALYZED, analyzed); + output.accept(stack); + } + } + public static void addPowered(CreativeModeTab.Output output, Item item) { ItemStack itemStack = new ItemStack(item); IPowerStorage storage = itemStack.getCapability(NTCapabilities.PowerStorage.ITEM); diff --git a/src/main/resources/assets/nautec/models/block/bacterial_analyzer.json b/src/main/resources/assets/nautec/models/block/bacterial_analyzer.json new file mode 100644 index 00000000..65085262 --- /dev/null +++ b/src/main/resources/assets/nautec/models/block/bacterial_analyzer.json @@ -0,0 +1,123 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "nautec:block/charging_station1", + "2": "nautec:block/bacterial_analyzer", + "3": "nautec:block/bacterial_analyzer1", + "particle": "nautec:block/charging_station1" + }, + "elements": [ + { + "from": [2, 0, 9], + "to": [7, 13, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 10]}, + "faces": { + "north": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [9, 0, 9], + "to": [14, 13, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [9, 0, 2], + "to": [14, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [1, 13, 1], + "to": [15, 16, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 13, 3]}, + "faces": { + "north": {"uv": [15, 1, 1, 4], "texture": "#3"}, + "east": {"uv": [15, 8, 1, 11], "texture": "#3"}, + "south": {"uv": [1, 11, 15, 14], "texture": "#3"}, + "west": {"uv": [1, 1, 15, 4], "texture": "#3"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#3"}, + "down": {"uv": [1, 15, 15, 1], "texture": "#3"} + } + }, + { + "from": [2, 0, 2], + "to": [7, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [7, 0, 4], + "to": [9, 13, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 10]}, + "faces": { + "north": {"uv": [9, 3, 11, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 13], "texture": "#missing"}, + "south": {"uv": [4, 3, 6, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 13], "texture": "#missing"}, + "up": {"uv": [0, 0, 2, 8], "texture": "#missing"}, + "down": {"uv": [11, 5, 13, 13], "texture": "#2"} + } + }, + { + "from": [9, 0, 7], + "to": [12, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 3, 13], "texture": "#missing"}, + "east": {"uv": [9, 3, 11, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 13], "texture": "#missing"}, + "west": {"uv": [0, 0, 2, 13], "texture": "#missing"}, + "up": {"uv": [0, 0, 3, 2], "texture": "#missing"}, + "down": {"uv": [4, 1, 7, 3], "texture": "#1"} + } + }, + { + "from": [4, 0, 7], + "to": [7, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 3, 13], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 13], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 13], "texture": "#1"}, + "west": {"uv": [8, 3, 10, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 2], "texture": "#1"}, + "down": {"uv": [4, 4, 7, 6], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "table", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/nautec/models/block/bacterial_analyzer_top.json b/src/main/resources/assets/nautec/models/block/bacterial_analyzer_top.json new file mode 100644 index 00000000..fc5ae802 --- /dev/null +++ b/src/main/resources/assets/nautec/models/block/bacterial_analyzer_top.json @@ -0,0 +1,82 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "nautec:block/bacterial_analyzer", + "particle": "nautec:block/bacterial_analyzer" + }, + "elements": [ + { + "from": [5, 0, 5], + "to": [11, 2, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 7]}, + "faces": { + "north": {"uv": [5, 12, 11, 10], "texture": "#0"}, + "east": {"uv": [11, 12, 9, 5], "rotation": 90, "texture": "#0"}, + "south": {"uv": [5, 5, 11, 7], "texture": "#0"}, + "west": {"uv": [5, 5, 7, 12], "rotation": 90, "texture": "#0"}, + "up": {"uv": [5, 12, 11, 5], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 7], "texture": "#0"} + } + }, + { + "from": [7, 2, 10], + "to": [9, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 7]}, + "faces": { + "north": {"uv": [3, 5, 1, 15], "texture": "#0"}, + "east": {"uv": [1, 6, 3, 16], "texture": "#0"}, + "south": {"uv": [3, 6, 1, 16], "texture": "#0"}, + "west": {"uv": [1, 5, 3, 15], "texture": "#0"}, + "up": {"uv": [1, 5, 3, 7], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "from": [7, 4, 7], + "to": [9, 5, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 1, 5]}, + "faces": { + "north": {"uv": [6, 13, 8, 14], "texture": "#0"}, + "east": {"uv": [6, 13, 8, 14], "texture": "#0"}, + "south": {"uv": [6, 13, 8, 14], "texture": "#0"}, + "west": {"uv": [6, 13, 8, 14], "texture": "#0"}, + "up": {"uv": [6, 13, 8, 14], "texture": "#0"}, + "down": {"uv": [4, 5, 6, 7], "texture": "#0"} + } + }, + { + "from": [6, 5, 6], + "to": [10, 9, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 5]}, + "faces": { + "north": {"uv": [9, 12, 5, 16], "texture": "#0"}, + "east": {"uv": [5, 12, 9, 16], "texture": "#0"}, + "south": {"uv": [5, 12, 9, 16], "texture": "#0"}, + "west": {"uv": [5, 12, 9, 16], "texture": "#0"}, + "up": {"uv": [5, 16, 9, 12], "texture": "#0"}, + "down": {"uv": [5, 12, 9, 16], "texture": "#0"} + } + }, + { + "from": [7, 5, 7], + "to": [9, 9, 9], + "rotation": {"angle": -45, "axis": "x", "origin": [6, 5, 4]}, + "faces": { + "north": {"uv": [8, 6, 10, 10], "texture": "#0"}, + "east": {"uv": [4, 10, 2, 14], "texture": "#0"}, + "south": {"uv": [8, 6, 10, 10], "texture": "#0"}, + "west": {"uv": [4, 10, 2, 14], "texture": "#0"}, + "up": {"uv": [11, 14, 9, 12], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "microscope", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/nautec/models/item/bacterial_analyzer.json b/src/main/resources/assets/nautec/models/item/bacterial_analyzer.json new file mode 100644 index 00000000..dd204f70 --- /dev/null +++ b/src/main/resources/assets/nautec/models/item/bacterial_analyzer.json @@ -0,0 +1,225 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "1": "nautec:block/charging_station1", + "2": "nautec:block/bacterial_analyzer", + "3": "nautec:block/bacterial_analyzer1", + "particle": "nautec:block/charging_station1" + }, + "elements": [ + { + "from": [2, 0, 9], + "to": [7, 13, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 10]}, + "faces": { + "north": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [9, 0, 9], + "to": [14, 13, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [9, 0, 2], + "to": [14, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [1, 13, 1], + "to": [15, 16, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 13, 3]}, + "faces": { + "north": {"uv": [15, 1, 1, 4], "texture": "#3"}, + "east": {"uv": [15, 8, 1, 11], "texture": "#3"}, + "south": {"uv": [1, 11, 15, 14], "texture": "#3"}, + "west": {"uv": [1, 1, 15, 4], "texture": "#3"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#3"}, + "down": {"uv": [1, 15, 15, 1], "texture": "#3"} + } + }, + { + "from": [2, 0, 2], + "to": [7, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "east": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "south": {"uv": [5, 0, 0, 13], "texture": "#2"}, + "west": {"uv": [0, 0, 5, 13], "texture": "#2"}, + "up": {"uv": [0, 0, 5, 5], "texture": "#2"}, + "down": {"uv": [5, 0, 10, 5], "texture": "#2"} + } + }, + { + "from": [7, 0, 4], + "to": [9, 13, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 10]}, + "faces": { + "north": {"uv": [9, 3, 11, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 13], "texture": "#missing"}, + "south": {"uv": [4, 3, 6, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 13], "texture": "#missing"}, + "up": {"uv": [0, 0, 2, 8], "texture": "#missing"}, + "down": {"uv": [11, 5, 13, 13], "texture": "#2"} + } + }, + { + "from": [9, 0, 7], + "to": [12, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 3, 13], "texture": "#missing"}, + "east": {"uv": [9, 3, 11, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 13], "texture": "#missing"}, + "west": {"uv": [0, 0, 2, 13], "texture": "#missing"}, + "up": {"uv": [0, 0, 3, 2], "texture": "#missing"}, + "down": {"uv": [4, 1, 7, 3], "texture": "#1"} + } + }, + { + "from": [4, 0, 7], + "to": [7, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 0, 10]}, + "faces": { + "north": {"uv": [0, 0, 3, 13], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 13], "texture": "#1"}, + "south": {"uv": [0, 0, 3, 13], "texture": "#1"}, + "west": {"uv": [8, 3, 10, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 3, 2], "texture": "#1"}, + "down": {"uv": [4, 4, 7, 6], "texture": "#1"} + } + }, + { + "from": [5, 16, 5], + "to": [11, 18, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 16, 7]}, + "faces": { + "north": {"uv": [5, 12, 11, 10], "texture": "#2"}, + "east": {"uv": [11, 12, 9, 5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [5, 5, 11, 7], "texture": "#2"}, + "west": {"uv": [5, 5, 7, 12], "rotation": 90, "texture": "#2"}, + "up": {"uv": [5, 12, 11, 5], "texture": "#2"}, + "down": {"uv": [0, 0, 6, 7], "texture": "#2"} + } + }, + { + "from": [7, 18, 10], + "to": [9, 28, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 18, 7]}, + "faces": { + "north": {"uv": [3, 5, 1, 15], "texture": "#2"}, + "east": {"uv": [1, 6, 3, 16], "texture": "#2"}, + "south": {"uv": [3, 6, 1, 16], "texture": "#2"}, + "west": {"uv": [1, 5, 3, 15], "texture": "#2"}, + "up": {"uv": [1, 5, 3, 7], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [7, 21, 7], + "to": [9, 25, 9], + "rotation": {"angle": -45, "axis": "x", "origin": [6, 21, 4]}, + "faces": { + "north": {"uv": [8, 6, 10, 10], "texture": "#2"}, + "east": {"uv": [4, 10, 2, 14], "texture": "#2"}, + "south": {"uv": [8, 6, 10, 10], "texture": "#2"}, + "west": {"uv": [4, 10, 2, 14], "texture": "#2"}, + "up": {"uv": [11, 14, 9, 12], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [6, 21, 6], + "to": [10, 25, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 18, 5]}, + "faces": { + "north": {"uv": [9, 12, 5, 16], "texture": "#2"}, + "east": {"uv": [5, 12, 9, 16], "texture": "#2"}, + "south": {"uv": [5, 12, 9, 16], "texture": "#2"}, + "west": {"uv": [5, 12, 9, 16], "texture": "#2"}, + "up": {"uv": [5, 16, 9, 12], "texture": "#2"}, + "down": {"uv": [5, 12, 9, 16], "texture": "#2"} + } + }, + { + "from": [7, 20, 7], + "to": [9, 21, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 17, 5]}, + "faces": { + "north": {"uv": [6, 13, 8, 14], "texture": "#2"}, + "east": {"uv": [6, 13, 8, 14], "texture": "#2"}, + "south": {"uv": [6, 13, 8, 14], "texture": "#2"}, + "west": {"uv": [6, 13, 8, 14], "texture": "#2"}, + "up": {"uv": [6, 13, 8, 14], "texture": "#2"}, + "down": {"uv": [4, 5, 6, 7], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "table", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7] + }, + { + "name": "mircoscope", + "origin": [8, 8, 8], + "color": 0, + "children": [8, 9, 10, 11, 12] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/nautec/textures/block/bacterial_analyzer.png b/src/main/resources/assets/nautec/textures/block/bacterial_analyzer.png new file mode 100644 index 0000000000000000000000000000000000000000..60ba8a377cd19c7e09370f35787c7bbf00f7e038 GIT binary patch literal 532 zcmV+v0_**WP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px$&PhZ;R5*=|lTT~ZP!z>~t%HTg3=GX+8L}9d%t9EZAca{f*!l&!(v1{9f*b9^ zg{um>cOeKax)78u3Y8+5LKiKRu^qY)XWC{F$3ICLNKCMb)WvY0NhgYD6Y}0Y=iYPP zdt<W;^QVuN9@4dY>^prrs}=yIN*O`u2E2Lpa*P}l(uIOjrOf?1cj?+a0G>a2n#Uaq z04#5=0nju|I#_CReZ!(!H^^%u7!TcmreOlG@ATEk%bROlzjBqqf%8|gve2qEG6Deo z?LGS2dxUQAZviO~5wUQVIJ+=^>IcUFyjyvz0#zYOV1lVjCW+^(|IiIMcYcBk7xhft zxRBH1mnvndbpuVG1W@0JW{s0L&RRI@T`)LssMZYzskQjk7Eu(9P9UeSzG0~iIe}{3 zP-{^XQ7jfmCy<WfIdlVBwFa$PgRb49X_%~dK2x{mhQ+(Pe*`4$#Pc!R({xrXN|iDX z9xoBPLFN(_+;7BRy!;Hz_O!Y**KXVfz)xb1>_cw0X8^djxX7;`Cs_gMkhb6_G4H>A zM%OexIv=1t!>8z&ofof19#kPs77GBnrr{+CKffo;nU`~4VkQGkpHvo(?89N_|G;k~ W`pvr-07U=*0000<MNUMnLSTX-bLTq% literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/bacterial_analyzer1.png b/src/main/resources/assets/nautec/textures/block/bacterial_analyzer1.png new file mode 100644 index 0000000000000000000000000000000000000000..f33054a21734889c3b9c5b799ffc139c2c0fc110 GIT binary patch literal 359 zcmV-t0hs=YP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px$AxT6*R5*>Tlfg~`F%X772nJJF)X*5YsTUv7m+<Pl7|$dgIr9XoWQgoiCJ+vK zfGJxV^q~J`)9K9DKmWGyN3{T+CvRU?nCmKQ8oFM#Hy*$6`uNo9G#lr-LP8C|!}Tbx zCDe#20NyzO`j-~~v~6%YD;c^TzCQrS);4G$Q`;>1{vZySrn3@&r3g!r1oHV_rVh;J zbXLYw0VLGi-QGu#LC((I0bugZA*x8Ie}!z<ngeXpAfn1rBti=BV_%Yi6$|eZo8CD# z&K)4C5ps1iN<(ZmG*4(k%$-4!5DV|=swNQoW!?R^2?>iT&%hw&pb0$A>12r3yxHe) z3X+9*4C$)=2r+eF_b|3=jmcKwgRrQgP1s!=fu!~?`UXAh+r<!q<Q4z`002ovPDHLk FV1f<nn-u^6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/bacterial_containment_shield.png b/src/main/resources/assets/nautec/textures/block/bacterial_containment_shield.png new file mode 100644 index 0000000000000000000000000000000000000000..860a0e4b75d7afcd10b852528c1ca8c476a73880 GIT binary patch literal 660 zcmV;F0&D$=P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px%PDw;TR5*=olV3<vVHn1LXC8vgE&rUUjmZ=@qF5UJyAo+-M061ug4vaH7v)V| z1VKnw26Y*95d^`+x~NN2BBu-@iOMmYva>evFx}3#HaGLqbrIijr+RL_^M3F9KIi3m zpHKOo)2jfnOp>^vlT8_HCUmZj-D5SsK}86hn#S@}m?smD0ho+V6ZHCt8#<0yCJ8{? z&<T3|c)Go~+)YS0HI0f8R$N=3O&O?hL${K(-x9Lf<!-X3lz;bhdr`9~1HihJabf3| zji_uE0j#`)Ltf6#M*!Fn1&&`CMr@Z+%{-fP3ph26j)9B3dj7&jl1&*X1EbfflFj9A z;{5fStmZdR%{+H53;=NJ!8q-qegM`#%vc(g%_7RPZ=WmzIeICrTg^GOj?XJAynh)c zFf?dwMQT&$AG|!SC=S+(1r)_WDXrt{^3mAZO2clIwL*dB`g&Rp`&kUX;aDg{M`JS{ zcN>-JE~;dbXEGAS*X2W)CW3z<w#%e5Kde|8n|WKU-7~=E+yY0=_Hpji2>?ER`AQ-Z zB``E-tE&isx;z!OiE?!K288-a%q`&S^0Ag)BN2(x9_pte1Y1jswzVp?R_^Hx@aX9T z2Yb(0lK_@@TT6>Pyn7#6KRX|xZo75=ctfL$p3VT1(P?fEk23r2HSS<9``X+bI(^dC z9Lprhm3|U8bezpD9G-43aYHATNix!RiOJ|R09u3VzwbcWJ?QlV{IRkmk;$@Iq^16V uO>NkFEAq^yj6Ew${Oxs#vRSlQSmHN!#61h{d53iX0000<MNUMnLSTZ~RW4Wn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/bio_reactor_top.png b/src/main/resources/assets/nautec/textures/block/bio_reactor_top.png new file mode 100644 index 0000000000000000000000000000000000000000..a9390b9fb9bca71aaa6776b0835f6536897ba5c3 GIT binary patch literal 514 zcmV+d0{#7oP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px$yh%hsR5*=wlCeu8Q4q#|kqw6Dnusn2ZO%f-6?c#-oK{zeSo$}l6ij8Q%_YsX z%2^)w7YNs#V0)+77`O}Mz#>I3CcMb*`tndL)?(eq?k1V$F*DzM^Ub`;)XvX>((($E z?Ej#LW9L~CbBXv+kC4iz-TZ@9T3#_g0I7T&JC9U8-A;>AWs9L6ncSn4%sUQJYXCCe zZZ3nN9?|@FndqWikC!KH{A^An{I&Hmo!cf>ynE}%&xxa?ZFQ%Dr}_X`0PVrON!CtJ z65#KLM^qbi0FL+e6S-_oggao+qx%*--rL7sTo@xs7Z&Uy%Js0K1x-^BC#apC7!}b7 zncDeT(CxH<a0lt`X;Tj_?{+^Mf5x%%ls{}F0P4XVD~i7W@5`GZ!IGGxJ-A1?o{<@i zQEk+zHtN`m3sf8R#CYZozWlxjr1JTDb-~@QYk;X^L<&}SD&`JmqGUEF#(<NGBYPGh z-jd2kYMr>UX(Vx*)jGTb07nRVZ_?5y8&?;Pd#caNlg5%-;|RgpdYNY-nAI9j^(ojz zI=4+ee%d0!JW6T)zhD<pIgiZt*MlI=p6(VYniL0k1y8Bsl>QuSasU7T07*qoM6N<$ Ef)3p7!vFvP literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/bioreactor_top.png b/src/main/resources/assets/nautec/textures/block/bioreactor_top.png new file mode 100644 index 0000000000000000000000000000000000000000..a9390b9fb9bca71aaa6776b0835f6536897ba5c3 GIT binary patch literal 514 zcmV+d0{#7oP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px$yh%hsR5*=wlCeu8Q4q#|kqw6Dnusn2ZO%f-6?c#-oK{zeSo$}l6ij8Q%_YsX z%2^)w7YNs#V0)+77`O}Mz#>I3CcMb*`tndL)?(eq?k1V$F*DzM^Ub`;)XvX>((($E z?Ej#LW9L~CbBXv+kC4iz-TZ@9T3#_g0I7T&JC9U8-A;>AWs9L6ncSn4%sUQJYXCCe zZZ3nN9?|@FndqWikC!KH{A^An{I&Hmo!cf>ynE}%&xxa?ZFQ%Dr}_X`0PVrON!CtJ z65#KLM^qbi0FL+e6S-_oggao+qx%*--rL7sTo@xs7Z&Uy%Js0K1x-^BC#apC7!}b7 zncDeT(CxH<a0lt`X;Tj_?{+^Mf5x%%ls{}F0P4XVD~i7W@5`GZ!IGGxJ-A1?o{<@i zQEk+zHtN`m3sf8R#CYZozWlxjr1JTDb-~@QYk;X^L<&}SD&`JmqGUEF#(<NGBYPGh z-jd2kYMr>UX(Vx*)jGTb07nRVZ_?5y8&?;Pd#caNlg5%-;|RgpdYNY-nAI9j^(ojz zI=4+ee%d0!JW6T)zhD<pIgiZt*MlI=p6(VYniL0k1y8Bsl>QuSasU7T07*qoM6N<$ Ef)3p7!vFvP literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/side.png b/src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/side.png new file mode 100644 index 0000000000000000000000000000000000000000..07e66a77462812c663f0f08d78f6c17a1dac0116 GIT binary patch literal 898 zcmV-|1AY97P)<h;3K|Lk000e1NJLTq001xm000mO1^@s6P_F#300001b5ch_0Itp) z=>Px&JV``BR7i=9mO*aYFc3w54FOUpB?e+zPJt|JbkP7gLax(AZ&9F&-q3)%vKI~- zD{|1p5@P`d+J*GTL&<W>ji@0-zCSY@>chkLuYZE)0&G=T*3XyU`10)s{?)dw#K^?| zZRZ$UUc5=)CRZK%dNs#p^N2piKrhUJL-7vxQhJ+>Ozc5v2->%<^ne!G6Ra^EFq>S- zJdWkXo7i&aWd1OjV6%DbW%LAapxv}5+n&|Hv<sXu0z**3^O+ZK9<Vh=zT0O@>^n3* zqX?+VvIDO@Ix;avCdSX~m%MLX>4OkV0RiZU0P5)Mvn2o^N@vnvqxO0Tbl^`h2ElV7 z13_{jPjelg^!(@aW4{RJ#B;hu>C6)$LZ<g(zg2xWhu30rggnD25eSkCgmL%K>0G4< zg0}OUp^wrT0EiGi^TwV#hr9HqvlqX=v{r1MkQ0o9!#F`0$1=dadnxM_YP`Y}*}4)B z(@z4T51vk)eYQlD&O{7t6u!uw#4${}^=d9_RmR}bS`3p3&M}^>LT#1YR7Zp!lS8Qw ztTDj!{<wfjkI*^noCA#UqI;L#U;%jNV!fJUm`psDHe<m0T9qZjI7U^LGHGOD0c(r! z;8lfLWKROCVfZbY^(dsG9S{+rbAWR|I>T$W#5u;nVVrmahvFTF;vMGt7zF`WDUv%^ z*LhXb^;~O=cyFIAvCDJp@?0EoX)P*aY9WoCj$!(Q&PfXOF%B4xQzc5n?z1IAm8W4N zh9V>~$rY?I*yT9@hzK6Wu!$y}K_LJ<fgEG&V;nFvEKTvmB1kUeCZ;!|bS4n%)m%Ij zHj$7rs#1yoT12HH#Pnoe3t6w`*yXwG*~d6wew`{&TUUBsiPD+CP(;;iPAH~U)hda% z(|ftFLKT6#^yYYmnv|kw!k=Rd7#^x@H|A+hKmbG3i%Z#4hg7EzfV$!|UJU_+4cHKq zdQEkY=>6KQk1;rmlg>@Y$x?;T)bIvWi-^?a#Eo@jv8vB`k*TW-3Sfa_Ip*EK?}w<P zy%|6DG6q!D9sueTTCe7EAyEWS=l7+x-me4yUAQp-9Ag3R7en9HT$3pnHop@3U#O4q YFC}*PBsG7<hX4Qo07*qoM6N<$f)QJv&Hw-a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/top.png b/src/main/resources/assets/nautec/textures/block/multiblock/bio_reactor/top.png new file mode 100644 index 0000000000000000000000000000000000000000..d9be3219f49dbc34714d4280e860ec8dca23f0a1 GIT binary patch literal 450 zcmV;z0X_bSP)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm00001b5ch_0Itp) z=>Px$d`Uz>RA_<i+A(XwKp4jHzj_ej1+mg%K?H|V7ooI+qfqDv=m+l9v4c=>v2+kb zs3@sO&JakkLpU`mv{OCk``dDN3D0}sruPcBkN0b@Rt3P*8tdcrjp6f40SB~u-Syd3 z1ITAwjwh%}vw@k;H-l*u<8@k;Yx>|rr&MayNd_a*C`JW-ma|qx0jR*=RF+0D0ISfP zF72M(&9qr<&f@OE#F(Qmxx{X?Ekq^8kVf&QBG=hXPNO(00Kn_CPMPUPtI$v;pR)uo zi%_5M6UyNtzqqEIIs*W!{_t?jv5Z0pA%qY@2qA<JLI@#*5dTA=-RrI)-<7nj8<!g0 zaM(Frg$8wbb4_{?<R;3%{HgzE0e|EC;qG9}8%?t=WilA$Cmie4+bsJzRp4g@*auJR zT(jFXyBTetxR@Ao^s0eN?3uLLJgrfI50L!<JK<t@$RA!aoo_FDXpKt31(oLZDobJv sU!$pWO=LBTQ1x>lyKbNYpXGSMH*`>#cMR_ITL1t607*qoM6N<$g8MGbLI3~& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/gui/bacterial_analyzer.png b/src/main/resources/assets/nautec/textures/gui/bacterial_analyzer.png new file mode 100644 index 0000000000000000000000000000000000000000..91fe147de2789e705d8af556f9cdafce51261d4b GIT binary patch literal 1311 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=AwcJzX3_ zD(1Yso11sbOQP-J^i|nTUVC}d6+PZ4b1U9%@W?s!H&F0t0n^U|$IjVYSAFWA!QMPW zy1Jt+G}bI;C-1UNvwky7imBSvo@nrY=l-i%p{h*fpMTH2zt`{I^y$-o%kh4clb6rl zew!C4{_*uCUN!qI?~@oBzHu_JRPSa>xZ1C}^IO#xJA+A=B@Y<zIM1z1@M}N3@ZLVT z^Yy1@U(KkS+W#kF!r8Q7et!P&|7RZ-tPpApT=PnYA?$zTuI0;@uUd8MZCR)ud)}w{ zt`3vsH~kP{XaX87%)p_>AmGEGFoVItfUzNgiQym%5fZ{T-hbbE|NV12o*xq!95#I4 zCp%-}ocXLJvF4X29{4?n5op$ofa|6AzDAmW3^myFx9)xHeEG#YT@Rd1EB-7|d%wO~ zX#T(ZHw0(=F1)zx8B@U5_pNo^Z_9qKeeb#F+s*$H!ujityY8OFb0FrPUr{~B5q|;U zhQ}X&ynBEB^;ebe*Gunav&<>m9CDWZfyqaG-!J`n?bA%98_xT^x%_r}+k;!0|Cjo+ z)g&FbGmH1Y-r91dZieElU+)>Ny)KpQKi+-)f9Th$-*cuji1Ezy{+!P6eEE;*dH>g} zR9kJ#`0PRrL)|5%1snzWzU&W-mw%I=t9WPf$@6<nWgFJ-Sv~(6x1G^5mD*~{#81ZU zY2u9b)(icg#c-JX1e@d?&us8>X7FXk6;l6$8w_XuIkWaB!yKK&sq)j7-85x*kbHJ7 z<Cog_+i%O>9hQh)-QQhlD&DZ}^{hKz7F|7lbWaQuDX~CgysfJ<e~`9$=TE+0`_?~y zp8i<k`R&IgvE`pF_Pjr=&;IuJzh%}p^0t5d^Cw5<aZR;Me3zB%bkfqq?p^W@_rGtw zo0q>&__0KLYE<Y|U=j_z`rj;WgYtyJX$I$h_Br_b`-g^Zz5RC8zrAfg)vTE$(?34G zA(&xxjkLs<=C1Hqr%q;BGK98f@;%<?a4hnVMH$PiK2y??^G(4M7TxmgFJtZsa!fnX z=kU0Y6PEsW@8ZY^Pk5}8IOlV0qhx<<WAEl4g*txz$5lzoG;g?a<{a%mT=ItNOn-9t zgO58{AepQ|{%Ogt^A>gCSF^T8@wOj6IGH=qFP&kvef_^PRSF+O#Tbqk{$t_WEW=te j_ar~CG@=P`X#U64Ba(G)@##I;APYQQ{an^LB{Ts5pegBS literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/nautec/textures/gui/sprites/container/bacterial_analyzer/progress_arrow.png b/src/main/resources/assets/nautec/textures/gui/sprites/container/bacterial_analyzer/progress_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..724a28b1cd79ca3bc8bcf30929bb617c2170dc1f GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|_IkQFhIn*t zoqC%0hystxSuI~*V@qSv!sRn|=zMEA;`T@Uye`+t<Tr*po>xwicxAkqqk&<9#A4nD z^0C_8&K&mVRi5s9|IYjw-!ujl*U+~N)>2FiI`6AEC)BT7b-3-?6<@)IXS-*z@G_=m zR&AKKY<A3{wDSEdH>PIGmMxxiCFY9I^*4+s^%jIKGGFpC!F}m#o<dF4&A%N&a~YM6 zX)0-+tFAxeSQ-ChO04zs(;lfU{nKCA%DXdeeQ0gPZd%J2-WejSYWd|Y&?5|<u6{1- HoD!M<)@fv- literal 0 HcmV?d00001