Skip to content

Commit

Permalink
fix spawn weight, add egg to group
Browse files Browse the repository at this point in the history
  • Loading branch information
TropheusJ committed Apr 2, 2024
1 parent ab966c1 commit 0b2f4a4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.minecraft.core.Holder;
Expand All @@ -30,6 +31,7 @@
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.item.ArrowItem;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Item.Properties;
import net.minecraft.world.item.SpawnEggItem;
Expand Down Expand Up @@ -82,6 +84,8 @@ public void onInitialize() {
Registry.register(BuiltInRegistries.TRIGGER_TYPES, id("accomplish_dreams"), ACCOMPLISH_DREAMS_TRIGGER);
Registry.register(BuiltInRegistries.TRIGGER_TYPES, id("krill_self"), KRILL_SELF);

ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.SPAWN_EGGS).register(entries -> entries.accept(SHRIMP_EGG));

CommandRegistrationCallback.EVENT.register(
(dispatcher, registryAccess, environment) -> dispatcher.register(KrillCommand.build())
);
Expand All @@ -91,7 +95,7 @@ public void onInitialize() {
BiomeModifications.addSpawn(
BiomeSelectors.tag(BiomeTags.IS_OCEAN),
MobCategory.WATER_AMBIENT, SHRIMP_TYPE,
50, 3, 5
5, 3, 5
);

SpawnPlacements.register(SHRIMP_TYPE, SpawnPlacementTypes.IN_WATER, Types.MOTION_BLOCKING_NO_LEAVES, ShrimpEntity::checkShrimpSpawnRules);
Expand Down

0 comments on commit 0b2f4a4

Please sign in to comment.