This commit is contained in:
craisinlord committed 2026-07-20 13:19:28 -05:00
1 parent c116054a87
commit 1858369f74
98 files changed
+1690 -196

No files matched your search

@@ -522,6 +522,14 @@ public final class AntarchySettings {
private static double creepingHorrorAttackDamage = 6.0D; private static double creepingHorrorAttackDamage = 6.0D;
private static double lurkingTerrorHealth = 15.0D; private static double lurkingTerrorHealth = 15.0D;
private static double lurkingTerrorAttackDamage = 6.0D; private static double lurkingTerrorAttackDamage = 6.0D;
private static double jerryInfantHealth = 20.0D;
private static double jerryInfantAttackDamage = 2.0D;
private static double jerryMatureHealth = 40.0D;
private static double jerryMatureAttackDamage = 3.5D;
private static double jerryAlphaHealth = 60.0D;
private static double jerryAlphaAttackDamage = 6.0D;
private static double jerryGammaHealth = 60.0D;
private static double jerryGammaAttackDamage = 7.0D;
private static double cheepHealth = 8.0D; private static double cheepHealth = 8.0D;
private static double cheepAttackDamage = 3.0D; private static double cheepAttackDamage = 3.0D;
private static double dorrieHealth = 60.0D; private static double dorrieHealth = 60.0D;
@@ -2789,6 +2797,22 @@ public final class AntarchySettings {
public static void setLurkingTerrorHealth(double v) { lurkingTerrorHealth = v; } public static void setLurkingTerrorHealth(double v) { lurkingTerrorHealth = v; }
public static double lurkingTerrorAttackDamage() { return lurkingTerrorAttackDamage; } public static double lurkingTerrorAttackDamage() { return lurkingTerrorAttackDamage; }
public static void setLurkingTerrorAttackDamage(double v) { lurkingTerrorAttackDamage = v; } public static void setLurkingTerrorAttackDamage(double v) { lurkingTerrorAttackDamage = v; }
public static double jerryInfantHealth() { return jerryInfantHealth; }
public static void setJerryInfantHealth(double v) { jerryInfantHealth = v; }
public static double jerryInfantAttackDamage() { return jerryInfantAttackDamage; }
public static void setJerryInfantAttackDamage(double v) { jerryInfantAttackDamage = v; }
public static double jerryMatureHealth() { return jerryMatureHealth; }
public static void setJerryMatureHealth(double v) { jerryMatureHealth = v; }
public static double jerryMatureAttackDamage() { return jerryMatureAttackDamage; }
public static void setJerryMatureAttackDamage(double v) { jerryMatureAttackDamage = v; }
public static double jerryAlphaHealth() { return jerryAlphaHealth; }
public static void setJerryAlphaHealth(double v) { jerryAlphaHealth = v; }
public static double jerryAlphaAttackDamage() { return jerryAlphaAttackDamage; }
public static void setJerryAlphaAttackDamage(double v) { jerryAlphaAttackDamage = v; }
public static double jerryGammaHealth() { return jerryGammaHealth; }
public static void setJerryGammaHealth(double v) { jerryGammaHealth = v; }
public static double jerryGammaAttackDamage() { return jerryGammaAttackDamage; }
public static void setJerryGammaAttackDamage(double v) { jerryGammaAttackDamage = v; }
public static double cheepHealth() { return cheepHealth; } public static double cheepHealth() { return cheepHealth; }
public static void setCheepHealth(double v) { cheepHealth = v; } public static void setCheepHealth(double v) { cheepHealth = v; }
public static double cheepAttackDamage() { return cheepAttackDamage; } public static double cheepAttackDamage() { return cheepAttackDamage; }
@@ -74,7 +74,7 @@ public final class CreativeTabOrder {
"dead_star_coral", "dead_star_coral_fan", "dead_star_coral_block" -> 11; "dead_star_coral", "dead_star_coral_fan", "dead_star_coral_block" -> 11;
case "dream_torch", "dream_lantern", "dream_campfire", "dream_fire", "dream_fire_ceiling" -> 12; case "dream_torch", "dream_lantern", "dream_campfire", "dream_fire", "dream_fire_ceiling" -> 12;
case "antimetal_scaffolding" -> 13; case "antimetal_scaffolding" -> 13;
case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg", "creeping_horror_egg", "lurking_terror_egg", "jumpy_bug_egg", "spit_bug_egg", "metroid_egg" -> 14; case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg", "creeping_horror_egg", "lurking_terror_egg", "jumpy_bug_egg", "spit_bug_egg", "jerry_egg" -> 14;
case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe", case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe",
"duct_tape", "diamond_minecart", "critter_cage", "gravity_sculk_sensor", "miners_dream" -> 15; "duct_tape", "diamond_minecart", "critter_cage", "gravity_sculk_sensor", "miners_dream" -> 15;
case "bile_bucket", "ichor_bucket", "antiwater_bucket", "cloud_bucket", "lumen_bucket" -> 16; case "bile_bucket", "ichor_bucket", "antiwater_bucket", "cloud_bucket", "lumen_bucket" -> 16;
@@ -101,7 +101,8 @@ public final class CreativeTabOrder {
"uranium_ingot", "titanium_ingot", "lucid_eye", "uranium_ingot", "titanium_ingot", "lucid_eye",
"mantis_claw", "hercules_horn", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear", "mantis_claw", "hercules_horn", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear",
"primordial_scute", "triffid_goo", "vortex_eye", "primordial_scute", "triffid_goo", "vortex_eye",
"king_scale", "queen_scale", "chiten", "stink_bug", "corn", "high_fructose_corn_syrup" -> 22; "king_scale", "queen_scale", "chiten", "jerry_nucleus", "carapace",
"stink_bug", "corn", "high_fructose_corn_syrup" -> 22;
case "reverie_bottle", "glimmer_bottle", "root_beer" -> 24; case "reverie_bottle", "glimmer_bottle", "root_beer" -> 24;
case "easter_bunny_spawn_egg", "flying_squirrel_spawn_egg", "caterpillar_spawn_egg", case "easter_bunny_spawn_egg", "flying_squirrel_spawn_egg", "caterpillar_spawn_egg",
"butterfly_spawn_egg", "reverie_spawn_egg", "brutalfly_spawn_egg", "butterfly_spawn_egg", "reverie_spawn_egg", "brutalfly_spawn_egg",
@@ -114,7 +115,7 @@ public final class CreativeTabOrder {
"nightmare_spawn_egg", "bed_bug_spawn_egg", "lucid_spawn_egg", "scorpion_spawn_egg", "nightmare_spawn_egg", "bed_bug_spawn_egg", "lucid_spawn_egg", "scorpion_spawn_egg",
"basilisk_spawn_egg", "emperor_scorpion_spawn_egg", "toreterror_spawn_egg", "basilisk_spawn_egg", "emperor_scorpion_spawn_egg", "toreterror_spawn_egg",
"dorrie_spawn_egg", "glimmer_spawn_egg", "ouranwood_deer_spawn_egg", "elka_spawn_egg", "dorrie_spawn_egg", "glimmer_spawn_egg", "ouranwood_deer_spawn_egg", "elka_spawn_egg",
"hercules_beetle_spawn_egg", "creeping_horror_spawn_egg", "lurking_terror_spawn_egg" -> 25; "hercules_beetle_spawn_egg", "creeping_horror_spawn_egg", "lurking_terror_spawn_egg", "jerry_spawn_egg" -> 25;
default -> 99; default -> 99;
}; };
} }
@@ -357,9 +358,11 @@ public final class CreativeTabOrder {
case "king_scale" -> 22; case "king_scale" -> 22;
case "queen_scale" -> 23; case "queen_scale" -> 23;
case "chiten" -> 24; case "chiten" -> 24;
case "stink_bug" -> 25; case "jerry_nucleus" -> 25;
case "corn" -> 26; case "carapace" -> 26;
case "high_fructose_corn_syrup" -> 27; case "stink_bug" -> 27;
case "corn" -> 28;
case "high_fructose_corn_syrup" -> 29;
default -> 0; default -> 0;
}; };
} }
@@ -26,7 +26,7 @@ public class BiowartTendrilsBlock extends BushBlock {
@Override @Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) { protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
return state.getBlock() instanceof BiowartBlock; return super.mayPlaceOn(state, level, pos);
} }
@Override @Override
@@ -1,8 +1,17 @@
package com.craisinlord.antarchy.content.block; package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import com.mojang.serialization.MapCodec; import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelAccessor;
@@ -18,18 +27,20 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
public class MetroidEggBlock extends Block { public class JerryEggBlock extends Block {
public static final MapCodec<MetroidEggBlock> CODEC = Block.simpleCodec(MetroidEggBlock::new); public static final MapCodec<JerryEggBlock> CODEC = Block.simpleCodec(JerryEggBlock::new);
public static final BooleanProperty ROTATED = BooleanProperty.create("rotated"); public static final BooleanProperty ROTATED = BooleanProperty.create("rotated");
private static final ResourceLocation JERRY_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "jerry");
private static final int HATCH_CHECK_INTERVAL = 1200;
private static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 0.0D, 15.0D, 16.0D, 16.0D); private static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 0.0D, 15.0D, 16.0D, 16.0D);
public MetroidEggBlock(BlockBehaviour.Properties properties) { public JerryEggBlock(BlockBehaviour.Properties properties) {
super(properties); super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(ROTATED, false)); this.registerDefaultState(this.stateDefinition.any().setValue(ROTATED, false));
} }
@Override @Override
public MapCodec<MetroidEggBlock> codec() { public MapCodec<JerryEggBlock> codec() {
return CODEC; return CODEC;
} }
@@ -65,6 +76,26 @@ public class MetroidEggBlock extends Block {
return state.canSurvive(level, pos) ? super.updateShape(state, direction, neighborState, level, pos, neighborPos) : Blocks.AIR.defaultBlockState(); return state.canSurvive(level, pos) ? super.updateShape(state, direction, neighborState, level, pos, neighborPos) : Blocks.AIR.defaultBlockState();
} }
@Override
protected boolean isRandomlyTicking(BlockState state) {
return true;
}
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (random.nextInt(HATCH_CHECK_INTERVAL) != 0) {
return;
}
EntityType<?> entityType = BuiltInRegistries.ENTITY_TYPE.get(JERRY_ID);
if (entityType.create(level) instanceof JerryEntity jerry) {
jerry.setStage(JerryEntity.Stage.INFANT);
jerry.moveTo(pos.getX() + 0.5D, pos.getY() + 0.15D, pos.getZ() + 0.5D, random.nextFloat() * 360.0F, 0.0F);
level.addFreshEntity(jerry);
level.destroyBlock(pos, false);
level.playSound(null, pos, SoundEvents.TURTLE_EGG_HATCH, SoundSource.HOSTILE, 0.8F, 0.8F + random.nextFloat() * 0.2F);
}
}
@Override @Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(ROTATED); builder.add(ROTATED);
@@ -40,8 +40,8 @@ public class JumpyBugEggBlock extends Block {
private static final double PLAYER_PROXIMITY_RADIUS = 12.0D; private static final double PLAYER_PROXIMITY_RADIUS = 12.0D;
private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F; private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F;
private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200; private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200;
private static final VoxelShape FLOOR_SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); private static final VoxelShape FLOOR_SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
private static final VoxelShape CEILING_SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); private static final VoxelShape CEILING_SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
private static final ResourceLocation JUMPY_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "jumpy_bug"); private static final ResourceLocation JUMPY_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "jumpy_bug");
public JumpyBugEggBlock(BlockBehaviour.Properties properties) { public JumpyBugEggBlock(BlockBehaviour.Properties properties) {
@@ -39,7 +39,7 @@ public class SpitBugEggBlock extends Block {
private static final double PLAYER_PROXIMITY_RADIUS = 12.0D; private static final double PLAYER_PROXIMITY_RADIUS = 12.0D;
private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F; private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F;
private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200; private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200;
private static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); private static final VoxelShape SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
private static final ResourceLocation SPIT_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "spit_bug"); private static final ResourceLocation SPIT_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "spit_bug");
public SpitBugEggBlock(BlockBehaviour.Properties properties) { public SpitBugEggBlock(BlockBehaviour.Properties properties) {
@@ -1,11 +1,20 @@
package com.craisinlord.antarchy.content.client; package com.craisinlord.antarchy.content.client;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public final class HordeClientState { public final class HordeClientState {
private static final ResourceKey<Level> CAVARYN = ResourceKey.create(
Registries.DIMENSION,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn")
);
private static float targetIntensity; private static float targetIntensity;
private static float intensity; private static float intensity;
@@ -22,7 +31,7 @@ public final class HordeClientState {
public static void tick() { public static void tick() {
Minecraft minecraft = Minecraft.getInstance(); Minecraft minecraft = Minecraft.getInstance();
if (minecraft.level == null || minecraft.player == null) { if (minecraft.level == null || minecraft.player == null || !minecraft.level.dimension().equals(CAVARYN)) {
targetIntensity = 0.0F; targetIntensity = 0.0F;
} }
@@ -1,16 +1,26 @@
package com.craisinlord.antarchy.content.client; package com.craisinlord.antarchy.content.client;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.level.Level;
public final class HordeHudRenderer { public final class HordeHudRenderer {
private static final ResourceKey<Level> CAVARYN = ResourceKey.create(
Registries.DIMENSION,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn")
);
private HordeHudRenderer() { private HordeHudRenderer() {
} }
public static void render(GuiGraphics guiGraphics) { public static void render(GuiGraphics guiGraphics) {
Minecraft minecraft = Minecraft.getInstance(); Minecraft minecraft = Minecraft.getInstance();
if (minecraft.player == null || minecraft.player.isDeadOrDying()) { if (minecraft.level == null || minecraft.player == null || minecraft.player.isDeadOrDying() || !minecraft.level.dimension().equals(CAVARYN)) {
return; return;
} }
@@ -0,0 +1,27 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class JerryModel extends GeoModel<JerryEntity> {
@Override
public ResourceLocation getModelResource(JerryEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/" + stageName(animatable) + "_jerry.geo.json");
}
@Override
public ResourceLocation getTextureResource(JerryEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/jerry/" + stageName(animatable) + "_jerry.png");
}
@Override
public ResourceLocation getAnimationResource(JerryEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/" + stageName(animatable) + "_jerry.animation.json");
}
private static String stageName(JerryEntity animatable) {
return animatable.getStage().getSerializedName();
}
}
@@ -0,0 +1,25 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.JerryModel;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class JerryRenderer extends GeoEntityRenderer<JerryEntity> {
public JerryRenderer(EntityRendererProvider.Context context) {
super(context, new JerryModel());
this.shadowRadius = 0.7F;
}
@Override
public RenderType getRenderType(JerryEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) {
JerryEntity.Stage stage = animatable.getStage();
return stage == JerryEntity.Stage.INFANT || stage == JerryEntity.Stage.MATURE
? RenderType.entityTranslucent(texture)
: RenderType.entityCutoutNoCull(texture);
}
}
@@ -8,18 +8,20 @@ import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.attributes.Attributes;
public final class GoopedMobEffect extends MobEffect { public final class GoopedMobEffect extends MobEffect {
private static final double SLOWDOWN_PER_LEVEL = -0.3D;
public GoopedMobEffect() { public GoopedMobEffect() {
super(MobEffectCategory.HARMFUL, 0x32B84E); super(MobEffectCategory.HARMFUL, 0x32B84E);
this.addAttributeModifier( this.addAttributeModifier(
Attributes.ATTACK_SPEED, Attributes.ATTACK_SPEED,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "gooped_attack_speed"), ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "gooped_attack_speed"),
-0.3D, SLOWDOWN_PER_LEVEL,
AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL
); );
this.addAttributeModifier( this.addAttributeModifier(
Attributes.MOVEMENT_SPEED, Attributes.MOVEMENT_SPEED,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "gooped_movement_speed"), ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "gooped_movement_speed"),
-0.3D, SLOWDOWN_PER_LEVEL,
AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL
); );
} }
@@ -0,0 +1,39 @@
package com.craisinlord.antarchy.content.entity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
public final class CavarynBurrowingMobBehavior {
private static final int MAX_UPWARD_SEARCH = 8;
private CavarynBurrowingMobBehavior() {
}
public static void moveOutOfBlocks(Mob mob) {
if (!(mob.level() instanceof ServerLevel level) || !mob.isAlive()) {
return;
}
AABB box = mob.getBoundingBox();
if (level.noCollision(mob, box)) {
return;
}
double startY = mob.getY();
for (int offset = 1; offset <= MAX_UPWARD_SEARCH; offset++) {
double candidateY = Math.floor(startY) + offset;
AABB candidateBox = box.move(0.0D, candidateY - startY, 0.0D);
if (!level.noCollision(mob, candidateBox)) {
continue;
}
mob.setPos(mob.getX(), candidateY, mob.getZ());
Vec3 motion = mob.getDeltaMovement();
mob.setDeltaMovement(motion.x, Math.max(0.0D, motion.y), motion.z);
mob.fallDistance = 0.0F;
mob.getNavigation().stop();
return;
}
}
}
@@ -169,7 +169,9 @@ public class CreepingHorrorEntity extends Monster implements GeoEntity {
@Override @Override
public void tick() { public void tick() {
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
super.tick(); super.tick();
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
if (attackAnimTicks > 0) attackAnimTicks--; if (attackAnimTicks > 0) attackAnimTicks--;
if (this.level().isClientSide()) return; if (this.level().isClientSide()) return;
@@ -194,4 +196,9 @@ public class CreepingHorrorEntity extends Monster implements GeoEntity {
this.getNavigation().stop(); this.getNavigation().stop();
} }
} }
@Override
public boolean isInWall() {
return false;
}
} }
@@ -275,7 +275,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
@Override @Override
public void tick() { public void tick() {
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
super.tick(); super.tick();
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
if (this.level().isClientSide) { if (this.level().isClientSide) {
return; return;
@@ -322,10 +324,6 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.5F, 0.85F + this.random.nextFloat() * 0.1F); this.playSound(AntarchySoundEvents.MANTIS_FLY_LOOP.get(), 0.5F, 0.85F + this.random.nextFloat() * 0.1F);
} }
if (!this.level().isClientSide && !this.isKnockedDown() && this.isInWall()) {
this.breakBlocksForSuffocation();
}
if (this.isKnockedDown()) { if (this.isKnockedDown()) {
this.tickKnockedDown(); this.tickKnockedDown();
} else if (this.chargeTicksRemaining > 0 || this.getAnimationState() == ANIM_CHARGE) { } else if (this.chargeTicksRemaining > 0 || this.getAnimationState() == ANIM_CHARGE) {
@@ -1058,6 +1056,11 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
return false; return false;
} }
@Override
public boolean isInWall() {
return false;
}
@Override @Override
protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) { protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) {
} }
@@ -1079,8 +1082,8 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
@Override @Override
public boolean canAttack(LivingEntity target) { public boolean canAttack(LivingEntity target) {
if (this.isTame() && target instanceof Player) { if (target instanceof Player player) {
return false; return !this.isTame() && !player.isCreative() && !player.isSpectator() && super.canAttack(target);
} }
return super.canAttack(target); return super.canAttack(target);
} }
@@ -1226,13 +1229,18 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
public boolean canUse() { public boolean canUse() {
return !HerculesBeetleEntity.this.isTame() return !HerculesBeetleEntity.this.isTame()
&& !HerculesBeetleEntity.this.isKnockedDown() && !HerculesBeetleEntity.this.isKnockedDown()
&& HerculesBeetleEntity.this.getTarget() != null; && HerculesBeetleEntity.this.getTarget() != null
&& HerculesBeetleEntity.this.canAttack(HerculesBeetleEntity.this.getTarget());
} }
@Override @Override
public boolean canContinueToUse() { public boolean canContinueToUse() {
LivingEntity target = HerculesBeetleEntity.this.getTarget(); LivingEntity target = HerculesBeetleEntity.this.getTarget();
return target != null && target.isAlive() && !HerculesBeetleEntity.this.isTame() && !HerculesBeetleEntity.this.isKnockedDown(); return target != null
&& target.isAlive()
&& !HerculesBeetleEntity.this.isTame()
&& !HerculesBeetleEntity.this.isKnockedDown()
&& HerculesBeetleEntity.this.canAttack(target);
} }
@Override @Override
@@ -1241,6 +1249,11 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
if (target == null) { if (target == null) {
return; return;
} }
if (!HerculesBeetleEntity.this.canAttack(target)) {
HerculesBeetleEntity.this.setTarget(null);
HerculesBeetleEntity.this.getNavigation().stop();
return;
}
HerculesBeetleEntity.this.getLookControl().setLookAt(target, 30.0F, 20.0F); HerculesBeetleEntity.this.getLookControl().setLookAt(target, 30.0F, 20.0F);
@@ -0,0 +1,428 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.ByIdMap;
import net.minecraft.util.Mth;
import net.minecraft.util.StringRepresentable;
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.entity.SpawnGroupData;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
import net.minecraft.world.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.animatable.GeoEntity;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.animation.AnimationController;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
import java.util.Locale;
import java.util.Objects;
import java.util.function.IntFunction;
public class JerryEntity extends Monster implements GeoEntity {
private static final EntityDataAccessor<Integer> STAGE =
SynchedEntityData.defineId(JerryEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Integer> ATTACK_ANIM_TICKS =
SynchedEntityData.defineId(JerryEntity.class, EntityDataSerializers.INT);
private static final String STAGE_KEY = "JerryStage";
private static final String STAGE_AGE_KEY = "JerryStageAge";
private static final int GROWTH_TICKS = 24000;
private static final int ATTACH_DAMAGE_INTERVAL = 20;
private static final int ATTACK_ANIM_DURATION = 16;
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation FLOAT_ANIM = RawAnimation.begin().thenLoop("float");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenPlay("attack");
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private int stageAgeTicks;
private int attachDamageTicks;
private int attackCooldownTicks;
public JerryEntity(EntityType<? extends JerryEntity> entityType, Level level) {
super(entityType, level);
this.xpReward = 12;
}
public static AttributeSupplier.Builder createAttributes() {
return Mob.createMobAttributes()
.add(Attributes.MAX_HEALTH, AntarchySettings.jerryInfantHealth())
.add(Attributes.MOVEMENT_SPEED, 0.36D)
.add(Attributes.ATTACK_DAMAGE, AntarchySettings.jerryInfantAttackDamage())
.add(Attributes.FOLLOW_RANGE, 28.0D)
.add(Attributes.FLYING_SPEED, 0.45D);
}
public static boolean canSpawn(EntityType<JerryEntity> entityType, ServerLevelAccessor level, MobSpawnType spawnReason, net.minecraft.core.BlockPos pos, net.minecraft.util.RandomSource random) {
if (spawnReason == MobSpawnType.SPAWN_EGG || spawnReason == MobSpawnType.SPAWNER || spawnReason == MobSpawnType.COMMAND) {
return true;
}
return level.getDifficulty() != Difficulty.PEACEFUL
&& Mob.checkMobSpawnRules(entityType, level, spawnReason, pos, random)
&& level.getMaxLocalRawBrightness(pos) <= 2;
}
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
builder.define(STAGE, Stage.INFANT.id());
builder.define(ATTACK_ANIM_TICKS, 0);
}
@Override
protected void registerGoals() {
this.goalSelector.addGoal(1, new GammaMeleeGoal());
this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 12.0F));
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
}
@Override
@Nullable
public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData spawnGroupData) {
if (spawnReason == MobSpawnType.SPAWN_EGG) {
this.setStage(this.random.nextBoolean() ? Stage.ALPHA : Stage.GAMMA);
}
this.applyStageAttributes(this.getStage(), true);
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
}
@Override
public void tick() {
super.tick();
if (this.getStage() == Stage.GAMMA) {
this.setNoGravity(false);
} else {
this.setNoGravity(true);
this.fallDistance = 0.0F;
}
int attackTicks = this.entityData.get(ATTACK_ANIM_TICKS);
if (attackTicks > 0) {
this.entityData.set(ATTACK_ANIM_TICKS, attackTicks - 1);
}
if (this.level().isClientSide) {
return;
}
this.tickGrowth();
if (this.attackCooldownTicks > 0) {
this.attackCooldownTicks--;
}
Stage stage = this.getStage();
if (stage == Stage.INFANT || stage == Stage.MATURE) {
this.tickAttachedForm(stage);
} else if (stage == Stage.ALPHA) {
this.tickAlpha();
}
}
private void tickGrowth() {
Stage stage = this.getStage();
if (stage == Stage.ALPHA || stage == Stage.GAMMA) {
return;
}
this.stageAgeTicks++;
if (this.stageAgeTicks < GROWTH_TICKS) {
return;
}
this.stageAgeTicks = 0;
this.setStage(stage == Stage.INFANT ? Stage.MATURE : (this.random.nextBoolean() ? Stage.ALPHA : Stage.GAMMA));
}
private void tickAttachedForm(Stage stage) {
LivingEntity target = this.getTarget();
if (target == null || !target.isAlive()) {
this.drift();
return;
}
Vec3 targetPos = target.getEyePosition().add(0.0D, -0.15D, 0.0D);
Vec3 toTarget = targetPos.subtract(this.position());
double distance = toTarget.length();
if (distance > 0.01D) {
Vec3 motion = toTarget.normalize().scale(stage == Stage.INFANT ? 0.16D : 0.19D);
this.setDeltaMovement(this.getDeltaMovement().scale(0.55D).add(motion));
}
if (distance < 1.15D) {
this.setPos(targetPos.x, targetPos.y, targetPos.z);
this.setDeltaMovement(Vec3.ZERO);
if (++this.attachDamageTicks >= ATTACH_DAMAGE_INTERVAL) {
this.attachDamageTicks = 0;
target.hurt(this.damageSources().mobAttack(this), (float) stage.attackDamage());
}
} else {
this.attachDamageTicks = 0;
}
}
private void tickAlpha() {
LivingEntity target = this.getTarget();
if (target == null || !target.isAlive()) {
this.drift();
return;
}
Stage stage = this.getStage();
Vec3 targetPos = target.getEyePosition().add(0.0D, -0.35D, 0.0D);
Vec3 toTarget = targetPos.subtract(this.position());
double distance = toTarget.length();
this.faceTarget(target);
if (distance > 0.01D) {
this.setDeltaMovement(this.getDeltaMovement().scale(0.65D).add(toTarget.normalize().scale(0.22D)));
}
if (distance < 2.1D && this.attackCooldownTicks <= 0) {
this.faceTarget(target);
this.attackCooldownTicks = 24;
this.entityData.set(ATTACK_ANIM_TICKS, ATTACK_ANIM_DURATION);
target.hurt(this.damageSources().mobAttack(this), (float) stage.attackDamage());
}
}
private void faceTarget(LivingEntity target) {
Vec3 toTarget = target.position().subtract(this.position());
if (toTarget.horizontalDistanceSqr() <= 0.0001D) {
return;
}
float targetYaw = (float) (Mth.atan2(toTarget.z, toTarget.x) * (180.0F / Math.PI)) - 90.0F;
this.setYRot(Mth.approachDegrees(this.getYRot(), targetYaw, 30.0F));
this.yBodyRot = this.getYRot();
this.yHeadRot = this.getYRot();
this.getLookControl().setLookAt(target, 30.0F, 30.0F);
}
private void drift() {
if (this.tickCount % 45 == 0) {
this.setDeltaMovement(
(this.random.nextDouble() - 0.5D) * 0.12D,
(this.random.nextDouble() - 0.5D) * 0.08D,
(this.random.nextDouble() - 0.5D) * 0.12D
);
}
}
@Override
public boolean doHurtTarget(Entity target) {
this.entityData.set(ATTACK_ANIM_TICKS, ATTACK_ANIM_DURATION);
if (target instanceof LivingEntity living) {
this.faceTarget(living);
}
return target instanceof LivingEntity living
? living.hurt(this.damageSources().mobAttack(this), (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE))
: super.doHurtTarget(target);
}
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
if (this.isAdultStage() && stack.getItem() instanceof SpawnEggItem spawnEggItem && spawnEggItem.getType(stack) == this.getType()) {
if (this.level() instanceof ServerLevel serverLevel && this.getType().create(serverLevel) instanceof JerryEntity infant) {
infant.setStage(Stage.INFANT);
infant.moveTo(this.getX(), this.getY(), this.getZ(), this.random.nextFloat() * 360.0F, 0.0F);
infant.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(infant.blockPosition()), MobSpawnType.MOB_SUMMONED, null);
serverLevel.addFreshEntity(infant);
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
}
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
return super.mobInteract(player, hand);
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "main_controller", 3, this::mainAnimController));
controllers.add(new AnimationController<>(this, "attack_controller", 0, this::attackAnimController));
}
private PlayState mainAnimController(AnimationState<JerryEntity> state) {
Stage stage = this.getStage();
if (stage == Stage.GAMMA) {
return state.setAndContinue(state.isMoving() ? WALK_ANIM : IDLE_ANIM);
}
if (stage == Stage.ALPHA && this.entityData.get(ATTACK_ANIM_TICKS) > 0) {
return state.setAndContinue(ATTACK_ANIM);
}
if (stage == Stage.ALPHA) {
return state.setAndContinue(state.isMoving() ? FLOAT_ANIM : IDLE_ANIM);
}
return state.setAndContinue(IDLE_ANIM);
}
private PlayState attackAnimController(AnimationState<JerryEntity> state) {
if (this.getStage() == Stage.GAMMA && this.entityData.get(ATTACK_ANIM_TICKS) > 0) {
return state.setAndContinue(ATTACK_ANIM);
}
return PlayState.STOP;
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
@Override
public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) {
return false;
}
@Override
protected void checkFallDamage(double y, boolean onGround, BlockState state, net.minecraft.core.BlockPos pos) {
}
@Override
public void addAdditionalSaveData(CompoundTag tag) {
super.addAdditionalSaveData(tag);
tag.putString(STAGE_KEY, this.getStage().getSerializedName());
tag.putInt(STAGE_AGE_KEY, this.stageAgeTicks);
}
@Override
public void readAdditionalSaveData(CompoundTag tag) {
super.readAdditionalSaveData(tag);
this.setStage(Stage.byName(tag.getString(STAGE_KEY)));
this.stageAgeTicks = tag.getInt(STAGE_AGE_KEY);
this.applyStageAttributes(this.getStage(), false);
}
public Stage getStage() {
return Stage.byId(this.entityData.get(STAGE));
}
public void setStage(Stage stage) {
Stage previous = this.getStage();
this.entityData.set(STAGE, stage.id());
this.applyStageAttributes(stage, true);
if (previous != stage) {
this.stageAgeTicks = 0;
this.refreshDimensions();
}
}
private void applyStageAttributes(Stage stage, boolean fillIfNew) {
double oldMaxHealth = this.getMaxHealth();
float healthRatio = oldMaxHealth > 0.0D ? this.getHealth() / (float) oldMaxHealth : 1.0F;
Objects.requireNonNull(this.getAttribute(Attributes.MAX_HEALTH)).setBaseValue(stage.maxHealth());
Objects.requireNonNull(this.getAttribute(Attributes.ATTACK_DAMAGE)).setBaseValue(stage.attackDamage());
if (fillIfNew && this.getHealth() <= 0.0F) {
this.setHealth(this.getMaxHealth());
} else {
this.setHealth(Mth.clamp((float) (this.getMaxHealth() * healthRatio), 1.0F, this.getMaxHealth()));
}
}
private boolean isAdultStage() {
Stage stage = this.getStage();
return stage == Stage.ALPHA || stage == Stage.GAMMA;
}
private class GammaMeleeGoal extends MeleeAttackGoal {
GammaMeleeGoal() {
super(JerryEntity.this, 1.35D, false);
}
@Override
public boolean canUse() {
return JerryEntity.this.getStage() == Stage.GAMMA && super.canUse();
}
@Override
public boolean canContinueToUse() {
return JerryEntity.this.getStage() == Stage.GAMMA && super.canContinueToUse();
}
}
public enum Stage implements StringRepresentable {
INFANT(0, "infant"),
MATURE(1, "mature"),
ALPHA(2, "alpha"),
GAMMA(3, "gamma");
private static final IntFunction<Stage> BY_ID = ByIdMap.continuous(Stage::id, values(), ByIdMap.OutOfBoundsStrategy.ZERO);
private final int id;
private final String name;
Stage(int id, String name) {
this.id = id;
this.name = name;
}
public int id() {
return this.id;
}
public double maxHealth() {
return switch (this) {
case INFANT -> AntarchySettings.jerryInfantHealth();
case MATURE -> AntarchySettings.jerryMatureHealth();
case ALPHA -> AntarchySettings.jerryAlphaHealth();
case GAMMA -> AntarchySettings.jerryGammaHealth();
};
}
public double attackDamage() {
return switch (this) {
case INFANT -> AntarchySettings.jerryInfantAttackDamage();
case MATURE -> AntarchySettings.jerryMatureAttackDamage();
case ALPHA -> AntarchySettings.jerryAlphaAttackDamage();
case GAMMA -> AntarchySettings.jerryGammaAttackDamage();
};
}
public static Stage byId(int id) {
return BY_ID.apply(id);
}
public static Stage byName(String name) {
for (Stage stage : values()) {
if (stage.name.equals(name.toLowerCase(Locale.ROOT))) {
return stage;
}
}
return INFANT;
}
@Override
public String getSerializedName() {
return this.name;
}
}
}
@@ -190,7 +190,9 @@ public class JumpyBugEntity extends Monster implements GeoEntity {
this.visualAlpha += (targetAlpha - this.visualAlpha) * 0.25F; this.visualAlpha += (targetAlpha - this.visualAlpha) * 0.25F;
} }
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
super.tick(); super.tick();
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
if (this.level().isClientSide) { if (this.level().isClientSide) {
return; return;
@@ -226,6 +228,11 @@ public class JumpyBugEntity extends Monster implements GeoEntity {
this.updateCamouflage(); this.updateCamouflage();
} }
@Override
public boolean isInWall() {
return false;
}
@Override @Override
public void travel(Vec3 travelVector) { public void travel(Vec3 travelVector) {
if (this.isClingingToCeiling()) { if (this.isClingingToCeiling()) {
@@ -163,13 +163,20 @@ public class LurkingTerrorEntity extends Monster implements GeoEntity {
@Override @Override
public void tick() { public void tick() {
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
super.tick(); super.tick();
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
if (!this.level().isClientSide() && !this.onGround() && this.tickCount % 80 == 0) { if (!this.level().isClientSide() && !this.onGround() && this.tickCount % 80 == 0) {
this.playSound(AntarchySoundEvents.LURKING_TERROR_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F); this.playSound(AntarchySoundEvents.LURKING_TERROR_FLY_LOOP.get(), 0.45F, 0.95F + this.random.nextFloat() * 0.1F);
} }
if (!this.level().isClientSide() && attackAnimTicks > 0) attackAnimTicks--; if (!this.level().isClientSide() && attackAnimTicks > 0) attackAnimTicks--;
} }
@Override
public boolean isInWall() {
return false;
}
@Override @Override
public boolean causeFallDamage(float fallDistance, float multiplier, net.minecraft.world.damagesource.DamageSource source) { public boolean causeFallDamage(float fallDistance, float multiplier, net.minecraft.world.damagesource.DamageSource source) {
return false; return false;
@@ -125,7 +125,9 @@ public class SpitBugEntity extends Monster implements GeoEntity {
@Override @Override
public void tick() { public void tick() {
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
super.tick(); super.tick();
CavarynBurrowingMobBehavior.moveOutOfBlocks(this);
if (this.level().isClientSide) { if (this.level().isClientSide) {
return; return;
} }
@@ -143,6 +145,11 @@ public class SpitBugEntity extends Monster implements GeoEntity {
} }
} }
@Override
public boolean isInWall() {
return false;
}
@Override @Override
public boolean doHurtTarget(net.minecraft.world.entity.Entity target) { public boolean doHurtTarget(net.minecraft.world.entity.Entity target) {
boolean hurt = target instanceof LivingEntity livingTarget && this.level() instanceof ServerLevel serverLevel boolean hurt = target instanceof LivingEntity livingTarget && this.level() instanceof ServerLevel serverLevel
@@ -0,0 +1,261 @@
package com.craisinlord.antarchy.content.horde;
import com.craisinlord.antarchy.Antarchy;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderSet;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.packs.resources.Resource;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.Difficulty;
import net.minecraft.world.entity.EntityType;
public final class CavarynHordeDefinitions {
private static final String DIRECTORY = "cavaryn_hordes";
private static ResourceManager cachedManager;
private static Map<ResourceLocation, Definition> definitions = Map.of();
private static Set<EntityType<?>> configuredTypes = Set.of();
private CavarynHordeDefinitions() {
}
public static Definition get(ServerLevel level, ResourceLocation id) {
reloadIfNeeded(level.getServer().getResourceManager());
return definitions.getOrDefault(id, Definition.EMPTY);
}
public static boolean isConfiguredHordeType(ServerLevel level, EntityType<?> type) {
reloadIfNeeded(level.getServer().getResourceManager());
return configuredTypes.contains(type);
}
private static void reloadIfNeeded(ResourceManager manager) {
if (cachedManager == manager) {
return;
}
Map<ResourceLocation, Definition> loaded = new HashMap<>();
manager.listResources(DIRECTORY, location -> location.getPath().endsWith(".json")).forEach((location, resource) -> {
String path = location.getPath();
String idPath = path.substring((DIRECTORY + "/").length(), path.length() - ".json".length());
ResourceLocation id = ResourceLocation.fromNamespaceAndPath(location.getNamespace(), idPath);
try {
loaded.put(id, Definition.fromJson(resource));
} catch (Exception exception) {
Antarchy.LOGGER.warn("Failed to load Cavaryn horde definition {}", location, exception);
}
});
Set<EntityType<?>> types = new HashSet<>();
for (Definition definition : loaded.values()) {
definition.addTypesTo(types);
}
definitions = Map.copyOf(loaded);
configuredTypes = Set.copyOf(types);
cachedManager = manager;
}
public record Definition(int maxActive, List<Entry> entries) {
private static final Definition EMPTY = new Definition(0, List.of());
private static Definition fromJson(Resource resource) throws Exception {
try (Reader reader = resource.openAsReader()) {
JsonObject json = JsonParser.parseReader(reader).getAsJsonObject();
int maxActive = getInt(json, "max_active", 0);
JsonArray rawEntries = json.getAsJsonArray("entries");
if (rawEntries == null) {
return new Definition(maxActive, List.of());
}
List<Entry> entries = new ArrayList<>();
for (JsonElement rawEntry : rawEntries) {
if (rawEntry.isJsonObject()) {
Entry entry = Entry.fromJson(rawEntry.getAsJsonObject());
if (entry != null) {
entries.add(entry);
}
}
}
return new Definition(maxActive, List.copyOf(entries));
}
}
public int resolvedMaxActive(ServerLevel level, int fallback) {
return this.maxActive > 0 ? scaleSpawnCount(level, this.maxActive) : fallback;
}
public List<SpawnChoice> buildSpawnList(ServerLevel level, int players, boolean highAttention, RandomSource random) {
if (level.getDifficulty() == Difficulty.PEACEFUL || this.entries.isEmpty()) {
return List.of();
}
List<SpawnChoice> choices = new ArrayList<>();
for (Entry entry : this.entries) {
int count = entry.count(players, highAttention);
count = scaleSpawnCount(level, count);
for (int i = 0; i < count; i++) {
EntityType<?> type = entry.randomType(random);
if (type != null) {
choices.add(new SpawnChoice(type, entry.trackCompletion, entry.heavyArrivalEffect));
}
}
}
Collections.shuffle(choices);
return choices;
}
public boolean shouldWarn() {
for (Entry entry : this.entries) {
if (entry.warning) {
return true;
}
}
return false;
}
private void addTypesTo(Set<EntityType<?>> types) {
for (Entry entry : this.entries) {
entry.addTypesTo(types);
}
}
}
public record SpawnChoice(EntityType<?> type, boolean trackCompletion, boolean heavyArrivalEffect) {
}
private static final class Entry {
private final TagKey<EntityType<?>> entityTag;
private final int weight;
private final int baseCount;
private final int highAttentionBaseCount;
private final int perPlayerCount;
private final int perPlayers;
private final int perPlayersCount;
private final int minCount;
private final int maxCount;
private final boolean warning;
private final boolean trackCompletion;
private final boolean heavyArrivalEffect;
private Entry(TagKey<EntityType<?>> entityTag, int weight, int baseCount, int highAttentionBaseCount, int perPlayerCount,
int perPlayers, int perPlayersCount, int minCount, int maxCount, boolean warning,
boolean trackCompletion, boolean heavyArrivalEffect) {
this.entityTag = entityTag;
this.weight = Math.max(1, weight);
this.baseCount = baseCount;
this.highAttentionBaseCount = highAttentionBaseCount;
this.perPlayerCount = perPlayerCount;
this.perPlayers = perPlayers;
this.perPlayersCount = perPlayersCount;
this.minCount = minCount;
this.maxCount = maxCount;
this.warning = warning;
this.trackCompletion = trackCompletion;
this.heavyArrivalEffect = heavyArrivalEffect;
}
private static Entry fromJson(JsonObject json) {
String tagId = getString(json, "entity_tag", "");
ResourceLocation tagLocation = ResourceLocation.tryParse(tagId);
if (tagLocation == null) {
Antarchy.LOGGER.warn("Skipping Cavaryn horde entry with invalid entity_tag '{}'", tagId);
return null;
}
return new Entry(
TagKey.create(Registries.ENTITY_TYPE, tagLocation),
getInt(json, "weight", 1),
getInt(json, "base_count", 0),
getInt(json, "high_attention_base_count", -1),
getInt(json, "per_player_count", 0),
getInt(json, "per_players", 0),
getInt(json, "per_players_count", 1),
getInt(json, "min_count", 0),
getInt(json, "max_count", Integer.MAX_VALUE),
getBoolean(json, "warning", false),
getBoolean(json, "track_completion", false),
getBoolean(json, "heavy_arrival_effect", false)
);
}
private int count(int players, boolean highAttention) {
int count = highAttention && this.highAttentionBaseCount >= 0 ? this.highAttentionBaseCount : this.baseCount;
count += this.perPlayerCount * Math.max(0, players);
if (this.perPlayers > 0) {
count += (Math.max(0, players) / this.perPlayers) * this.perPlayersCount;
}
count = Math.max(this.minCount, count);
return Math.min(this.maxCount, count);
}
private EntityType<?> randomType(RandomSource random) {
Optional<HolderSet.Named<EntityType<?>>> tag = BuiltInRegistries.ENTITY_TYPE.getTag(this.entityTag);
if (tag.isEmpty()) {
return null;
}
List<EntityType<?>> weightedTypes = new ArrayList<>();
for (Holder<EntityType<?>> holder : tag.get()) {
EntityType<?> type = holder.value();
for (int i = 0; i < this.weight; i++) {
weightedTypes.add(type);
}
}
if (weightedTypes.isEmpty()) {
return null;
}
return weightedTypes.get(random.nextInt(weightedTypes.size()));
}
private void addTypesTo(Set<EntityType<?>> types) {
Optional<HolderSet.Named<EntityType<?>>> tag = BuiltInRegistries.ENTITY_TYPE.getTag(this.entityTag);
tag.ifPresent(entityTypes -> {
for (Holder<EntityType<?>> holder : entityTypes) {
types.add(holder.value());
}
});
}
}
private static int scaleSpawnCount(ServerLevel level, int baseCount) {
if (baseCount <= 0 || level.getDifficulty() == Difficulty.PEACEFUL) {
return 0;
}
float multiplier = switch (level.getDifficulty()) {
case PEACEFUL -> 0.0F;
case EASY -> 0.65F;
case NORMAL -> 1.0F;
case HARD -> 1.35F;
};
return Math.max(1, Mth.ceil(baseCount * multiplier));
}
private static String getString(JsonObject json, String key, String fallback) {
return json.has(key) ? json.get(key).getAsString() : fallback;
}
private static int getInt(JsonObject json, String key, int fallback) {
return json.has(key) ? json.get(key).getAsInt() : fallback;
}
private static boolean getBoolean(JsonObject json, String key, boolean fallback) {
return json.has(key) ? json.get(key).getAsBoolean() : fallback;
}
}
@@ -48,11 +48,12 @@ public final class CavarynHordeManager {
Registries.DIMENSION, Registries.DIMENSION,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn") ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn")
); );
private static final ResourceLocation JUMPY_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "jumpy_bug"); private static final ResourceLocation DORMANT_HORDE = hordeId("dormant");
private static final ResourceLocation SPIT_BUG_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "spit_bug"); private static final ResourceLocation AWAKENING_HORDE = hordeId("awakening");
private static final ResourceLocation CREEPING_HORROR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "creeping_horror"); private static final ResourceLocation WAVE_ONE_HORDE = hordeId("wave_1");
private static final ResourceLocation LURKING_TERROR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "lurking_terror"); private static final ResourceLocation WAVE_TWO_HORDE = hordeId("wave_2");
private static final ResourceLocation HERCULES_BEETLE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "hercules_beetle"); private static final ResourceLocation WAVE_THREE_HORDE = hordeId("wave_3");
private static final ResourceLocation FINAL_HORDE = hordeId("final");
private static final String DATA_ID = "antarchy_cavaryn_hordes"; private static final String DATA_ID = "antarchy_cavaryn_hordes";
private static final int GROUP_RADIUS_BLOCKS = 128; private static final int GROUP_RADIUS_BLOCKS = 128;
@@ -60,6 +61,7 @@ public final class CavarynHordeManager {
private static final int STALE_ATTENTION_PRUNE_TICKS = 20 * 60 * 20; private static final int STALE_ATTENTION_PRUNE_TICKS = 20 * 60 * 20;
private static final int PLAYER_CHECK_INTERVAL = 20; private static final int PLAYER_CHECK_INTERVAL = 20;
private static final int AREA_ATTENTION_INTERVAL = 20 * 45; private static final int AREA_ATTENTION_INTERVAL = 20 * 45;
private static final int DORMANT_ATTENTION_DECAY_INTERVAL = 20 * 15;
private static final int DORMANT_MIN_SPAWN_INTERVAL = 20 * 50; private static final int DORMANT_MIN_SPAWN_INTERVAL = 20 * 50;
private static final int DORMANT_RANDOM_SPAWN_INTERVAL = 20 * 35; private static final int DORMANT_RANDOM_SPAWN_INTERVAL = 20 * 35;
private static final int AWAKENING_SKIRMISH_INTERVAL = 20 * 8; private static final int AWAKENING_SKIRMISH_INTERVAL = 20 * 8;
@@ -162,9 +164,16 @@ public final class CavarynHordeManager {
UUID uuid = player.getUUID(); UUID uuid = player.getUUID();
seen.add(uuid); seen.add(uuid);
PlayerAttention attention = data.players.computeIfAbsent(uuid, ignored -> new PlayerAttention()); PlayerAttention attention = data.players.computeIfAbsent(uuid, ignored -> new PlayerAttention());
if (!player.isAlive()) {
attention.fade(10);
data.setDirty();
HordeIntensitySync.send(player, 0.0F);
continue;
}
boolean inHordeBiome = isHordeBiome(level, player.blockPosition()); boolean inHordeBiome = isHordeBiome(level, player.blockPosition());
if (!inHordeBiome) { if (!inHordeBiome) {
attention.fade(6); attention.fade(10);
data.setDirty(); data.setDirty();
HordeIntensitySync.send(player, 0.0F); HordeIntensitySync.send(player, 0.0F);
continue; continue;
@@ -176,7 +185,7 @@ public final class CavarynHordeManager {
if (attention.areaKey != currentArea) { if (attention.areaKey != currentArea) {
attention.areaKey = currentArea; attention.areaKey = currentArea;
attention.areaTicks = 0; attention.areaTicks = 0;
attention.fade(4); attention.fade(8);
data.setDirty(); data.setDirty();
} else if (!isPlayerInActiveEncounter(level, player)) { } else if (!isPlayerInActiveEncounter(level, player)) {
attention.areaTicks += PLAYER_CHECK_INTERVAL; attention.areaTicks += PLAYER_CHECK_INTERVAL;
@@ -184,6 +193,9 @@ public final class CavarynHordeManager {
attention.areaTicks = 0; attention.areaTicks = 0;
attention.add(6); attention.add(6);
data.setDirty(); data.setDirty();
} else if (gameTime % DORMANT_ATTENTION_DECAY_INTERVAL == 0L) {
attention.fade(1);
data.setDirty();
} }
} }
@@ -200,7 +212,7 @@ public final class CavarynHordeManager {
for (Map.Entry<UUID, PlayerAttention> entry : data.players.entrySet()) { for (Map.Entry<UUID, PlayerAttention> entry : data.players.entrySet()) {
if (!seen.contains(entry.getKey())) { if (!seen.contains(entry.getKey())) {
entry.getValue().fade(2); entry.getValue().fade(4);
} }
} }
} }
@@ -260,19 +272,17 @@ public final class CavarynHordeManager {
return; return;
} }
CavarynHordeDefinitions.Definition definition = CavarynHordeDefinitions.get(level, DORMANT_HORDE);
int existing = countNearbyDirectHordeMobs(level, player.blockPosition(), 48.0D); int existing = countNearbyDirectHordeMobs(level, player.blockPosition(), 48.0D);
if (existing >= scaleSpawnCount(level, MAX_DORMANT_MOBS_PER_AREA)) { if (existing >= definition.resolvedMaxActive(level, scaleSpawnCount(level, MAX_DORMANT_MOBS_PER_AREA))) {
data.areaSpawnCooldowns.put(areaKey, gameTime + DORMANT_MIN_SPAWN_INTERVAL); data.areaSpawnCooldowns.put(areaKey, gameTime + DORMANT_MIN_SPAWN_INTERVAL);
data.setDirty(); data.setDirty();
return; return;
} }
int count = scaleSpawnCount(level, attention.attention >= ATTENTION_THRESHOLD * 2 / 3 ? 2 : 1); boolean highAttention = attention.attention >= ATTENTION_THRESHOLD * 2 / 3;
for (int i = 0; i < count; i++) { for (CavarynHordeDefinitions.SpawnChoice choice : definition.buildSpawnList(level, 1, highAttention, level.random)) {
EntityType<?> type = level.random.nextBoolean() ? creepingHorrorType() : lurkingTerrorType(); spawnDirectMob(level, null, choice, player);
if (type != null) {
spawnDirectMob(level, null, type, player);
}
} }
data.areaSpawnCooldowns.put(areaKey, gameTime + DORMANT_MIN_SPAWN_INTERVAL + level.random.nextInt(DORMANT_RANDOM_SPAWN_INTERVAL)); data.areaSpawnCooldowns.put(areaKey, gameTime + DORMANT_MIN_SPAWN_INTERVAL + level.random.nextInt(DORMANT_RANDOM_SPAWN_INTERVAL));
data.setDirty(); data.setDirty();
@@ -336,16 +346,15 @@ public final class CavarynHordeManager {
return; return;
} }
List<EntityType<?>> types = new ArrayList<>(); List<CavarynHordeDefinitions.SpawnChoice> choices = CavarynHordeDefinitions.get(level, AWAKENING_HORDE)
addCommon(types, scaleSpawnCount(level, 2 + players)); .buildSpawnList(level, players, false, level.random);
addRepeated(types, spitBugType(), scaleSpawnCount(level, Math.max(1, players)));
int spawned = 0; int spawned = 0;
for (EntityType<?> type : types) { for (CavarynHordeDefinitions.SpawnChoice choice : choices) {
if (spawned >= capacity || type == null) { if (spawned >= capacity) {
break; break;
} }
ServerPlayer target = targets.get(level.random.nextInt(targets.size())); ServerPlayer target = targets.get(level.random.nextInt(targets.size()));
if (spawnDirectMob(level, encounter, type, target)) { if (spawnDirectMob(level, encounter, choice, target)) {
spawned++; spawned++;
} }
} }
@@ -362,39 +371,26 @@ public final class CavarynHordeManager {
return; return;
} }
List<EntityType<?>> types = new ArrayList<>(); CavarynHordeDefinitions.Definition definition = CavarynHordeDefinitions.get(level, hordeForWave(encounter.wave));
switch (encounter.wave) { if (definition.shouldWarn()) {
case 0 -> addCommon(types, scaleSpawnCount(level, 12 + players * 3));
case 1 -> {
addCommon(types, scaleSpawnCount(level, 14 + players * 3));
addRepeated(types, spitBugType(), scaleSpawnCount(level, 2 + players));
}
case 2 -> {
addCommon(types, scaleSpawnCount(level, 16 + players * 4));
addRepeated(types, spitBugType(), scaleSpawnCount(level, 3 + players));
addRepeated(types, jumpyBugType(), scaleSpawnCount(level, 1 + players));
}
default -> {
int beetles = Math.min(scaleSpawnCount(level, 1 + players / 3), 3);
addRepeated(types, herculesBeetleType(), beetles);
addCommon(types, scaleSpawnCount(level, 8 + players * 2));
warnHercules(level, encounter.center, targets); warnHercules(level, encounter.center, targets);
} }
}
List<CavarynHordeDefinitions.SpawnChoice> choices = definition.buildSpawnList(level, players, false, level.random);
int spawned = 0; int spawned = 0;
for (EntityType<?> type : types) { for (CavarynHordeDefinitions.SpawnChoice choice : choices) {
if (spawned >= capacity || type == null) { if (spawned >= capacity) {
break; break;
} }
ServerPlayer target = targets.get(level.random.nextInt(targets.size())); ServerPlayer target = targets.get(level.random.nextInt(targets.size()));
if (spawnDirectMob(level, encounter, type, target)) { if (spawnDirectMob(level, encounter, choice, target)) {
spawned++; spawned++;
} }
} }
} }
private static boolean spawnDirectMob(ServerLevel level, @Nullable Encounter encounter, EntityType<?> type, ServerPlayer target) { private static boolean spawnDirectMob(ServerLevel level, @Nullable Encounter encounter, CavarynHordeDefinitions.SpawnChoice choice, ServerPlayer target) {
EntityType<?> type = choice.type();
BlockPos spawnPos = findSpawnPos(level, target, type, level.random); BlockPos spawnPos = findSpawnPos(level, target, type, level.random);
if (spawnPos == null) { if (spawnPos == null) {
return false; return false;
@@ -405,17 +401,21 @@ public final class CavarynHordeManager {
} }
mob.moveTo(spawnPos.getX() + 0.5D, spawnPos.getY(), spawnPos.getZ() + 0.5D, level.random.nextFloat() * 360.0F, 0.0F); mob.moveTo(spawnPos.getX() + 0.5D, spawnPos.getY(), spawnPos.getZ() + 0.5D, level.random.nextFloat() * 360.0F, 0.0F);
mob.finalizeSpawn(level, level.getCurrentDifficultyAt(spawnPos), MobSpawnType.EVENT, null); mob.finalizeSpawn(level, level.getCurrentDifficultyAt(spawnPos), MobSpawnType.EVENT, null);
if (mob.canAttack(target)) {
mob.setTarget(target); mob.setTarget(target);
}
if (!level.addFreshEntity(mob)) { if (!level.addFreshEntity(mob)) {
return false; return false;
} }
if (encounter != null) { if (encounter != null) {
encounter.hordeMobIds.add(mob.getUUID()); encounter.hordeMobIds.add(mob.getUUID());
} }
if (type == herculesBeetleType()) { if (choice.trackCompletion()) {
if (encounter != null) { if (encounter != null) {
encounter.herculesIds.add(mob.getUUID()); encounter.herculesIds.add(mob.getUUID());
} }
}
if (choice.heavyArrivalEffect()) {
level.playSound(null, spawnPos, SoundEvents.GENERIC_EXPLODE.value(), SoundSource.HOSTILE, 1.5F, 0.65F); level.playSound(null, spawnPos, SoundEvents.GENERIC_EXPLODE.value(), SoundSource.HOSTILE, 1.5F, 0.65F);
HerculesBeetleImpactShakeSync.send(target, 28); HerculesBeetleImpactShakeSync.send(target, 28);
} else { } else {
@@ -427,16 +427,7 @@ public final class CavarynHordeManager {
private static int countNearbyDirectHordeMobs(ServerLevel level, BlockPos center, double radius) { private static int countNearbyDirectHordeMobs(ServerLevel level, BlockPos center, double radius) {
AABB box = new AABB(center).inflate(radius); AABB box = new AABB(center).inflate(radius);
EntityType<?> creepingHorror = creepingHorrorType(); return level.getEntitiesOfClass(Mob.class, box, mob -> CavarynHordeDefinitions.isConfiguredHordeType(level, mob.getType())).size();
EntityType<?> lurkingTerror = lurkingTerrorType();
EntityType<?> spitBug = spitBugType();
EntityType<?> jumpyBug = jumpyBugType();
return level.getEntitiesOfClass(Mob.class, box, mob ->
mob.getType() == creepingHorror
|| mob.getType() == lurkingTerror
|| mob.getType() == spitBug
|| mob.getType() == jumpyBug
).size();
} }
@Nullable @Nullable
@@ -490,26 +481,6 @@ public final class CavarynHordeManager {
&& level.isEmptyBlock(pos.above()); && level.isEmptyBlock(pos.above());
} }
private static void addCommon(List<EntityType<?>> types, int count) {
EntityType<?> creepingHorror = creepingHorrorType();
EntityType<?> lurkingTerror = lurkingTerrorType();
for (int i = 0; i < count; i++) {
EntityType<?> type = i % 2 == 0 ? creepingHorror : lurkingTerror;
if (type != null) {
types.add(type);
}
}
}
private static void addRepeated(List<EntityType<?>> types, @Nullable EntityType<?> type, int count) {
if (type == null) {
return;
}
for (int i = 0; i < count; i++) {
types.add(type);
}
}
private static int scaleSpawnCount(ServerLevel level, int baseCount) { private static int scaleSpawnCount(ServerLevel level, int baseCount) {
if (baseCount <= 0 || level.getDifficulty() == Difficulty.PEACEFUL) { if (baseCount <= 0 || level.getDifficulty() == Difficulty.PEACEFUL) {
return 0; return 0;
@@ -523,29 +494,17 @@ public final class CavarynHordeManager {
return Math.max(1, Mth.ceil(baseCount * multiplier)); return Math.max(1, Mth.ceil(baseCount * multiplier));
} }
@Nullable private static ResourceLocation hordeForWave(int wave) {
private static EntityType<?> spitBugType() { return switch (wave) {
return BuiltInRegistries.ENTITY_TYPE.getOptional(SPIT_BUG_ID).orElse(null); case 0 -> WAVE_ONE_HORDE;
case 1 -> WAVE_TWO_HORDE;
case 2 -> WAVE_THREE_HORDE;
default -> FINAL_HORDE;
};
} }
@Nullable private static ResourceLocation hordeId(String path) {
private static EntityType<?> jumpyBugType() { return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path);
return BuiltInRegistries.ENTITY_TYPE.getOptional(JUMPY_BUG_ID).orElse(null);
}
@Nullable
private static EntityType<?> creepingHorrorType() {
return BuiltInRegistries.ENTITY_TYPE.getOptional(CREEPING_HORROR_ID).orElse(null);
}
@Nullable
private static EntityType<?> lurkingTerrorType() {
return BuiltInRegistries.ENTITY_TYPE.getOptional(LURKING_TERROR_ID).orElse(null);
}
@Nullable
private static EntityType<?> herculesBeetleType() {
return BuiltInRegistries.ENTITY_TYPE.getOptional(HERCULES_BEETLE_ID).orElse(null);
} }
private static void warnHercules(ServerLevel level, BlockPos center, List<ServerPlayer> targets) { private static void warnHercules(ServerLevel level, BlockPos center, List<ServerPlayer> targets) {
@@ -574,7 +533,7 @@ public final class CavarynHordeManager {
private static List<ServerPlayer> targetsFor(ServerLevel level, Encounter encounter) { private static List<ServerPlayer> targetsFor(ServerLevel level, Encounter encounter) {
List<ServerPlayer> targets = new ArrayList<>(); List<ServerPlayer> targets = new ArrayList<>();
for (ServerPlayer player : level.players()) { for (ServerPlayer player : level.players()) {
if (player.isSpectator() || !isHordeBiome(level, player.blockPosition())) { if (!isValidHordeTarget(player) || !isHordeBiome(level, player.blockPosition())) {
continue; continue;
} }
if (player.blockPosition().distSqr(encounter.center) <= GROUP_RADIUS_BLOCKS * GROUP_RADIUS_BLOCKS) { if (player.blockPosition().distSqr(encounter.center) <= GROUP_RADIUS_BLOCKS * GROUP_RADIUS_BLOCKS) {
@@ -585,6 +544,10 @@ public final class CavarynHordeManager {
return targets; return targets;
} }
private static boolean isValidHordeTarget(ServerPlayer player) {
return player.isAlive() && !player.isCreative() && !player.isSpectator();
}
private static BlockPos averageBlockPos(List<ServerPlayer> players) { private static BlockPos averageBlockPos(List<ServerPlayer> players) {
int x = 0; int x = 0;
int y = 0; int y = 0;
@@ -1,10 +1,10 @@
{ {
"variants": { "variants": {
"rotated=false": { "rotated=false": {
"model": "antarchy:block/metroid_egg" "model": "antarchy:block/jerry_egg"
}, },
"rotated=true": { "rotated=true": {
"model": "antarchy:block/metroid_egg", "model": "antarchy:block/jerry_egg",
"y": 90 "y": 90
} }
} }
@@ -1,22 +1,52 @@
{ {
"variants": { "multipart": [
"growth_direction=up,top_cap=true,bottom_cap=false,broodfruit=false": { {
"when": {
"broodfruit": "true"
},
"apply": {
"model": "antarchy:block/molting_vines_broodfruit"
}
},
{
"when": {
"broodfruit": "false",
"growth_direction": "up",
"top_cap": "true"
},
"apply": {
"model": "antarchy:block/molting_vines_top" "model": "antarchy:block/molting_vines_top"
}
}, },
"growth_direction=up,top_cap=false,bottom_cap=false,broodfruit=false": { {
"when": {
"broodfruit": "false",
"growth_direction": "up",
"top_cap": "false"
},
"apply": {
"model": "antarchy:block/molting_vines" "model": "antarchy:block/molting_vines"
}
}, },
"growth_direction=up,top_cap=false,bottom_cap=false,broodfruit=true": { {
"model": "antarchy:block/molting_vines_broodfruit" "when": {
"broodfruit": "false",
"growth_direction": "down",
"bottom_cap": "true"
}, },
"growth_direction=down,top_cap=false,bottom_cap=true,broodfruit=false": { "apply": {
"model": "antarchy:block/molting_vines_bottom" "model": "antarchy:block/molting_vines_bottom"
}
}, },
"growth_direction=down,top_cap=false,bottom_cap=false,broodfruit=false": { {
"when": {
"broodfruit": "false",
"growth_direction": "down",
"bottom_cap": "false"
},
"apply": {
"model": "antarchy:block/molting_vines" "model": "antarchy:block/molting_vines"
},
"growth_direction=down,top_cap=false,bottom_cap=false,broodfruit=true": {
"model": "antarchy:block/molting_vines_broodfruit"
} }
} }
]
} }
@@ -0,0 +1,13 @@
{
"variants": {
"squirrels=1": {
"model": "antarchy:block/ouranwood_squirrel_nest"
},
"squirrels=2": {
"model": "antarchy:block/ouranwood_squirrel_nest"
},
"squirrels=3": {
"model": "antarchy:block/ouranwood_squirrel_nest"
}
}
}
@@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.alphametroid", "identifier": "geometry.alphajerry",
"texture_width": 128, "texture_width": 128,
"texture_height": 128, "texture_height": 128,
"visible_bounds_width": 4, "visible_bounds_width": 4,
@@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.gammametroid", "identifier": "geometry.gammajerry",
"texture_width": 128, "texture_width": 128,
"texture_height": 128, "texture_height": 128,
"visible_bounds_width": 6, "visible_bounds_width": 6,
@@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.infantmetroid", "identifier": "geometry.infantjerry",
"texture_width": 64, "texture_width": 64,
"texture_height": 64, "texture_height": 64,
"visible_bounds_width": 2, "visible_bounds_width": 2,
@@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.metroidlarva", "identifier": "geometry.maturejerry",
"texture_width": 128, "texture_width": 128,
"texture_height": 128, "texture_height": 128,
"visible_bounds_width": 2, "visible_bounds_width": 2,
@@ -351,6 +351,8 @@
"item.antarchy.mantis_claw": "Mantis Claw", "item.antarchy.mantis_claw": "Mantis Claw",
"item.antarchy.king_scale": "King Scale", "item.antarchy.king_scale": "King Scale",
"item.antarchy.queen_scale": "Queen Scale", "item.antarchy.queen_scale": "Queen Scale",
"item.antarchy.jerry_nucleus": "Jerry Nucleus",
"item.antarchy.carapace": "Carapace",
"item.antarchy.jumpy_bug_leg": "Jumpy Bug Leg", "item.antarchy.jumpy_bug_leg": "Jumpy Bug Leg",
"item.antarchy.jumpy_boots": "Jumpy Boots", "item.antarchy.jumpy_boots": "Jumpy Boots",
"tooltip.antarchy.jumpy_boots": "Sneak to charge, then jump to spring upward.", "tooltip.antarchy.jumpy_boots": "Sneak to charge, then jump to spring upward.",
@@ -917,11 +919,14 @@
"item.antarchy.broodfruit": "Broodfruit", "item.antarchy.broodfruit": "Broodfruit",
"block.antarchy.jumpy_bug_egg": "Jumpy Bug Egg", "block.antarchy.jumpy_bug_egg": "Jumpy Bug Egg",
"block.antarchy.spit_bug_egg": "Spit Bug Egg", "block.antarchy.spit_bug_egg": "Spit Bug Egg",
"block.antarchy.metroid_egg": "Metroid Egg", "block.antarchy.jerry_egg": "Jerry Egg",
"entity.antarchy.jerry": "Jerry",
"item.antarchy.jerry_spawn_egg": "Jerry Spawn Egg",
"block.antarchy.biomite": "Biomite", "block.antarchy.biomite": "Biomite",
"block.antarchy.biomite_turf": "Biomite Turf", "block.antarchy.biomite_turf": "Biomite Turf",
"block.antarchy.biowart": "Biowart", "block.antarchy.biowart": "Biowart",
"block.antarchy.biowart_tendrils": "Biowart Tendrils", "block.antarchy.biowart_tendrils": "Biowart Tendrils",
"biome.antarchy.biowart_caves": "Biowart Caves",
"subtitles.antarchy.creeping_horror_growl": "Creeping Horror growls", "subtitles.antarchy.creeping_horror_growl": "Creeping Horror growls",
"subtitles.antarchy.creeping_horror_hurt": "Creeping Horror hurts", "subtitles.antarchy.creeping_horror_hurt": "Creeping Horror hurts",
"subtitles.antarchy.creeping_horror_bite": "Creeping Horror bites", "subtitles.antarchy.creeping_horror_bite": "Creeping Horror bites",
@@ -1,6 +1,18 @@
{ {
"parent": "minecraft:block/mossy_carpet_side", "ambientocclusion": true,
"textures": { "textures": {
"particle": "#side",
"side": "antarchy:block/amber_moss/amber_moss_carpet" "side": "antarchy:block/amber_moss/amber_moss_carpet"
},
"elements": [
{
"from": [0, 0, 0.1],
"to": [16, 8, 0.1],
"shade": true,
"faces": {
"north": {"uv": [16, 8, 0, 16], "texture": "#side"},
"south": {"uv": [0, 8, 16, 16], "texture": "#side"}
} }
}
]
} }
@@ -1,6 +1,8 @@
{ {
"parent": "minecraft:block/cube_all", "parent": "minecraft:block/cube_bottom_top",
"textures": { "textures": {
"all": "antarchy:block/biomite_turf" "bottom": "antarchy:block/biomite",
"top": "antarchy:block/biowart",
"side": "antarchy:block/biomite_turf"
} }
} }
@@ -3,25 +3,13 @@
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"texture_size": [64, 64], "texture_size": [64, 64],
"textures": { "textures": {
"1": "antarchy:block/metroid_egg", "1": "antarchy:block/jerry_egg",
"particle": "antarchy:block/metroid_egg" "particle": "antarchy:block/biomite"
}, },
"elements": [ "elements": [
{ {
"from": [1, 0, 0], "from": [2, 0, 1],
"to": [15, 14, 16], "to": [14, 16, 15],
"faces": {
"north": {"uv": [7, 8, 10.5, 11.5], "texture": "#1"},
"east": {"uv": [0, 0, 4, 3.5], "texture": "#1"},
"south": {"uv": [7, 8, 10.5, 11.5], "texture": "#1"},
"west": {"uv": [0, 0, 4, 3.5], "texture": "#1"},
"up": {"uv": [3.5, 7.5, 0, 3.5], "texture": "#1"},
"down": {"uv": [7, 3.5, 3.5, 7.5], "texture": "#1"}
}
},
{
"from": [2, 0.025, 1],
"to": [14, 16.025, 15],
"faces": { "faces": {
"north": {"uv": [10.5, 0, 13.5, 4], "texture": "#1"}, "north": {"uv": [10.5, 0, 13.5, 4], "texture": "#1"},
"east": {"uv": [7, 0, 10.5, 4], "texture": "#1"}, "east": {"uv": [7, 0, 10.5, 4], "texture": "#1"},
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_hanging_sign",
"textures": { "textures": {
"texture": "antarchy:models/ouranwood/ouranwood_hanging_sign" "particle": "antarchy:models/ouranwood/ouranwood_hanging_sign"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_sign",
"textures": { "textures": {
"texture": "antarchy:models/ouranwood/ouranwood_sign" "particle": "antarchy:models/ouranwood/ouranwood_sign"
} }
} }
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "minecraft:block/coarse_dirt"
}
}
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_wall_hanging_sign",
"textures": { "textures": {
"texture": "antarchy:models/ouranwood/ouranwood_hanging_sign" "particle": "antarchy:models/ouranwood/ouranwood_hanging_sign"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_wall_sign",
"textures": { "textures": {
"texture": "antarchy:models/ouranwood/ouranwood_sign" "particle": "antarchy:models/ouranwood/ouranwood_sign"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_hanging_sign",
"textures": { "textures": {
"texture": "antarchy:block/peach/peach_hanging" "particle": "antarchy:block/peach/peach_hanging"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_sign",
"textures": { "textures": {
"texture": "antarchy:item/peach_sign" "particle": "antarchy:item/peach_sign"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_wall_hanging_sign",
"textures": { "textures": {
"texture": "antarchy:block/peach/peach_hanging" "particle": "antarchy:block/peach/peach_hanging"
} }
} }
@@ -1,6 +1,5 @@
{ {
"parent": "minecraft:block/template_wall_sign",
"textures": { "textures": {
"texture": "antarchy:item/peach_sign" "particle": "antarchy:item/peach_sign"
} }
} }
@@ -1,6 +1,6 @@
{ {
"parent": "minecraft:item/generated", "parent": "minecraft:item/generated",
"textures": { "textures": {
"layer0": "antarchy:item/metroid_egg_item" "layer0": "antarchy:item/carapace"
} }
} }
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/jerry_egg_item"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/jerry_nucleus"
}
}
@@ -0,0 +1,3 @@
{
"parent": "minecraft:item/template_spawn_egg"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

@@ -0,0 +1,17 @@
{
"entries": [
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 2,
"per_player_count": 1
},
{
"entity_tag": "antarchy:horde_spitters",
"weight": 1,
"base_count": 0,
"per_player_count": 1,
"min_count": 1
}
]
}
@@ -0,0 +1,11 @@
{
"max_active": 8,
"entries": [
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 1,
"high_attention_base_count": 2
}
]
}
@@ -0,0 +1,21 @@
{
"entries": [
{
"entity_tag": "antarchy:horde_bosses",
"weight": 1,
"base_count": 1,
"per_players": 3,
"per_players_count": 1,
"max_count": 3,
"warning": true,
"track_completion": true,
"heavy_arrival_effect": true
},
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 8,
"per_player_count": 2
}
]
}
@@ -0,0 +1,10 @@
{
"entries": [
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 12,
"per_player_count": 3
}
]
}
@@ -0,0 +1,16 @@
{
"entries": [
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 14,
"per_player_count": 3
},
{
"entity_tag": "antarchy:horde_spitters",
"weight": 1,
"base_count": 2,
"per_player_count": 1
}
]
}
@@ -0,0 +1,22 @@
{
"entries": [
{
"entity_tag": "antarchy:horde_common",
"weight": 1,
"base_count": 16,
"per_player_count": 4
},
{
"entity_tag": "antarchy:horde_spitters",
"weight": 1,
"base_count": 3,
"per_player_count": 1
},
{
"entity_tag": "antarchy:horde_jumpers",
"weight": 1,
"base_count": 1,
"per_player_count": 1
}
]
}
@@ -66,6 +66,36 @@
}, },
"biome": "antarchy:glowcap_caves" "biome": "antarchy:glowcap_caves"
}, },
{
"parameters": {
"temperature": [
-1.0,
1.0
],
"humidity": [
0.15,
0.85
],
"continentalness": [
-1.0,
1.0
],
"erosion": [
-1.0,
1.0
],
"weirdness": [
0.45,
1.0
],
"depth": [
-2.0,
-0.1
],
"offset": 0.0
},
"biome": "antarchy:biowart_caves"
},
{ {
"parameters": { "parameters": {
"temperature": [ "temperature": [
@@ -10,11 +10,11 @@
"entries": [ "entries": [
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "antarchy:metroid_egg" "name": "antarchy:jerry_egg"
} }
], ],
"rolls": 1.0 "rolls": 1.0
} }
], ],
"random_sequence": "antarchy:blocks/metroid_egg" "random_sequence": "antarchy:blocks/jerry_egg"
} }
@@ -0,0 +1,91 @@
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "antarchy:jerry_nucleus",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"type": "minecraft:uniform",
"min": 1.0,
"max": 2.0
}
},
{
"function": "minecraft:enchanted_count_increase",
"enchantment": "minecraft:looting",
"count": {
"type": "minecraft:uniform",
"min": 0.0,
"max": 1.0
}
}
]
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "antarchy:carapace",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"type": "minecraft:uniform",
"min": 1.0,
"max": 2.0
}
},
{
"function": "minecraft:enchanted_count_increase",
"enchantment": "minecraft:looting",
"count": {
"type": "minecraft:uniform",
"min": 0.0,
"max": 1.0
}
}
]
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
},
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"nbt": "{JerryStage:\"alpha\"}"
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"nbt": "{JerryStage:\"gamma\"}"
}
}
]
}
]
}
],
"random_sequence": "antarchy:entities/jerry"
}
@@ -17,7 +17,7 @@
"item": "antarchy:jumpy_bug_leg" "item": "antarchy:jumpy_bug_leg"
}, },
"D": { "D": {
"item": "antarchy:chiten" "item": "antarchy:jerry_nucleus"
}, },
"E": { "E": {
"item": "antarchy:rainbow_sugar" "item": "antarchy:rainbow_sugar"
@@ -0,0 +1,5 @@
{
"values": [
"antarchy:hercules_beetle"
]
}
@@ -0,0 +1,6 @@
{
"values": [
"antarchy:creeping_horror",
"antarchy:lurking_terror"
]
}
@@ -0,0 +1,5 @@
{
"values": [
"antarchy:jumpy_bug"
]
}
@@ -0,0 +1,5 @@
{
"values": [
"antarchy:spit_bug"
]
}
@@ -2,6 +2,7 @@
"values": [ "values": [
"antarchy:cavaryn", "antarchy:cavaryn",
"antarchy:glowcap_caves", "antarchy:glowcap_caves",
"antarchy:biowart_caves",
"antarchy:brooding_tunnels", "antarchy:brooding_tunnels",
"antarchy:rolly_caves" "antarchy:rolly_caves"
] ]
@@ -0,0 +1,83 @@
{
"has_precipitation": false,
"temperature": 0.58,
"downfall": 0.25,
"effects": {
"fog_color": 7639848,
"water_color": 9453328,
"water_fog_color": 5643034,
"sky_color": 5007935,
"grass_color": 4569361,
"foliage_color": 6018898,
"grass_color_modifier": "none",
"mood_sound": {
"sound": "minecraft:ambient.cave",
"tick_delay": 60000,
"block_search_extent": 8,
"offset": 2.0
},
"particle": {
"probability": 0.004,
"options": {
"type": "antarchy:orange_ash"
}
}
},
"spawn_costs": {
"antarchy:jerry": {
"energy_budget": 0.8,
"charge": 4
}
},
"carvers": {
"air": [],
"liquid": []
},
"features": [
[],
[],
[],
[],
[],
[],
[],
[],
[
"antarchy:cavaryn_bile_veins",
"antarchy:cavaryn_bile_cysts",
"antarchy:termite_nest"
],
[
"antarchy:biowart_patch",
"antarchy:cavaryn_creepvine",
"antarchy:cavaryn_hanging_creeproots",
"antarchy:jerry_egg_patch"
],
[]
],
"creature_spawn_probability": 0.08,
"spawners": {
"monster": [
{
"type": "antarchy:jerry",
"weight": 65,
"minCount": 1,
"maxCount": 2
}
],
"creature": [
{
"type": "antarchy:stink_bug",
"weight": 12,
"minCount": 1,
"maxCount": 3
}
],
"ambient": [],
"axolotls": [],
"underground_water_creature": [],
"water_creature": [],
"water_ambient": [],
"misc": []
}
}
@@ -0,0 +1,37 @@
{
"type": "minecraft:vegetation_patch",
"config": {
"surface": "floor",
"depth": 1,
"vertical_range": 5,
"extra_bottom_block_chance": 0.0,
"extra_edge_column_chance": 0.55,
"vegetation_chance": 0.72,
"xz_radius": {
"type": "minecraft:uniform",
"min_inclusive": 3,
"max_inclusive": 6
},
"replaceable": "#antarchy:biowart_replaceable",
"ground_state": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "antarchy:biowart"
}
},
"vegetation_feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "antarchy:biowart_tendrils"
}
}
}
},
"placement": []
}
}
}
@@ -0,0 +1,42 @@
{
"type": "minecraft:random_patch",
"config": {
"tries": 10,
"xz_spread": 5,
"y_spread": 2,
"feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "antarchy:jerry_egg",
"Properties": {
"rotated": "false"
}
}
}
}
},
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:matching_blocks",
"offset": [
0,
-1,
0
],
"blocks": [
"antarchy:biomite",
"antarchy:biomite_turf",
"antarchy:biowart"
]
}
}
]
}
}
}
@@ -169,6 +169,40 @@
} }
} }
}, },
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:biome",
"biome_is": ["antarchy:biowart_caves"]
},
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"offset": 0,
"surface_type": "floor",
"add_surface_depth": false,
"secondary_depth_range": 0
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "antarchy:biomite_turf"
}
}
},
{
"type": "minecraft:block",
"result_state": {
"Name": "antarchy:biomite"
}
}
]
}
},
{ {
"type": "minecraft:condition", "type": "minecraft:condition",
"if_true": { "if_true": {
@@ -0,0 +1,27 @@
{
"feature": "antarchy:biowart_patch",
"placement": [
{
"type": "minecraft:count",
"count": 18
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"min_inclusive": {
"above_bottom": 8
},
"max_inclusive": {
"below_top": 16
}
}
},
{
"type": "minecraft:biome"
}
]
}
@@ -3,7 +3,7 @@
"placement": [ "placement": [
{ {
"type": "minecraft:rarity_filter", "type": "minecraft:rarity_filter",
"chance": 24 "chance": 6
}, },
{ {
"type": "minecraft:in_square" "type": "minecraft:in_square"
@@ -3,7 +3,7 @@
"placement": [ "placement": [
{ {
"type": "minecraft:rarity_filter", "type": "minecraft:rarity_filter",
"chance": 20 "chance": 5
}, },
{ {
"type": "minecraft:in_square" "type": "minecraft:in_square"
@@ -0,0 +1,31 @@
{
"feature": "antarchy:jerry_egg_patch",
"placement": [
{
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 1,
"max_inclusive": 3
}
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"min_inclusive": {
"above_bottom": 8
},
"max_inclusive": {
"below_top": 16
}
}
},
{
"type": "minecraft:biome"
}
]
}
@@ -5,6 +5,7 @@
"antarchy:infested_coarse_dirt", "antarchy:infested_coarse_dirt",
"antarchy:umbral_moss_block", "antarchy:umbral_moss_block",
"antarchy:blush_moss_block", "antarchy:blush_moss_block",
"antarchy:amber_moss_block" "antarchy:amber_moss_block",
"antarchy:biowart"
] ]
} }
@@ -17,6 +17,7 @@
"antarchy:lurking_terror", "antarchy:lurking_terror",
"antarchy:rolly_polly", "antarchy:rolly_polly",
"antarchy:scorpion", "antarchy:scorpion",
"antarchy:emperor_scorpion" "antarchy:emperor_scorpion",
"antarchy:jerry"
] ]
} }
@@ -141,6 +141,7 @@ public final class AntarchyFabricClientBootstrap {
EntityRendererRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), CreepingHorrorRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), CreepingHorrorRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), LurkingTerrorRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), LurkingTerrorRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), HerculesBeetleRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), HerculesBeetleRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.JERRY.get(), JerryRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.JUMPY_BUG.get(), JumpyBugRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.JUMPY_BUG.get(), JumpyBugRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.SPIT_BUG.get(), SpitBugRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.SPIT_BUG.get(), SpitBugRenderer::new);
EntityRendererRegistry.register(AntarchyFabricEntities.SPIT_BUG_PROJECTILE.get(), SpitBugProjectileRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.SPIT_BUG_PROJECTILE.get(), SpitBugProjectileRenderer::new);
@@ -342,7 +343,7 @@ public final class AntarchyFabricClientBootstrap {
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.CLOUD_BLOCK.get(), RenderType.translucent()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.CLOUD_BLOCK.get(), RenderType.translucent());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.JUMPY_BUG_EGG.get(), RenderType.translucent()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.JUMPY_BUG_EGG.get(), RenderType.translucent());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.SPIT_BUG_EGG.get(), RenderType.translucent()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.SPIT_BUG_EGG.get(), RenderType.translucent());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.METROID_EGG.get(), RenderType.translucent()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.JERRY_EGG.get(), RenderType.translucent());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.BIOWART_TENDRILS.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.BIOWART_TENDRILS.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.HANGING_CREEPROOTS.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.HANGING_CREEPROOTS.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.MOLTING_VINES.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.MOLTING_VINES.get(), RenderType.cutout());
@@ -665,15 +665,15 @@ public final class AntarchyFabricBlocks {
public static final DeferredBlock<Block> BIOMITE_TURF = BLOCKS.register("biomite_turf", public static final DeferredBlock<Block> BIOMITE_TURF = BLOCKS.register("biomite_turf",
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK))); () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK).lightLevel(state -> 2)));
public static final DeferredBlock<BiowartBlock> BIOWART = BLOCKS.register("biowart", public static final DeferredBlock<BiowartBlock> BIOWART = BLOCKS.register("biowart",
() -> new BiowartBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK))); () -> new BiowartBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK).lightLevel(state -> 2)));
public static final DeferredBlock<BiowartTendrilsBlock> BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils", public static final DeferredBlock<BiowartTendrilsBlock> BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils",
() -> new BiowartTendrilsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noCollission().noOcclusion())); () -> new BiowartTendrilsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).lightLevel(state -> 2).noCollission().noOcclusion()));
public static final DeferredBlock<Block> MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore", public static final DeferredBlock<Block> MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore",
@@ -826,8 +826,8 @@ public final class AntarchyFabricBlocks {
() -> new SpitBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new SpitBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG)));
public static final DeferredBlock<MetroidEggBlock> METROID_EGG = BLOCKS.register("metroid_egg", public static final DeferredBlock<JerryEggBlock> JERRY_EGG = BLOCKS.register("jerry_egg",
() -> new MetroidEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new JerryEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG).randomTicks()));
public static final DeferredBlock<LurkingTerrorEggBlock> LURKING_TERROR_EGG = BLOCKS.register("lurking_terror_egg", public static final DeferredBlock<LurkingTerrorEggBlock> LURKING_TERROR_EGG = BLOCKS.register("lurking_terror_egg",
@@ -552,6 +552,7 @@ public final class AntarchyFabricEntities {
.sized(0.5F, 0.5F) .sized(0.5F, 0.5F)
.clientTrackingRange(8) .clientTrackingRange(8)
.updateInterval(1) .updateInterval(1)
.fireImmune()
.build("krakens_grasp_trident")); .build("krakens_grasp_trident"));
public static final DeferredHolder<EntityType<?>, EntityType<TentacleEntity>> TENTACLE = ENTITY_TYPES.register("tentacle", public static final DeferredHolder<EntityType<?>, EntityType<TentacleEntity>> TENTACLE = ENTITY_TYPES.register("tentacle",
@@ -651,6 +652,13 @@ public final class AntarchyFabricEntities {
.build("lurking_terror")); .build("lurking_terror"));
public static final DeferredHolder<EntityType<?>, EntityType<com.craisinlord.antarchy.content.entity.JerryEntity>> JERRY = ENTITY_TYPES.register("jerry",
() -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.JerryEntity::new, MobCategory.MONSTER)
.sized(1.4F, 1.4F)
.clientTrackingRange(10)
.build("jerry"));
public static final DeferredHolder<EntityType<?>, EntityType<com.craisinlord.antarchy.content.entity.CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep", public static final DeferredHolder<EntityType<?>, EntityType<com.craisinlord.antarchy.content.entity.CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
() -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.CheepEntity::new, MobCategory.WATER_AMBIENT) () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.CheepEntity::new, MobCategory.WATER_AMBIENT)
.sized(1.0F, 1.2F) .sized(1.0F, 1.2F)
@@ -312,6 +312,7 @@ public final class AntarchyFabricEntityAttributes {
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.TORETERROR.get(), ToreterrorEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.TORETERROR.get(), ToreterrorEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), com.craisinlord.antarchy.content.entity.CreepingHorrorEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), com.craisinlord.antarchy.content.entity.CreepingHorrorEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), com.craisinlord.antarchy.content.entity.LurkingTerrorEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), com.craisinlord.antarchy.content.entity.LurkingTerrorEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.JERRY.get(), com.craisinlord.antarchy.content.entity.JerryEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CHEEP.get(), com.craisinlord.antarchy.content.entity.CheepEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CHEEP.get(), com.craisinlord.antarchy.content.entity.CheepEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.DORRIE.get(), com.craisinlord.antarchy.content.entity.DorrieEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.DORRIE.get(), com.craisinlord.antarchy.content.entity.DorrieEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), com.craisinlord.antarchy.content.entity.HerculesBeetleEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), com.craisinlord.antarchy.content.entity.HerculesBeetleEntity.createAttributes().build());
@@ -792,7 +792,7 @@ public final class AntarchyFabricItems {
public static final DeferredItem<net.minecraft.world.item.BlockItem> CREEPING_HORROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CREEPING_HORROR_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> CREEPING_HORROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CREEPING_HORROR_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> JUMPY_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.JUMPY_BUG_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> JUMPY_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.JUMPY_BUG_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SPIT_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.SPIT_BUG_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> SPIT_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.SPIT_BUG_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> METROID_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.METROID_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> JERRY_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.JERRY_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> LURKING_TERROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.LURKING_TERROR_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> LURKING_TERROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.LURKING_TERROR_EGG);
@@ -887,6 +887,12 @@ public final class AntarchyFabricItems {
public static final DeferredItem<Item> CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem<Item> CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> CARAPACE = ITEMS.registerSimpleItem("carapace", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> STINK_BUG_ITEM = ITEMS.registerSimpleItem("stink_bug", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem<Item> STINK_BUG_ITEM = ITEMS.registerSimpleItem("stink_bug", new Item.Properties().rarity(Rarity.UNCOMMON));
@@ -1575,6 +1581,8 @@ public final class AntarchyFabricItems {
public static final DeferredItem<DeferredSpawnEggItem> HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg",
() -> new DeferredSpawnEggItem(AntarchyFabricEntities.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE))); () -> new DeferredSpawnEggItem(AntarchyFabricEntities.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE)));
public static final DeferredItem<DeferredSpawnEggItem> JERRY_SPAWN_EGG = ITEMS.register("jerry_spawn_egg",
() -> new DeferredSpawnEggItem(AntarchyFabricEntities.JERRY, 0x6D2232, 0x8ED34A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> TORETERROR_SPAWN_EGG = ITEMS.register("toreterror_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> TORETERROR_SPAWN_EGG = ITEMS.register("toreterror_spawn_egg",
@@ -293,6 +293,7 @@ public final class AntarchyFabricSpawnPlacements {
SpawnPlacements.register(AntarchyFabricEntities.TORETERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ToreterrorEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.TORETERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ToreterrorEntity::canSpawn);
SpawnPlacements.register(AntarchyFabricEntities.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.CreepingHorrorEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.CreepingHorrorEntity::canSpawn);
SpawnPlacements.register(AntarchyFabricEntities.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.LurkingTerrorEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.LurkingTerrorEntity::canSpawn);
SpawnPlacements.register(AntarchyFabricEntities.JERRY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.JerryEntity::canSpawn);
SpawnPlacements.register(AntarchyFabricEntities.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules); SpawnPlacements.register(AntarchyFabricEntities.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules);
SpawnPlacements.register(AntarchyFabricEntities.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn);
} }
@@ -202,6 +202,14 @@ public final class AntarchyConfigModuleNeoforge {
AntarchySettings.setCreepingHorrorAttackDamage(AntarchyMobsConfig.creepingHorrorAttackDamage()); AntarchySettings.setCreepingHorrorAttackDamage(AntarchyMobsConfig.creepingHorrorAttackDamage());
AntarchySettings.setLurkingTerrorHealth(AntarchyMobsConfig.lurkingTerrorHealth()); AntarchySettings.setLurkingTerrorHealth(AntarchyMobsConfig.lurkingTerrorHealth());
AntarchySettings.setLurkingTerrorAttackDamage(AntarchyMobsConfig.lurkingTerrorAttackDamage()); AntarchySettings.setLurkingTerrorAttackDamage(AntarchyMobsConfig.lurkingTerrorAttackDamage());
AntarchySettings.setJerryInfantHealth(AntarchyMobsConfig.jerryInfantHealth());
AntarchySettings.setJerryInfantAttackDamage(AntarchyMobsConfig.jerryInfantAttackDamage());
AntarchySettings.setJerryMatureHealth(AntarchyMobsConfig.jerryMatureHealth());
AntarchySettings.setJerryMatureAttackDamage(AntarchyMobsConfig.jerryMatureAttackDamage());
AntarchySettings.setJerryAlphaHealth(AntarchyMobsConfig.jerryAlphaHealth());
AntarchySettings.setJerryAlphaAttackDamage(AntarchyMobsConfig.jerryAlphaAttackDamage());
AntarchySettings.setJerryGammaHealth(AntarchyMobsConfig.jerryGammaHealth());
AntarchySettings.setJerryGammaAttackDamage(AntarchyMobsConfig.jerryGammaAttackDamage());
AntarchySettings.setCheepHealth(AntarchyMobsConfig.cheepHealth()); AntarchySettings.setCheepHealth(AntarchyMobsConfig.cheepHealth());
AntarchySettings.setCheepAttackDamage(AntarchyMobsConfig.cheepAttackDamage()); AntarchySettings.setCheepAttackDamage(AntarchyMobsConfig.cheepAttackDamage());
AntarchySettings.setDorrieHealth(AntarchyMobsConfig.dorrieHealth()); AntarchySettings.setDorrieHealth(AntarchyMobsConfig.dorrieHealth());
@@ -205,6 +205,17 @@ public final class AntarchyMobsConfig {
private static final ModConfigSpec.DoubleValue LURKING_TERROR_HEALTH; private static final ModConfigSpec.DoubleValue LURKING_TERROR_HEALTH;
private static final ModConfigSpec.DoubleValue LURKING_TERROR_ATTACK_DAMAGE; private static final ModConfigSpec.DoubleValue LURKING_TERROR_ATTACK_DAMAGE;
// Jerry
private static final ModConfigSpec.DoubleValue JERRY_INFANT_HEALTH;
private static final ModConfigSpec.DoubleValue JERRY_INFANT_ATTACK_DAMAGE;
private static final ModConfigSpec.DoubleValue JERRY_MATURE_HEALTH;
private static final ModConfigSpec.DoubleValue JERRY_MATURE_ATTACK_DAMAGE;
private static final ModConfigSpec.DoubleValue JERRY_ALPHA_HEALTH;
private static final ModConfigSpec.DoubleValue JERRY_ALPHA_ATTACK_DAMAGE;
private static final ModConfigSpec.DoubleValue JERRY_GAMMA_HEALTH;
private static final ModConfigSpec.DoubleValue JERRY_GAMMA_ATTACK_DAMAGE;
// Cheep // Cheep
@@ -553,6 +564,17 @@ public final class AntarchyMobsConfig {
LURKING_TERROR_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D); LURKING_TERROR_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D);
b.pop(); b.pop();
b.push("jerry");
JERRY_INFANT_HEALTH = b.comment("Infant Jerry max health.").defineInRange("infantHealth", 20.0D, 1.0D, 32768.0D);
JERRY_INFANT_ATTACK_DAMAGE = b.comment("Infant Jerry damage per attached damage tick.").defineInRange("infantAttackDamage", 2.0D, 0.0D, 1024.0D);
JERRY_MATURE_HEALTH = b.comment("Mature Jerry max health.").defineInRange("matureHealth", 40.0D, 1.0D, 32768.0D);
JERRY_MATURE_ATTACK_DAMAGE = b.comment("Mature Jerry damage per attached damage tick.").defineInRange("matureAttackDamage", 3.5D, 0.0D, 1024.0D);
JERRY_ALPHA_HEALTH = b.comment("Alpha Jerry max health.").defineInRange("alphaHealth", 60.0D, 1.0D, 32768.0D);
JERRY_ALPHA_ATTACK_DAMAGE = b.comment("Alpha Jerry attack damage.").defineInRange("alphaAttackDamage", 6.0D, 0.0D, 1024.0D);
JERRY_GAMMA_HEALTH = b.comment("Gamma Jerry max health.").defineInRange("gammaHealth", 60.0D, 1.0D, 32768.0D);
JERRY_GAMMA_ATTACK_DAMAGE = b.comment("Gamma Jerry melee attack damage.").defineInRange("gammaAttackDamage", 7.0D, 0.0D, 1024.0D);
b.pop();
b.push("cheep"); b.push("cheep");
CHEEP_HEALTH = b.comment("Base max health.").defineInRange("health", 8.0D, 1.0D, 32768.0D); CHEEP_HEALTH = b.comment("Base max health.").defineInRange("health", 8.0D, 1.0D, 32768.0D);
CHEEP_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 3.0D, 0.0D, 1024.0D); CHEEP_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 3.0D, 0.0D, 1024.0D);
@@ -748,6 +770,14 @@ public final class AntarchyMobsConfig {
static double creepingHorrorAttackDamage() { return CREEPING_HORROR_ATTACK_DAMAGE.get(); } static double creepingHorrorAttackDamage() { return CREEPING_HORROR_ATTACK_DAMAGE.get(); }
static double lurkingTerrorHealth() { return LURKING_TERROR_HEALTH.get(); } static double lurkingTerrorHealth() { return LURKING_TERROR_HEALTH.get(); }
static double lurkingTerrorAttackDamage() { return LURKING_TERROR_ATTACK_DAMAGE.get(); } static double lurkingTerrorAttackDamage() { return LURKING_TERROR_ATTACK_DAMAGE.get(); }
static double jerryInfantHealth() { return JERRY_INFANT_HEALTH.get(); }
static double jerryInfantAttackDamage() { return JERRY_INFANT_ATTACK_DAMAGE.get(); }
static double jerryMatureHealth() { return JERRY_MATURE_HEALTH.get(); }
static double jerryMatureAttackDamage() { return JERRY_MATURE_ATTACK_DAMAGE.get(); }
static double jerryAlphaHealth() { return JERRY_ALPHA_HEALTH.get(); }
static double jerryAlphaAttackDamage() { return JERRY_ALPHA_ATTACK_DAMAGE.get(); }
static double jerryGammaHealth() { return JERRY_GAMMA_HEALTH.get(); }
static double jerryGammaAttackDamage() { return JERRY_GAMMA_ATTACK_DAMAGE.get(); }
static double cheepHealth() { return CHEEP_HEALTH.get(); } static double cheepHealth() { return CHEEP_HEALTH.get(); }
static double cheepAttackDamage() { return CHEEP_ATTACK_DAMAGE.get(); } static double cheepAttackDamage() { return CHEEP_ATTACK_DAMAGE.get(); }
static double dorrieHealth() { return DORRIE_HEALTH.get(); } static double dorrieHealth() { return DORRIE_HEALTH.get(); }
@@ -146,6 +146,7 @@ public final class AntarchyNeoForgeClient {
event.registerEntityRenderer(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.HERCULES_BEETLE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.HerculesBeetleRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.HERCULES_BEETLE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.HerculesBeetleRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.JERRY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JerryRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.JUMPY_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JumpyBugRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.JUMPY_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JumpyBugRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.SPIT_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.SpitBugRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.SPIT_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.SpitBugRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.SPIT_BUG_PROJECTILE.get(), com.craisinlord.antarchy.content.client.renderer.SpitBugProjectileRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.SPIT_BUG_PROJECTILE.get(), com.craisinlord.antarchy.content.client.renderer.SpitBugProjectileRenderer::new);
@@ -590,7 +591,7 @@ public final class AntarchyNeoForgeClient {
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CLOUD_BLOCK.get(), RenderType.translucent()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CLOUD_BLOCK.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.JUMPY_BUG_EGG.get(), RenderType.translucent()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.JUMPY_BUG_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.SPIT_BUG_EGG.get(), RenderType.translucent()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.SPIT_BUG_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.METROID_EGG.get(), RenderType.translucent()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.JERRY_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.BIOWART_TENDRILS.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.BIOWART_TENDRILS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.HANGING_CREEPROOTS.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.HANGING_CREEPROOTS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.MOLTING_VINES.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.MOLTING_VINES.get(), RenderType.cutout());
@@ -251,11 +251,11 @@ public final class AntarchyNeoforgeBlocks {
public static final DeferredBlock<Block> BIOMITE = BLOCKS.register("biomite", public static final DeferredBlock<Block> BIOMITE = BLOCKS.register("biomite",
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK))); () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK)));
public static final DeferredBlock<Block> BIOMITE_TURF = BLOCKS.register("biomite_turf", public static final DeferredBlock<Block> BIOMITE_TURF = BLOCKS.register("biomite_turf",
() -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK))); () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.NETHERRACK).lightLevel(state -> 2)));
public static final DeferredBlock<BiowartBlock> BIOWART = BLOCKS.register("biowart", public static final DeferredBlock<BiowartBlock> BIOWART = BLOCKS.register("biowart",
() -> new BiowartBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK))); () -> new BiowartBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_BLOCK).lightLevel(state -> 2)));
public static final DeferredBlock<BiowartTendrilsBlock> BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils", public static final DeferredBlock<BiowartTendrilsBlock> BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils",
() -> new BiowartTendrilsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).noCollission().noOcclusion())); () -> new BiowartTendrilsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).lightLevel(state -> 2).noCollission().noOcclusion()));
public static final DeferredBlock<Block> MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore", public static final DeferredBlock<Block> MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore",
() -> createOre(Blocks.COAL_ORE, 0, 2)); () -> createOre(Blocks.COAL_ORE, 0, 2));
public static final DeferredBlock<Block> BROODSTONE = BLOCKS.register("broodstone", public static final DeferredBlock<Block> BROODSTONE = BLOCKS.register("broodstone",
@@ -334,8 +334,8 @@ public final class AntarchyNeoforgeBlocks {
() -> new JumpyBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new JumpyBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG)));
public static final DeferredBlock<SpitBugEggBlock> SPIT_BUG_EGG = BLOCKS.register("spit_bug_egg", public static final DeferredBlock<SpitBugEggBlock> SPIT_BUG_EGG = BLOCKS.register("spit_bug_egg",
() -> new SpitBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new SpitBugEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG)));
public static final DeferredBlock<MetroidEggBlock> METROID_EGG = BLOCKS.register("metroid_egg", public static final DeferredBlock<JerryEggBlock> JERRY_EGG = BLOCKS.register("jerry_egg",
() -> new MetroidEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new JerryEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG).randomTicks()));
public static final DeferredBlock<LurkingTerrorEggBlock> LURKING_TERROR_EGG = BLOCKS.register("lurking_terror_egg", public static final DeferredBlock<LurkingTerrorEggBlock> LURKING_TERROR_EGG = BLOCKS.register("lurking_terror_egg",
() -> new LurkingTerrorEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG))); () -> new LurkingTerrorEggBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG)));
@@ -89,6 +89,7 @@ public class AntarchyNeoforgeCreativeModeTabs {
event.accept(AntarchyNeoforgeItems.CREEPING_HORROR_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.CREEPING_HORROR_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.LURKING_TERROR_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.LURKING_TERROR_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.HERCULES_BEETLE_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.HERCULES_BEETLE_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.JERRY_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.DORRIE_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.DORRIE_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.OURANWOOD_DEER_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.OURANWOOD_DEER_SPAWN_EGG.get());
event.accept(AntarchyNeoforgeItems.GLIMMER_SPAWN_EGG.get()); event.accept(AntarchyNeoforgeItems.GLIMMER_SPAWN_EGG.get());
@@ -124,7 +125,7 @@ public class AntarchyNeoforgeCreativeModeTabs {
event.accept(AntarchyNeoforgeItems.LURKING_TERROR_EGG_ITEM.get()); event.accept(AntarchyNeoforgeItems.LURKING_TERROR_EGG_ITEM.get());
event.accept(AntarchyNeoforgeItems.JUMPY_BUG_EGG_ITEM.get()); event.accept(AntarchyNeoforgeItems.JUMPY_BUG_EGG_ITEM.get());
event.accept(AntarchyNeoforgeItems.SPIT_BUG_EGG_ITEM.get()); event.accept(AntarchyNeoforgeItems.SPIT_BUG_EGG_ITEM.get());
event.accept(AntarchyNeoforgeItems.METROID_EGG_ITEM.get()); event.accept(AntarchyNeoforgeItems.JERRY_EGG_ITEM.get());
event.accept(AntarchyNeoforgeItems.WASP_NEST_ITEM.get()); event.accept(AntarchyNeoforgeItems.WASP_NEST_ITEM.get());
event.accept(AntarchyNeoforgeItems.RED_ANT_NEST_ITEM.get()); event.accept(AntarchyNeoforgeItems.RED_ANT_NEST_ITEM.get());
event.accept(AntarchyNeoforgeItems.BROWN_ANT_NEST_ITEM.get()); event.accept(AntarchyNeoforgeItems.BROWN_ANT_NEST_ITEM.get());
@@ -19,6 +19,7 @@ import com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity;
import com.craisinlord.antarchy.content.entity.HushProjectileEntity; import com.craisinlord.antarchy.content.entity.HushProjectileEntity;
import com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity; import com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity; import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import com.craisinlord.antarchy.content.entity.JumpyBugEntity; import com.craisinlord.antarchy.content.entity.JumpyBugEntity;
import com.craisinlord.antarchy.content.entity.AlphaMantisEntity; import com.craisinlord.antarchy.content.entity.AlphaMantisEntity;
import com.craisinlord.antarchy.content.entity.RollyPollyEntity; import com.craisinlord.antarchy.content.entity.RollyPollyEntity;
@@ -282,6 +283,7 @@ public final class AntarchyNeoforgeEntites {
.sized(0.5F, 0.5F) .sized(0.5F, 0.5F)
.clientTrackingRange(8) .clientTrackingRange(8)
.updateInterval(1) .updateInterval(1)
.fireImmune()
.build("krakens_grasp_trident")); .build("krakens_grasp_trident"));
public static final DeferredHolder<EntityType<?>, EntityType<TentacleEntity>> TENTACLE = ENTITY_TYPES.register("tentacle", public static final DeferredHolder<EntityType<?>, EntityType<TentacleEntity>> TENTACLE = ENTITY_TYPES.register("tentacle",
@@ -350,6 +352,11 @@ public final class AntarchyNeoforgeEntites {
.sized(1.3F, 1.5F) .sized(1.3F, 1.5F)
.clientTrackingRange(10) .clientTrackingRange(10)
.build("lurking_terror")); .build("lurking_terror"));
public static final DeferredHolder<EntityType<?>, EntityType<JerryEntity>> JERRY = ENTITY_TYPES.register("jerry",
() -> EntityType.Builder.of(JerryEntity::new, MobCategory.MONSTER)
.sized(1.4F, 1.4F)
.clientTrackingRange(10)
.build("jerry"));
public static final DeferredHolder<EntityType<?>, EntityType<CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep", public static final DeferredHolder<EntityType<?>, EntityType<CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
() -> EntityType.Builder.of(CheepEntity::new, MobCategory.WATER_AMBIENT) () -> EntityType.Builder.of(CheepEntity::new, MobCategory.WATER_AMBIENT)
.sized(1.0F, 1.2F) .sized(1.0F, 1.2F)
@@ -70,6 +70,7 @@ public class AntarchyNeoforgeEntityAttributes {
event.put(AntarchyNeoforgeEntites.TORETERROR.get(), ToreterrorEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.TORETERROR.get(), ToreterrorEntity.createAttributes().build());
event.put(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), CreepingHorrorEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), CreepingHorrorEntity.createAttributes().build());
event.put(AntarchyNeoforgeEntites.LURKING_TERROR.get(), LurkingTerrorEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.LURKING_TERROR.get(), LurkingTerrorEntity.createAttributes().build());
event.put(AntarchyNeoforgeEntites.JERRY.get(), JerryEntity.createAttributes().build());
AttributeSupplier redAntAttributes = buildAntAttributes(AntarchySettings.redAntHealth(), AntarchySettings.redAntMovementSpeed(), AntarchySettings.redAntAttackDamage()).build(); AttributeSupplier redAntAttributes = buildAntAttributes(AntarchySettings.redAntHealth(), AntarchySettings.redAntMovementSpeed(), AntarchySettings.redAntAttackDamage()).build();
AttributeSupplier brownAntAttributes = buildAntAttributes(AntarchySettings.brownAntHealth(), AntarchySettings.brownAntMovementSpeed(), AntarchySettings.brownAntAttackDamage()).build(); AttributeSupplier brownAntAttributes = buildAntAttributes(AntarchySettings.brownAntHealth(), AntarchySettings.brownAntMovementSpeed(), AntarchySettings.brownAntAttackDamage()).build();
@@ -351,7 +351,7 @@ public final class AntarchyNeoforgeItems {
public static final DeferredItem<net.minecraft.world.item.BlockItem> CREEPING_HORROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CREEPING_HORROR_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> CREEPING_HORROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CREEPING_HORROR_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> JUMPY_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.JUMPY_BUG_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> JUMPY_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.JUMPY_BUG_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SPIT_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SPIT_BUG_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> SPIT_BUG_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SPIT_BUG_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> METROID_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.METROID_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> JERRY_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.JERRY_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> LURKING_TERROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.LURKING_TERROR_EGG); public static final DeferredItem<net.minecraft.world.item.BlockItem> LURKING_TERROR_EGG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.LURKING_TERROR_EGG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> WASP_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.WASP_NEST); public static final DeferredItem<net.minecraft.world.item.BlockItem> WASP_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.WASP_NEST);
public static final DeferredItem<net.minecraft.world.item.BlockItem> HUSHWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.HUSHWEED); public static final DeferredItem<net.minecraft.world.item.BlockItem> HUSHWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.HUSHWEED);
@@ -402,6 +402,8 @@ public final class AntarchyNeoforgeItems {
public static final DeferredItem<Item> QUEEN_SCALE = ITEMS.register("queen_scale", public static final DeferredItem<Item> QUEEN_SCALE = ITEMS.register("queen_scale",
() -> new MobComingSoonTooltipItem(new Item.Properties().rarity(Rarity.RARE))); () -> new MobComingSoonTooltipItem(new Item.Properties().rarity(Rarity.RARE)));
public static final DeferredItem<Item> CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem<Item> CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> CARAPACE = ITEMS.registerSimpleItem("carapace", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> STINK_BUG = ITEMS.registerSimpleItem("stink_bug", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem<Item> STINK_BUG = ITEMS.registerSimpleItem("stink_bug", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<Item> JUMPY_BUG_LEG = ITEMS.registerSimpleItem("jumpy_bug_leg", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem<Item> JUMPY_BUG_LEG = ITEMS.registerSimpleItem("jumpy_bug_leg", new Item.Properties().rarity(Rarity.UNCOMMON));
public static final DeferredItem<JumpyBootsItem> JUMPY_BOOTS = ITEMS.register("jumpy_boots", public static final DeferredItem<JumpyBootsItem> JUMPY_BOOTS = ITEMS.register("jumpy_boots",
@@ -784,6 +786,8 @@ public final class AntarchyNeoforgeItems {
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties())); () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg",
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE))); () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE)));
public static final DeferredItem<DeferredSpawnEggItem> JERRY_SPAWN_EGG = ITEMS.register("jerry_spawn_egg",
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.JERRY, 0x6D2232, 0x8ED34A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> TORETERROR_SPAWN_EGG = ITEMS.register("toreterror_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> TORETERROR_SPAWN_EGG = ITEMS.register("toreterror_spawn_egg",
() -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.TORETERROR, 0x90EE90, 0x5C4033, new Item.Properties().rarity(Rarity.EPIC))); () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.TORETERROR, 0x90EE90, 0x5C4033, new Item.Properties().rarity(Rarity.EPIC)));
public static final DeferredItem<DeferredSpawnEggItem> CHEEP_SPAWN_EGG = ITEMS.register("cheep_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> CHEEP_SPAWN_EGG = ITEMS.register("cheep_spawn_egg",
@@ -52,6 +52,7 @@ public class AntarchyNeoforgeSpawnPlacements {
event.register(AntarchyNeoforgeEntites.EMPEROR_SCORPION.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EmperorScorpionEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.EMPEROR_SCORPION.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EmperorScorpionEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.JERRY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, JerryEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.ROLLY_POLLY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);
event.register(AntarchyNeoforgeEntites.CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR);