Added first implemenation of Toreterror, shellstone, water cannon, toreterror arena, primordial armor

This commit is contained in:
craisinlord committed 2026-06-24 20:50:00 -05:00
1 parent 0e37e4069e
commit 70e4479f19
86 files changed
+1399 -115

No files matched your search

@@ -237,6 +237,7 @@ public final class AntarchyConfigModuleNeoforge {
AntarchySettings.setNightmareBootsArmorToughness(AntarchyToolsConfig.nightmareBootsArmorToughness());
AntarchySettings.setNightmareArmorKnockbackResistance(AntarchyToolsConfig.nightmareArmorKnockbackResistance());
AntarchySettings.setNightmareArmorDreadAuraRangePerPiece(AntarchyToolsConfig.nightmareArmorDreadAuraRangePerPiece());
AntarchySettings.setPrimordialArmorKnockbackPerPiece(AntarchyToolsConfig.primordialArmorKnockbackPerPiece());
AntarchySettings.setNightmareSwordBaseDamage(AntarchyToolsConfig.nightmareSwordBaseDamage());
AntarchySettings.setNightmareSwordAttackSpeed(AntarchyToolsConfig.nightmareSwordAttackSpeed());
AntarchySettings.setNightmareSwordScalingFactor(AntarchyToolsConfig.nightmareSwordScalingFactor());
@@ -195,6 +195,9 @@ public class AntarchyNeoforge {
() -> AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS.get(),
() -> AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_STAIRS.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_SLAB.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_WALL.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_SLAB.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_WALL.get(),
@@ -111,6 +111,7 @@ public final class AntarchyToolsConfig {
private static final ModConfigSpec.DoubleValue NIGHTMARE_BOOTS_ARMOR_TOUGHNESS;
private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE;
private static final ModConfigSpec.DoubleValue PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_BASE_DAMAGE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_ATTACK_SPEED;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_SCALING_FACTOR;
@@ -326,6 +327,7 @@ public final class AntarchyToolsConfig {
"Full set (4 pieces) gives 5.0 blocks by default."
)
.defineInRange("dreadAuraRangePerPiece", 1.25D, 0.0D, 64.0D);
PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE = b.comment("Attack knockback added by each Primordial Armor piece.") .defineInRange("primordialArmorKnockbackPerPiece", 0.5D, 0.0D, 16.0D);
b.pop();
b.push("nightmareSword");
@@ -532,6 +534,7 @@ public final class AntarchyToolsConfig {
static double nightmareBootsArmorToughness() { return NIGHTMARE_BOOTS_ARMOR_TOUGHNESS.get(); }
static double nightmareArmorKnockbackResistance() { return NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE.get(); }
static double nightmareArmorDreadAuraRangePerPiece() { return NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE.get(); }
static double primordialArmorKnockbackPerPiece() { return PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE.get(); }
static double nightmareSwordBaseDamage() { return NIGHTMARE_SWORD_BASE_DAMAGE.get(); }
static double nightmareSwordAttackSpeed() { return NIGHTMARE_SWORD_ATTACK_SPEED.get(); }
static double nightmareSwordScalingFactor() { return NIGHTMARE_SWORD_SCALING_FACTOR.get(); }
@@ -0,0 +1,45 @@
package com.craisinlord.antarchy.neoforge.client;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.ViewportEvent;
@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ToreterrorCameraShakeHandler {
private static final double MAX_SHAKE_RANGE = 48.0D;
private ToreterrorCameraShakeHandler() {
}
@SubscribeEvent
public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null) return;
Vec3 cameraPos = event.getCamera().getPosition();
float shakeStrength = 0.0F;
for (ToreterrorEntity toreterror : mc.level.getEntitiesOfClass(
ToreterrorEntity.class,
mc.player.getBoundingBox().inflate(MAX_SHAKE_RANGE),
t -> t.isAlive() && t.isJumpShaking()
)) {
double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0)));
if (distance > MAX_SHAKE_RANGE) continue;
shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 2.0D);
}
if (shakeStrength <= 0.0F) return;
float time = (float) (mc.player.tickCount + event.getPartialTick());
event.setYaw(event.getYaw() + Mth.sin(time * 1.5F) * shakeStrength * 2.5F);
event.setPitch(event.getPitch() + Mth.cos(time * 1.8F) * shakeStrength * 2.0F);
event.setRoll(event.getRoll() + Mth.sin(time * 2.2F) * shakeStrength * 1.5F);
}
}
@@ -136,6 +136,12 @@ public final class AntarchyNeoforgeBlocks {
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<StairBlock> MOSSY_SHELLSTONE_BRICK_STAIRS = BLOCKS.register("mossy_shellstone_brick_stairs",
() -> new StairBlock(MOSSY_SHELLSTONE_BRICKS.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<SlabBlock> MOSSY_SHELLSTONE_BRICK_SLAB = BLOCKS.register("mossy_shellstone_brick_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<WallBlock> MOSSY_SHELLSTONE_BRICK_WALL = BLOCKS.register("mossy_shellstone_brick_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs",
() -> new StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab",
@@ -183,6 +183,9 @@ public class AntarchyNeoforgeCreativeModeTabs {
event.accept(AntarchyNeoforgeItems.SHELLSTONE_BRICK_WALL_ITEM.get());
event.accept(AntarchyNeoforgeItems.CHISELED_SHELLSTONE_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICKS_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_STAIRS_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_SLAB_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_WALL_ITEM.get());
event.accept(AntarchyNeoforgeItems.CRACKED_SHELLSTONE_BRICKS_ITEM.get());
event.accept(AntarchyNeoforgeItems.NYXITE_ITEM.get());
event.accept(AntarchyNeoforgeItems.NYXITE_STAIRS_ITEM.get());
@@ -315,73 +318,81 @@ public class AntarchyNeoforgeCreativeModeTabs {
"nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall",
"pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1;
// 2 - Antimetal blocks
case "antimetal", "polished_antimetal" -> 2;
// 2 - Shellstone blocks
case "shellstone", "polished_shellstone", "shellstone_bricks", "chiseled_shellstone",
"mossy_shellstone_bricks", "cracked_shellstone_bricks",
"shellstone_stairs", "shellstone_slab", "shellstone_wall",
"polished_shellstone_stairs", "polished_shellstone_slab", "polished_shellstone_wall",
"shellstone_brick_stairs", "shellstone_brick_slab", "shellstone_brick_wall",
"mossy_shellstone_brick_stairs", "mossy_shellstone_brick_slab", "mossy_shellstone_brick_wall" -> 2;
// 3 - Dream sand and blocks
// 3 - Antimetal blocks
case "antimetal", "polished_antimetal" -> 3;
// 4 - Dream sand and blocks
case "dream_sand", "dream_sandstone", "chiseled_dream_sandstone",
"cut_dream_sandstone", "smooth_dream_sandstone",
"dream_sandstone_stairs", "dream_sandstone_slab", "dream_sandstone_wall",
"smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab",
"cut_dream_sandstone_slab" -> 3;
"cut_dream_sandstone_slab" -> 4;
// 4 - Umbral moss
case "umbral_moss_block", "umbral_moss_carpet" -> 4;
// 5 - Umbral moss
case "umbral_moss_block", "umbral_moss_carpet" -> 5;
// 5 - All ores + metal storage/decorative blocks
// 6 - All ores + metal storage/decorative blocks
case "uranium_ore", "deepslate_uranium_ore", "titanium_ore", "deepslate_titanium_ore",
"uranium_block", "titanium_block",
"cut_uranium", "cut_titanium", "cut_uranium_slab", "cut_titanium_slab",
"cut_uranium_stairs", "cut_titanium_stairs",
"chiseled_uranium", "chiseled_titanium",
"uranium_door", "titanium_door", "uranium_trapdoor", "titanium_trapdoor",
"uranium_bars", "titanium_bars", "uranium_bulb", "titanium_bulb" -> 5;
"uranium_bars", "titanium_bars", "uranium_bulb", "titanium_bulb" -> 6;
// 6 - Raw ores
// 7 - Raw ores
case "raw_uranium", "raw_titanium", "raw_uranium_scrap", "raw_titanium_scrap",
"raw_uranium_block", "raw_titanium_block" -> 6;
"raw_uranium_block", "raw_titanium_block" -> 7;
// 7 - Blood crystal blocks (not the shard ingredient)
// 8 - Blood crystal blocks (not the shard ingredient)
case "blood_crystal_block", "small_blood_crystal_bud", "medium_blood_crystal_bud",
"large_blood_crystal_bud", "budding_blood_crystal", "blood_crystal_cluster" -> 7;
"large_blood_crystal_bud", "budding_blood_crystal", "blood_crystal_cluster" -> 8;
// 8 - Ouranwood leaves
case "ouranwood_leaves" -> 8;
// 9 - Ouranwood leaves
case "ouranwood_leaves" -> 9;
// 9 - Saplings / seeds
case "duplicator_sapling", "ouranwood_acorn" -> 9;
// 10 - Saplings / seeds
case "duplicator_sapling", "ouranwood_acorn" -> 10;
// 10 - Plants and flowers
// 11 - Plants and flowers
case "orange_milkweed", "pink_milkweed", "torchflower_bush", "hushweed",
"triffid_goo_block", "wasp_nest",
"red_ant_nest", "brown_ant_nest", "rainbow_ant_nest" -> 10;
"red_ant_nest", "brown_ant_nest", "rainbow_ant_nest" -> 11;
// 11 - Dream lighting
case "dream_torch", "dream_lantern", "dream_campfire" -> 11;
// 12 - Dream lighting
case "dream_torch", "dream_lantern", "dream_campfire" -> 12;
// 12 - Antimetal scaffolding
case "antimetal_scaffolding" -> 12;
// 13 - Antimetal scaffolding
case "antimetal_scaffolding" -> 13;
// 13 - Infested blocks
case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg" -> 13;
// 14 - Infested blocks
case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg" -> 14;
// 14 - Tools
// 15 - Tools
case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe",
"duct_tape", "diamond_minecart", "gravity_sculk_sensor" -> 14;
"duct_tape", "diamond_minecart", "gravity_sculk_sensor" -> 15;
// 15 - Liquid buckets
case "ichor_bucket", "antiwater_bucket", "cloud_bucket" -> 15;
// 16 - Liquid buckets
case "ichor_bucket", "antiwater_bucket", "cloud_bucket" -> 16;
// 16 - Misc wearables / gadgets
case "moggles", "brutalfly_elytra", "fallen_king_crown" -> 16;
// 17 - Misc wearables / gadgets
case "moggles", "brutalfly_elytra", "fallen_king_crown" -> 17;
// 17 - Weapons
// 18 - Weapons
case "battle_axe", "basilisk_dagger", "squidzooka", "shrink_ray", "growth_ray",
"gravity_gun", "water_cannon", "nightmare_sword", "lucid_pearl", "scorpion_whip", "blood_crystal_katana",
"big_bertha", "big_bertha_blade", "big_bertha_handle", "big_bertha_hilt",
"ultimate_sword", "ultimate_mace" -> 17;
"ultimate_sword", "ultimate_mace" -> 18;
// 18 - Armor sets
// 19 - Armor sets
case "primordial_helmet", "primordial_chestplate",
"primordial_leggings", "primordial_boots",
"blood_crystal_helmet", "blood_crystal_chestplate",
@@ -389,34 +400,34 @@ public class AntarchyNeoforgeCreativeModeTabs {
"nightmare_helmet", "nightmare_chestplate",
"nightmare_leggings", "nightmare_boots",
"ultimate_helmet", "ultimate_chestplate",
"ultimate_leggings", "ultimate_boots" -> 18;
"ultimate_leggings", "ultimate_boots" -> 19;
// 19 - Ranged weapons
case "ultimate_bow", "ultimate_crossbow" -> 19;
// 20 - Ranged weapons
case "ultimate_bow", "ultimate_crossbow" -> 20;
// 20 - Foods
// 21 - Foods
case "cloud_shark_fin_soup", "mud_pie", "rainbow_sugar",
"blood_crystal_apple" -> 20;
"blood_crystal_apple" -> 21;
// 21 - Crafting ingredients
// 22 - Crafting ingredients
case "blood_crystal_shard", "cloud_shark_fin", "basilisk_fang", "kraken_tooth",
"emperor_scorpion_stinger", "nightmare_scale", "molevore_nose",
"moleworm", "uranium_nugget", "titanium_nugget",
"uranium_ingot", "titanium_ingot", "lucid_eye",
"mantis_claw", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear",
"primordial_scute", "triffid_goo", "vortex_eye" -> 21;
"primordial_scute", "triffid_goo", "vortex_eye" -> 22;
// 22 - Arrows (reserved for future arrow types)
// 23 - Arrows (reserved for future arrow types)
// 23 - Potions
case "reverie_bottle" -> 23;
// 24 - Potions
case "reverie_bottle" -> 24;
// 24 - Spawn eggs
// 25 - Spawn eggs
default -> {
if (!path.endsWith("_spawn_egg")) {
org.slf4j.LoggerFactory.getLogger("Antarchy/CreativeTab").warn("Unmatched creative tab item: '{}'", path);
}
yield path.endsWith("_spawn_egg") ? 24 : 99;
yield path.endsWith("_spawn_egg") ? 25 : 99;
}
};
}
@@ -244,7 +244,7 @@ public final class AntarchyNeoforgeEntites {
.build("brutalfly_orb"));
public static final DeferredHolder<EntityType<?>, EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror",
() -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER)
.sized(2.5F, 3.0F)
.sized(2.0F, 3.0F)
.clientTrackingRange(14)
.build("toreterror"));
public static final DeferredHolder<EntityType<?>, EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb",
@@ -235,6 +235,9 @@ public final class AntarchyNeoforgeItems {
public static final DeferredItem<net.minecraft.world.item.BlockItem> CHISELED_SHELLSTONE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> CRACKED_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_WALL);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_WALL);
@@ -0,0 +1,9 @@
{
"type": "neoforge:add_features",
"biomes": "#antarchy:has_shellstone",
"features": [
"antarchy:shellstone_upper",
"antarchy:shellstone_lower"
],
"step": "underground_ores"
}