Fixed a crash found in #25 relating to spawn configuration registration

Actually defined hitbox sizes
Made size adjustments to several creatures
Added the Achillobator, Chilesaurus, Mussaurus, Suchomimus, Thescelosaurus and it's items
Improved swimming behavior for terrestrial and avian creatures
Made Dilophosaurus animation fixes relating to its frill
Added natural breeding as life finds a way
Added a short amount of health regeneration after full hunger so dinos don't die from hunting too much
Fixed avian AI to not select the Idle state while flying, and generally improved their behavior
Increased the chance and timespan of which dinos select a new place to move
Increased the minimum speed for dinos to move when roaming to stop animations not playing
Set a minimum speed when a dino is on Ice so it actaully moves
Add random setting to spawn egg item Fix entities not middle-mouse-clickable
Drastically reduced spawn rate of many creatures
Fixes hand feeding, and thereby being able to put entities in the breeding state
Replaces machine models
Changed AI to ignore creepers
Adds tags for each entity in the forge namespace to have compatibility with other mods that add the same entity, as long as they support this too
Fixes machine input and export logic with pipes and hoppers
Fixes inworld water input via bucket with fossil cleaner
Fixes pipe logic to actually select a new fill point Fixes herbivores not being able to self feed
This commit is contained in:
2026-06-05 23:08:50 -04:00
parent e6a57740b2
commit 4d2921a925
279 changed files with 28229 additions and 3415 deletions
@@ -8,6 +8,8 @@ import net.cmr.jurassicrevived.platform.FabricEnergyWrapper;
import net.cmr.jurassicrevived.platform.FabricTransferHelper;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage;
import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage;
import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage;
import team.reborn.energy.api.EnergyStorage;
public class JRMod implements ModInitializer
@@ -28,6 +30,56 @@ public class JRMod implements ModInitializer
ModBlockEntities.TANK_BE.get()
);
FluidStorage.SIDED.registerForBlockEntities((be, side) ->
new FabricTransferHelper.InternalFluidStorage(((FossilCleanerBlockEntity) be).getFluidHandler(side)),
ModBlockEntities.FOSSIL_CLEANER_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((GeneratorBlockEntity) be).itemHandler, side),
ModBlockEntities.GENERATOR_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((DNAExtractorBlockEntity) be).itemHandler, side),
ModBlockEntities.DNA_EXTRACTOR_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((DNAAnalyzerBlockEntity) be).itemHandler, side),
ModBlockEntities.DNA_ANALYZER_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((DNAHybridizerBlockEntity) be).itemHandler, side),
ModBlockEntities.DNA_HYBRIDIZER_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((FossilCleanerBlockEntity) be).itemHandler, side),
ModBlockEntities.FOSSIL_CLEANER_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((FossilGrinderBlockEntity) be).itemHandler, side),
ModBlockEntities.FOSSIL_GRINDER_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((EmbryonicMachineBlockEntity) be).itemHandler, side),
ModBlockEntities.EMBRYONIC_MACHINE_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((EmbryoCalcificationMachineBlockEntity) be).itemHandler, side),
ModBlockEntities.EMBRYO_CALCIFICATION_MACHINE_BE.get()
);
ItemStorage.SIDED.registerForBlockEntities((be, side) ->
InventoryStorage.of(((IncubatorBlockEntity) be).itemHandler, side),
ModBlockEntities.INCUBATOR_BE.get()
);
EnergyStorage.SIDED.registerForBlockEntities((be, side) ->
new FabricEnergyWrapper(((PowerCellBlockEntity) be).getEnergyStorage(side)),
ModBlockEntities.POWER_CELL_BE.get()
@@ -58,6 +58,15 @@ public final class JRClothConfigScreens {
.build()
);
general.addEntry(
eb.startBooleanToggle(Component.literal("Dinosaur Natural Breeding"), cfg.naturalBreeding)
.setDefaultValue(false)
.setTooltip(Component.literal("When enabled, dinosaurs have a chance to breed naturally over time. Disabled by default. Life finds a way..."))
.setSaveConsumer(v -> cfg.naturalBreeding = v)
.requireRestart()
.build()
);
general.addEntry(
eb.startIntField(Component.literal("FE Per Second"), cfg.fePerSecond)
.setDefaultValue(1000)
@@ -11,6 +11,7 @@ public class DataGenerators implements DataGeneratorEntrypoint {
pack.addProvider(FabricModModelProvider::new);
pack.addProvider(FabricBlockTagProvider::new);
pack.addProvider(FabricItemTagProvider::new);
pack.addProvider(FabricEntityTagProvider::new);
pack.addProvider(FabricBlockLootTableProvider::new);
pack.addProvider(FabricEntityLootTableProvider::new);
pack.addProvider(FabricRecipeProvider::new);
@@ -0,0 +1,26 @@
package net.cmr.jurassicrevived.datagen;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.core.HolderLookup;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;
import java.util.concurrent.CompletableFuture;
public class FabricEntityTagProvider extends FabricTagProvider.EntityTypeTagProvider implements ModEntityTagProvider.EntityTagHelper {
public FabricEntityTagProvider(FabricDataOutput output, CompletableFuture<HolderLookup.Provider> registriesFuture) {
super(output, registriesFuture);
}
@Override
protected void addTags(HolderLookup.Provider wrapperLookup) {
ModEntityTagProvider.registerEntityTags(this);
}
@Override
public void tag(TagKey<EntityType<?>> tag, EntityType<?>... entityTypes) {
getOrCreateTagBuilder(tag).add(entityTypes);
}
}