Skip to content

Commit

Permalink
feat: add despoil loot to Alex's Caves mobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Feb 8, 2024
1 parent 2a1ec2c commit 5da2dd4
Showing 1 changed file with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.elenterius.biomancy.datagen.tags;

import com.github.alexmodguy.alexscaves.AlexsCaves;
import com.github.alexmodguy.alexscaves.server.entity.ACEntityRegistry;
import com.github.alexthe666.alexsmobs.AlexsMobs;
import com.github.alexthe666.alexsmobs.entity.AMEntityRegistry;
import com.github.elenterius.biomancy.BiomancyMod;
Expand Down Expand Up @@ -33,22 +35,34 @@ public class ModEntityTypeTagsProvider extends EntityTypeTagsProvider {
protected static final EntityType<?>[] VOLATILE_MOBS = {
EntityType.CREEPER,
EntityType.GHAST, EntityType.BLAZE,
EntityType.WITHER, EntityType.ENDER_DRAGON
EntityType.WITHER, EntityType.ENDER_DRAGON,

ACEntityRegistry.NUCLEEPER.get()
};
protected static final EntityType<?>[] SHARP_CLAW_MOBS = {
EntityType.BAT,
EntityType.CAT, EntityType.OCELOT,
EntityType.WOLF, EntityType.FOX,
EntityType.POLAR_BEAR, EntityType.PANDA,
EntityType.ENDER_DRAGON
EntityType.ENDER_DRAGON,

ACEntityRegistry.SUBTERRANODON.get(), ACEntityRegistry.VALLUMRAPTOR.get(), ACEntityRegistry.TREMORSAURUS.get(), ACEntityRegistry.RELICHEIRUS.get(),
ACEntityRegistry.RAYCAT.get(),
ACEntityRegistry.DEEP_ONE.get(), ACEntityRegistry.DEEP_ONE_KNIGHT.get(),
ACEntityRegistry.UNDERZEALOT.get(), ACEntityRegistry.WATCHER.get(), ACEntityRegistry.CORRODENT.get(), ACEntityRegistry.VESPER.get(), ACEntityRegistry.FORSAKEN.get()
};
protected static final EntityType<?>[] SHARP_FANG_MOBS = {
EntityType.BAT,
EntityType.CAT, EntityType.OCELOT,
EntityType.WOLF, EntityType.FOX,
EntityType.POLAR_BEAR, EntityType.PANDA,
EntityType.HOGLIN, EntityType.ZOGLIN,
EntityType.ENDER_DRAGON
EntityType.ENDER_DRAGON,

ACEntityRegistry.VALLUMRAPTOR.get(), ACEntityRegistry.TREMORSAURUS.get(),
ACEntityRegistry.RAYCAT.get(),
ACEntityRegistry.HULLBREAKER.get(), ACEntityRegistry.DEEP_ONE.get(), ACEntityRegistry.DEEP_ONE_KNIGHT.get(),
ACEntityRegistry.VESPER.get(), ACEntityRegistry.FORSAKEN.get()
};
protected static final Set<EntityType<?>> INVALID_MOBS_FOR_MEATY_LOOT = Set.of(
EntityType.SLIME, EntityType.MAGMA_CUBE,
Expand All @@ -57,13 +71,20 @@ public class ModEntityTypeTagsProvider extends EntityTypeTagsProvider {
EntityType.BLAZE,
EntityType.HUSK, EntityType.DROWNED, EntityType.ZOMBIE, EntityType.ZOMBIE_HORSE, EntityType.ZOMBIE_VILLAGER,
EntityType.SKELETON, EntityType.SKELETON_HORSE, EntityType.STRAY, EntityType.WITHER_SKELETON, EntityType.WITHER,
EntityType.CREEPER,

AMEntityRegistry.SPECTRE.get(), AMEntityRegistry.VOID_WORM.get(), AMEntityRegistry.SKELEWAG.get(), AMEntityRegistry.BONE_SERPENT.get(),
AMEntityRegistry.MIMICUBE.get(), AMEntityRegistry.FLUTTER.get(), AMEntityRegistry.GUSTER.get()
AMEntityRegistry.MIMICUBE.get(), AMEntityRegistry.FLUTTER.get(), AMEntityRegistry.GUSTER.get(),

ACEntityRegistry.TELETOR.get(), ACEntityRegistry.MAGNETRON.get(), ACEntityRegistry.BOUNDROID.get(), ACEntityRegistry.NOTOR.get(), ACEntityRegistry.FERROUSLIME.get(),
ACEntityRegistry.RAYCAT.get(), ACEntityRegistry.NUCLEEPER.get(),
ACEntityRegistry.MINE_GUARDIAN.get()
);
protected static final Set<EntityType<?>> SLIME_TYPES = Set.of(
EntityType.SLIME,
EntityType.MAGMA_CUBE
EntityType.MAGMA_CUBE,

ACEntityRegistry.FERROUSLIME.get()
);
protected static final Set<EntityType<?>> GOLEM_TYPES = Set.of(
EntityType.IRON_GOLEM,
Expand Down Expand Up @@ -101,6 +122,9 @@ private static Set<EntityType<?>> createUndeadTypes() {

set.add(EntityType.PHANTOM);

set.add(ACEntityRegistry.RAYCAT.get());
set.add(ACEntityRegistry.BRAINIAC.get());

return Set.copyOf(set);
}

Expand Down Expand Up @@ -143,8 +167,7 @@ private void addDespoilLootTags() {
createTag(ModEntityTags.TOXIN_GLAND)
.add(TOXIC_MOBS)
.addOptional(
AMEntityRegistry.KOMODO_DRAGON,
AMEntityRegistry.PLATYPUS
AMEntityRegistry.KOMODO_DRAGON, AMEntityRegistry.PLATYPUS
);

createTag(ModEntityTags.VOLATILE_GLAND)
Expand All @@ -156,13 +179,14 @@ private void addDespoilLootTags() {
.addOptional(AMEntityRegistry.SKELEWAG, AMEntityRegistry.BONE_SERPENT);

createTag(ModEntityTags.WITHERED_BONE_MARROW)
.add(EntityType.WITHER_SKELETON, EntityType.WITHER);
.add(EntityType.WITHER_SKELETON, EntityType.WITHER)
.addOptional(ACEntityRegistry.RAYCAT);

buildSinewAndBileTag();
}

private void buildSinewAndBileTag() {
Set<String> validNamespaces = Set.of("minecraft", BiomancyMod.MOD_ID, AlexsMobs.MODID);
Set<String> validNamespaces = Set.of("minecraft", BiomancyMod.MOD_ID, AlexsMobs.MODID, AlexsCaves.MODID);
Predicate<EntityType<?>> allowedNamespace = entityType -> validNamespaces.contains(Objects.requireNonNull(ForgeRegistries.ENTITY_TYPES.getKey(entityType)).getNamespace());

Set<EntityType<?>> toxicMobs = Set.of(TOXIC_MOBS);
Expand Down

0 comments on commit 5da2dd4

Please sign in to comment.