Skip to content

Commit

Permalink
NauBio machines
Browse files Browse the repository at this point in the history
  • Loading branch information
ReclipseTheOne committed Dec 15, 2024
1 parent 5d45470 commit f623f4b
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-12-15T13:39:38.358791409 Item Models: nautec
// 1.21.1 2024-12-15T19:07:20.8340143 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
Expand All @@ -24,6 +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
cd68bca3502f5a671aa5c4bbd828397047b19b8b assets/nautec/models/item/bio_reactor.json
b1e3c9080ae5a0f78b06fa90f3c5da5b3805f842 assets/nautec/models/item/broken_whisk.json
cf1524c962ddbbf1cb5e8782d764e71888a03eb1 assets/nautec/models/item/brown_polymer.json
5415b7ed1e075d2bffe7acdd5bc251f77363c0ac assets/nautec/models/item/burnt_coil.json
Expand Down Expand Up @@ -53,19 +54,21 @@ cb07777d8dcd1c00bea806efc2b7f64c6c13a8c3 assets/nautec/models/item/fishing_stati
490588573d27c343b055c02b137c221a71866aa8 assets/nautec/models/item/gear.json
2b617afc38ea0b797aeba3ca00dfb25f33be4bd3 assets/nautec/models/item/glass_vial.json
1f8f85fa3cfb3f9fada3af0abc3f67b91ee70b81 assets/nautec/models/item/guardian_eye.json
465fff8f345aedd2e37bc4a22fa70756fb069373 assets/nautec/models/item/incubator.json
d30193c75aab5ff8f4d4945df8689f575874c0f0 assets/nautec/models/item/laser_channeling_coil.json
644f1395dba609cfe064a66a028001e76dd20ab7 assets/nautec/models/item/laser_junction.json
e2a54f360d7c345a624bfd88678359ffce2af94d assets/nautec/models/item/long_distance_laser.json
2a5b3ee493a3b20a37c3f391ebd960de088f2b7c assets/nautec/models/item/mixer.json
420392d152f0164245752585ea3f0e85b95b0cce assets/nautec/models/item/mutator.json
c30b2391537fbc383c41aebe69a6eab8b2f9bd31 assets/nautec/models/item/petri_dish.json
888fbf8e3629b4cd0df267581ac130f534f80ac5 assets/nautec/models/item/petri_dish_bacteria.json
e8d19ed0a058c92c28efb20a5f8887ff0b78770f assets/nautec/models/item/polished_prismarine.json
113d63fc1bd37fbe0fb477446a06eafa25ce09b1 assets/nautec/models/item/prism_monocle.json
8e22e42d27bc66bc91cc76fd66d0ff5457b585b1 assets/nautec/models/item/prismarine_crystal.json
8b90a03798a28c038b1c16da2f723e90694d182b assets/nautec/models/item/prismarine_crystal_shard.json
09882392c9745a728907f265dd968977ca0f171b assets/nautec/models/item/prismarine_laser_relay.json
b01055cbe0dd02e958fe1063758658a9be6b753a assets/nautec/models/item/prismarine_sand.json
e0209c5f64b38c19f4b8cc62dc90d23fd5f3bad0 assets/nautec/models/item/prismatic_battery.json
113d63fc1bd37fbe0fb477446a06eafa25ce09b1 assets/nautec/models/item/prism_monocle.json
0441fb5aafacad25af44cc70caad7de17d4d7762 assets/nautec/models/item/rusty_crate.json
546756658cb53a34f117de278d075cbdd09c70ba assets/nautec/models/item/rusty_gear.json
8af43812b6a13031c60720373e6e2aa8b3aa3367 assets/nautec/models/item/salt_water_bucket.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.portingdeadmods.nautec.content.blockentities;

import com.portingdeadmods.nautec.api.blockentities.LaserBlockEntity;
import com.portingdeadmods.nautec.capabilities.IOActions;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import it.unimi.dsi.fastutil.Pair;
import it.unimi.dsi.fastutil.objects.ObjectSet;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.neoforge.capabilities.BlockCapability;
import org.jetbrains.annotations.Nullable;

import java.util.Map;

public class BioReactorBlockEntity extends LaserBlockEntity {


public BioReactorBlockEntity(BlockPos blockPos, BlockState blockState) {
super(NTBlockEntityTypes.BIO_REACTOR.get(), blockPos, blockState);
}

@Override
public ObjectSet<Direction> getLaserInputs() {
return ObjectSet.of(Direction.UP, Direction.DOWN);
}

@Override
public ObjectSet<Direction> getLaserOutputs() {
return ObjectSet.of();
}

@Override
public <T> Map<Direction, Pair<IOActions, int[]>> getSidedInteractions(BlockCapability<T, @Nullable Direction> capability) {
return Map.of();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.portingdeadmods.nautec.content.blockentities;

import com.portingdeadmods.nautec.api.blockentities.LaserBlockEntity;
import com.portingdeadmods.nautec.capabilities.IOActions;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import it.unimi.dsi.fastutil.Pair;
import it.unimi.dsi.fastutil.objects.ObjectSet;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.neoforge.capabilities.BlockCapability;
import org.jetbrains.annotations.Nullable;

import java.util.Map;

public class IncubatorBlockEntity extends LaserBlockEntity {


public IncubatorBlockEntity(BlockPos blockPos, BlockState blockState) {
super(NTBlockEntityTypes.INCUBATOR.get(), blockPos, blockState);
}

@Override
public ObjectSet<Direction> getLaserInputs() {
return ObjectSet.of(Direction.UP, Direction.DOWN);
}

@Override
public ObjectSet<Direction> getLaserOutputs() {
return ObjectSet.of();
}

@Override
public <T> Map<Direction, Pair<IOActions, int[]>> getSidedInteractions(BlockCapability<T, @Nullable Direction> capability) {
return Map.of();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.portingdeadmods.nautec.content.blockentities;

import com.portingdeadmods.nautec.api.blockentities.LaserBlockEntity;
import com.portingdeadmods.nautec.capabilities.IOActions;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import it.unimi.dsi.fastutil.Pair;
import it.unimi.dsi.fastutil.objects.ObjectSet;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.neoforge.capabilities.BlockCapability;
import org.jetbrains.annotations.Nullable;

import java.util.Map;

public class MutatorBlockEntity extends LaserBlockEntity {


public MutatorBlockEntity(BlockPos blockPos, BlockState blockState) {
super(NTBlockEntityTypes.MUTATOR.get(), blockPos, blockState);
}

@Override
public ObjectSet<Direction> getLaserInputs() {
return ObjectSet.of(Direction.UP, Direction.DOWN);
}

@Override
public ObjectSet<Direction> getLaserOutputs() {
return ObjectSet.of();
}

@Override
public <T> Map<Direction, Pair<IOActions, int[]>> getSidedInteractions(BlockCapability<T, @Nullable Direction> capability) {
return Map.of();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.portingdeadmods.nautec.content.blocks;

import com.mojang.serialization.MapCodec;
import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity;
import com.portingdeadmods.nautec.api.blocks.blockentities.LaserBlock;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.entity.BlockEntityType;

public class BioReactorBlock extends LaserBlock {
public BioReactorBlock(Properties properties) {
super(properties);
}

@Override
public BlockEntityType<? extends ContainerBlockEntity> getBlockEntityType() {
return NTBlockEntityTypes.BIO_REACTOR.get();
}

@Override
protected MapCodec<? extends BaseEntityBlock> codec() {
return simpleCodec(BioReactorBlock::new);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.portingdeadmods.nautec.content.blocks;

import com.mojang.serialization.MapCodec;
import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity;
import com.portingdeadmods.nautec.api.blocks.blockentities.LaserBlock;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.entity.BlockEntityType;

public class IncubatorBlock extends LaserBlock {
public IncubatorBlock(Properties properties) {
super(properties);
}

@Override
public BlockEntityType<? extends ContainerBlockEntity> getBlockEntityType() {
return NTBlockEntityTypes.INCUBATOR.get();
}

@Override
protected MapCodec<? extends BaseEntityBlock> codec() {
return simpleCodec(IncubatorBlock::new);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.portingdeadmods.nautec.content.blocks;

import com.mojang.serialization.MapCodec;
import com.portingdeadmods.nautec.api.blockentities.ContainerBlockEntity;
import com.portingdeadmods.nautec.api.blocks.blockentities.LaserBlock;
import com.portingdeadmods.nautec.registries.NTBlockEntityTypes;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.entity.BlockEntityType;

public class MutatorBlock extends LaserBlock {
public MutatorBlock(Properties properties) {
super(properties);
}

@Override
public BlockEntityType<? extends ContainerBlockEntity> getBlockEntityType() {
return NTBlockEntityTypes.MUTATOR.get();
}

@Override
protected MapCodec<? extends BaseEntityBlock> codec() {
return simpleCodec(MutatorBlock::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ protected void addTranslations() {
addBlock(NTBlocks.CHARGER, "Charger");
addBlock(NTBlocks.PRISMARINE_SAND, "Prismarine Sand");
addBlock(NTBlocks.CREATIVE_POWER_SOURCE,"Creative Power Source");
addBlock(NTBlocks.MUTATOR, "Mutator");
addBlock(NTBlocks.INCUBATOR, "Incubator");
addBlock(NTBlocks.BIO_REACTOR, "Bio Reactor");

// Multiblock information
add("multiblock.info.failed_to_construct", "Missing or invalid block");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ public final class NTBlockEntityTypes {
() -> BlockEntityType.Builder.of(FishingStationBlockEntity::new,
NTBlocks.FISHING_STATION.get()).build(null));

// Biology
public static final Supplier<BlockEntityType<MutatorBlockEntity>> MUTATOR = BLOCK_ENTITIES.register("mutator",
() -> BlockEntityType.Builder.of(MutatorBlockEntity::new,
NTBlocks.MUTATOR.get()).build(null));
public static final Supplier<BlockEntityType<IncubatorBlockEntity>> INCUBATOR = BLOCK_ENTITIES.register("incubator",
() -> BlockEntityType.Builder.of(IncubatorBlockEntity::new,
NTBlocks.INCUBATOR.get()).build(null));
public static final Supplier<BlockEntityType<BioReactorBlockEntity>> BIO_REACTOR = BLOCK_ENTITIES.register("bio_reactor",
() -> BlockEntityType.Builder.of(BioReactorBlockEntity::new,
NTBlocks.BIO_REACTOR.get()).build(null));

public static final Supplier<BlockEntityType<CreativePowerSourceBlockEntity>> CREATIVE_POWER_SOURCE = BLOCK_ENTITIES.register("creative_power_source",
() -> BlockEntityType.Builder.of(CreativePowerSourceBlockEntity::new,
NTBlocks.CREATIVE_POWER_SOURCE.get()).build(null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ public final class NTBlocks {
public static final DeferredBlock<FishingStationBlock> FISHING_STATION = registerBlockAndItem("fishing_station", FishingStationBlock::new,
BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK));

// Biology
public static final DeferredBlock<MutatorBlock> MUTATOR = registerBlockAndItem("mutator", MutatorBlock::new,
BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK));
public static final DeferredBlock<IncubatorBlock> INCUBATOR = registerBlockAndItem("incubator", IncubatorBlock::new,
BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK));
public static final DeferredBlock<BioReactorBlock> BIO_REACTOR = registerBlockAndItem("bio_reactor", BioReactorBlock::new,
BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK));

// MULTIBLOCKS
public static final DeferredBlock<DrainBlock> DRAIN = registerBlockAndItem("deep_sea_drain", DrainBlock::new,
BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK));
Expand Down

0 comments on commit f623f4b

Please sign in to comment.