Skip to content

Commit

Permalink
WOOOOOOOOO we don't need that either
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Oct 18, 2023
1 parent 69c856a commit 88c80be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 92 deletions.
12 changes: 9 additions & 3 deletions src/main/java/net/frozenblock/wilderwild/entity/Crab.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.level.biome.Biome;
Expand Down Expand Up @@ -210,7 +211,7 @@ public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstanc
return spawnData;
}
if (spawnData instanceof CrabGroupData crabGroupData) {
if (crabGroupData.getGroupSize() >= 2 && random.nextFloat() <= 0.4F) {
if (crabGroupData.getGroupSize() >= 2) {
this.setAge(-24000);
}
} else {
Expand All @@ -234,6 +235,11 @@ public static int getCrabs(@NotNull ServerLevel level) {
return count.get();
}

@Override
public float getWalkTargetValue(BlockPos pos, LevelReader level) {
return 0.0f;
}

public static void clearLevelToCrabCount() {
CRABS_PER_LEVEL.clear();
}
Expand All @@ -243,9 +249,9 @@ public static boolean canSpawn(@NotNull EntityType<Crab> type, @NotNull ServerLe
return true;
}
Holder<Biome> biome = level.getBiome(pos);
int randomBound = 20;
int randomBound = 1;
if (!biome.is(WilderBiomeTags.HAS_COMMON_CRAB)) {
randomBound = 50;
randomBound = 1;
if (getCrabs(level.getLevel()) >= type.getCategory().getMaxInstancesPerChunk() / 3) {
return false;
}
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/wilderwild.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"entity.boat.BoatDropsMixin",
"entity.boat.BoatTypeMixin",
"entity.boat.ChestBoatDropsMixin",
"entity.crab.NaturalSpawnerMixin",
"entity.crab.VibrationSystemTickerMixin",
"entity.crab.WallClimberNavigationMixin",
"entity.easter.EntityMixin",
Expand Down

0 comments on commit 88c80be

Please sign in to comment.