re-organized files

moved creative menu logic all to common
fixed fabric fluids
made termites a little more forgiving
worked on fixing herc beetle
This commit is contained in:
craisinlord committed 2026-07-22 02:39:32 -05:00
1 parent d5fd81f1c3
commit db93a3ced9
161 files changed
+2588 -1337

No files matched your search

@@ -1,10 +1,10 @@
package com.craisinlord.antarchy.compat.jei;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.AmericanizeRecipe;
import com.craisinlord.antarchy.content.recipe.AmericanizeRecipe;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.CustomBrewingRecipes;
import com.craisinlord.antarchy.content.recipe.CustomBrewingRecipes;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant;
import com.craisinlord.antarchy.content.item.GlimmerBottleItem;
@@ -160,6 +160,14 @@ public final class AntarchySoundEvents {
public static Supplier<SoundEvent> ROLLY_POLLY_WHEEL_MODE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> ROLLY_POLLY_NORMAL_MODE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> ROLLY_POLLY_ROLL = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_YOUNG_IDLE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_YOUNG_HURT = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_YOUNG_DEATH = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_YOUNG_ATTACK = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_ADULT_IDLE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_ADULT_HURT = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_ADULT_DEATH = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> JERRY_ADULT_ATTACK = (Supplier<SoundEvent>) UNBOUND;
private AntarchySoundEvents() {
}
@@ -315,7 +323,15 @@ public final class AntarchySoundEvents {
Supplier<SoundEvent> brutalflySpit,
Supplier<SoundEvent> rollyPollyWheelMode,
Supplier<SoundEvent> rollyPollyNormalMode,
Supplier<SoundEvent> rollyPollyRoll
Supplier<SoundEvent> rollyPollyRoll,
Supplier<SoundEvent> jerryYoungIdle,
Supplier<SoundEvent> jerryYoungHurt,
Supplier<SoundEvent> jerryYoungDeath,
Supplier<SoundEvent> jerryYoungAttack,
Supplier<SoundEvent> jerryAdultIdle,
Supplier<SoundEvent> jerryAdultHurt,
Supplier<SoundEvent> jerryAdultDeath,
Supplier<SoundEvent> jerryAdultAttack
) {
SQUIDZOOKA_FIRE = squidzookaFire;
SHRINK_RAY_SOUND = shrinkRaySound;
@@ -468,5 +484,13 @@ public final class AntarchySoundEvents {
ROLLY_POLLY_WHEEL_MODE = rollyPollyWheelMode;
ROLLY_POLLY_NORMAL_MODE = rollyPollyNormalMode;
ROLLY_POLLY_ROLL = rollyPollyRoll;
JERRY_YOUNG_IDLE = jerryYoungIdle;
JERRY_YOUNG_HURT = jerryYoungHurt;
JERRY_YOUNG_DEATH = jerryYoungDeath;
JERRY_YOUNG_ATTACK = jerryYoungAttack;
JERRY_ADULT_IDLE = jerryAdultIdle;
JERRY_ADULT_HURT = jerryAdultHurt;
JERRY_ADULT_DEATH = jerryAdultDeath;
JERRY_ADULT_ATTACK = jerryAdultAttack;
}
}
@@ -33,6 +33,7 @@ public final class AntarchyTags {
public static final TagKey<Block> UMBRAL_MOSS_REPLACEABLE = TagKey.create(Registries.BLOCK, id("umbral_moss_replaceable"));
public static final TagKey<Block> BLUSH_MOSS_REPLACEABLE = TagKey.create(Registries.BLOCK, id("blush_moss_replaceable"));
public static final TagKey<Block> BIOWART_REPLACEABLE = TagKey.create(Registries.BLOCK, id("biowart_replaceable"));
public static final TagKey<Block> BIOWART_TENDRILS_PLANTABLE = TagKey.create(Registries.BLOCK, id("biowart_tendrils_plantable"));
public static final TagKey<Block> HERCULES_BEETLE_CHARGE_IMMUNE_BLOCKS = TagKey.create(Registries.BLOCK, id("hercules_beetle_charge_immune_blocks"));
public static final TagKey<Block> ELYTHIA_PORTAL_FRAMES = TagKey.create(Registries.BLOCK, id("elythia_portal_frames"));
public static final TagKey<Block> THORAXIS_PORTAL_FRAMES = TagKey.create(Registries.BLOCK, id("thoraxis_portal_frames"));
@@ -0,0 +1,495 @@
package com.craisinlord.antarchy.content;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant;
import com.craisinlord.antarchy.content.item.GlimmerBottleItem;
import com.craisinlord.antarchy.content.item.ultimate.UltimateGearHelper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.world.item.alchemy.PotionContents;
import net.minecraft.world.level.ItemLike;
public final class CreativeTabContents {
private CreativeTabContents() {}
private record CatalogEntry(String path, String neoTabPath, String insertAfterPath) {}
public interface AntarchyTabOutput {
void accept(ItemLike item);
void accept(ItemStack stack);
}
public interface NeoForgeVanillaTabOutput extends AntarchyTabOutput {
void insertAfter(ItemLike anchor, ItemLike item);
}
private static final List<CatalogEntry> CATALOG = List.of(
entry("ouranwood_log", "building_blocks"),
entry("ouranwood_wood", "building_blocks"),
entry("mossy_ouranwood_log", "building_blocks"),
entry("mossy_ouranwood_wood", "building_blocks"),
entry("stripped_ouranwood_log", "building_blocks"),
entry("stripped_ouranwood_wood", "building_blocks"),
entry("ouranwood_planks", "building_blocks"),
entry("ouranwood_stairs", "building_blocks"),
entry("ouranwood_slab", "building_blocks"),
entry("ouranwood_fence", "building_blocks"),
entry("ouranwood_fence_gate", "building_blocks"),
entry("ouranwood_boat", "building_blocks"),
entry("ouranwood_chest_boat", "building_blocks"),
entry("ouranwood_door", "building_blocks"),
entry("ouranwood_trapdoor", "building_blocks"),
entry("ouranwood_pressure_plate", "building_blocks"),
entry("ouranwood_button", "building_blocks"),
entry("ouranwood_sign", "building_blocks"),
entry("ouranwood_hanging_sign", "building_blocks"),
entry("peach_log", "building_blocks"),
entry("peach_wood", "building_blocks"),
entry("stripped_peach_log", "building_blocks"),
entry("stripped_peach_wood", "building_blocks"),
entry("peach_planks", "building_blocks"),
entry("peach_stairs", "building_blocks"),
entry("peach_slab", "building_blocks"),
entry("peach_fence", "building_blocks"),
entry("peach_fence_gate", "building_blocks"),
entry("peach_boat", "building_blocks"),
entry("peach_chest_boat", "building_blocks"),
entry("peach_door", "building_blocks"),
entry("peach_trapdoor", "building_blocks"),
entry("peach_pressure_plate", "building_blocks"),
entry("peach_button", "building_blocks"),
entry("peach_sign", "building_blocks"),
entry("peach_hanging_sign", "building_blocks"),
entry("shellstone", "building_blocks"),
entry("shellstone_stairs", "building_blocks"),
entry("shellstone_slab", "building_blocks"),
entry("shellstone_wall", "building_blocks"),
entry("polished_shellstone", "building_blocks"),
entry("polished_shellstone_stairs", "building_blocks"),
entry("polished_shellstone_slab", "building_blocks"),
entry("polished_shellstone_wall", "building_blocks"),
entry("shellstone_bricks", "building_blocks"),
entry("shellstone_brick_stairs", "building_blocks"),
entry("shellstone_brick_slab", "building_blocks"),
entry("shellstone_brick_wall", "building_blocks"),
entry("chiseled_shellstone", "building_blocks"),
entry("mossy_shellstone_bricks", "building_blocks"),
entry("mossy_shellstone_brick_stairs", "building_blocks"),
entry("mossy_shellstone_brick_slab", "building_blocks"),
entry("mossy_shellstone_brick_wall", "building_blocks"),
entry("cracked_shellstone_bricks", "building_blocks"),
entry("blush_moss_block", "building_blocks"),
entry("blush_moss_carpet", "building_blocks"),
entry("lumen_froglight", "natural_blocks"),
entry("roseate_froglight", "natural_blocks"),
entry("nyxite", "building_blocks"),
entry("nyxite_stairs", "building_blocks"),
entry("nyxite_slab", "building_blocks"),
entry("nyxite_wall", "building_blocks"),
entry("polished_nyxite", "building_blocks"),
entry("polished_nyxite_stairs", "building_blocks"),
entry("polished_nyxite_slab", "building_blocks"),
entry("polished_nyxite_wall", "building_blocks"),
entry("nyxite_bricks", "building_blocks"),
entry("nyxite_brick_stairs", "building_blocks"),
entry("nyxite_brick_slab", "building_blocks"),
entry("nyxite_brick_wall", "building_blocks"),
entry("chiseled_nyxite", "building_blocks"),
entry("pale_nyxite", "building_blocks"),
entry("nyxite_spike", "building_blocks"),
entry("potent_nyxite", "building_blocks"),
entry("antimetal", "building_blocks"),
entry("polished_antimetal", "building_blocks"),
entry("antimetal_scaffolding", "building_blocks"),
entry("umbral_moss_block", "building_blocks"),
entry("umbral_moss_carpet", "building_blocks"),
entry("dream_torch", "building_blocks"),
entry("dream_lantern", "building_blocks"),
entry("dream_campfire", "building_blocks"),
entry("dream_sand", "building_blocks"),
entry("dream_sandstone", "building_blocks"),
entry("chiseled_dream_sandstone", "building_blocks"),
entry("cut_dream_sandstone", "building_blocks"),
entry("smooth_dream_sandstone", "building_blocks"),
entry("dream_sandstone_stairs", "building_blocks"),
entry("dream_sandstone_slab", "building_blocks"),
entry("dream_sandstone_wall", "building_blocks"),
entry("smooth_dream_sandstone_stairs", "building_blocks"),
entry("smooth_dream_sandstone_slab", "building_blocks"),
entry("cut_dream_sandstone_slab", "building_blocks"),
entry("budding_blood_crystal", "building_blocks"),
entry("blood_crystal_block", "building_blocks"),
entry("blood_crystal_cluster", "building_blocks"),
entry("small_blood_crystal_bud", "building_blocks"),
entry("medium_blood_crystal_bud", "building_blocks"),
entry("large_blood_crystal_bud", "building_blocks"),
entry("myrmite", "building_blocks"),
entry("biomite", "building_blocks"),
entry("biomite_turf", "building_blocks"),
entry("biowart", "building_blocks"),
entry("biowart_tendrils", "building_blocks"),
entry("broodstone", "building_blocks"),
entry("polished_broodstone", "building_blocks"),
entry("chiseled_broodstone", "building_blocks"),
entry("broodstone_bricks", "building_blocks"),
entry("broodstone_stairs", "building_blocks"),
entry("broodstone_slab", "building_blocks"),
entry("broodstone_wall", "building_blocks"),
entry("polished_broodstone_stairs", "building_blocks"),
entry("polished_broodstone_slab", "building_blocks"),
entry("polished_broodstone_wall", "building_blocks"),
entry("broodstone_brick_stairs", "building_blocks"),
entry("broodstone_brick_slab", "building_blocks"),
entry("broodstone_brick_wall", "building_blocks"),
entry("myrmite_coal_ore", "building_blocks"),
entry("broodstone_uranium_ore", "building_blocks"),
entry("broodstone_titanium_ore", "building_blocks"),
entry("bile_vein", "building_blocks"),
entry("chiten_block", "building_blocks"),
entry("chiten_spike", "building_blocks"),
entry("amber_moss_block", "building_blocks"),
entry("amber_moss_carpet", "building_blocks"),
entry("uranium_block", "building_blocks"),
entry("raw_uranium_block", "building_blocks"),
entry("cut_uranium", "building_blocks"),
entry("cut_uranium_stairs", "building_blocks"),
entry("cut_uranium_slab", "building_blocks"),
entry("chiseled_uranium", "building_blocks"),
entry("uranium_door", "building_blocks"),
entry("uranium_trapdoor", "building_blocks"),
entry("uranium_bars", "building_blocks"),
entry("uranium_bulb", "building_blocks"),
entry("titanium_block", "building_blocks"),
entry("raw_titanium_block", "building_blocks"),
entry("cut_titanium", "building_blocks"),
entry("cut_titanium_stairs", "building_blocks"),
entry("cut_titanium_slab", "building_blocks"),
entry("chiseled_titanium", "building_blocks"),
entry("titanium_door", "building_blocks"),
entry("titanium_trapdoor", "building_blocks"),
entry("titanium_bars", "building_blocks"),
entry("titanium_bulb", "building_blocks"),
entry("ouranwood_leaves", "natural_blocks"),
entry("ouranwood_acorn", "natural_blocks"),
entry("peach_leaves", "natural_blocks"),
entry("peach_sapling", "natural_blocks"),
entry("duplicator_log", "natural_blocks"),
entry("duplicator_sapling", "natural_blocks"),
entry("orange_milkweed", "natural_blocks"),
entry("pink_milkweed", "natural_blocks"),
entry("camellia", "natural_blocks"),
entry("spider_lily", "natural_blocks"),
entry("lotus", "natural_blocks"),
entry("giant_lily_pad", "natural_blocks"),
entry("seashell", "natural_blocks"),
entry("hushweed", "natural_blocks"),
entry("amber_lichen", "natural_blocks"),
entry("creepvine", "natural_blocks"),
entry("hanging_creeproots", "natural_blocks"),
entry("molting_vines", "natural_blocks"),
entry("glowcap_mushroom", "natural_blocks"),
entry("glowcap_mushroom_block", "natural_blocks"),
entry("infested_rooted_dirt", "natural_blocks"),
entry("infested_coarse_dirt", "natural_blocks"),
entry("triffid_goo_block", "natural_blocks"),
entry("bed_bug_egg", "natural_blocks"),
entry("creeping_horror_egg", "natural_blocks"),
entry("lurking_terror_egg", "natural_blocks"),
entry("jumpy_bug_egg", "natural_blocks"),
entry("spit_bug_egg", "natural_blocks"),
entry("jerry_egg", "natural_blocks"),
entry("wasp_nest", "natural_blocks"),
entry("red_ant_nest", "natural_blocks"),
entry("brown_ant_nest", "natural_blocks"),
entry("rainbow_ant_nest", "natural_blocks"),
entry("termite_nest", "natural_blocks"),
entry("uranium_ore", "natural_blocks"),
entry("deepslate_uranium_ore", "natural_blocks"),
entry("titanium_ore", "natural_blocks"),
entry("deepslate_titanium_ore", "natural_blocks"),
entry("corn_seeds", "natural_blocks"),
entry("star_coral", "natural_blocks"),
entry("star_coral_fan", "natural_blocks"),
entry("star_coral_block", "natural_blocks"),
entry("dead_star_coral", "natural_blocks"),
entry("dead_star_coral_fan", "natural_blocks"),
entry("dead_star_coral_block", "natural_blocks"),
entry("duct_tape", "tools_and_utilities", "shears"),
entry("diamond_minecart", "tools_and_utilities", "minecart"),
entry("bile_bucket", "tools_and_utilities"),
entry("ichor_bucket", "tools_and_utilities"),
entry("antiwater_bucket", "tools_and_utilities"),
entry("lumen_bucket", "tools_and_utilities"),
entry("cloud_bucket", "tools_and_utilities"),
entry("reverie_bottle", "tools_and_utilities"),
entry("glimmer_bottle", "tools_and_utilities"),
entry("critter_cage", "tools_and_utilities"),
entry("ultimate_pickaxe", "tools_and_utilities"),
entry("ultimate_axe", "tools_and_utilities"),
entry("ultimate_shovel", "tools_and_utilities"),
entry("ultimate_hoe", "tools_and_utilities"),
entry("battle_axe", "combat"),
entry("big_bertha", "combat"),
entry("basilisk_dagger", "combat"),
entry("ultimate_helmet", "combat"),
entry("ultimate_chestplate", "combat"),
entry("ultimate_leggings", "combat"),
entry("ultimate_boots", "combat"),
entry("ultimate_sword", "combat"),
entry("ultimate_bow", "combat"),
entry("ultimate_crossbow", "combat"),
entry("squidzooka", "combat"),
entry("rpo_launcher", "combat"),
entry("krakens_grasp", "combat"),
entry("shrink_ray", "combat"),
entry("growth_ray", "combat"),
entry("gravity_gun", "combat"),
entry("water_cannon", "combat"),
entry("attitude_adjuster", "combat"),
entry("lucid_pearl", "combat"),
entry("primordial_helmet", "combat"),
entry("primordial_chestplate", "combat"),
entry("primordial_leggings", "combat"),
entry("primordial_boots", "combat"),
entry("nightmare_helmet", "combat"),
entry("nightmare_chestplate", "combat"),
entry("nightmare_leggings", "combat"),
entry("nightmare_boots", "combat"),
entry("nightmare_sword", "combat"),
entry("blood_crystal_katana", "combat"),
entry("blood_crystal_helmet", "combat"),
entry("blood_crystal_chestplate", "combat"),
entry("blood_crystal_leggings", "combat"),
entry("blood_crystal_boots", "combat"),
entry("moggles", "combat"),
entry("scorpion_whip", "combat"),
entry("fallen_king_crown", "combat"),
entry("brutalfly_elytra", "combat"),
entry("jumpy_boots", "combat"),
entry("raw_uranium_scrap", "ingredients"),
entry("raw_titanium_scrap", "ingredients"),
entry("raw_uranium", "ingredients"),
entry("raw_titanium", "ingredients"),
entry("uranium_nugget", "ingredients"),
entry("titanium_nugget", "ingredients"),
entry("uranium_ingot", "ingredients"),
entry("titanium_ingot", "ingredients"),
entry("cloud_shark_fin", "ingredients"),
entry("cloud_shark_fin_soup", "ingredients"),
entry("basilisk_fang", "ingredients"),
entry("nightmare_scale", "ingredients"),
entry("molevore_nose", "ingredients"),
entry("moleworm", "ingredients"),
entry("mud_pie", "ingredients"),
entry("lucid_eye", "ingredients"),
entry("blood_crystal_shard", "ingredients"),
entry("blood_crystal_apple", "ingredients"),
entry("spirit_apple", "ingredients"),
entry("mantis_claw", "combat"),
entry("hercules_horn", "ingredients"),
entry("king_scale", "ingredients"),
entry("queen_scale", "ingredients"),
entry("chiten", "ingredients"),
entry("jerry_nucleus", "ingredients"),
entry("carapace", "ingredients"),
entry("stink_bug", "ingredients"),
entry("brutalfly_wing", "ingredients"),
entry("primordial_scute", "ingredients"),
entry("triffid_goo", "ingredients"),
entry("vortex_eye", "ingredients"),
entry("emperor_scorpion_stinger", "ingredients"),
entry("kraken_tooth", "ingredients"),
entry("kraken_tentacle", "ingredients"),
entry("jumpy_bug_leg", "ingredients"),
entry("cornea_ear", "ingredients"),
entry("corn", "ingredients"),
entry("high_fructose_corn_syrup", "ingredients"),
entry("peach", "ingredients"),
entry("peach_pie", "ingredients"),
entry("cornbread", "ingredients"),
entry("popcorn", "ingredients"),
entry("raw_corndog", "ingredients"),
entry("cooked_corndog", "ingredients"),
entry("raw_venison", "ingredients"),
entry("cooked_venison", "ingredients"),
entry("raw_bug_meat", "ingredients"),
entry("cooked_bug_meat", "ingredients"),
entry("broodfruit", "ingredients"),
entry("cheep", "ingredients"),
entry("root_beer", "ingredients"),
entry("rainbow_sugar", "ingredients"),
entry("big_bertha_blade", "ingredients"),
entry("big_bertha_handle", "ingredients"),
entry("big_bertha_hilt", "ingredients"),
entry("easter_bunny_spawn_egg", "spawn_eggs"),
entry("flying_squirrel_spawn_egg", "spawn_eggs"),
entry("caterpillar_spawn_egg", "spawn_eggs"),
entry("butterfly_spawn_egg", "spawn_eggs"),
entry("reverie_spawn_egg", "spawn_eggs"),
entry("brutalfly_spawn_egg", "spawn_eggs"),
entry("red_ant_spawn_egg", "spawn_eggs"),
entry("brown_ant_spawn_egg", "spawn_eggs"),
entry("rainbow_ant_spawn_egg", "spawn_eggs"),
entry("termite_spawn_egg", "spawn_eggs"),
entry("moleworm_spawn_egg", "spawn_eggs"),
entry("mantis_spawn_egg", "spawn_eggs"),
entry("alpha_mantis_spawn_egg", "spawn_eggs"),
entry("rolly_polly_spawn_egg", "spawn_eggs"),
entry("molevore_spawn_egg", "spawn_eggs"),
entry("triffid_spawn_egg", "spawn_eggs"),
entry("apple_cow_spawn_egg", "spawn_eggs"),
entry("golden_apple_cow_spawn_egg", "spawn_eggs"),
entry("enchanted_golden_apple_cow_spawn_egg", "spawn_eggs"),
entry("dr_trayaurus_spawn_egg", "spawn_eggs"),
entry("wasp_spawn_egg", "spawn_eggs"),
entry("bomber_spawn_egg", "spawn_eggs"),
entry("jumpy_bug_spawn_egg", "spawn_eggs"),
entry("spit_bug_spawn_egg", "spawn_eggs"),
entry("stink_bug_spawn_egg", "spawn_eggs"),
entry("cloud_shark_spawn_egg", "spawn_eggs"),
entry("kraken_spawn_egg", "spawn_eggs"),
entry("missile_squid_spawn_egg", "spawn_eggs"),
entry("octopus_bomb_spawn_egg", "spawn_eggs"),
entry("nightmare_spawn_egg", "spawn_eggs"),
entry("bed_bug_spawn_egg", "spawn_eggs"),
entry("lucid_spawn_egg", "spawn_eggs"),
entry("scorpion_spawn_egg", "spawn_eggs"),
entry("basilisk_spawn_egg", "spawn_eggs"),
entry("emperor_scorpion_spawn_egg", "spawn_eggs"),
entry("toreterror_spawn_egg", "spawn_eggs"),
entry("creeping_horror_spawn_egg", "spawn_eggs"),
entry("lurking_terror_spawn_egg", "spawn_eggs"),
entry("hercules_beetle_spawn_egg", "spawn_eggs"),
entry("jerry_spawn_egg", "spawn_eggs"),
entry("dorrie_spawn_egg", "spawn_eggs"),
entry("ouranwood_deer_spawn_egg", "spawn_eggs"),
entry("glimmer_spawn_egg", "spawn_eggs"),
entry("elka_spawn_egg", "spawn_eggs")
);
private static final List<String> ANTARCHY_POTION_FAMILIES = List.of(
"dread", "long_dread", "inversion", "long_inversion", "stinky", "long_stinky",
"paralysis", "long_paralysis", "haste", "strong_haste", "shrinking",
"strong_shrinking", "extreme_shrinking", "growing", "strong_growing", "extreme_growing"
);
private static final Map<String, Integer> ORDER_INDEX = createOrderIndex();
private static CatalogEntry entry(String path, String neoTabPath) {
return new CatalogEntry(path, neoTabPath, null);
}
private static CatalogEntry entry(String path, String neoTabPath, String insertAfterPath) {
return new CatalogEntry(path, neoTabPath, insertAfterPath);
}
private static Map<String, Integer> createOrderIndex() {
HashMap<String, Integer> index = new HashMap<>();
for (int i = 0; i < CATALOG.size(); i++) {
index.put(CATALOG.get(i).path(), i);
}
return index;
}
public static int orderIndex(Item item) {
return ORDER_INDEX.getOrDefault(path(item), Integer.MAX_VALUE);
}
public static void populateAntarchyTab(AntarchyTabOutput output) {
for (CatalogEntry entry : CATALOG) {
if ("glimmer_bottle".equals(entry.path())) {
for (GlimmerVariant variant : GlimmerVariant.values()) {
output.accept(GlimmerBottleItem.create(variant));
}
continue;
}
output.accept(item(entry.path()));
}
for (String potionPath : ANTARCHY_POTION_FAMILIES) {
acceptPotionFamily(output, potionPath);
}
}
public static boolean populateNeoForgeVanillaTab(ResourceKey<CreativeModeTab> tabKey, HolderLookup.Provider holders,
NeoForgeVanillaTabOutput output) {
String tabPath = tabKey.location().getPath();
boolean matched = false;
for (CatalogEntry entry : CATALOG) {
if (!tabPath.equals(entry.neoTabPath())) {
continue;
}
matched = true;
if (entry.insertAfterPath() != null) {
output.insertAfter(vanillaItem(entry.insertAfterPath()), item(entry.path()));
continue;
}
if ("combat".equals(tabPath)) {
if (isUltimateArmor(entry.path())) {
output.accept(UltimateGearHelper.createUltimateArmorStack(item(entry.path()), holders));
continue;
}
if ("ultimate_bow".equals(entry.path())) {
output.accept(UltimateGearHelper.createUltimateBowStack(item(entry.path()), holders));
continue;
}
}
output.accept(item(entry.path()));
}
if ("combat".equals(tabPath)) {
for (String potionPath : ANTARCHY_POTION_FAMILIES) {
Holder<Potion> potion = potion(potionPath);
if (potion != null) {
output.accept(PotionContents.createItemStack(Items.POTION, potion));
}
}
matched = true;
}
return matched;
}
private static boolean isUltimateArmor(String path) {
return "ultimate_helmet".equals(path)
|| "ultimate_chestplate".equals(path)
|| "ultimate_leggings".equals(path)
|| "ultimate_boots".equals(path);
}
private static void acceptPotionFamily(AntarchyTabOutput output, String path) {
Holder<Potion> potion = potion(path);
if (potion == null) {
return;
}
output.accept(PotionContents.createItemStack(Items.POTION, potion));
output.accept(PotionContents.createItemStack(Items.SPLASH_POTION, potion));
output.accept(PotionContents.createItemStack(Items.LINGERING_POTION, potion));
output.accept(PotionContents.createItemStack(Items.TIPPED_ARROW, potion));
}
private static String path(Item item) {
return BuiltInRegistries.ITEM.getKey(item).getPath();
}
private static Item item(String path) {
return BuiltInRegistries.ITEM.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path));
}
private static Item vanillaItem(String path) {
return BuiltInRegistries.ITEM.get(ResourceLocation.withDefaultNamespace(path));
}
private static Holder<Potion> potion(String path) {
Potion potion = BuiltInRegistries.POTION.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path));
return potion == null ? null : BuiltInRegistries.POTION.wrapAsHolder(potion);
}
}
@@ -8,362 +8,18 @@ public final class CreativeTabOrder {
private CreativeTabOrder() {}
public static final Comparator<Item> COMPARATOR =
Comparator.comparingInt(CreativeTabOrder::group)
.thenComparingInt(CreativeTabOrder::subOrder);
Comparator.comparingInt(CreativeTabContents::orderIndex)
.thenComparing(CreativeTabOrder::path);
public static int group(Item item) {
String path = BuiltInRegistries.ITEM.getKey(item).getPath();
return switch (path) {
case "ouranwood_log", "ouranwood_wood", "mossy_ouranwood_log", "mossy_ouranwood_wood",
"stripped_ouranwood_log", "stripped_ouranwood_wood", "duplicator_log",
"ouranwood_planks", "ouranwood_stairs", "ouranwood_slab",
"ouranwood_fence", "ouranwood_fence_gate",
"ouranwood_door", "ouranwood_trapdoor",
"ouranwood_pressure_plate", "ouranwood_button",
"ouranwood_sign", "ouranwood_hanging_sign",
"ouranwood_boat", "ouranwood_chest_boat",
"peach_log", "peach_wood", "stripped_peach_log", "stripped_peach_wood",
"peach_planks", "peach_stairs", "peach_slab", "peach_fence", "peach_fence_gate",
"peach_door", "peach_trapdoor", "peach_pressure_plate", "peach_button",
"peach_sign", "peach_hanging_sign", "peach_boat", "peach_chest_boat" -> 0;
case "nyxite", "polished_nyxite", "chiseled_nyxite", "nyxite_bricks",
"nyxite_stairs", "nyxite_slab", "nyxite_wall",
"polished_nyxite_stairs", "polished_nyxite_slab", "polished_nyxite_wall",
"nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall",
"pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1;
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",
"blush_moss_block", "blush_moss_carpet",
"lumen_froglight", "roseate_froglight" -> 2;
case "antimetal", "polished_antimetal" -> 3;
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" -> 4;
case "umbral_moss_block", "umbral_moss_carpet" -> 4;
case "uranium_ore", "deepslate_uranium_ore", "broodstone_uranium_ore",
"titanium_ore", "deepslate_titanium_ore", "broodstone_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" -> 6;
case "raw_uranium", "raw_titanium", "raw_uranium_scrap", "raw_titanium_scrap",
"raw_uranium_block", "raw_titanium_block" -> 7;
case "blood_crystal_block", "small_blood_crystal_bud", "medium_blood_crystal_bud",
"large_blood_crystal_bud", "budding_blood_crystal", "blood_crystal_cluster",
"myrmite", "biomite", "biomite_turf", "biowart", "biowart_tendrils",
"broodstone", "polished_broodstone", "chiseled_broodstone", "broodstone_bricks",
"broodstone_stairs", "broodstone_slab", "broodstone_wall",
"polished_broodstone_stairs", "polished_broodstone_slab", "polished_broodstone_wall",
"broodstone_brick_stairs", "broodstone_brick_slab", "broodstone_brick_wall",
"myrmite_coal_ore", "chiten_block", "chiten_spike", "amber_moss_block", "amber_moss_carpet",
"glowcap_mushroom", "glowcap_mushroom_block" -> 8;
case "ouranwood_leaves", "peach_leaves" -> 9;
case "duplicator_sapling", "ouranwood_acorn", "peach_sapling", "corn_seeds" -> 10;
case "orange_milkweed", "pink_milkweed", "camellia", "spider_lily", "lotus", "hushweed", "hanging_creeproots", "molting_vines", "amber_lichen", "creepvine",
"triffid_goo_block", "cloud_block", "wasp_nest",
"red_ant_nest", "brown_ant_nest", "rainbow_ant_nest", "termite_nest",
"star_coral", "star_coral_fan", "star_coral_block",
"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 "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", "jerry_egg" -> 14;
case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe",
"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 "moggles", "brutalfly_elytra", "fallen_king_crown", "jumpy_boots" -> 17;
case "battle_axe", "basilisk_dagger", "squidzooka", "rpo_launcher", "shrink_ray", "growth_ray",
"gravity_gun", "water_cannon", "nightmare_sword", "lucid_pearl", "scorpion_whip", "blood_crystal_katana",
"attitude_adjuster", "big_bertha", "big_bertha_blade", "big_bertha_handle", "big_bertha_hilt",
"ultimate_sword", "ultimate_mace", "krakens_grasp" -> 18;
case "primordial_helmet", "primordial_chestplate",
"primordial_leggings", "primordial_boots",
"blood_crystal_helmet", "blood_crystal_chestplate",
"blood_crystal_leggings", "blood_crystal_boots",
"nightmare_helmet", "nightmare_chestplate",
"nightmare_leggings", "nightmare_boots",
"ultimate_helmet", "ultimate_chestplate",
"ultimate_leggings", "ultimate_boots" -> 19;
case "ultimate_bow", "ultimate_crossbow" -> 20;
case "cloud_shark_fin_soup", "mud_pie", "peach_pie", "cornbread", "popcorn", "rainbow_sugar",
"blood_crystal_apple", "spirit_apple", "peach", "raw_corndog", "cooked_corndog",
"raw_venison", "cooked_venison", "raw_bug_meat", "cooked_bug_meat", "broodfruit" -> 21;
case "blood_crystal_shard", "cloud_shark_fin", "basilisk_fang", "kraken_tooth", "kraken_tentacle",
"emperor_scorpion_stinger", "nightmare_scale", "molevore_nose",
"moleworm", "uranium_nugget", "titanium_nugget",
"uranium_ingot", "titanium_ingot", "lucid_eye",
"mantis_claw", "hercules_horn", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear",
"primordial_scute", "triffid_goo", "vortex_eye",
"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 "easter_bunny_spawn_egg", "flying_squirrel_spawn_egg", "caterpillar_spawn_egg",
"butterfly_spawn_egg", "reverie_spawn_egg", "brutalfly_spawn_egg",
"red_ant_spawn_egg", "brown_ant_spawn_egg", "rainbow_ant_spawn_egg", "termite_spawn_egg",
"moleworm_spawn_egg", "mantis_spawn_egg", "alpha_mantis_spawn_egg", "rolly_polly_spawn_egg",
"molevore_spawn_egg", "triffid_spawn_egg", "apple_cow_spawn_egg", "golden_apple_cow_spawn_egg",
"enchanted_golden_apple_cow_spawn_egg", "dr_trayaurus_spawn_egg", "wasp_spawn_egg",
"bomber_spawn_egg", "jumpy_bug_spawn_egg", "spit_bug_spawn_egg", "stink_bug_spawn_egg", "cloud_shark_spawn_egg",
"kraken_spawn_egg", "missile_squid_spawn_egg", "octopus_bomb_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",
"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", "jerry_spawn_egg" -> 25;
default -> 99;
};
return CreativeTabContents.orderIndex(item);
}
public static int subOrder(Item item) {
String path = BuiltInRegistries.ITEM.getKey(item).getPath();
return switch (path) {
case "ouranwood_log" -> 0;
case "ouranwood_wood" -> 1;
case "mossy_ouranwood_log" -> 2;
case "mossy_ouranwood_wood" -> 3;
case "stripped_ouranwood_log" -> 4;
case "stripped_ouranwood_wood" -> 5;
case "duplicator_log" -> 6;
case "ouranwood_planks" -> 7;
case "ouranwood_stairs" -> 8;
case "ouranwood_slab" -> 9;
case "ouranwood_fence" -> 10;
case "ouranwood_fence_gate" -> 11;
case "ouranwood_door" -> 12;
case "ouranwood_trapdoor" -> 13;
case "ouranwood_pressure_plate" -> 14;
case "ouranwood_button" -> 15;
case "ouranwood_sign" -> 16;
case "ouranwood_hanging_sign" -> 17;
case "ouranwood_boat" -> 18;
case "ouranwood_chest_boat" -> 19;
case "peach_log" -> 20;
case "peach_wood" -> 21;
case "stripped_peach_log" -> 22;
case "stripped_peach_wood" -> 23;
case "peach_planks" -> 24;
case "peach_stairs" -> 25;
case "peach_slab" -> 26;
case "peach_fence" -> 27;
case "peach_fence_gate" -> 28;
case "peach_door" -> 29;
case "peach_trapdoor" -> 30;
case "peach_pressure_plate" -> 31;
case "peach_button" -> 32;
case "peach_sign" -> 33;
case "peach_hanging_sign" -> 34;
case "peach_boat" -> 35;
case "peach_chest_boat" -> 36;
case "ouranwood_leaves" -> 0;
case "peach_leaves" -> 1;
case "duplicator_sapling" -> 0;
case "ouranwood_acorn" -> 1;
case "peach_sapling" -> 2;
case "corn_seeds" -> 3;
case "orange_milkweed" -> 0;
case "pink_milkweed" -> 1;
case "camellia" -> 2;
case "spider_lily" -> 3;
case "hushweed" -> 4;
case "hanging_creeproots" -> 21;
case "molting_vines" -> 22;
case "amber_lichen" -> 5;
case "creepvine" -> 6;
case "triffid_goo_block" -> 7;
case "cloud_block" -> 8;
case "wasp_nest" -> 9;
case "red_ant_nest" -> 10;
case "brown_ant_nest" -> 11;
case "rainbow_ant_nest" -> 12;
case "termite_nest" -> 13;
case "star_coral" -> 14;
case "star_coral_fan" -> 15;
case "star_coral_block" -> 16;
case "dead_star_coral" -> 17;
case "dead_star_coral_fan" -> 18;
case "dead_star_coral_block" -> 19;
case "lotus" -> 20;
case "blood_crystal_block" -> 0;
case "small_blood_crystal_bud" -> 1;
case "medium_blood_crystal_bud" -> 2;
case "large_blood_crystal_bud" -> 3;
case "budding_blood_crystal" -> 4;
case "blood_crystal_cluster" -> 5;
case "myrmite" -> 6;
case "broodstone" -> 7;
case "polished_broodstone" -> 8;
case "chiseled_broodstone" -> 9;
case "broodstone_bricks" -> 10;
case "broodstone_stairs" -> 11;
case "broodstone_slab" -> 12;
case "broodstone_wall" -> 13;
case "polished_broodstone_stairs" -> 14;
case "polished_broodstone_slab" -> 15;
case "polished_broodstone_wall" -> 16;
case "broodstone_brick_stairs" -> 17;
case "broodstone_brick_slab" -> 18;
case "broodstone_brick_wall" -> 19;
case "myrmite_coal_ore" -> 20;
case "chiten_block" -> 21;
case "chiten_spike" -> 22;
case "amber_moss_block" -> 23;
case "amber_moss_carpet" -> 24;
case "glowcap_mushroom" -> 25;
case "glowcap_mushroom_block" -> 26;
case "uranium_ore" -> 0;
case "deepslate_uranium_ore" -> 1;
case "broodstone_uranium_ore" -> 2;
case "titanium_ore" -> 3;
case "deepslate_titanium_ore" -> 4;
case "broodstone_titanium_ore" -> 5;
case "uranium_block" -> 4;
case "titanium_block" -> 5;
case "cut_uranium" -> 6;
case "cut_titanium" -> 7;
case "cut_uranium_slab" -> 8;
case "cut_titanium_slab" -> 9;
case "cut_uranium_stairs" -> 10;
case "cut_titanium_stairs" -> 11;
case "chiseled_uranium" -> 12;
case "chiseled_titanium" -> 13;
case "uranium_door" -> 14;
case "titanium_door" -> 15;
case "uranium_trapdoor" -> 16;
case "titanium_trapdoor" -> 17;
case "uranium_bars" -> 18;
case "titanium_bars" -> 19;
case "uranium_bulb" -> 20;
case "titanium_bulb" -> 21;
case "raw_uranium" -> 0;
case "raw_titanium" -> 1;
case "raw_uranium_scrap" -> 2;
case "raw_titanium_scrap" -> 3;
case "raw_uranium_block" -> 4;
case "raw_titanium_block" -> 5;
case "dream_torch" -> 0;
case "dream_lantern" -> 1;
case "dream_campfire" -> 2;
case "dream_fire" -> 3;
case "dream_fire_ceiling" -> 4;
case "blush_moss_block" -> 18;
case "blush_moss_carpet" -> 19;
case "lumen_froglight" -> 20;
case "roseate_froglight" -> 21;
case "infested_rooted_dirt" -> 0;
case "infested_coarse_dirt" -> 1;
case "bed_bug_egg" -> 2;
case "ultimate_pickaxe" -> 0;
case "ultimate_axe" -> 1;
case "ultimate_shovel" -> 2;
case "ultimate_hoe" -> 3;
case "duct_tape" -> 4;
case "diamond_minecart" -> 5;
case "critter_cage" -> 6;
case "gravity_sculk_sensor" -> 7;
case "miners_dream" -> 8;
case "bile_bucket" -> 0;
case "ichor_bucket" -> 1;
case "antiwater_bucket" -> 2;
case "cloud_bucket" -> 3;
case "lumen_bucket" -> 4;
case "moggles" -> 0;
case "brutalfly_elytra" -> 1;
case "fallen_king_crown" -> 2;
case "jumpy_boots" -> 3;
case "battle_axe" -> 0;
case "basilisk_dagger" -> 1;
case "squidzooka" -> 2;
case "rpo_launcher" -> 3;
case "shrink_ray" -> 4;
case "growth_ray" -> 5;
case "gravity_gun" -> 6;
case "water_cannon" -> 7;
case "nightmare_sword" -> 8;
case "attitude_adjuster" -> 9;
case "lucid_pearl" -> 10;
case "scorpion_whip" -> 11;
case "blood_crystal_katana" -> 12;
case "big_bertha" -> 13;
case "big_bertha_blade" -> 14;
case "big_bertha_handle" -> 15;
case "big_bertha_hilt" -> 16;
case "ultimate_sword" -> 17;
case "ultimate_mace" -> 18;
case "krakens_grasp" -> 19;
case "primordial_helmet" -> 0;
case "primordial_chestplate" -> 1;
case "primordial_leggings" -> 2;
case "primordial_boots" -> 3;
case "blood_crystal_helmet" -> 4;
case "blood_crystal_chestplate" -> 5;
case "blood_crystal_leggings" -> 6;
case "blood_crystal_boots" -> 7;
case "nightmare_helmet" -> 8;
case "nightmare_chestplate" -> 9;
case "nightmare_leggings" -> 10;
case "nightmare_boots" -> 11;
case "ultimate_helmet" -> 12;
case "ultimate_chestplate" -> 13;
case "ultimate_leggings" -> 14;
case "ultimate_boots" -> 15;
case "ultimate_bow" -> 0;
case "ultimate_crossbow" -> 1;
case "cloud_shark_fin_soup" -> 0;
case "mud_pie" -> 1;
case "peach_pie" -> 2;
case "cornbread" -> 3;
case "popcorn" -> 4;
case "rainbow_sugar" -> 5;
case "raw_corndog" -> 6;
case "cooked_corndog" -> 7;
case "raw_venison" -> 8;
case "cooked_venison" -> 9;
case "raw_bug_meat" -> 10;
case "cooked_bug_meat" -> 11;
case "broodfruit" -> 12;
case "blood_crystal_apple" -> 10;
case "spirit_apple" -> 11;
case "peach" -> 12;
case "reverie_bottle" -> 0;
case "glimmer_bottle" -> 1;
case "root_beer" -> 2;
case "blood_crystal_shard" -> 0;
case "cloud_shark_fin" -> 1;
case "basilisk_fang" -> 2;
case "kraken_tooth" -> 3;
case "kraken_tentacle" -> 4;
case "emperor_scorpion_stinger" -> 5;
case "nightmare_scale" -> 6;
case "molevore_nose" -> 7;
case "moleworm" -> 8;
case "uranium_nugget" -> 9;
case "titanium_nugget" -> 10;
case "uranium_ingot" -> 11;
case "titanium_ingot" -> 12;
case "lucid_eye" -> 13;
case "mantis_claw" -> 14;
case "hercules_horn" -> 15;
case "jumpy_bug_leg" -> 16;
case "brutalfly_wing" -> 17;
case "cornea_ear" -> 18;
case "primordial_scute" -> 19;
case "triffid_goo" -> 20;
case "vortex_eye" -> 21;
case "king_scale" -> 22;
case "queen_scale" -> 23;
case "chiten" -> 24;
case "jerry_nucleus" -> 25;
case "carapace" -> 26;
case "stink_bug" -> 27;
case "corn" -> 28;
case "high_fructose_corn_syrup" -> 29;
default -> 0;
};
return 0;
}
private static String path(Item item) {
return BuiltInRegistries.ITEM.getKey(item).getPath();
}
}
@@ -1,4 +1,4 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.advancement;
import net.minecraft.advancements.AdvancementHolder;
import net.minecraft.resources.ResourceLocation;
@@ -180,6 +180,10 @@ public class BedBugEggBlock extends Block {
}
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos, BlockState state) {
this.hatchEggs(level, pos, state, level.random);
}
private void decreaseEggs(Level level, BlockPos pos, BlockState state) {
int eggs = state.getValue(EGGS);
if (eggs <= 1) {
@@ -1,5 +1,6 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
@@ -26,7 +27,7 @@ public class BiowartTendrilsBlock extends BushBlock {
@Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
return super.mayPlaceOn(state, level, pos);
return state.is(AntarchyTags.Blocks.BIOWART_TENDRILS_PLANTABLE) || super.mayPlaceOn(state, level, pos);
}
@Override
@@ -4,6 +4,7 @@ import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.CreepingHorrorEntity;
import com.craisinlord.antarchy.content.block.AmberMossBlock;
import com.craisinlord.antarchy.content.block.LurkingTerrorEggBlock;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -37,6 +38,7 @@ public class CreepingHorrorEggBlock extends Block {
public static final IntegerProperty HATCH = BlockStateProperties.HATCH;
public static final IntegerProperty EGGS = BlockStateProperties.EGGS;
private static final float PANIC_HATCH_CHANCE = 0.25F;
private static final double HORDE_ACCELERATION_RADIUS = 5.0D;
private static final int MAX_HATCH = 2;
private static final int MAX_EGGS = 4;
private static final VoxelShape SINGLE_SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 7.0D, 13.0D);
@@ -204,6 +206,10 @@ public class CreepingHorrorEggBlock extends Block {
}
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos, BlockState state) {
this.hatchEggs(level, pos, state, level.random, state.getValue(EGGS));
}
private static int rollPanickedEggs(int eggs, RandomSource random) {
int hatchedEggs = 0;
for (int i = 0; i < eggs; i++) {
@@ -224,6 +230,11 @@ public class CreepingHorrorEggBlock extends Block {
}
private boolean shouldUpdateHatchLevel(Level level, BlockPos pos) {
if (level instanceof ServerLevel serverLevel
&& CavarynHordeManager.shouldAccelerateNearbyEggHatching(serverLevel, pos, HORDE_ACCELERATION_RADIUS, level.random)) {
return true;
}
boolean onAmberMoss = level.getBlockState(pos.below()).getBlock() instanceof AmberMossBlock;
return level.random.nextInt(onAmberMoss ? 150 : 500) == 0;
}
@@ -1,7 +1,7 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyAdvancements;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.AntarchyTags;
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -32,6 +33,7 @@ public class JerryEggBlock extends Block {
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 double HORDE_ACCELERATION_RADIUS = 5.0D;
private static final VoxelShape SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
public JerryEggBlock(BlockBehaviour.Properties properties) {
@@ -83,9 +85,18 @@ public class JerryEggBlock extends Block {
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (random.nextInt(HATCH_CHECK_INTERVAL) != 0) {
if (!CavarynHordeManager.shouldAccelerateNearbyEggHatching(level, pos, HORDE_ACCELERATION_RADIUS, random)
&& random.nextInt(HATCH_CHECK_INTERVAL) != 0) {
return;
}
this.hatch(level, pos, random);
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos) {
this.hatch(level, pos, level.random);
}
private void hatch(ServerLevel level, BlockPos pos, RandomSource random) {
EntityType<?> entityType = BuiltInRegistries.ENTITY_TYPE.get(JERRY_ID);
if (entityType.create(level) instanceof JerryEntity jerry) {
jerry.setStage(JerryEntity.Stage.INFANT);
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.JumpyBugEntity;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -38,6 +39,7 @@ public class JumpyBugEggBlock extends Block {
public static final BooleanProperty ROTATED = BooleanProperty.create("rotated");
private static final int MAX_HATCH = 2;
private static final double PLAYER_PROXIMITY_RADIUS = 12.0D;
private static final double HORDE_ACCELERATION_RADIUS = 5.0D;
private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F;
private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200;
private static final VoxelShape FLOOR_SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
@@ -119,6 +121,11 @@ public class JumpyBugEggBlock extends Block {
}
private boolean shouldUpdateHatchLevel(Level level, BlockPos pos, BlockState state) {
if (level instanceof ServerLevel serverLevel
&& CavarynHordeManager.shouldAccelerateNearbyEggHatching(serverLevel, pos, HORDE_ACCELERATION_RADIUS, level.random)) {
return true;
}
if (level.random.nextInt(PLAYER_PROXIMITY_CHECK_INTERVAL) == 0) {
Player nearbyPlayer = level.getNearestPlayer(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, PLAYER_PROXIMITY_RADIUS, false);
if (nearbyPlayer != null && level.random.nextFloat() < PLAYER_PROXIMITY_HATCH_CHANCE) {
@@ -149,6 +156,10 @@ public class JumpyBugEggBlock extends Block {
level.addFreshEntity(entity);
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos) {
this.hatch(level, pos, level.random);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(HATCH, HANGING, ROTATED);
@@ -4,6 +4,7 @@ import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.LurkingTerrorEntity;
import com.craisinlord.antarchy.content.block.AmberMossBlock;
import com.craisinlord.antarchy.content.block.CreepingHorrorEggBlock;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -37,6 +38,7 @@ public class LurkingTerrorEggBlock extends Block {
public static final IntegerProperty HATCH = BlockStateProperties.HATCH;
public static final IntegerProperty EGGS = BlockStateProperties.EGGS;
private static final float PANIC_HATCH_CHANCE = 0.25F;
private static final double HORDE_ACCELERATION_RADIUS = 5.0D;
private static final int MAX_HATCH = 2;
private static final int MAX_EGGS = 4;
private static final VoxelShape SINGLE_SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 7.0D, 13.0D);
@@ -204,6 +206,10 @@ public class LurkingTerrorEggBlock extends Block {
}
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos, BlockState state) {
this.hatchEggs(level, pos, state, level.random, state.getValue(EGGS));
}
private static int rollPanickedEggs(int eggs, RandomSource random) {
int hatchedEggs = 0;
for (int i = 0; i < eggs; i++) {
@@ -224,6 +230,11 @@ public class LurkingTerrorEggBlock extends Block {
}
private boolean shouldUpdateHatchLevel(Level level, BlockPos pos) {
if (level instanceof ServerLevel serverLevel
&& CavarynHordeManager.shouldAccelerateNearbyEggHatching(serverLevel, pos, HORDE_ACCELERATION_RADIUS, level.random)) {
return true;
}
boolean onAmberMoss = level.getBlockState(pos.below()).getBlock() instanceof AmberMossBlock;
return level.random.nextInt(onAmberMoss ? 150 : 500) == 0;
}
@@ -1,9 +1,9 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.block.entity.PotentNyxiteBlockEntity;
import com.craisinlord.antarchy.content.block.state.PotentNyxiteState;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.mojang.serialization.MapCodec;
import java.util.function.Supplier;
import net.minecraft.core.BlockPos;
@@ -31,13 +31,9 @@ import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
public class PotentNyxiteBlock extends BaseEntityBlock {
private static final ResourceLocation ANTIWATER_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "antiwater");
private static final ResourceLocation FLOWING_ANTIWATER_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_antiwater");
private static final ResourceLocation ICHOR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ichor");
private static final ResourceLocation FLOWING_ICHOR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_ichor");
private static final ResourceLocation HYPNOTIC_GAS_SOUND_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "potent_nyxite_hypnotic_gas");
private static final ResourceLocation HYPNOTIC_GAS_CLOUD_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "hypnotic_gas_cloud");
private static final ResourceLocation HYPNOTIC_GAS_CLOUD_DOWN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "hypnotic_gas_cloud_down");
private static final ResourceLocation HYPNOTIC_GAS_SOUND_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "potent_nyxite_hypnotic_gas");
private static final ResourceLocation HYPNOTIC_GAS_CLOUD_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "hypnotic_gas_cloud");
private static final ResourceLocation HYPNOTIC_GAS_CLOUD_DOWN_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "hypnotic_gas_cloud_down");
public static final EnumProperty<PotentNyxiteState> STATE = EnumProperty.create("state", PotentNyxiteState.class);
@@ -177,16 +173,6 @@ public class PotentNyxiteBlock extends BaseEntityBlock {
return fluidDirection != null && hasContinuousTrigger(level, pos, fluidDirection);
}
public static boolean isAntiwater(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return ANTIWATER_ID.equals(fluidId) || FLOWING_ANTIWATER_ID.equals(fluidId);
}
public static boolean isIchor(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return ICHOR_ID.equals(fluidId) || FLOWING_ICHOR_ID.equals(fluidId);
}
public static Direction getEruptionDirection(LevelAccessor level, BlockPos pos) {
Direction fluidDirection = getFluidColumnDirection(level, pos);
if (fluidDirection != null) {
@@ -236,12 +222,12 @@ public class PotentNyxiteBlock extends BaseEntityBlock {
public static boolean hasAntiwaterOnSide(LevelAccessor level, BlockPos pos, Direction direction) {
FluidState fluidState = level.getFluidState(pos.relative(direction));
return fluidState.isSource() && isAntiwater(fluidState);
return fluidState.isSource() && AntarchyFluidChecks.isAntiwater(fluidState);
}
public static boolean hasGasFluid(LevelAccessor level, BlockPos pos, Direction direction) {
FluidState fluidState = level.getFluidState(pos.relative(direction));
return fluidState.isSource() && isAntiwater(fluidState);
return fluidState.isSource() && AntarchyFluidChecks.isAntiwater(fluidState);
}
public static boolean hasPeriodicTrigger(LevelAccessor level, BlockPos pos, Direction direction) {
@@ -269,7 +255,7 @@ public class PotentNyxiteBlock extends BaseEntityBlock {
BlockPos.MutableBlockPos cursor = pos.relative(direction).mutable();
while (true) {
FluidState fluidState = level.getFluidState(cursor);
if (!isAntiwater(fluidState)) {
if (!AntarchyFluidChecks.isAntiwater(fluidState)) {
break;
}
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.SpitBugEntity;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -37,6 +38,7 @@ public class SpitBugEggBlock extends Block {
public static final BooleanProperty ROTATED = BooleanProperty.create("rotated");
private static final int MAX_HATCH = 2;
private static final double PLAYER_PROXIMITY_RADIUS = 12.0D;
private static final double HORDE_ACCELERATION_RADIUS = 5.0D;
private static final float PLAYER_PROXIMITY_HATCH_CHANCE = 0.25F;
private static final int PLAYER_PROXIMITY_CHECK_INTERVAL = 200;
private static final VoxelShape SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D);
@@ -106,6 +108,11 @@ public class SpitBugEggBlock extends Block {
}
private boolean shouldUpdateHatchLevel(Level level, BlockPos pos) {
if (level instanceof ServerLevel serverLevel
&& CavarynHordeManager.shouldAccelerateNearbyEggHatching(serverLevel, pos, HORDE_ACCELERATION_RADIUS, level.random)) {
return true;
}
if (level.random.nextInt(PLAYER_PROXIMITY_CHECK_INTERVAL) == 0) {
Player nearbyPlayer = level.getNearestPlayer(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, PLAYER_PROXIMITY_RADIUS, false);
if (nearbyPlayer != null && level.random.nextFloat() < PLAYER_PROXIMITY_HATCH_CHANCE) {
@@ -135,6 +142,10 @@ public class SpitBugEggBlock extends Block {
level.addFreshEntity(entity);
}
public void hatchWithNucleus(ServerLevel level, BlockPos pos) {
this.hatch(level, pos, level.random);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(HATCH, ROTATED);
@@ -5,6 +5,7 @@ import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.PotentNyxiteBlock;
import com.craisinlord.antarchy.content.block.state.PotentNyxiteState;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
@@ -502,7 +503,7 @@ public class PotentNyxiteBlockEntity extends BlockEntity {
}
private static boolean isHypnoticGasFluid(FluidState fluidState) {
return PotentNyxiteBlock.isAntiwater(fluidState);
return AntarchyFluidChecks.isAntiwater(fluidState);
}
private static boolean haveLineOfSight(Level level, Vec3 from, Vec3 to) {
@@ -0,0 +1,20 @@
package com.craisinlord.antarchy.content.boss;
import java.util.UUID;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerBossEvent;
import net.minecraft.world.BossEvent;
public class EntityLinkedServerBossEvent extends ServerBossEvent {
private final UUID entityId;
public EntityLinkedServerBossEvent(UUID entityId, Component name, BossEvent.BossBarColor color, BossEvent.BossBarOverlay overlay) {
super(name, color, overlay);
this.entityId = entityId;
}
@Override
public UUID getId() {
return this.entityId;
}
}
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.content.client;
import com.craisinlord.antarchy.content.GoopedEffectHooks;
import com.craisinlord.antarchy.content.effect.GoopedEffectHooks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.core.Holder;
@@ -30,9 +30,10 @@ public final class HordeHudRenderer {
}
float pulse = 0.9F + 0.1F * Mth.sin(minecraft.player.tickCount * ((float) Math.PI * 2.0F / 90.0F));
int alpha = Mth.clamp((int) (intensity * pulse * 0x78), 0, 0x78);
int alpha = Mth.clamp((int) (intensity * pulse * 0x2C), 0, 0x2C);
int width = minecraft.getWindow().getGuiScaledWidth();
int height = minecraft.getWindow().getGuiScaledHeight();
guiGraphics.fill(0, 0, width, height, (alpha << 24) | 0xD84A16);
int color = (alpha << 24) | 0xD84A16;
guiGraphics.fill(0, 0, width, height, color);
}
}
@@ -0,0 +1,96 @@
package com.craisinlord.antarchy.content.client.hud;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.AlphaMantisEntity;
import com.craisinlord.antarchy.content.entity.EmperorScorpionEntity;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity;
import com.craisinlord.antarchy.content.entity.kraken.KrakenEntity;
import java.util.Map;
import java.util.UUID;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.BossEvent;
import net.minecraft.world.entity.Entity;
public final class CustomBossBarRenderer {
private static final int BAR_WIDTH = 182;
private static final int BAR_HEIGHT = 5;
private static final int GLOBAL_Y_OFFSET = 15;
private static final Map<Class<? extends Entity>, Textures> BY_ENTITY_CLASS = Map.of(
KrakenEntity.class, textures("blue", "kraken", 204, 56, 4),
ToreterrorEntity.class, textures("green", "toreterror", 194, 58, 2),
AlphaMantisEntity.class, textures("green", "alpha_mantis", 205, 49, 6),
BrutalflyEntity.class, textures("brutalfly", "brutalfly", 198, 38, 3),
HerculesBeetleEntity.class, textures("beetle", "hercules_beetle", 194, 33, 1),
EmperorScorpionEntity.class, textures("purple", "scorpion", 218, 34, -2)
);
private CustomBossBarRenderer() {
}
public static boolean render(GuiGraphics guiGraphics, int x, int y, BossEvent bossEvent) {
Textures textures = lookup(bossEvent);
if (textures == null) {
return false;
}
int baseY = y + GLOBAL_Y_OFFSET;
int barY = baseY + textures.barYOffset;
guiGraphics.blit(textures.background, x, barY, 0, 0, BAR_WIDTH, BAR_HEIGHT, BAR_WIDTH, BAR_HEIGHT);
int filledWidth = Math.round(BAR_WIDTH * Math.max(0.0F, Math.min(1.0F, bossEvent.getProgress())));
if (filledWidth > 0) {
guiGraphics.blit(textures.progress, x, barY, 0, 0, filledWidth, BAR_HEIGHT, BAR_WIDTH, BAR_HEIGHT);
}
int overlayX = x + (BAR_WIDTH - textures.overlayWidth) / 2;
int overlayY = baseY + (BAR_HEIGHT - textures.overlayHeight) / 2;
guiGraphics.blit(textures.overlay, overlayX, overlayY, 0, 0, textures.overlayWidth, textures.overlayHeight, textures.overlayWidth, textures.overlayHeight);
return true;
}
public static boolean isCustomBoss(BossEvent bossEvent) {
return lookup(bossEvent) != null;
}
private static Textures lookup(BossEvent bossEvent) {
Entity entity = findEntity(bossEvent.getId());
if (entity == null) {
return null;
}
return BY_ENTITY_CLASS.get(entity.getClass());
}
private static Entity findEntity(UUID id) {
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.level == null) {
return null;
}
for (Entity entity : minecraft.level.entitiesForRendering()) {
if (entity.getUUID().equals(id)) {
return entity;
}
}
return null;
}
private static Textures textures(String barKey, String overlayKey, int overlayWidth, int overlayHeight, int barYOffset) {
return new Textures(
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/gui/boss_bars/healthbars/" + barKey + "_background.png"),
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/gui/boss_bars/healthbars/" + barKey + "_progress.png"),
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/gui/boss_bars/" + overlayKey + ".png"),
overlayWidth,
overlayHeight,
barYOffset
);
}
private record Textures(ResourceLocation background, ResourceLocation progress, ResourceLocation overlay, int overlayWidth, int overlayHeight, int barYOffset) {
}
}
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.GoopedEffectHooks;
import com.craisinlord.antarchy.content.effect.GoopedEffectHooks;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.GoopedEffectHooks;
import com.craisinlord.antarchy.content.effect.GoopedEffectHooks;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.model.EntityModel;
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.dispenser;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.OctopusBombEntity;
import net.minecraft.core.Direction;
import net.minecraft.core.Position;
@@ -1,4 +1,4 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.dispenser;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.entity.SizeRayProjectileEntity;
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.dispenser;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.MissileSquidEntity;
import net.minecraft.core.Direction;
import net.minecraft.core.Position;
@@ -1,4 +1,4 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.dispenser;
import com.craisinlord.antarchy.content.entity.WaterBombEntity;
import com.craisinlord.antarchy.content.AntarchyObjects;
@@ -1,4 +1,4 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.effect;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.Holder;
@@ -1,5 +1,7 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.effect;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.EntityTypeTags;
import net.minecraft.world.effect.MobEffectInstance;
@@ -1,6 +1,5 @@
package com.craisinlord.antarchy.content.effect;
import com.craisinlord.antarchy.content.StinkyBehavior;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.LivingEntity;
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
public class AlphaMantisEntity extends MantisEntity {
private final ServerBossEvent bossEvent =
new ServerBossEvent(Component.translatable("entity.antarchy.alpha_mantis"), BossEvent.BossBarColor.GREEN, BossEvent.BossBarOverlay.PROGRESS);
new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), Component.translatable("entity.antarchy.alpha_mantis"), BossEvent.BossBarColor.GREEN, BossEvent.BossBarOverlay.PROGRESS);
private int summonCooldownTicks;
@@ -101,7 +101,7 @@ public class EmperorScorpionEntity extends Monster implements GeoEntity {
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private final ServerBossEvent bossEvent =
new ServerBossEvent(this.getDisplayName(), BossEvent.BossBarColor.PURPLE, BossEvent.BossBarOverlay.PROGRESS);
new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), this.getDisplayName(), BossEvent.BossBarColor.PURPLE, BossEvent.BossBarOverlay.PROGRESS);
private int attackAnimTicks;
private int clawCooldownTicks;
@@ -88,6 +88,8 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
SynchedEntityData.defineId(HerculesBeetleEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Boolean> KNOCKED_DOWN =
SynchedEntityData.defineId(HerculesBeetleEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Integer> MOUNTED_CHARGE =
SynchedEntityData.defineId(HerculesBeetleEntity.class, EntityDataSerializers.INT);
private static final int ANIM_IDLE = 0;
private static final int ANIM_WALK = 1;
@@ -147,11 +149,13 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
private static final int MAX_BROKEN_BLOCKS = 32;
private static final int MAX_SUFFOCATION_BLOCKS = 12;
private static final EntityDimensions DEFAULT_DIMENSIONS = EntityDimensions.scalable(3.0F, 4.0F);
private static final double MOUNTED_FLYING_SPEED_MULTIPLIER = 0.06D;
private static final double MOUNTED_FLYING_SPEED_MULTIPLIER = 0.052D;
private static final double MOUNTED_GROUND_BRAKE = 0.6D;
private static final double MOUNTED_FLIGHT_LIFT = 0.36D;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private final ServerBossEvent bossEvent =
new ServerBossEvent(Component.translatable("entity.antarchy.hercules_beetle"), BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.PROGRESS);
new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), Component.translatable("entity.antarchy.hercules_beetle"), BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.PROGRESS);
private int actionTicks;
private int actionHitTick;
@@ -164,8 +168,12 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
private int flightCooldown;
private int targetlessTicks;
private int groundedTicks;
private int airborneTicks;
private int mountedChargeTicks;
private boolean attackDamageApplied;
private boolean riderJumpPressed;
private boolean riderJumpPressedLastTick;
private boolean mountedChargeActive;
private boolean combatCryDone;
private boolean pendingChargeStart;
private boolean pendingMountedCharge;
@@ -242,14 +250,19 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
builder.define(SADDLED, false);
builder.define(FLYING, false);
builder.define(KNOCKED_DOWN, false);
builder.define(MOUNTED_CHARGE, 0);
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "main_controller", 0, this::mainAnimController));
controllers.add(new AnimationController<>(this, "flying_charge_controller", 0, this::flyingChargeAnimController));
}
private PlayState mainAnimController(AnimationState<HerculesBeetleEntity> state) {
if (this.isFlying() && (this.getAnimationState() == ANIM_CHARGE_START || this.getAnimationState() == ANIM_CHARGE)) {
return state.setAndContinue(FLY_ANIM);
}
return switch (this.getAnimationState()) {
case ANIM_WALK -> state.setAndContinue(WALK_ANIM);
case ANIM_FLY -> state.setAndContinue(FLY_ANIM);
@@ -268,6 +281,22 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
};
}
private PlayState flyingChargeAnimController(AnimationState<HerculesBeetleEntity> state) {
if (!this.isFlying()) {
state.resetCurrentAnimation();
return PlayState.STOP;
}
return switch (this.getAnimationState()) {
case ANIM_CHARGE_START -> state.setAndContinue(CHARGE_START_ANIM);
case ANIM_CHARGE -> state.setAndContinue(CHARGE_ANIM);
default -> {
state.resetCurrentAnimation();
yield PlayState.STOP;
}
};
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
@@ -305,10 +334,14 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
if (this.onGround()) {
this.groundedTicks++;
this.airborneTicks = 0;
} else {
this.groundedTicks = 0;
this.airborneTicks++;
}
this.tickMountedCharge();
if (this.isDeadOrDying()) {
this.noPhysics = false;
this.setAnimationState(ANIM_DEATH);
@@ -353,7 +386,8 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
private void tickKnockedDown() {
this.getNavigation().stop();
this.setDeltaMovement(Vec3.ZERO);
Vec3 motion = this.getDeltaMovement();
this.setDeltaMovement(0.0D, Math.min(motion.y, 0.0D), 0.0D);
if (this.getAnimationState() == ANIM_KNOCKED_DOWN && this.actionTicks > 0) {
this.actionTicks--;
if (this.actionTicks <= 0) {
@@ -389,6 +423,11 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
switch (state) {
case ANIM_OPEN_WINGS -> {
this.setFlying(true);
if (this.getControllingPassenger() instanceof Player) {
Vec3 motion = this.getDeltaMovement();
this.setDeltaMovement(motion.x, Math.max(motion.y, MOUNTED_FLIGHT_LIFT), motion.z);
this.hasImpulse = true;
}
if (this.pendingChargeStart) {
this.pendingChargeStart = false;
this.beginChargeStart(this.chargeDirection, this.pendingChargeDuration, this.pendingMountedCharge);
@@ -449,6 +488,7 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
private void tickMountedMotion() {
if (!(this.getControllingPassenger() instanceof Player rider) || this.isKnockedDown()) {
this.riderJumpPressedLastTick = false;
return;
}
if (this.chargeTicksRemaining > 0 || this.getAnimationState() == ANIM_CHARGE_START || this.getAnimationState() == ANIM_OPEN_WINGS) {
@@ -459,15 +499,36 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
this.yHeadRot = this.getYRot();
this.yBodyRot = this.getYRot();
if (this.onGround() && this.isFlying()) {
this.requestFlightStop();
if (this.isFlying() && this.onGround()) {
this.forceMountedFlightStop();
return;
}
boolean wantsFlight = this.riderJumpPressed || rider.getXRot() < -5.0F || this.fallDistance > 2.5F;
if (wantsFlight && !this.isFlying() && this.onGround() && this.flightCooldown <= 0) {
this.requestFlightStart();
if (this.isFlying()) {
this.riderJumpPressedLastTick = this.riderJumpPressed;
return;
}
boolean jumpPressedThisTick = this.riderJumpPressed;
boolean jumpPressedEdge = jumpPressedThisTick && !this.riderJumpPressedLastTick;
if (jumpPressedEdge && this.onGround()) {
if (this.flightCooldown <= 0) {
this.requestFlightStart();
}
}
this.riderJumpPressedLastTick = jumpPressedThisTick;
}
private void forceMountedFlightStop() {
this.setFlying(false);
this.actionTicks = 0;
this.flightCooldown = 8;
if (this.getAnimationState() == ANIM_OPEN_WINGS || this.getAnimationState() == ANIM_CLOSE_WINGS) {
this.setAnimationState(ANIM_IDLE);
}
this.updateAmbientAnimation();
}
private void updateAmbientAnimation() {
@@ -480,13 +541,15 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
return;
}
if (!this.onGround()) {
this.setAnimationState(ANIM_FLY);
this.setAnimationState(ANIM_IDLE);
return;
}
if (this.getControllingPassenger() instanceof Player rider
&& (Math.abs(rider.zza) > 0.05F || Math.abs(rider.xxa) > 0.05F)) {
this.setAnimationState(ANIM_WALK);
return;
if (this.getControllingPassenger() instanceof Player rider) {
boolean riderMoving = Math.abs(rider.zza) > 0.05F || Math.abs(rider.xxa) > 0.05F;
if (riderMoving) {
this.setAnimationState(ANIM_WALK);
return;
}
}
Vec3 motion = this.getDeltaMovement();
boolean moving = motion.horizontalDistanceSqr() > 0.0025D;
@@ -954,6 +1017,10 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
this.riderJumpPressed = riderJumpPressed;
}
public int getMountedCharge() {
return this.entityData.get(MOUNTED_CHARGE);
}
public void handleMountedRegularAttack(ServerPlayer player) {
if (!this.canPlayerControl(player) || this.attackCooldown > 0 || this.isKnockedDown() || this.isInBusyAnimation() || this.chargeTicksRemaining > 0) {
return;
@@ -962,14 +1029,29 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
this.startRegularAttack(this.isFlying(), target);
}
public void handleMountedCharge(ServerPlayer player, int chargeTicks) {
public void startMountedCharge(ServerPlayer player) {
if (!this.canPlayerControl(player) || this.chargeCooldown > 0 || this.isKnockedDown() || this.isInBusyAnimation() || this.chargeTicksRemaining > 0) {
this.resetMountedChargeState();
return;
}
int clamped = Mth.clamp(chargeTicks, 0, MAX_PLAYER_CHARGE_TICKS);
if (clamped <= 0) {
this.mountedChargeActive = true;
}
public void releaseMountedCharge(ServerPlayer player) {
if (!this.canPlayerControl(player)) {
this.resetMountedChargeState();
return;
}
if (!this.mountedChargeActive) {
return;
}
int clamped = Mth.clamp(this.mountedChargeTicks, 0, MAX_PLAYER_CHARGE_TICKS);
this.resetMountedChargeState();
if (this.chargeCooldown > 0 || this.isKnockedDown() || this.isInBusyAnimation() || this.chargeTicksRemaining > 0 || clamped <= 0) {
return;
}
int duration = MIN_MOUNTED_CHARGE_TICKS + Mth.floor((MAX_CHARGE_TICKS - MIN_MOUNTED_CHARGE_TICKS) * (clamped / (float) MAX_PLAYER_CHARGE_TICKS));
this.startCharge(player.getLookAngle(), duration, true);
}
@@ -1013,7 +1095,7 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
@Override
public void travel(Vec3 travelVector) {
if (!(this.getControllingPassenger() instanceof Player rider) || !this.isVehicle()) {
if (!(this.getControllingPassenger() instanceof Player rider) || !this.isVehicle() || this.isKnockedDown()) {
super.travel(travelVector);
return;
}
@@ -1024,11 +1106,25 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
Vec3 riddenInput = this.getRiddenInput(rider, travelVector);
this.setSpeed(this.getRiddenSpeed(rider));
Vec3 motion = new Vec3(0.0D, this.getDeltaMovement().y, 0.0D);
this.moveRelative(this.getSpeed(), new Vec3(riddenInput.x, 0.0D, riddenInput.z));
motion = motion.add(this.getDeltaMovement().x, riddenInput.y, this.getDeltaMovement().z);
this.setDeltaMovement(motion);
this.move(MoverType.SELF, this.getDeltaMovement());
if (!this.isFlying()) {
Vec3 currentMotion = this.getDeltaMovement();
Vec3 horizontalMotion = new Vec3(currentMotion.x, 0.0D, currentMotion.z).scale(MOUNTED_GROUND_BRAKE);
this.setDeltaMovement(horizontalMotion.x, currentMotion.y, horizontalMotion.z);
this.moveRelative(this.getSpeed(), new Vec3(riddenInput.x, 0.0D, riddenInput.z));
this.move(MoverType.SELF, this.getDeltaMovement());
if (Math.abs(rider.zza) < 0.05F && Math.abs(rider.xxa) < 0.05F && this.onGround()) {
Vec3 dampedMotion = this.getDeltaMovement();
this.setDeltaMovement(dampedMotion.x * 0.35D, dampedMotion.y, dampedMotion.z * 0.35D);
}
} else {
Vec3 motion = new Vec3(0.0D, this.getDeltaMovement().y, 0.0D);
this.moveRelative(this.getSpeed(), new Vec3(riddenInput.x, 0.0D, riddenInput.z));
motion = motion.add(this.getDeltaMovement().x, riddenInput.y, this.getDeltaMovement().z);
this.setDeltaMovement(motion);
this.move(MoverType.SELF, this.getDeltaMovement());
}
if (!this.isFlying() && rider.zza > 0.0F && this.horizontalCollision) {
Vec3 stepUpPos = this.position().add(0.0D, 1.0D, 0.0D);
@@ -1211,7 +1307,38 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl
@Override
protected void playStepSound(BlockPos pos, BlockState state) {
this.playSound(SoundEvents.RAVAGER_STEP, 0.8F, 0.8F);
this.playSound(SoundEvents.RAVAGER_STEP, 0.28F, 0.92F);
}
private void tickMountedCharge() {
if (this.level().isClientSide) {
return;
}
if (!(this.getControllingPassenger() instanceof ServerPlayer player) || !this.canPlayerControl(player)) {
this.resetMountedChargeState();
return;
}
if (!this.mountedChargeActive) {
if (this.getMountedCharge() != 0) {
this.entityData.set(MOUNTED_CHARGE, 0);
}
return;
}
if (this.chargeCooldown > 0 || this.isKnockedDown() || this.isInBusyAnimation() || this.chargeTicksRemaining > 0) {
this.resetMountedChargeState();
return;
}
this.mountedChargeTicks = Math.min(this.mountedChargeTicks + 1, MAX_PLAYER_CHARGE_TICKS);
this.entityData.set(MOUNTED_CHARGE, Mth.floor((this.mountedChargeTicks / (float) MAX_PLAYER_CHARGE_TICKS) * 100.0F));
}
private void resetMountedChargeState() {
this.mountedChargeActive = false;
this.mountedChargeTicks = 0;
if (this.getMountedCharge() != 0) {
this.entityData.set(MOUNTED_CHARGE, 0);
}
}
@Override
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.core.registries.BuiltInRegistries;
@@ -10,6 +11,7 @@ import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.ByIdMap;
import net.minecraft.util.Mth;
import net.minecraft.util.StringRepresentable;
@@ -220,6 +222,7 @@ public class JerryEntity extends Monster implements GeoEntity {
if (++this.attachDamageTicks >= ATTACH_DAMAGE_INTERVAL) {
this.attachDamageTicks = 0;
Vec3 targetMotion = target.getDeltaMovement();
this.playSound(this.attackSoundForCurrentStage(), 0.85F, this.voicePitch());
target.hurt(this.damageSources().mobAttack(this), (float) stage.attackDamage());
target.setDeltaMovement(targetMotion);
target.hurtMarked = true;
@@ -262,6 +265,7 @@ public class JerryEntity extends Monster implements GeoEntity {
this.faceTarget(target);
this.attackCooldownTicks = 24;
this.entityData.set(ATTACK_ANIM_TICKS, ATTACK_ANIM_DURATION);
this.playSound(this.attackSoundForCurrentStage(), 1.0F, this.voicePitch());
target.hurt(this.damageSources().mobAttack(this), (float) stage.attackDamage());
}
}
@@ -294,11 +298,33 @@ public class JerryEntity extends Monster implements GeoEntity {
if (target instanceof LivingEntity living) {
this.faceTarget(living);
}
this.playSound(this.attackSoundForCurrentStage(), 1.0F, this.voicePitch());
return target instanceof LivingEntity living
? living.hurt(this.damageSources().mobAttack(this), (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE))
: super.doHurtTarget(target);
}
@Override
@Nullable
protected SoundEvent getAmbientSound() {
return this.isAdultStage() ? AntarchySoundEvents.JERRY_ADULT_IDLE.get() : AntarchySoundEvents.JERRY_YOUNG_IDLE.get();
}
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return this.isAdultStage() ? AntarchySoundEvents.JERRY_ADULT_HURT.get() : AntarchySoundEvents.JERRY_YOUNG_HURT.get();
}
@Override
protected SoundEvent getDeathSound() {
return this.isAdultStage() ? AntarchySoundEvents.JERRY_ADULT_DEATH.get() : AntarchySoundEvents.JERRY_YOUNG_DEATH.get();
}
@Override
protected float getSoundVolume() {
return this.isAdultStage() ? 1.0F : 0.8F;
}
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
@@ -436,6 +462,14 @@ public class JerryEntity extends Monster implements GeoEntity {
return stage == Stage.ALPHA || stage == Stage.GAMMA;
}
private SoundEvent attackSoundForCurrentStage() {
return this.isAdultStage() ? AntarchySoundEvents.JERRY_ADULT_ATTACK.get() : AntarchySoundEvents.JERRY_YOUNG_ATTACK.get();
}
private float voicePitch() {
return this.isAdultStage() ? 0.9F + this.random.nextFloat() * 0.2F : 1.1F + this.random.nextFloat() * 0.25F;
}
private Stage nextGrowthStage() {
return switch (this.getStage()) {
case INFANT -> Stage.MATURE;
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
import net.minecraft.core.particles.DustParticleOptions;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
@@ -32,6 +33,7 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.joml.Vector3f;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.animatable.GeoEntity;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
@@ -44,6 +46,9 @@ import java.util.List;
import java.util.Objects;
public class OctopusBombEntity extends Monster implements GeoEntity {
private static final DustParticleOptions OCTOPUS_BOMB_INK_PARTICLE =
new DustParticleOptions(new Vector3f(0.02F, 0.02F, 0.02F), 1.2F);
private static final EntityDataAccessor<Integer> ATTACK_STATE = SynchedEntityData.defineId(OctopusBombEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Integer> ANIMATION_STATE = SynchedEntityData.defineId(OctopusBombEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> CAN_FLY = SynchedEntityData.defineId(OctopusBombEntity.class, EntityDataSerializers.BOOLEAN);
@@ -405,8 +410,8 @@ public class OctopusBombEntity extends Monster implements GeoEntity {
serverLevel.playSound(null, this.getX(), this.getY(), this.getZ(),
net.minecraft.sounds.SoundEvents.GENERIC_EXPLODE, net.minecraft.sounds.SoundSource.HOSTILE, 2.0F, 0.9F);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, this.getX(), this.getY(), this.getZ(), 250, radius * 0.5D, radius * 0.5D, radius * 0.5D, 0.1D);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, this.getX(), this.getY(), this.getZ(), 150, radius * 0.2D, radius * 0.2D, radius * 0.2D, 0.2D);
serverLevel.sendParticles(OCTOPUS_BOMB_INK_PARTICLE, this.getX(), this.getY(), this.getZ(), 125, radius * 0.5D, radius * 0.5D, radius * 0.5D, 0.1D);
serverLevel.sendParticles(OCTOPUS_BOMB_INK_PARTICLE, this.getX(), this.getY(), this.getZ(), 75, radius * 0.2D, radius * 0.2D, radius * 0.2D, 0.2D);
serverLevel.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(), this.getZ(), 4, 0.5D, 0.5D, 0.5D, 0.0D);
this.discard();
}
@@ -423,8 +428,8 @@ public class OctopusBombEntity extends Monster implements GeoEntity {
double cx = this.getX();
double cy = this.getY() + this.getBbHeight() * 0.5D;
double cz = this.getZ();
serverLevel.sendParticles(ParticleTypes.SQUID_INK, cx, cy, cz, 120, 2.0D, 1.2D, 2.0D, 0.04D);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, cx, cy, cz, 60, 3.5D, 1.8D, 3.5D, 0.02D);
serverLevel.sendParticles(OCTOPUS_BOMB_INK_PARTICLE, cx, cy, cz, 60, 2.0D, 1.2D, 2.0D, 0.04D);
serverLevel.sendParticles(OCTOPUS_BOMB_INK_PARTICLE, cx, cy, cz, 30, 3.5D, 1.8D, 3.5D, 0.02D);
}
// -------------------------------------------------------------------------
@@ -2,11 +2,11 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyAdvancements;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.block.PotentNyxiteBlock;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
@@ -37,7 +37,6 @@ import net.minecraft.tags.DamageTypeTags;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
@@ -1022,7 +1021,7 @@ public class ReverieEntity extends PathfinderMob implements FlyingAnimal, GeoEnt
for (int y = min.getY(); y <= max.getY(); y++) {
for (int z = min.getZ(); z <= max.getZ(); z++) {
cursor.set(x, y, z);
if (PotentNyxiteBlock.isAntiwater(this.level().getFluidState(cursor))) {
if (AntarchyFluidChecks.isAntiwater(this.level().getFluidState(cursor))) {
return true;
}
}
@@ -1239,4 +1238,3 @@ public class ReverieEntity extends PathfinderMob implements FlyingAnimal, GeoEnt
}
}
}
@@ -2,10 +2,9 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyAdvancements;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.AntarchyTags;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.GoopedEffectHooks;
import com.craisinlord.antarchy.content.effect.GoopedEffectHooks;
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
import net.minecraft.core.Holder;
import net.minecraft.core.particles.ParticleTypes;
@@ -2,7 +2,7 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.StinkyBehavior;
import com.craisinlord.antarchy.content.effect.StinkyBehavior;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
@@ -93,7 +93,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
private static final double JUMP_RANGE_SQR = 400.0D;
private static final double RANGED_MAX_RANGE_SQR = 625.0D;
private static final double SPIN_TRIGGER_RANGE_SQR = 225.0D;
private static final double SPIN_LEASH_RANGE_SQR = 225.0D;
private static final double SPIN_LEASH_RANGE_SQR = 400.0D;
private static final double SPIN_RADIUS = 2.5D;
private static final double SPIN_MOVE_SPEED = 0.65D;
private static final double SPIN_ANIMATION_SPEED = 0.49D;
@@ -110,7 +110,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlayAndHold("death");
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private final ServerBossEvent bossEvent = new ServerBossEvent(Component.translatable("entity.antarchy.toreterror"), BossEvent.BossBarColor.GREEN, BossEvent.BossBarOverlay.PROGRESS);
private final ServerBossEvent bossEvent = new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), Component.translatable("entity.antarchy.toreterror"), BossEvent.BossBarColor.GREEN, BossEvent.BossBarOverlay.PROGRESS);
private int shootAnimTicks;
private int jumpAnimTicks;
@@ -509,7 +509,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
}
this.updateSpinDirection(target);
if (!this.moveDuringSpin()) {
if (!this.moveDuringSpin(target)) {
this.spinStuckTicks++;
if (this.spinStuckTicks >= SPIN_STUCK_FAIL_LIMIT) {
this.beginSpinEnd();
@@ -566,7 +566,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
this.spinDirection = combined.lengthSqr() > 1.0E-4D ? combined.normalize() : towardTarget;
}
private boolean moveDuringSpin() {
private boolean moveDuringSpin(LivingEntity target) {
Vec3 direction = this.spinDirection.lengthSqr() > 1.0E-4D ? this.spinDirection.normalize() : Vec3.ZERO;
if (direction == Vec3.ZERO) {
return false;
@@ -577,19 +577,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
}
this.playSpinRicochetSound();
this.spinStrafeSign *= -1;
Vec3 bounced = rotateHorizontal(direction, this.spinStrafeSign * 35.0D);
if (this.trySpinMoves(bounced, true)) {
return true;
}
Vec3 reversed = direction.scale(-1.0D);
if (this.trySpinMoves(reversed, true)) {
return true;
}
Vec3 reversedBounce = rotateHorizontal(reversed, this.spinStrafeSign * 25.0D);
return this.trySpinMoves(reversedBounce, true);
return this.trySpinRicochetTowardTarget(target, direction);
}
private void playSpinRicochetSound() {
@@ -600,6 +588,33 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
this.playSound(AntarchySoundEvents.TORETERROR_RICOCHET.get(), 1.0F, 0.95F + this.random.nextFloat() * 0.1F);
}
private boolean trySpinRicochetTowardTarget(LivingEntity target, Vec3 fallbackDirection) {
this.spinStrafeSign *= -1;
Vec3 towardTarget = horizontalDirectionTo(target.position());
if (towardTarget.lengthSqr() <= 1.0E-4D) {
towardTarget = fallbackDirection;
}
if (this.trySpinMoves(towardTarget, true)) {
this.spinDirection = towardTarget.normalize();
return true;
}
Vec3 slightRight = rotateHorizontal(towardTarget, 18.0D);
if (this.trySpinMoves(slightRight, true)) {
this.spinDirection = towardTarget.normalize();
return true;
}
Vec3 slightLeft = rotateHorizontal(towardTarget, -18.0D);
if (this.trySpinMoves(slightLeft, true)) {
this.spinDirection = towardTarget.normalize();
return true;
}
return false;
}
private boolean trySpinMoves(Vec3 baseDirection, boolean bounced) {
Vec3[] attempts = new Vec3[]{
baseDirection,
@@ -707,6 +722,20 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
this.spinProgressTicks = 0;
}
private void startSpinSequence(LivingEntity target) {
this.spinStartTicks = SPIN_START_TOTAL_TICKS;
this.spinLoopTotalTicks = SPIN_LOOP_MIN_TICKS + this.random.nextInt(SPIN_LOOP_MAX_TICKS - SPIN_LOOP_MIN_TICKS + 1);
this.spinLoopTicks = this.spinLoopTotalTicks;
this.spinEndTicks = 0;
this.spinStuckTicks = 0;
this.spinProgressAnchor = this.position();
this.spinProgressTicks = 0;
this.spinStrafeSign = this.random.nextBoolean() ? 1 : -1;
this.spinHitCooldowns.clear();
this.spinDirection = target == null ? Vec3.ZERO : this.horizontalDirectionTo(target.position());
this.playSound(AntarchySoundEvents.TORETERROR_SPIN.get(), 0.66F, 0.95F + this.random.nextFloat() * 0.1F);
}
private Vec3 calcLaunchVelocity(Vec3 from, Vec3 to, double minSpeed) {
Vec3 diff = to.subtract(from);
double dh = Math.sqrt(diff.x * diff.x + diff.z * diff.z);
@@ -914,20 +943,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
@Override
public void start() {
LivingEntity target = ToreterrorEntity.this.getTarget();
ToreterrorEntity.this.spinStartTicks = SPIN_START_TOTAL_TICKS;
ToreterrorEntity.this.spinLoopTotalTicks = SPIN_LOOP_MIN_TICKS + ToreterrorEntity.this.random.nextInt(SPIN_LOOP_MAX_TICKS - SPIN_LOOP_MIN_TICKS + 1);
ToreterrorEntity.this.spinLoopTicks = ToreterrorEntity.this.spinLoopTotalTicks;
ToreterrorEntity.this.spinEndTicks = 0;
ToreterrorEntity.this.spinStuckTicks = 0;
ToreterrorEntity.this.spinProgressAnchor = ToreterrorEntity.this.position();
ToreterrorEntity.this.spinProgressTicks = 0;
ToreterrorEntity.this.spinStrafeSign = ToreterrorEntity.this.random.nextBoolean() ? 1 : -1;
ToreterrorEntity.this.spinHitCooldowns.clear();
ToreterrorEntity.this.spinDirection = target == null
? Vec3.ZERO
: ToreterrorEntity.this.horizontalDirectionTo(target.position());
ToreterrorEntity.this.playSound(AntarchySoundEvents.TORETERROR_SPIN.get(), 1.1F, 0.95F + ToreterrorEntity.this.random.nextFloat() * 0.1F);
ToreterrorEntity.this.startSpinSequence(ToreterrorEntity.this.getTarget());
}
@Override
@@ -11,9 +11,11 @@ import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.PointedDripstoneBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
@@ -77,6 +79,7 @@ public class UpwardFallingBlockEntity extends Entity {
// Move upward directly — noPhysics=true means move() just calls setPos()
setPos(getX(), getY() + RISE_SPEED, getZ());
damageEntitiesAlongPath(blockState);
BlockPos headPos = BlockPos.containing(getX(), getY() + getBbHeight(), getZ());
BlockState above = level().getBlockState(headPos);
@@ -91,18 +94,40 @@ public class UpwardFallingBlockEntity extends Entity {
boolean hitScaffolding = above.getBlock() instanceof AntimetalScaffoldingBlock;
if (hitCeiling || hitScaffolding) {
BlockPos placePos = headPos.below();
BlockState atPlace = level().getBlockState(placePos);
if (atPlace.isAir() || atPlace.canBeReplaced()) {
level().setBlock(placePos, blockState, 3);
} else {
dropAndRemove(blockState);
return;
}
discard();
dropAndRemove(blockState);
return;
}
}
private void damageEntitiesAlongPath(BlockState state) {
float damage = getImpactDamage(state);
if (damage <= 0.0F) {
return;
}
AABB hitBox = getBoundingBox().inflate(0.15D);
for (LivingEntity living : level().getEntitiesOfClass(LivingEntity.class, hitBox, LivingEntity::isAlive)) {
living.hurt(level().damageSources().fallingBlock(this), damage);
}
}
private float getImpactDamage(BlockState state) {
float travelDistance = (float) this.time * (float) RISE_SPEED;
float baseDamage = Math.max(0.0F, travelDistance - 1.5F);
if (baseDamage <= 0.0F) {
return 0.0F;
}
float thicknessMultiplier = switch (state.getValue(PointedDripstoneBlock.THICKNESS)) {
case TIP, TIP_MERGE -> 2.0F;
case FRUSTUM -> 1.5F;
case MIDDLE -> 1.25F;
case BASE -> 1.0F;
};
return Math.min(baseDamage * thicknessMultiplier, 40.0F);
}
private void dropAndRemove(BlockState state) {
if (!level().isClientSide && !state.isAir()) {
ItemStack drop = new ItemStack(state.getBlock().asItem());
@@ -6,12 +6,17 @@ import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.RotatedPillarBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.pathfinder.Path;
@@ -21,6 +26,7 @@ import software.bernie.geckolib.animatable.GeoEntity;
public class TermiteEntity extends BaseAntEntity implements GeoEntity {
private static final int WOOD_BITE_ANIMATION_TICKS = 8;
private static final int WOOD_BITE_COOLDOWN_TICKS = 20 * 3;
private static final int WOOD_SEARCH_INTERVAL_TICKS = 20;
private static final int WOOD_REPATH_INTERVAL_TICKS = 6;
private static final int WOOD_SEARCH_RADIUS_HORIZONTAL = 12;
@@ -38,6 +44,7 @@ public class TermiteEntity extends BaseAntEntity implements GeoEntity {
};
@Nullable
private BlockPos targetWoodPos;
private int nextWoodBiteTick;
private int nextWoodSearchTick;
private int nextWoodRepathTick;
@@ -129,20 +136,31 @@ public class TermiteEntity extends BaseAntEntity implements GeoEntity {
}
private boolean tryEatNearbyWood() {
if (this.tickCount < this.nextWoodBiteTick) {
return false;
}
BlockPos basePos = this.blockPosition();
for (Vec3i offset : IMMEDIATE_WOOD_OFFSETS) {
BlockPos targetPos = basePos.offset(offset);
BlockState targetState = this.level().getBlockState(targetPos);
if (!targetState.is(AntarchyTags.Blocks.TERMITE_FOODS)) {
if (!this.isTermiteEdible(targetState)) {
continue;
}
SoundType soundType = targetState.getSoundType();
this.triggerBiteAnimation(WOOD_BITE_ANIMATION_TICKS);
this.level().destroyBlock(targetPos, false, this);
this.level().playSound(null, targetPos, soundType.getBreakSound(), this.getSoundSource(), 0.7F, 1.1F);
this.playSound(AntarchySoundEvents.ANT_BITE.get(), 0.35F, 0.95F + this.random.nextFloat() * 0.1F);
return true;
if (this.tryStripWood(targetPos, targetState)) {
return true;
}
if (targetState.is(AntarchyTags.Blocks.TERMITE_FOODS) || this.isStrippedWoodState(targetState)) {
SoundType soundType = targetState.getSoundType();
this.triggerBiteAnimation(WOOD_BITE_ANIMATION_TICKS);
this.nextWoodBiteTick = this.tickCount + WOOD_BITE_COOLDOWN_TICKS;
this.level().destroyBlock(targetPos, false, this);
this.level().playSound(null, targetPos, soundType.getBreakSound(), this.getSoundSource(), 0.7F, 1.1F);
this.playSound(AntarchySoundEvents.ANT_BITE.get(), 0.35F, 0.95F + this.random.nextFloat() * 0.1F);
return true;
}
}
return false;
@@ -219,7 +237,65 @@ public class TermiteEntity extends BaseAntEntity implements GeoEntity {
}
private boolean isValidWoodTarget(BlockPos targetPos) {
return this.level().getBlockState(targetPos).is(AntarchyTags.Blocks.TERMITE_FOODS);
return this.isTermiteEdible(this.level().getBlockState(targetPos));
}
private boolean isTermiteEdible(BlockState state) {
return state.is(AntarchyTags.Blocks.TERMITE_FOODS) || this.isStrippedWoodState(state);
}
private boolean tryStripWood(BlockPos targetPos, BlockState targetState) {
BlockState strippedState = this.getStrippedState(targetState);
if (strippedState == null) {
return false;
}
SoundType soundType = targetState.getSoundType();
this.triggerBiteAnimation(WOOD_BITE_ANIMATION_TICKS);
this.nextWoodBiteTick = this.tickCount + WOOD_BITE_COOLDOWN_TICKS;
this.level().setBlock(targetPos, strippedState, Block.UPDATE_ALL_IMMEDIATE);
this.level().playSound(null, targetPos, soundType.getBreakSound(), this.getSoundSource(), 0.6F, 1.2F);
this.playSound(AntarchySoundEvents.ANT_BITE.get(), 0.35F, 0.95F + this.random.nextFloat() * 0.1F);
return true;
}
@Nullable
private BlockState getStrippedState(BlockState state) {
ResourceLocation blockId = BuiltInRegistries.BLOCK.getKey(state.getBlock());
if (blockId == null || this.isStrippedWoodState(state) || !this.isStripTargetState(state, blockId.getPath())) {
return null;
}
String path = blockId.getPath();
if (path.startsWith("mossy_")) {
path = path.substring("mossy_".length());
}
ResourceLocation strippedId = ResourceLocation.fromNamespaceAndPath(blockId.getNamespace(), "stripped_" + path);
Block strippedBlock = BuiltInRegistries.BLOCK.getOptional(strippedId).orElse(null);
if (strippedBlock == null) {
return null;
}
BlockState strippedState = strippedBlock.defaultBlockState();
if (state.hasProperty(RotatedPillarBlock.AXIS) && strippedState.hasProperty(RotatedPillarBlock.AXIS)) {
strippedState = strippedState.setValue(RotatedPillarBlock.AXIS, state.getValue(RotatedPillarBlock.AXIS));
}
return strippedState;
}
private boolean isStripTargetState(BlockState state, String path) {
return state.is(BlockTags.LOGS) || path.endsWith("_wood");
}
private boolean isStrippedWoodState(BlockState state) {
ResourceLocation blockId = BuiltInRegistries.BLOCK.getKey(state.getBlock());
if (blockId == null) {
return false;
}
String path = blockId.getPath();
return path.startsWith("stripped_") && (path.endsWith("_log") || path.endsWith("_wood") || path.endsWith("_stem") || path.endsWith("_hyphae"));
}
private boolean canReachWoodTarget(BlockPos targetPos) {
@@ -91,7 +91,7 @@ public class BrutalflyEntity extends Monster implements GeoEntity {
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private final ServerBossEvent bossEvent =
new ServerBossEvent(this.getDisplayName(), BossEvent.BossBarColor.YELLOW, BossEvent.BossBarOverlay.PROGRESS);
new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), this.getDisplayName(), BossEvent.BossBarColor.YELLOW, BossEvent.BossBarOverlay.PROGRESS);
@Nullable
private Vec3 patrolTarget;
@@ -7,20 +7,21 @@ import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.goal.FloatGoal;
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal;
import net.minecraft.world.entity.monster.Enemy;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.Projectile;
import net.minecraft.core.BlockPos;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.animation.RawAnimation;
public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
private static final int PASSIVE_REFRESH_DURATION = 20 * 4;
@@ -30,6 +31,21 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
private static final double SHOCKWAVE_RADIUS = 6.0D;
private static final double SHOCKWAVE_KNOCKBACK = 1.3D;
private static final float SHOCKWAVE_DAMAGE = 8.0F;
private static final int IDLE_ANIMATION_CYCLE_TICKS = 60;
private static final int QUIRK_ANIMATION_TICKS = 40;
private static final int QUIRK_CHANCE = 60;
private static final int SIT_MIN_TICKS = 20 * 60;
private static final int SIT_MAX_TICKS = 20 * 60 * 3;
private static final int SIT_COOLDOWN_TICKS = 20 * 60 * 6;
private static final int SIT_CHECK_CHANCE_SHADE = 300;
private static final int SIT_CHECK_CHANCE_OPEN = 1200;
private static final double FOLLOW_BREAK_SIT_DISTANCE_SQR = 81.0D;
private static final RawAnimation ELKA_WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation ELKA_IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation ELKA_SIT_IDLE_ANIM = RawAnimation.begin().thenLoop("sit_idle");
private static final RawAnimation ELKA_QUIRK_ANIM = RawAnimation.begin().thenPlay("quirk");
private static final RawAnimation ELKA_QUIRK_2_ANIM = RawAnimation.begin().thenPlay("quirk_2");
private static final RawAnimation ELKA_QUIRK_3_ANIM = RawAnimation.begin().thenPlay("quirk_3");
private static ResourceLocation rl(String path) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path);
@@ -38,9 +54,6 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
@Override
public void registerGoals(GlimmerEntity entity) {
entity.addGoal(0, new FloatGoal(entity));
entity.addGoal(5, new WaterAvoidingRandomStrollGoal(entity, 1.0D));
entity.addGoal(6, new LookAtPlayerGoal(entity, Player.class, 8.0F));
entity.addGoal(7, new RandomLookAroundGoal(entity));
}
@Override
@@ -95,6 +108,8 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
@Override
public void tickPassiveEveryTick(GlimmerEntity entity, Player owner) {
this.tickIdleState(entity);
if (!(owner instanceof BloodglassAccess access)) {
return;
}
@@ -110,6 +125,7 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
@Override
public void clearPassive(GlimmerEntity entity, Player owner) {
entity.setLastOwnerShieldLostCount(-1L);
this.stopSitting(entity);
}
@Override
@@ -117,6 +133,28 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
return ABILITY_COOLDOWN_TICKS;
}
@Override
@Nullable
public RawAnimation movingAnimation(GlimmerEntity entity) {
return ELKA_WALK_ANIM;
}
@Override
@Nullable
public RawAnimation idleAnimation(GlimmerEntity entity) {
if (entity.getElkaIdleQuirkTicks() > 0) {
return switch (entity.getElkaIdleQuirkVariant()) {
case 1 -> ELKA_QUIRK_2_ANIM;
case 2 -> ELKA_QUIRK_3_ANIM;
default -> ELKA_QUIRK_ANIM;
};
}
if (entity.isElkaIdleSitting()) {
return ELKA_SIT_IDLE_ANIM;
}
return ELKA_IDLE_ANIM;
}
@Override
@Nullable
public software.bernie.geckolib.animation.RawAnimation abilityAnimation() {
@@ -149,4 +187,120 @@ public class GlimmerElkaBehavior implements GlimmerVariantBehavior {
this.sendAbilityMessage(owner, Component.translatable("entity.antarchy.glimmer.ability.elka"));
entity.startAbilityCooldown();
}
private void tickIdleState(GlimmerEntity entity) {
int quirkTicks = entity.getElkaIdleQuirkTicks();
if (quirkTicks > 0) {
entity.setElkaIdleQuirkTicks(quirkTicks - 1);
}
if (entity.isElkaIdleSitting()) {
if (!this.canRemainSitting(entity)) {
this.stopSitting(entity);
return;
}
int sitTicks = entity.getElkaIdleSitTicksRemaining();
if (sitTicks > 0) {
entity.setElkaIdleSitTicksRemaining(sitTicks - 1);
if (sitTicks - 1 <= 0) {
this.stopSitting(entity);
}
}
return;
}
if (entity.getElkaIdleSitCooldownTicks() > 0) {
entity.setElkaIdleSitCooldownTicks(entity.getElkaIdleSitCooldownTicks() - 1);
}
if (this.canStartSitting(entity)) {
int chance = this.isNearShade(entity) ? SIT_CHECK_CHANCE_SHADE : SIT_CHECK_CHANCE_OPEN;
if (entity.getElkaIdleSitCooldownTicks() <= 0 && entity.getRandom().nextInt(chance) == 0) {
this.startSitting(entity);
return;
}
}
this.tickIdleQuirk(entity);
}
private void tickIdleQuirk(GlimmerEntity entity) {
if (entity.getElkaIdleQuirkTicks() > 0
|| entity.getDeltaMovement().horizontalDistanceSqr() > 1.0E-4D
|| entity.getNavigation().isInProgress()
|| entity.getTarget() != null
|| entity.isFollowingOwner() && entity.getOwner() != null && entity.distanceToSqr(entity.getOwner()) > 9.0D) {
entity.setElkaIdleAnimationCycleTicks(0);
return;
}
entity.setElkaIdleAnimationCycleTicks(entity.getElkaIdleAnimationCycleTicks() + 1);
if (entity.getElkaIdleAnimationCycleTicks() < IDLE_ANIMATION_CYCLE_TICKS) {
return;
}
entity.setElkaIdleAnimationCycleTicks(0);
if (entity.getRandom().nextInt(QUIRK_CHANCE) != 0) {
return;
}
entity.setElkaIdleQuirkTicks(QUIRK_ANIMATION_TICKS);
if (entity.isElkaIdleSitting()) {
entity.setElkaIdleQuirkVariant(2);
} else {
entity.setElkaIdleQuirkVariant(entity.getRandom().nextBoolean() ? 0 : 1);
}
}
private void startSitting(GlimmerEntity entity) {
entity.setElkaIdleSitting(true);
entity.setElkaIdleSitTicksRemaining(Mth.nextInt(entity.getRandom(), SIT_MIN_TICKS, SIT_MAX_TICKS));
entity.getNavigation().stop();
entity.setDeltaMovement(0.0D, entity.getDeltaMovement().y, 0.0D);
entity.setElkaIdleAnimationCycleTicks(0);
}
private void stopSitting(GlimmerEntity entity) {
if (!entity.isElkaIdleSitting()) {
return;
}
entity.setElkaIdleSitting(false);
entity.setElkaIdleSitTicksRemaining(0);
entity.setElkaIdleSitCooldownTicks(SIT_COOLDOWN_TICKS);
entity.setElkaIdleAnimationCycleTicks(0);
}
private boolean canStartSitting(GlimmerEntity entity) {
if (entity.isOrderedToSit() || !entity.onGround() || entity.isInWaterOrBubble() || entity.isOnFire()) {
return false;
}
if (entity.getTarget() != null || entity.getNavigation().isInProgress() || entity.getDeltaMovement().horizontalDistanceSqr() > 1.0E-4D) {
return false;
}
if (entity.isFollowingOwner() && entity.getOwner() != null && entity.distanceToSqr(entity.getOwner()) > 9.0D) {
return false;
}
return true;
}
private boolean canRemainSitting(GlimmerEntity entity) {
if (entity.isOrderedToSit() || !entity.onGround() || entity.isInWaterOrBubble() || entity.isOnFire() || entity.getTarget() != null) {
return false;
}
if (entity.isFollowingOwner() && entity.getOwner() != null && entity.distanceToSqr(entity.getOwner()) > FOLLOW_BREAK_SIT_DISTANCE_SQR) {
return false;
}
return entity.hurtTime <= 0;
}
private boolean isNearShade(GlimmerEntity entity) {
BlockPos base = entity.blockPosition();
for (BlockPos pos : BlockPos.betweenClosed(base.offset(-3, -1, -3), base.offset(3, 3, 3))) {
if (entity.level().getBlockState(pos).is(BlockTags.LEAVES)) {
return true;
}
}
return false;
}
}
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity.glimmer;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.client.particle.GlimmerParticles;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.network.chat.Component;
@@ -93,6 +94,12 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
SynchedEntityData.defineId(GlimmerEntity.class, EntityDataSerializers.FLOAT);
private static final EntityDataAccessor<Integer> ABILITY_ANIM_TICKS =
SynchedEntityData.defineId(GlimmerEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> ELKA_IDLE_SITTING =
SynchedEntityData.defineId(GlimmerEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Integer> ELKA_IDLE_QUIRK_TICKS =
SynchedEntityData.defineId(GlimmerEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Integer> ELKA_IDLE_QUIRK_VARIANT =
SynchedEntityData.defineId(GlimmerEntity.class, EntityDataSerializers.INT);
public static final int FADE_DURATION_TICKS = 40;
private static final int PASSIVE_RANGE = 16;
@@ -103,11 +110,19 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
private static final String VARIANT_LOCKED_KEY = "VariantLocked";
private static final String FOLLOWING_KEY = "GlimmerFollowing";
private static final String ABILITY_COOLDOWN_KEY = "AbilityCooldown";
private static final String ELKA_IDLE_SITTING_KEY = "ElkaIdleSitting";
private static final String ELKA_IDLE_SIT_TICKS_KEY = "ElkaIdleSitTicks";
private static final String ELKA_IDLE_SIT_COOLDOWN_KEY = "ElkaIdleSitCooldown";
private static final String ELKA_IDLE_QUIRK_TICKS_KEY = "ElkaIdleQuirkTicks";
private static final String ELKA_IDLE_QUIRK_VARIANT_KEY = "ElkaIdleQuirkVariant";
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private boolean variantLocked;
private float lastOwnerExhaustion = -1.0F;
private long lastOwnerShieldLostCount = -1L;
private int elkaIdleSitTicksRemaining;
private int elkaIdleSitCooldownTicks = 20 * 60 * 6;
private int elkaIdleAnimationCycleTicks;
public GlimmerEntity(EntityType<? extends GlimmerEntity> entityType, Level level) {
super(entityType, level);
@@ -152,6 +167,9 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
builder.define(ABILITY_COOLDOWN, 0);
builder.define(GROWTH_SCALE, 1.0F);
builder.define(ABILITY_ANIM_TICKS, 0);
builder.define(ELKA_IDLE_SITTING, false);
builder.define(ELKA_IDLE_QUIRK_TICKS, 0);
builder.define(ELKA_IDLE_QUIRK_VARIANT, 0);
}
public void playAbilityAnimation(int ticks) {
@@ -224,6 +242,54 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
this.refreshDimensions();
}
public boolean isElkaIdleSitting() {
return this.entityData.get(ELKA_IDLE_SITTING);
}
public void setElkaIdleSitting(boolean sitting) {
this.entityData.set(ELKA_IDLE_SITTING, sitting);
}
public int getElkaIdleQuirkTicks() {
return this.entityData.get(ELKA_IDLE_QUIRK_TICKS);
}
public void setElkaIdleQuirkTicks(int ticks) {
this.entityData.set(ELKA_IDLE_QUIRK_TICKS, Math.max(0, ticks));
}
public int getElkaIdleQuirkVariant() {
return this.entityData.get(ELKA_IDLE_QUIRK_VARIANT);
}
public void setElkaIdleQuirkVariant(int variant) {
this.entityData.set(ELKA_IDLE_QUIRK_VARIANT, Math.max(0, variant));
}
public int getElkaIdleSitTicksRemaining() {
return this.elkaIdleSitTicksRemaining;
}
public void setElkaIdleSitTicksRemaining(int ticks) {
this.elkaIdleSitTicksRemaining = Math.max(0, ticks);
}
public int getElkaIdleSitCooldownTicks() {
return this.elkaIdleSitCooldownTicks;
}
public void setElkaIdleSitCooldownTicks(int ticks) {
this.elkaIdleSitCooldownTicks = Math.max(0, ticks);
}
public int getElkaIdleAnimationCycleTicks() {
return this.elkaIdleAnimationCycleTicks;
}
public void setElkaIdleAnimationCycleTicks(int ticks) {
this.elkaIdleAnimationCycleTicks = Math.max(0, ticks);
}
private void cycleMovementState(Player player) {
if (this.isOrderedToSit()) {
this.setOrderedToSit(false);
@@ -366,7 +432,7 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
}
if (player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) {
com.craisinlord.antarchy.content.AntarchyAdvancements.award(serverPlayer, this.getVariant().tameAdvancementId());
AntarchyAdvancements.award(serverPlayer, this.getVariant().tameAdvancementId());
}
return InteractionResult.SUCCESS;
@@ -566,6 +632,11 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
tag.putBoolean(VARIANT_LOCKED_KEY, this.variantLocked);
tag.putBoolean(FOLLOWING_KEY, this.isFollowingOwner());
tag.putInt(ABILITY_COOLDOWN_KEY, this.entityData.get(ABILITY_COOLDOWN));
tag.putBoolean(ELKA_IDLE_SITTING_KEY, this.isElkaIdleSitting());
tag.putInt(ELKA_IDLE_SIT_TICKS_KEY, this.elkaIdleSitTicksRemaining);
tag.putInt(ELKA_IDLE_SIT_COOLDOWN_KEY, this.elkaIdleSitCooldownTicks);
tag.putInt(ELKA_IDLE_QUIRK_TICKS_KEY, this.getElkaIdleQuirkTicks());
tag.putInt(ELKA_IDLE_QUIRK_VARIANT_KEY, this.getElkaIdleQuirkVariant());
}
@Override
@@ -578,6 +649,11 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
this.variantLocked = tag.getBoolean(VARIANT_LOCKED_KEY);
this.entityData.set(FOLLOWING, !tag.contains(FOLLOWING_KEY) || tag.getBoolean(FOLLOWING_KEY));
this.entityData.set(ABILITY_COOLDOWN, tag.getInt(ABILITY_COOLDOWN_KEY));
this.entityData.set(ELKA_IDLE_SITTING, tag.getBoolean(ELKA_IDLE_SITTING_KEY));
this.elkaIdleSitTicksRemaining = tag.getInt(ELKA_IDLE_SIT_TICKS_KEY);
this.elkaIdleSitCooldownTicks = tag.contains(ELKA_IDLE_SIT_COOLDOWN_KEY) ? tag.getInt(ELKA_IDLE_SIT_COOLDOWN_KEY) : 20 * 60 * 6;
this.entityData.set(ELKA_IDLE_QUIRK_TICKS, tag.getInt(ELKA_IDLE_QUIRK_TICKS_KEY));
this.entityData.set(ELKA_IDLE_QUIRK_VARIANT, tag.getInt(ELKA_IDLE_QUIRK_VARIANT_KEY));
}
@Override
@@ -611,7 +687,8 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity {
RawAnimation movingAnim = this.getVariant().getBehavior().movingAnimation(this);
return state.setAndContinue(movingAnim != null ? movingAnim : WALK_ANIM);
}
return state.setAndContinue(IDLE_ANIM);
RawAnimation idleAnim = this.getVariant().getBehavior().idleAnimation(this);
return state.setAndContinue(idleAnim != null ? idleAnim : IDLE_ANIM);
}
@Override
@@ -95,6 +95,15 @@ public interface GlimmerVariantBehavior {
return null;
}
/**
* Animation to play while idle in place of the default idle loop. Null uses the
* shared Glimmer idle animation.
*/
@Nullable
default software.bernie.geckolib.animation.RawAnimation idleAnimation(GlimmerEntity entity) {
return null;
}
/**
* Navigation speed multiplier used while following the owner (see {@link GlimmerFollowOwnerGoal}).
*/
@@ -112,7 +112,7 @@ public class KrakenEntity extends Monster implements GeoEntity, MultipartEntityO
private static final Vec3 GRAB_ANCHOR_LOCAL = new Vec3(22.0D / 16.0D, 223.5D / 16.0D, -12.5D / 16.0D);
private final ServerBossEvent bossEvent = new ServerBossEvent(Component.literal("The Kraken"), BossEvent.BossBarColor.BLUE, BossEvent.BossBarOverlay.PROGRESS);
private final ServerBossEvent bossEvent = new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent(this.getUUID(), Component.translatable("entity.antarchy.kraken"), BossEvent.BossBarColor.BLUE, BossEvent.BossBarOverlay.PROGRESS);
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
@Nullable
@@ -0,0 +1,44 @@
package com.craisinlord.antarchy.content.fluid;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.material.FluidState;
public final class AntarchyFluidChecks {
private static final ResourceLocation ANTIWATER_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "antiwater");
private static final ResourceLocation FLOWING_ANTIWATER_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_antiwater");
private static final ResourceLocation ICHOR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ichor");
private static final ResourceLocation FLOWING_ICHOR_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_ichor");
private static final ResourceLocation LUMEN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "lumen");
private static final ResourceLocation FLOWING_LUMEN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_lumen");
private static final ResourceLocation BILE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "bile");
private static final ResourceLocation FLOWING_BILE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "flowing_bile");
private AntarchyFluidChecks() {
}
public static boolean isAntiwater(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return ANTIWATER_ID.equals(fluidId) || FLOWING_ANTIWATER_ID.equals(fluidId);
}
public static boolean isIchor(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return ICHOR_ID.equals(fluidId) || FLOWING_ICHOR_ID.equals(fluidId);
}
public static boolean isLumen(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return LUMEN_ID.equals(fluidId) || FLOWING_LUMEN_ID.equals(fluidId);
}
public static boolean isBile(FluidState fluidState) {
ResourceLocation fluidId = BuiltInRegistries.FLUID.getKey(fluidState.getType());
return BILE_ID.equals(fluidId) || FLOWING_BILE_ID.equals(fluidId);
}
public static boolean usesWaterLikePhysics(FluidState fluidState) {
return isIchor(fluidState) || isLumen(fluidState) || isBile(fluidState);
}
}
@@ -67,7 +67,7 @@ public final class CavarynHordeManager {
private static final int HOSTILE_KILL_ATTENTION = 4;
private static final int MOB_KILL_ATTENTION = 3;
private static final int EGG_OR_NEST_BREAK_ATTENTION = 5;
private static final int BLOCK_BREAK_ATTENTION = 1;
private static final int BLOCK_BREAK_ATTENTION = 0;
private static final int STALE_ATTENTION_PRUNE_TICKS = 20 * 60 * 20;
private static final int PLAYER_CHECK_INTERVAL = 20;
private static final int AREA_ATTENTION_INTERVAL = 20 * 45;
@@ -85,6 +85,7 @@ public final class CavarynHordeManager {
private static final int MAX_SPAWN_ATTEMPTS_PER_MOB = 18;
private static final double MIN_SPAWN_DISTANCE = 18.0D;
private static final double MAX_SPAWN_DISTANCE = 36.0D;
private static final int EGG_HATCH_ACCELERATION_MIN_ATTENTION = ATTENTION_THRESHOLD / 2;
private CavarynHordeManager() {
}
@@ -145,6 +146,34 @@ public final class CavarynHordeManager {
return attention != null ? attention.attention : 0;
}
public static boolean shouldAccelerateNearbyEggHatching(ServerLevel level, BlockPos pos, double playerRadius, RandomSource random) {
if (!level.dimension().equals(CAVARYN) || !isHordeBiome(level, pos)) {
return false;
}
double radiusSqr = playerRadius * playerRadius;
HordeData data = get(level);
int highestAttention = 0;
for (ServerPlayer player : level.players()) {
if (!isValidHordeTarget(player) || player.blockPosition().distSqr(pos) > radiusSqr) {
continue;
}
PlayerAttention attention = data.players.get(player.getUUID());
if (attention == null) {
continue;
}
highestAttention = Math.max(highestAttention, attention.attention);
}
if (highestAttention < EGG_HATCH_ACCELERATION_MIN_ATTENTION) {
return false;
}
float pressure = highestAttention / (float) ATTENTION_THRESHOLD;
float chance = Mth.lerp(pressure, 0.02F, 0.3F);
return random.nextFloat() < chance;
}
public static int setHordeLevel(ServerPlayer player, int levelValue) {
if (!(player.level() instanceof ServerLevel level) || !level.dimension().equals(CAVARYN)) {
return -1;
@@ -160,6 +160,7 @@ public class BigBerthaItem extends SwordItem implements GeoItem {
case LUCID -> applyLucidHit(target, player, serverLevel);
case NIGHTMARE -> applyNightmareHit(target, serverLevel);
case KRAKEN -> applyKrakenHit(player, target, serverLevel);
case HERCULES -> applyHerculesHit(player, target, serverLevel);
case MOLEVORE, TORETERROR -> {
}
}
@@ -324,6 +325,31 @@ public class BigBerthaItem extends SwordItem implements GeoItem {
com.craisinlord.antarchy.content.entity.kraken.TentacleEntity.spawnAt(level, target.position(), attacker);
}
private void applyHerculesHit(Player attacker, LivingEntity target, ServerLevel level) {
float bonusDamage = (float) (attacker.getAttributeValue(Attributes.ATTACK_DAMAGE) * 0.5D);
Vec3 push = target.position().subtract(attacker.position()).multiply(1.0D, 0.0D, 1.0D);
if (push.lengthSqr() < 1.0E-4D) {
push = attacker.getLookAngle().multiply(1.0D, 0.0D, 1.0D);
}
if (bonusDamage > 0.0F) {
target.invulnerableTime = 0;
target.hurt(attacker.damageSources().playerAttack(attacker), bonusDamage);
}
if (push.lengthSqr() >= 1.0E-4D) {
Vec3 normalized = push.normalize();
Vec3 motion = target.getDeltaMovement();
target.setDeltaMovement(motion.x + normalized.x * 0.55D, Math.max(motion.y, 1.35D), motion.z + normalized.z * 0.55D);
} else {
Vec3 motion = target.getDeltaMovement();
target.setDeltaMovement(motion.x, Math.max(motion.y, 1.35D), motion.z);
}
target.hurtMarked = true;
level.sendParticles(ParticleTypes.CRIT, target.getX(), target.getY(0.7D), target.getZ(), 12, 0.3D, 0.35D, 0.3D, 0.04D);
level.playSound(null, target.blockPosition(), SoundEvents.IRON_GOLEM_ATTACK, SoundSource.PLAYERS, 1.0F, 0.8F);
}
private void cycleMode(Level level, Player player, ItemStack stack) {
BossMode nextMode = getMode(stack).next();
setMode(stack, nextMode);
@@ -595,7 +621,8 @@ public class BigBerthaItem extends SwordItem implements GeoItem {
KRAKEN(2, "tooltip.antarchy.big_bertha.mode.kraken", "message.antarchy.big_bertha.mode.kraken"),
MOLEVORE(3, "tooltip.antarchy.big_bertha.mode.molevore", "message.antarchy.big_bertha.mode.molevore"),
LUCID(4, "tooltip.antarchy.big_bertha.mode.lucid", "message.antarchy.big_bertha.mode.lucid"),
TORETERROR(5, "tooltip.antarchy.big_bertha.mode.toreterror", "message.antarchy.big_bertha.mode.toreterror");
TORETERROR(5, "tooltip.antarchy.big_bertha.mode.toreterror", "message.antarchy.big_bertha.mode.toreterror"),
HERCULES(6, "tooltip.antarchy.big_bertha.mode.hercules", "message.antarchy.big_bertha.mode.hercules");
private final int id;
private final String tooltipKey;
@@ -612,7 +639,8 @@ public class BigBerthaItem extends SwordItem implements GeoItem {
case BASILISK -> LUCID;
case LUCID -> NIGHTMARE;
case NIGHTMARE -> KRAKEN;
case KRAKEN -> MOLEVORE;
case KRAKEN -> HERCULES;
case HERCULES -> MOLEVORE;
case MOLEVORE -> TORETERROR;
case TORETERROR -> BASILISK;
};
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.client.particle.GlimmerParticles;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerCompanionSavedData;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity;
@@ -80,7 +81,7 @@ public class GlimmerBottleItem extends Item {
level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_EMPTY, SoundSource.PLAYERS, 1.0F, 1.0F);
if (player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) {
com.craisinlord.antarchy.content.AntarchyAdvancements.award(serverPlayer, variant.tameAdvancementId());
AntarchyAdvancements.award(serverPlayer, variant.tameAdvancementId());
}
ItemStack result = ItemUtils.createFilledResult(stack, player, new ItemStack(Items.GLASS_BOTTLE));
@@ -0,0 +1,98 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.content.block.BedBugEggBlock;
import com.craisinlord.antarchy.content.block.CreepingHorrorEggBlock;
import com.craisinlord.antarchy.content.block.JerryEggBlock;
import com.craisinlord.antarchy.content.block.JumpyBugEggBlock;
import com.craisinlord.antarchy.content.block.LurkingTerrorEggBlock;
import com.craisinlord.antarchy.content.block.SpitBugEggBlock;
import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.animal.Turtle;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.TurtleEggBlock;
import net.minecraft.world.level.block.state.BlockState;
public class JerryNucleusItem extends Item {
public JerryNucleusItem(Properties properties) {
super(properties);
}
@Override
public InteractionResult useOn(UseOnContext context) {
BlockState state = context.getLevel().getBlockState(context.getClickedPos());
Block block = state.getBlock();
boolean handled = block instanceof BedBugEggBlock
|| block instanceof CreepingHorrorEggBlock
|| block instanceof LurkingTerrorEggBlock
|| block instanceof JumpyBugEggBlock
|| block instanceof SpitBugEggBlock
|| block instanceof JerryEggBlock
|| block instanceof TurtleEggBlock;
if (!handled) {
return super.useOn(context);
}
if (!(context.getLevel() instanceof ServerLevel serverLevel)) {
return InteractionResult.SUCCESS;
}
BlockPos pos = context.getClickedPos();
if (block instanceof BedBugEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos, state);
} else if (block instanceof CreepingHorrorEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos, state);
} else if (block instanceof LurkingTerrorEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos, state);
} else if (block instanceof JumpyBugEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos);
} else if (block instanceof SpitBugEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos);
} else if (block instanceof JerryEggBlock eggBlock) {
eggBlock.hatchWithNucleus(serverLevel, pos);
} else if (block instanceof TurtleEggBlock) {
hatchTurtleEggs(serverLevel, pos, state);
}
if (context.getPlayer() == null || !context.getPlayer().getAbilities().instabuild) {
context.getItemInHand().shrink(1);
}
return InteractionResult.CONSUME;
}
private static void hatchTurtleEggs(ServerLevel level, BlockPos pos, BlockState state) {
int eggs = state.getValue(TurtleEggBlock.EGGS);
level.removeBlock(pos, false);
level.playSound(null, pos, SoundEvents.TURTLE_EGG_HATCH, SoundSource.BLOCKS, 0.75F, 0.95F + level.random.nextFloat() * 0.1F);
for (int i = 0; i < eggs; i++) {
Turtle turtle = EntityType.TURTLE.create(level);
if (turtle == null) {
continue;
}
turtle.setAge(-24000);
turtle.setHomePos(pos);
double spawnX = pos.getX() + 0.3D + level.random.nextDouble() * 0.4D;
double spawnZ = pos.getZ() + 0.3D + level.random.nextDouble() * 0.4D;
turtle.moveTo(spawnX, pos.getY() + 0.1D, spawnZ, level.random.nextFloat() * 360.0F, 0.0F);
level.addFreshEntity(turtle);
}
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.jerry_nucleus.hatch").withStyle(ChatFormatting.GRAY));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
}
@@ -0,0 +1,31 @@
package com.craisinlord.antarchy.content.item;
import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.Tier;
import net.minecraft.world.item.TooltipFlag;
public class MantisClawItem extends SwordItem {
public static final double WALL_CLING_FALL_SPEED = -0.02D;
public static final double WALL_CLIMB_JUMP_VELOCITY = 0.42D;
public MantisClawItem(Tier tier, Item.Properties properties) {
super(tier, properties);
}
public static boolean isDualWielding(LivingEntity entity) {
return entity.getMainHandItem().getItem() instanceof MantisClawItem
&& entity.getOffhandItem().getItem() instanceof MantisClawItem;
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.mantis_claw.wall_cling").withStyle(ChatFormatting.GRAY));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
}
@@ -7,11 +7,14 @@ import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record HerculesBeetleMountedChargePayload(int chargeTicks) implements CustomPacketPayload {
public record HerculesBeetleMountedChargePayload(boolean pressing) implements CustomPacketPayload {
public static final Type<HerculesBeetleMountedChargePayload> TYPE =
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "hercules_beetle_mounted_charge"));
public static final StreamCodec<ByteBuf, HerculesBeetleMountedChargePayload> STREAM_CODEC =
ByteBufCodecs.VAR_INT.map(HerculesBeetleMountedChargePayload::new, HerculesBeetleMountedChargePayload::chargeTicks);
StreamCodec.composite(
ByteBufCodecs.BOOL, HerculesBeetleMountedChargePayload::pressing,
HerculesBeetleMountedChargePayload::new
);
@Override
public Type<HerculesBeetleMountedChargePayload> type() {
@@ -1,6 +1,8 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.recipe;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.NonNullList;
import net.minecraft.core.component.DataComponents;
@@ -1,8 +1,9 @@
package com.craisinlord.antarchy.content;
package com.craisinlord.antarchy.content.recipe;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant;
import com.craisinlord.antarchy.content.item.GlimmerBottleItem;
import net.minecraft.core.Holder;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.mixins;
import com.craisinlord.antarchy.content.GoopedEffectHooks;
import com.craisinlord.antarchy.content.effect.GoopedEffectHooks;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.sounds.SoundEvents;
@@ -0,0 +1,71 @@
package com.craisinlord.antarchy.mixins;
import com.craisinlord.antarchy.content.item.MantisClawItem;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Player.class)
public abstract class MantisClawWallClimbMixin extends LivingEntity {
@Unique
private boolean antarchy$mantisClinging;
@Unique
private int antarchy$mantisWallJumpCooldown;
protected MantisClawWallClimbMixin(EntityType<? extends LivingEntity> entityType, Level level) {
super(entityType, level);
}
@Inject(method = "tick", at = @At("TAIL"))
private void antarchy$tickMantisWallCling(CallbackInfo ci) {
if (this.antarchy$mantisWallJumpCooldown > 0) {
this.antarchy$mantisWallJumpCooldown--;
}
if (!this.antarchy$canMantisCling()) {
this.antarchy$mantisClinging = false;
return;
}
if (!this.antarchy$mantisClinging && !this.level().isClientSide()) {
this.playSound(
SoundEvents.STONE_BREAK,
0.45F,
0.9F + this.getRandom().nextFloat() * 0.1F
);
}
Vec3 motion = this.getDeltaMovement();
double clampedY = motion.y < MantisClawItem.WALL_CLING_FALL_SPEED ? MantisClawItem.WALL_CLING_FALL_SPEED : motion.y;
if (this.jumping && this.antarchy$mantisWallJumpCooldown <= 0) {
clampedY = Math.max(clampedY, MantisClawItem.WALL_CLIMB_JUMP_VELOCITY);
this.antarchy$mantisWallJumpCooldown = 6;
}
this.setDeltaMovement(motion.x, clampedY, motion.z);
this.hasImpulse = true;
this.fallDistance = 0.0F;
this.antarchy$mantisClinging = true;
}
@Unique
private boolean antarchy$canMantisCling() {
Player player = (Player) (Object) this;
return MantisClawItem.isDualWielding(player)
&& this.horizontalCollision
&& !this.onGround()
&& !this.isInWaterOrBubble()
&& !this.isPassenger()
&& !this.isFallFlying()
&& !player.getAbilities().flying
&& !player.isSpectator();
}
}
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.mixins;
import com.craisinlord.antarchy.content.CustomBrewingRecipes;
import com.craisinlord.antarchy.content.recipe.CustomBrewingRecipes;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.alchemy.PotionBrewing;
import org.spongepowered.asm.mixin.Mixin;
@@ -1,7 +1,7 @@
package com.craisinlord.antarchy.mixins;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.StinkyBehavior;
import com.craisinlord.antarchy.content.effect.StinkyBehavior;
import net.minecraft.world.entity.LivingEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -0,0 +1,43 @@
package com.craisinlord.antarchy.mixins.client;
import com.craisinlord.antarchy.content.client.hud.CustomBossBarRenderer;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.BossHealthOverlay;
import net.minecraft.client.gui.components.LerpingBossEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.BossEvent;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(BossHealthOverlay.class)
public abstract class CustomBossBarMixin {
@Inject(
method = "drawBar(Lnet/minecraft/client/gui/GuiGraphics;IILnet/minecraft/world/BossEvent;)V",
at = @At("HEAD"),
cancellable = true
)
private void antarchy$drawCustomBossBar(GuiGraphics guiGraphics, int x, int y, BossEvent bossEvent, CallbackInfo ci) {
if (CustomBossBarRenderer.render(guiGraphics, x, y, bossEvent)) {
ci.cancel();
}
}
@Redirect(
method = "render",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/components/LerpingBossEvent;getName()Lnet/minecraft/network/chat/Component;")
)
private Component antarchy$hideNameForCustomBossBar(LerpingBossEvent bossEvent) {
return CustomBossBarRenderer.isCustomBoss(bossEvent) ? Component.empty() : bossEvent.getName();
}
@ModifyConstant(method = "render", constant = @Constant(intValue = 9, ordinal = 1))
private int antarchy$doubleGapForCustomBossBar(int original, @Local LerpingBossEvent bossEvent) {
return CustomBossBarRenderer.isCustomBoss(bossEvent) ? original + 19 : original;
}
}
@@ -239,7 +239,7 @@ public abstract class EntityGravityMixin implements AntarchyGravityAccess {
for (int z = min.getZ(); z <= max.getZ(); z++) {
cursor.set(x, y, z);
FluidState fluidState = entity.level().getFluidState(cursor);
if (com.craisinlord.antarchy.content.block.PotentNyxiteBlock.isAntiwater(fluidState)) {
if (com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks.isAntiwater(fluidState)) {
return true;
}
}
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.mixins.gravity;
import com.craisinlord.antarchy.content.block.PotentNyxiteBlock;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
@@ -160,7 +160,7 @@ public abstract class EntityMoveMixin {
for (int z = min.getZ(); z <= max.getZ(); z++) {
cursor.set(x, y, z);
FluidState fluidState = entity.level().getFluidState(cursor);
if (PotentNyxiteBlock.isAntiwater(fluidState)) {
if (AntarchyFluidChecks.isAntiwater(fluidState)) {
return true;
}
}
@@ -3,7 +3,7 @@ package com.craisinlord.antarchy.mixins.gravity;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
import com.craisinlord.antarchy.content.block.PotentNyxiteBlock;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local;
@@ -115,7 +115,7 @@ public abstract class LivingEntityMixin {
for (int z = min.getZ(); z <= max.getZ(); z++) {
cursor.set(x, y, z);
FluidState fluidState = entity.level().getFluidState(cursor);
if (PotentNyxiteBlock.isAntiwater(fluidState)) {
if (AntarchyFluidChecks.isAntiwater(fluidState)) {
return true;
}
}
@@ -1,6 +1,6 @@
package com.craisinlord.antarchy.mixins.gravity;
import com.craisinlord.antarchy.content.block.PotentNyxiteBlock;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
@@ -105,7 +105,7 @@ public abstract class ServerPlayerGravityMixin {
for (int z = min.getZ(); z <= max.getZ(); z++) {
cursor.set(x, y, z);
FluidState fluidState = player.level().getFluidState(cursor);
if (PotentNyxiteBlock.isAntiwater(fluidState)) {
if (AntarchyFluidChecks.isAntiwater(fluidState)) {
return true;
}
}
@@ -20,6 +20,7 @@
"FrogVariantBootstrapMixin",
"GlowSquidLumenSpawnMixin",
"GlowVinesUnderLeavesMixin",
"MantisClawWallClimbMixin",
"MilkBucketSizeResetMixin",
"GoopedStepSoundMixin",
"ExperimentalSettingsLevelSummaryMixin",
@@ -63,6 +64,7 @@
"multipart.EntityMultipartLifecycleMixin"
],
"client": [
"client.CustomBossBarMixin",
"client.CavarynSkyMixin",
"client.CavarynHordeFogMixin",
"client.CavarynHordeLightTextureMixin",
@@ -2373,26 +2373,6 @@
}
}
},
"right_wing": {
"scale": {
"0.0": {
"post": {
"vector": [0, 0, 0]
},
"lerp_mode": "catmullrom"
}
}
},
"left_wing": {
"scale": {
"0.0": {
"post": {
"vector": [0, 0, 0]
},
"lerp_mode": "catmullrom"
}
}
},
"Hercules_beetle": {
"position": {
"0.0": {
@@ -2661,26 +2641,6 @@
}
}
},
"right_wing": {
"scale": {
"0.0": {
"post": {
"vector": [0, 0, 0]
},
"lerp_mode": "catmullrom"
}
}
},
"left_wing": {
"scale": {
"0.0": {
"post": {
"vector": [0, 0, 0]
},
"lerp_mode": "catmullrom"
}
}
},
"Hercules_beetle": {
"position": {
"0.0": {
@@ -5183,4 +5143,4 @@
}
}
}
}
}
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Schleudert dich bei einem Treffer nach vorn.",
"tooltip.antarchy.blood_crystal_katana.trail": "Hinterlässt eine karmesinrote Spur.",
"item.antarchy.mantis_claw": "Gottesanbeterin-Klaue",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "König-Schuppe",
"item.antarchy.queen_scale": "Königin-Schuppe",
"item.antarchy.jumpy_bug_leg": "Sprungkäfer-Bein",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "Die kleine Raupe Nimmersatt",
"advancements.antarchy.very_hungry_caterpillar.description": "Hilf einer Raupe beim Wachsen.",
"effect.antarchy.dread": "Grauen",
"effect.antarchy.dread.description": "Verursacht visuelle und akustische Halluzinationen.",
"effect.antarchy.paralyzed": "Gelähmt",
"effect.antarchy.paralyzed.description": "Verhindert, dass sich Ziele bewegen.",
"effect.antarchy.inverted": "Umgekehrt",
"effect.antarchy.inverted.description": "Kehrt die Schwerkraft des Ziels um.",
"effect.antarchy.stinky": "Stinkend",
"effect.antarchy.stinky.description": "Vertreibt passive und neutrale Kreaturen und zieht Gliederfüßer an.",
"effect.antarchy.gooped.description": "Verlangsamt Bewegung und Angriffsgeschwindigkeit.",
"effect.antarchy.shrinking": "Schrumpfung",
"effect.antarchy.growth": "Wachstum",
"effect.antarchy.bloodglass_ward": "Blutglasbarriere",
"effect.antarchy.bloodglass_ward.description": "Verleiht Herzen, die zersplittern und einen gesamten Treffer absorbieren. Sie regenerieren sich mit der Zeit.",
"death.attack.triffid_mauling": "%1$s wurde von einer Pflanze zu Tode zerfleischt",
"death.attack.triffid_mauling.player": "%1$s wurde von einer Pflanze zu Tode zerfleischt",
"death.attack.triffid_swallow": "%1$s wurde von einem Triffid verschlungen",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "Herkuleskäfer brüllt",
"subtitles.antarchy.hercules_beetle_charge_start": "Herkuleskäfer lädt einen Angriff auf",
"subtitles.antarchy.hercules_beetle_knocked_down": "Herkuleskäfer wird zu Boden geworfen",
"subtitles.antarchy.jerry_idle": "Jerry schwatzt",
"subtitles.antarchy.jerry_hurt": "Jerry wird verletzt",
"subtitles.antarchy.jerry_death": "Jerry stirbt",
"subtitles.antarchy.jerry_attack": "Jerry greift an",
"subtitles.antarchy.jumpy_bug_idle": "Sprungkäfer ist zu hören",
"subtitles.antarchy.spit_bug_idle": "Spuckkäfer ist zu hören",
"subtitles.antarchy.jumpy_bug_hurt": "Sprungkäfer wird verletzt",
@@ -349,9 +349,13 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Launches you forward on hit.",
"tooltip.antarchy.blood_crystal_katana.trail": "Leaves a crimson trail behind you.",
"item.antarchy.mantis_claw": "Mantis Claw",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "King Scale",
"item.antarchy.queen_scale": "Queen Scale",
"item.antarchy.jerry_nucleus": "Jerry Nucleus",
"tooltip.antarchy.jerry_nucleus.hatch": "Right-click any bug egg or turtle egg to hatch it instantly.",
"key.antarchy.dorrie_charge_jump": "Dorrie Charge Jump",
"key.antarchy.hercules_beetle_charge": "Hercules Beetle Charge",
"item.antarchy.carapace": "Carapace",
"item.antarchy.jumpy_bug_leg": "Jumpy Bug Leg",
"item.antarchy.jumpy_boots": "Jumpy Boots",
@@ -521,6 +525,7 @@
"message.antarchy.big_bertha.mode.lucid": "Lucid",
"message.antarchy.big_bertha.mode.nightmare": "Nightmare",
"message.antarchy.big_bertha.mode.kraken": "Kraken",
"message.antarchy.big_bertha.mode.hercules": "Hercules",
"message.antarchy.big_bertha.mode.molevore": "Molevore",
"message.antarchy.big_bertha.mode.toreterror": "Toreterror",
"message.antarchy.ultimate_tool.mode_3x3": "Switched to 3x3 Mining",
@@ -530,13 +535,19 @@
"advancements.antarchy.very_hungry_caterpillar.title": "Very Hungry Caterpillar",
"advancements.antarchy.very_hungry_caterpillar.description": "Help a caterpillar grow.",
"effect.antarchy.dread": "Dread",
"effect.antarchy.dread.description": "Gives visual and audio hallucinations.",
"effect.antarchy.paralyzed": "Paralyzed",
"effect.antarchy.paralyzed.description": "Prevents targets from moving.",
"effect.antarchy.inverted": "Inverted",
"effect.antarchy.inverted.description": "Inverts the target's gravity.",
"effect.antarchy.stinky": "Stinky",
"effect.antarchy.stinky.description": "Repels passive and neutral mobs, attracts arthropods.",
"effect.antarchy.gooped": "Gooped",
"effect.antarchy.gooped.description": "Slows movement and attack speed.",
"effect.antarchy.shrinking": "Shrinking",
"effect.antarchy.growth": "Growth",
"effect.antarchy.bloodglass_ward": "Bloodglass Ward",
"effect.antarchy.bloodglass_ward.description": "Gives hearts that shatter, absorbing an entire hit of damage. They regenerate over time.",
"death.attack.triffid_mauling": "%1$s was mauled to death by a plant",
"death.attack.triffid_mauling.player": "%1$s was mauled to death by a plant",
"death.attack.triffid_swallow": "%1$s was swallowed by a triffid",
@@ -549,6 +560,7 @@
"tooltip.antarchy.big_bertha.mode.lucid": "Hits invert targets for a few seconds. Hits deal more damage while you are inverted.",
"tooltip.antarchy.big_bertha.mode.nightmare": "Players suffer Dread; hits inflict weakness.",
"tooltip.antarchy.big_bertha.mode.kraken": "Hits slam targets back and call lightning.",
"tooltip.antarchy.big_bertha.mode.hercules": "Hits deal bonus damage and launch targets high into the air.",
"tooltip.antarchy.big_bertha.mode.molevore": "Right-click to spin forward and drill through Molevore blocks.",
"tooltip.antarchy.big_bertha.mode.toreterror": "Right-click to launch into the air and crash down with an AOE shockwave.",
"tooltip.antarchy.ultimate_tools_3x3": "Shift-right-click to toggle 3x3 Mining.",
@@ -957,6 +969,10 @@
"subtitles.antarchy.spit_bug_hurt": "Spit Bug hurts",
"subtitles.antarchy.spit_bug_spit": "Spit Bug spits",
"subtitles.antarchy.brutalfly_spit": "Brutalfly spits",
"subtitles.antarchy.jerry_idle": "Jerry chatters",
"subtitles.antarchy.jerry_hurt": "Jerry hurts",
"subtitles.antarchy.jerry_death": "Jerry dies",
"subtitles.antarchy.jerry_attack": "Jerry attacks",
"advancements.antarchy.bug_apetit.title": "Bug Apétit",
"advancements.antarchy.bug_apetit.description": "Eat Cooked Bug Meat.",
"advancements.antarchy.behavioral_correction.title": "Behavioral Correction",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Te impulsa hacia delante al golpear.",
"tooltip.antarchy.blood_crystal_katana.trail": "Deja un rastro carmesí tras de ti.",
"item.antarchy.mantis_claw": "Garra de Mantis",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "Escama de Rey",
"item.antarchy.queen_scale": "Escama de Reina",
"item.antarchy.jumpy_bug_leg": "Pata de Bicho saltarín",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "La oruga muy hambrienta",
"advancements.antarchy.very_hungry_caterpillar.description": "Ayuda a crecer a una oruga.",
"effect.antarchy.dread": "Pavor",
"effect.antarchy.dread.description": "Provoca alucinaciones visuales y auditivas.",
"effect.antarchy.paralyzed": "Paralizado",
"effect.antarchy.paralyzed.description": "Impide que los objetivos se muevan.",
"effect.antarchy.inverted": "Invertido",
"effect.antarchy.inverted.description": "Invierte la gravedad del objetivo.",
"effect.antarchy.stinky": "Apestoso",
"effect.antarchy.stinky.description": "Ahuyenta a las criaturas pasivas y neutrales, y atrae a los artrópodos.",
"effect.antarchy.gooped.description": "Reduce la velocidad de movimiento y de ataque.",
"effect.antarchy.shrinking": "Reducción",
"effect.antarchy.growth": "Crecimiento",
"effect.antarchy.bloodglass_ward": "Guardia de Cristalsangre",
"effect.antarchy.bloodglass_ward.description": "Otorga corazones que se hacen añicos y absorben un golpe completo de daño. Se regeneran con el tiempo.",
"death.attack.triffid_mauling": "Una planta despedazó a %1$s",
"death.attack.triffid_mauling.player": "Una planta despedazó a %1$s",
"death.attack.triffid_swallow": "Un Triffid se tragó a %1$s",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "Escarabajo hércules ruge",
"subtitles.antarchy.hercules_beetle_charge_start": "Escarabajo hércules carga un ataque",
"subtitles.antarchy.hercules_beetle_knocked_down": "Escarabajo hércules cae derribado",
"subtitles.antarchy.jerry_idle": "Jerry parlotea",
"subtitles.antarchy.jerry_hurt": "Jerry sufre daño",
"subtitles.antarchy.jerry_death": "Jerry muere",
"subtitles.antarchy.jerry_attack": "Jerry ataca",
"subtitles.antarchy.jumpy_bug_idle": "Bicho saltarín hace ruido",
"subtitles.antarchy.spit_bug_idle": "Bicho escupidor hace ruido",
"subtitles.antarchy.jumpy_bug_hurt": "Bicho saltarín recibe daño",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Vous propulse vers l’avant lorsque vous touchez une cible.",
"tooltip.antarchy.blood_crystal_katana.trail": "Laisse une traînée cramoisie derrière vous.",
"item.antarchy.mantis_claw": "Griffe de Mante religieuse",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "Écaille de Roi",
"item.antarchy.queen_scale": "Écaille de Reine",
"item.antarchy.jumpy_bug_leg": "Patte de Insecte sauteur",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "La chenille qui fait des trous",
"advancements.antarchy.very_hungry_caterpillar.description": "Aidez une chenille à grandir.",
"effect.antarchy.dread": "Effroi",
"effect.antarchy.dread.description": "Provoque des hallucinations visuelles et sonores.",
"effect.antarchy.paralyzed": "Paralysé",
"effect.antarchy.paralyzed.description": "Empêche les cibles de se déplacer.",
"effect.antarchy.inverted": "Inversé",
"effect.antarchy.inverted.description": "Inverse la gravité de la cible.",
"effect.antarchy.stinky": "Puant",
"effect.antarchy.stinky.description": "Repousse les créatures passives et neutres, et attire les arthropodes.",
"effect.antarchy.gooped.description": "Ralentit la vitesse de déplacement et d'attaque.",
"effect.antarchy.shrinking": "Rétrécissement",
"effect.antarchy.growth": "Croissance",
"effect.antarchy.bloodglass_ward": "Égide de verre-sang",
"effect.antarchy.bloodglass_ward.description": "Accorde des cœurs qui se brisent et absorbent un coup entier de dégâts. Ils se régénèrent avec le temps.",
"death.attack.triffid_mauling": "%1$s a été déchiqueté par une plante",
"death.attack.triffid_mauling.player": "%1$s a été déchiqueté par une plante",
"death.attack.triffid_swallow": "%1$s a été avalé par un Triffid",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "Scarabée Hercule rugir",
"subtitles.antarchy.hercules_beetle_charge_start": "Scarabée Hercule charge une attaque",
"subtitles.antarchy.hercules_beetle_knocked_down": "Scarabée Hercule est renversé",
"subtitles.antarchy.jerry_idle": "Jerry bavarde",
"subtitles.antarchy.jerry_hurt": "Jerry souffre",
"subtitles.antarchy.jerry_death": "Jerry meurt",
"subtitles.antarchy.jerry_attack": "Jerry attaque",
"subtitles.antarchy.jumpy_bug_idle": "Insecte sauteur se fait entendre",
"subtitles.antarchy.spit_bug_idle": "Insecte cracheur se fait entendre",
"subtitles.antarchy.jumpy_bug_hurt": "Insecte sauteur est blessé",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Ti scaglia in avanti quando colpisci.",
"tooltip.antarchy.blood_crystal_katana.trail": "Lascia una scia cremisi dietro di te.",
"item.antarchy.mantis_claw": "Artiglio di Mantide",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "Scaglia di Re",
"item.antarchy.queen_scale": "Scaglia di Regina",
"item.antarchy.jumpy_bug_leg": "Zampa di Insetto saltatore",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "Il bruco molto affamato",
"advancements.antarchy.very_hungry_caterpillar.description": "Aiuta un bruco a crescere.",
"effect.antarchy.dread": "Terrore",
"effect.antarchy.dread.description": "Provoca allucinazioni visive e sonore.",
"effect.antarchy.paralyzed": "Paralizzato",
"effect.antarchy.paralyzed.description": "Impedisce ai bersagli di muoversi.",
"effect.antarchy.inverted": "Invertito",
"effect.antarchy.inverted.description": "Inverte la gravità del bersaglio.",
"effect.antarchy.stinky": "Puzzolente",
"effect.antarchy.stinky.description": "Respinge le creature passive e neutrali e attira gli artropodi.",
"effect.antarchy.gooped.description": "Riduce la velocità di movimento e di attacco.",
"effect.antarchy.shrinking": "Restringimento",
"effect.antarchy.growth": "Crescita",
"effect.antarchy.bloodglass_ward": "Protezione di vetrosangue",
"effect.antarchy.bloodglass_ward.description": "Conferisce cuori che si frantumano assorbendo un colpo intero di danno. Si rigenerano col tempo.",
"death.attack.triffid_mauling": "%1$s è stato sbranato a morte da una pianta",
"death.attack.triffid_mauling.player": "%1$s è stato sbranato a morte da una pianta",
"death.attack.triffid_swallow": "%1$s è stato inghiottito da un Triffid",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "Lo scarabeo Ercole ruggisce",
"subtitles.antarchy.hercules_beetle_charge_start": "Lo scarabeo Ercole si carica",
"subtitles.antarchy.hercules_beetle_knocked_down": "Lo scarabeo Ercole viene abbattuto",
"subtitles.antarchy.jerry_idle": "Jerry chiacchiera",
"subtitles.antarchy.jerry_hurt": "Jerry soffre",
"subtitles.antarchy.jerry_death": "Jerry muore",
"subtitles.antarchy.jerry_attack": "Jerry attacca",
"subtitles.antarchy.jumpy_bug_idle": "L’insetto saltatore emette un verso",
"subtitles.antarchy.spit_bug_idle": "L’insetto sputatore emette un verso",
"subtitles.antarchy.jumpy_bug_hurt": "L’insetto saltatore si ferisce",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "攻撃命中時に前方へ突進します。",
"tooltip.antarchy.blood_crystal_katana.trail": "背後に深紅の軌跡を残します。",
"item.antarchy.mantis_claw": "カマキリの爪",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "王の鱗",
"item.antarchy.queen_scale": "女王の鱗",
"item.antarchy.jumpy_bug_leg": "ジャンピーバグの脚",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "はらぺこあおむし",
"advancements.antarchy.very_hungry_caterpillar.description": "イモムシの成長を手伝う。",
"effect.antarchy.dread": "恐怖",
"effect.antarchy.dread.description": "視覚と聴覚の幻覚を引き起こします。",
"effect.antarchy.paralyzed": "麻痺",
"effect.antarchy.paralyzed.description": "対象が動けなくなります。",
"effect.antarchy.inverted": "重力反転",
"effect.antarchy.inverted.description": "対象の重力を反転させます。",
"effect.antarchy.stinky": "悪臭",
"effect.antarchy.stinky.description": "友好的および中立のMobを遠ざけ、節足動物を引き寄せます。",
"effect.antarchy.gooped.description": "移動速度と攻撃速度を低下させます。",
"effect.antarchy.shrinking": "縮小",
"effect.antarchy.growth": "成長",
"effect.antarchy.bloodglass_ward": "血晶の守護",
"effect.antarchy.bloodglass_ward.description": "砕けるハートを与え、1回分のダメージを丸ごと吸収します。時間経過で再生します。",
"death.attack.triffid_mauling": "%1$sは植物に噛み殺された",
"death.attack.triffid_mauling.player": "%1$sは植物に噛み殺された",
"death.attack.triffid_swallow": "%1$sはトリフィドに飲み込まれた",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "ヘラクレスオオカブトが咆哮する",
"subtitles.antarchy.hercules_beetle_charge_start": "ヘラクレスオオカブトが攻撃を溜める",
"subtitles.antarchy.hercules_beetle_knocked_down": "ヘラクレスオオカブトが転倒する",
"subtitles.antarchy.jerry_idle": "ジェリーが鳴く",
"subtitles.antarchy.jerry_hurt": "ジェリーが傷つく",
"subtitles.antarchy.jerry_death": "ジェリーが死ぬ",
"subtitles.antarchy.jerry_attack": "ジェリーが攻撃する",
"subtitles.antarchy.jumpy_bug_idle": "ジャンピーバグが鳴く",
"subtitles.antarchy.spit_bug_idle": "スピットバグが鳴く",
"subtitles.antarchy.jumpy_bug_hurt": "ジャンピーバグが傷つく",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "명중 시 앞으로 돌진합니다.",
"tooltip.antarchy.blood_crystal_katana.trail": "뒤에 진홍빛 흔적을 남깁니다.",
"item.antarchy.mantis_claw": "사마귀 발톱",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "왕 비늘",
"item.antarchy.queen_scale": "여왕 비늘",
"item.antarchy.jumpy_bug_leg": "점피 벌레 다리",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "배고픈 애벌레",
"advancements.antarchy.very_hungry_caterpillar.description": "애벌레가 자라도록 도와주세요.",
"effect.antarchy.dread": "공포",
"effect.antarchy.dread.description": "시각 및 청각 환각을 일으킵니다.",
"effect.antarchy.paralyzed": "마비",
"effect.antarchy.paralyzed.description": "대상이 움직이지 못하게 합니다.",
"effect.antarchy.inverted": "반전",
"effect.antarchy.inverted.description": "대상의 중력을 반전시킵니다.",
"effect.antarchy.stinky": "악취",
"effect.antarchy.stinky.description": "수동적 및 중립적 몹을 쫓아내고 절지동물을 끌어들입니다.",
"effect.antarchy.gooped.description": "이동 속도와 공격 속도를 늦춥니다.",
"effect.antarchy.shrinking": "축소",
"effect.antarchy.growth": "성장",
"effect.antarchy.bloodglass_ward": "혈유리 수호",
"effect.antarchy.bloodglass_ward.description": "산산이 부서지는 하트를 부여해 피해 한 번을 통째로 흡수합니다. 시간이 지나면 다시 재생됩니다.",
"death.attack.triffid_mauling": "%1$s이(가) 식물에게 물어뜯겨 죽었습니다",
"death.attack.triffid_mauling.player": "%1$s이(가) 식물에게 물어뜯겨 죽었습니다",
"death.attack.triffid_swallow": "%1$s이(가) 트리피드에게 삼켜졌습니다",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "헤라클레스장수풍뎅이 포효합니다",
"subtitles.antarchy.hercules_beetle_charge_start": "헤라클레스장수풍뎅이 힘을 모읍니다",
"subtitles.antarchy.hercules_beetle_knocked_down": "헤라클레스장수풍뎅이 쓰러집니다",
"subtitles.antarchy.jerry_idle": "제리가 재잘거립니다",
"subtitles.antarchy.jerry_hurt": "제리가 다칩니다",
"subtitles.antarchy.jerry_death": "제리가 죽습니다",
"subtitles.antarchy.jerry_attack": "제리가 공격합니다",
"subtitles.antarchy.jumpy_bug_idle": "점피 벌레 소리를 냅니다",
"subtitles.antarchy.spit_bug_idle": "스핏 벌레 소리를 냅니다",
"subtitles.antarchy.jumpy_bug_hurt": "점피 벌레 다칩니다",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Impulsiona você para a frente ao acertar.",
"tooltip.antarchy.blood_crystal_katana.trail": "Deixa um rastro carmesim atrás de você.",
"item.antarchy.mantis_claw": "Garra de Louva-a-deus",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "Escama de Rei",
"item.antarchy.queen_scale": "Escama de Rainha",
"item.antarchy.jumpy_bug_leg": "Perna de Inseto Saltador",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "A Lagarta Muito Faminta",
"advancements.antarchy.very_hungry_caterpillar.description": "Ajude uma lagarta a crescer.",
"effect.antarchy.dread": "Pavor",
"effect.antarchy.dread.description": "Provoca alucinações visuais e auditivas.",
"effect.antarchy.paralyzed": "Paralisado",
"effect.antarchy.paralyzed.description": "Impede que os alvos se movam.",
"effect.antarchy.inverted": "Invertido",
"effect.antarchy.inverted.description": "Inverte a gravidade do alvo.",
"effect.antarchy.stinky": "Fedido",
"effect.antarchy.stinky.description": "Afasta mobs passivos e neutros e atrai artrópodes.",
"effect.antarchy.gooped.description": "Reduz a velocidade de movimento e de ataque.",
"effect.antarchy.shrinking": "Encolhimento",
"effect.antarchy.growth": "Crescimento",
"effect.antarchy.bloodglass_ward": "Guarda de Vidro de Sangue",
"effect.antarchy.bloodglass_ward.description": "Concede corações que se estilhaçam, absorvendo um golpe inteiro de dano. Eles se regeneram com o tempo.",
"death.attack.triffid_mauling": "%1$s foi dilacerado até a morte por uma planta",
"death.attack.triffid_mauling.player": "%1$s foi dilacerado até a morte por uma planta",
"death.attack.triffid_swallow": "%1$s foi engolido por um Triffid",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "Besouro-hércules ruge",
"subtitles.antarchy.hercules_beetle_charge_start": "Besouro-hércules carrega um ataque",
"subtitles.antarchy.hercules_beetle_knocked_down": "Besouro-hércules é derrubado",
"subtitles.antarchy.jerry_idle": "Jerry tagarela",
"subtitles.antarchy.jerry_hurt": "Jerry se machuca",
"subtitles.antarchy.jerry_death": "Jerry morre",
"subtitles.antarchy.jerry_attack": "Jerry ataca",
"subtitles.antarchy.jumpy_bug_idle": "Inseto Saltador faz barulho",
"subtitles.antarchy.spit_bug_idle": "Inseto Cuspidor faz barulho",
"subtitles.antarchy.jumpy_bug_hurt": "Inseto Saltador se machuca",
@@ -326,6 +326,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Толкает вас вперёд при ударе.",
"tooltip.antarchy.blood_crystal_katana.trail": "Оставляет за вами багровый след.",
"item.antarchy.mantis_claw": "Клешня богомола",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "Чешуйка короля",
"item.antarchy.queen_scale": "Чешуйка королевы",
"item.antarchy.jumpy_bug_leg": "Ножка прыгучего жука",
@@ -498,12 +499,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "Очень голодная гусеница",
"advancements.antarchy.very_hungry_caterpillar.description": "Помогите гусенице вырасти.",
"effect.antarchy.dread": "Ужас",
"effect.antarchy.dread.description": "Вызывает зрительные и звуковые галлюцинации.",
"effect.antarchy.paralyzed": "Паралич",
"effect.antarchy.paralyzed.description": "Не дает целям двигаться.",
"effect.antarchy.inverted": "Инверсия",
"effect.antarchy.inverted.description": "Инвертирует гравитацию цели.",
"effect.antarchy.stinky": "Вонючесть",
"effect.antarchy.stinky.description": "Отпугивает мирных и нейтральных мобов, но притягивает членистоногих.",
"effect.antarchy.gooped.description": "Замедляет движение и скорость атаки.",
"effect.antarchy.shrinking": "Уменьшение",
"effect.antarchy.growth": "Увеличение",
"effect.antarchy.bloodglass_ward": "Защита кровавого стекла",
"effect.antarchy.bloodglass_ward.description": "Дает сердца, которые разбиваются и полностью поглощают один удар. Со временем они восстанавливаются.",
"death.attack.triffid_mauling": "%1$s был растерзан растением",
"death.attack.triffid_mauling.player": "%1$s был растерзан растением",
"death.attack.triffid_swallow": "%1$s был проглочен триффидом",
@@ -734,6 +741,10 @@
"subtitles.antarchy.toreterror_jump_up": "Тортеррор прыгает",
"subtitles.antarchy.toreterror_jump_land": "Тортеррор приземляется",
"subtitles.antarchy.stinky_fly": "Вонючие мухи жужжат",
"subtitles.antarchy.jerry_idle": "Джерри стрекочет",
"subtitles.antarchy.jerry_hurt": "Джерри ранен",
"subtitles.antarchy.jerry_death": "Джерри умирает",
"subtitles.antarchy.jerry_attack": "Джерри атакует",
"item.minecraft.potion.effect.inversion": "Зелье инверсии",
"item.minecraft.potion.effect.long_inversion": "Зелье инверсии",
"item.minecraft.splash_potion.effect.inversion": "Взрывное зелье инверсии",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "命中时将你向前推进。",
"tooltip.antarchy.blood_crystal_katana.trail": "在身后留下猩红轨迹。",
"item.antarchy.mantis_claw": "螳螂利爪",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "国王鳞片",
"item.antarchy.queen_scale": "女王鳞片",
"item.antarchy.jumpy_bug_leg": "跳跳虫腿",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "好饿的毛毛虫",
"advancements.antarchy.very_hungry_caterpillar.description": "帮助一只毛毛虫成长。",
"effect.antarchy.dread": "恐惧",
"effect.antarchy.dread.description": "会产生视觉和听觉幻觉。",
"effect.antarchy.paralyzed": "麻痹",
"effect.antarchy.paralyzed.description": "阻止目标移动。",
"effect.antarchy.inverted": "反转",
"effect.antarchy.inverted.description": "反转目标的重力。",
"effect.antarchy.stinky": "臭气",
"effect.antarchy.stinky.description": "驱赶被动和中立生物,吸引节肢生物。",
"effect.antarchy.gooped.description": "减缓移动速度和攻击速度。",
"effect.antarchy.shrinking": "缩小",
"effect.antarchy.growth": "生长",
"effect.antarchy.bloodglass_ward": "血晶守护",
"effect.antarchy.bloodglass_ward.description": "给予会破碎的心,能吸收整整一次伤害。它们会随时间恢复。",
"death.attack.triffid_mauling": "%1$s被一株植物撕咬致死",
"death.attack.triffid_mauling.player": "%1$s被一株植物撕咬致死",
"death.attack.triffid_swallow": "%1$s被特里菲德吞下了",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "赫拉克勒斯甲虫咆哮",
"subtitles.antarchy.hercules_beetle_charge_start": "赫拉克勒斯甲虫开始蓄力",
"subtitles.antarchy.hercules_beetle_knocked_down": "赫拉克勒斯甲虫被击倒",
"subtitles.antarchy.jerry_idle": "杰瑞喋喋不休",
"subtitles.antarchy.jerry_hurt": "杰瑞受伤",
"subtitles.antarchy.jerry_death": "杰瑞死亡",
"subtitles.antarchy.jerry_attack": "杰瑞攻击",
"subtitles.antarchy.jumpy_bug_idle": "跳跳虫发出动静",
"subtitles.antarchy.spit_bug_idle": "喷吐虫发出动静",
"subtitles.antarchy.jumpy_bug_hurt": "跳跳虫受伤",
@@ -349,6 +349,7 @@
"tooltip.antarchy.blood_crystal_katana.launch": "命中時將你向前推進。",
"tooltip.antarchy.blood_crystal_katana.trail": "在身後留下猩紅軌跡。",
"item.antarchy.mantis_claw": "螳螂利爪",
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
"item.antarchy.king_scale": "國王鱗片",
"item.antarchy.queen_scale": "女王鱗片",
"item.antarchy.jumpy_bug_leg": "跳跳蟲腿",
@@ -527,12 +528,18 @@
"advancements.antarchy.very_hungry_caterpillar.title": "好餓的毛毛蟲",
"advancements.antarchy.very_hungry_caterpillar.description": "幫助一隻毛毛蟲成長。",
"effect.antarchy.dread": "恐懼",
"effect.antarchy.dread.description": "會產生視覺與聽覺幻覺。",
"effect.antarchy.paralyzed": "麻痺",
"effect.antarchy.paralyzed.description": "阻止目標移動。",
"effect.antarchy.inverted": "反轉",
"effect.antarchy.inverted.description": "反轉目標的重力。",
"effect.antarchy.stinky": "臭氣",
"effect.antarchy.stinky.description": "驅趕被動與中立生物,吸引節肢生物。",
"effect.antarchy.gooped.description": "降低移動速度與攻擊速度。",
"effect.antarchy.shrinking": "縮小",
"effect.antarchy.growth": "生長",
"effect.antarchy.bloodglass_ward": "血晶守護",
"effect.antarchy.bloodglass_ward.description": "給予會破碎的心,能吸收完整一次傷害。它們會隨時間恢復。",
"death.attack.triffid_mauling": "%1$s被一株植物撕咬致死",
"death.attack.triffid_mauling.player": "%1$s被一株植物撕咬致死",
"death.attack.triffid_swallow": "%1$s被特里菲德吞下了",
@@ -934,6 +941,10 @@
"subtitles.antarchy.hercules_beetle_cry": "赫拉克勒斯甲蟲咆哮",
"subtitles.antarchy.hercules_beetle_charge_start": "赫拉克勒斯甲蟲開始蓄力",
"subtitles.antarchy.hercules_beetle_knocked_down": "赫拉克勒斯甲蟲被擊倒",
"subtitles.antarchy.jerry_idle": "傑瑞喋喋不休",
"subtitles.antarchy.jerry_hurt": "傑瑞受傷",
"subtitles.antarchy.jerry_death": "傑瑞死亡",
"subtitles.antarchy.jerry_attack": "傑瑞攻擊",
"subtitles.antarchy.jumpy_bug_idle": "跳跳蟲發出動靜",
"subtitles.antarchy.spit_bug_idle": "噴吐蟲發出動靜",
"subtitles.antarchy.jumpy_bug_hurt": "跳跳蟲受傷",
@@ -539,16 +539,20 @@
"subtitle": "subtitles.antarchy.water_cannon_fire",
"sounds": [
{
"name": "antarchy:mob/toreterror/water_cannon1"
"name": "antarchy:mob/toreterror/water_cannon1",
"attenuation_distance": 28
},
{
"name": "antarchy:mob/toreterror/water_cannon2"
"name": "antarchy:mob/toreterror/water_cannon2",
"attenuation_distance": 28
},
{
"name": "antarchy:mob/toreterror/water_cannon3"
"name": "antarchy:mob/toreterror/water_cannon3",
"attenuation_distance": 28
},
{
"name": "antarchy:mob/toreterror/water_cannon4"
"name": "antarchy:mob/toreterror/water_cannon4",
"attenuation_distance": 28
}
]
},
@@ -2131,5 +2135,96 @@
"name": "antarchy:mob/brutalfly/spit4"
}
]
},
"jerry_young_idle": {
"subtitle": "subtitles.antarchy.jerry_idle",
"sounds": [
{
"name": "antarchy:mob/jerry/young_idle1"
},
{
"name": "antarchy:mob/jerry/young_idle2"
},
{
"name": "antarchy:mob/jerry/young_idle3"
}
]
},
"jerry_young_hurt": {
"subtitle": "subtitles.antarchy.jerry_hurt",
"sounds": [
{
"name": "antarchy:mob/jerry/young_hurt1"
}
]
},
"jerry_young_death": {
"subtitle": "subtitles.antarchy.jerry_death",
"sounds": [
{
"name": "antarchy:mob/jerry/young_death1"
}
]
},
"jerry_young_attack": {
"subtitle": "subtitles.antarchy.jerry_attack",
"sounds": [
{
"name": "antarchy:mob/jerry/young_attack1"
},
{
"name": "antarchy:mob/jerry/young_attack2"
}
]
},
"jerry_adult_idle": {
"subtitle": "subtitles.antarchy.jerry_idle",
"sounds": [
{
"name": "antarchy:mob/jerry/adult_idle1"
},
{
"name": "antarchy:mob/jerry/adult_idle2"
},
{
"name": "antarchy:mob/jerry/adult_idle3"
},
{
"name": "antarchy:mob/jerry/adult_idle4"
}
]
},
"jerry_adult_hurt": {
"subtitle": "subtitles.antarchy.jerry_hurt",
"sounds": [
{
"name": "antarchy:mob/jerry/adult_hurt1"
}
]
},
"jerry_adult_death": {
"subtitle": "subtitles.antarchy.jerry_death",
"sounds": [
{
"name": "antarchy:mob/jerry/adult_death1"
},
{
"name": "antarchy:mob/jerry/adult_death2"
}
]
},
"jerry_adult_attack": {
"subtitle": "subtitles.antarchy.jerry_attack",
"sounds": [
{
"name": "antarchy:mob/jerry/adult_attack1"
},
{
"name": "antarchy:mob/jerry/adult_attack2"
},
{
"name": "antarchy:mob/jerry/adult_attack3"
}
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 9
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 9
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Loaded 100 of 161 files, more files were not shown because too many files have changed in this diff. Show more