first draft royal

This commit is contained in:
craisinlord committed 2026-08-29 12:19:02 -05:00
1 parent ce66f56c87
commit 357f41d9d6
179 files changed
+29573 -611

No files matched your search

@@ -197,8 +197,40 @@ public final class AntarchySettings {
private static double nightmareBootsDoubleDamageChance = 0.05D;
private static double nightmareSwordBaseDamage = 18.0D;
private static double nightmareSwordScalingFactor = 1.5D;
private static boolean royalArmorComesEnchanted = true;
private static int royalArmorProtectionLevel = 10;
private static int royalArmorEnchantability = 30;
private static int royalArmorDurabilityMultiplier = 93;
private static int royalGuardianHelmetArmorValue = 5;
private static int royalGuardianChestplateArmorValue = 10;
private static int royalGuardianLeggingsArmorValue = 8;
private static int royalGuardianBootsArmorValue = 5;
private static double royalGuardianArmorToughness = 4.0D;
private static double royalGuardianArmorKnockbackResistance = 0.15D;
private static int royalAssailantHelmetArmorValue = 5;
private static int royalAssailantChestplateArmorValue = 10;
private static int royalAssailantLeggingsArmorValue = 8;
private static int royalAssailantBootsArmorValue = 5;
private static double royalAssailantArmorToughness = 3.0D;
private static double royalAssailantArmorKnockbackResistance = 0.15D;
private static double royalAssailantHelmetDoubleDamageChance = 0.06D;
private static double royalAssailantChestplateDoubleDamageChance = 0.08D;
private static double royalAssailantLeggingsDoubleDamageChance = 0.07D;
private static double royalAssailantBootsDoubleDamageChance = 0.05D;
private static double royalGuardianSwordAttackDamage = 111.0D;
private static double royalGuardianSwordAttackSpeed = -2.5D;
private static double royalAssailantBattleAxeAttackDamage = 151.0D;
private static double royalAssailantBattleAxeAttackSpeed = -2.9D;
private static double royalWeaponAttackReachBonus = 1.0D;
private static double royalWeaponAttackKnockbackBonus = 1.0D;
private static int royalWeaponDurability = 4608;
private static int royalWeaponEnchantability = 30;
private static int royalGuardianShieldDurability = 1008;
private static double royalBoltDamage = 6.0D;
private static int royalEggHatchChance = 3;
private static boolean basiliskPetrifyingGazeEnabled = true;
private static int basiliskSpawnMaxLightLevel = 5;
private static double basiliskHealth = 320.0D;
@@ -345,6 +377,20 @@ public final class AntarchySettings {
private static int windVortexDurationTicks = 140;
private static double windVortexPullStrength = 0.32D;
private static double windVortexLaunchStrength = 1.0D;
private static boolean eyeOfTheStormEnabled = true;
private static int eyeOfTheStormUpdraftCooldownTicks = 40;
private static double eyeOfTheStormUpdraftLaunchStrength = 1.15D;
private static double eyeOfTheStormUpdraftHeight = 4.0D;
private static double eyeOfTheStormUpdraftRadius = 1.3D;
private static int eyeOfTheStormUpdraftDurationTicks = 32;
private static int eyeOfTheStormSurgeCooldownTicks = 70;
private static double eyeOfTheStormSurgeRange = 16.0D;
private static int eyeOfTheStormSurgeDurationTicks = 300;
private static double eyeOfTheStormSurgeRadius = 3.5D;
private static double eyeOfTheStormSurgeHeight = 5.0D;
private static double eyeOfTheStormSurgePullStrength = 0.45D;
private static double eyeOfTheStormSurgeReturnStrength = 1.4D;
private static float eyeOfTheStormSurgeDamage = 5.0F;
private static double vortexLensMinRadius = 1.5D;
private static double vortexLensMaxRadius = 10.0D;
private static double vortexLensMinHeight = 3.0D;
@@ -1775,6 +1821,99 @@ public final class AntarchySettings {
public static double nightmareBootsDoubleDamageChance() { return nightmareBootsDoubleDamageChance; }
public static void setNightmareBootsDoubleDamageChance(double v) { nightmareBootsDoubleDamageChance = v; }
public static boolean royalArmorComesEnchanted() { return royalArmorComesEnchanted; }
public static void setRoyalArmorComesEnchanted(boolean v) { royalArmorComesEnchanted = v; }
public static int royalArmorProtectionLevel() { return royalArmorProtectionLevel; }
public static void setRoyalArmorProtectionLevel(int v) { royalArmorProtectionLevel = v; }
public static int royalArmorEnchantability() { return royalArmorEnchantability; }
public static void setRoyalArmorEnchantability(int v) { royalArmorEnchantability = v; }
public static int royalArmorDurabilityMultiplier() { return royalArmorDurabilityMultiplier; }
public static void setRoyalArmorDurabilityMultiplier(int v) { royalArmorDurabilityMultiplier = v; }
public static int royalGuardianHelmetArmorValue() { return royalGuardianHelmetArmorValue; }
public static void setRoyalGuardianHelmetArmorValue(int v) { royalGuardianHelmetArmorValue = v; }
public static int royalGuardianChestplateArmorValue() { return royalGuardianChestplateArmorValue; }
public static void setRoyalGuardianChestplateArmorValue(int v) { royalGuardianChestplateArmorValue = v; }
public static int royalGuardianLeggingsArmorValue() { return royalGuardianLeggingsArmorValue; }
public static void setRoyalGuardianLeggingsArmorValue(int v) { royalGuardianLeggingsArmorValue = v; }
public static int royalGuardianBootsArmorValue() { return royalGuardianBootsArmorValue; }
public static void setRoyalGuardianBootsArmorValue(int v) { royalGuardianBootsArmorValue = v; }
public static double royalGuardianArmorToughness() { return royalGuardianArmorToughness; }
public static void setRoyalGuardianArmorToughness(double v) { royalGuardianArmorToughness = v; }
public static double royalGuardianArmorKnockbackResistance() { return royalGuardianArmorKnockbackResistance; }
public static void setRoyalGuardianArmorKnockbackResistance(double v) { royalGuardianArmorKnockbackResistance = v; }
public static int royalAssailantHelmetArmorValue() { return royalAssailantHelmetArmorValue; }
public static void setRoyalAssailantHelmetArmorValue(int v) { royalAssailantHelmetArmorValue = v; }
public static int royalAssailantChestplateArmorValue() { return royalAssailantChestplateArmorValue; }
public static void setRoyalAssailantChestplateArmorValue(int v) { royalAssailantChestplateArmorValue = v; }
public static int royalAssailantLeggingsArmorValue() { return royalAssailantLeggingsArmorValue; }
public static void setRoyalAssailantLeggingsArmorValue(int v) { royalAssailantLeggingsArmorValue = v; }
public static int royalAssailantBootsArmorValue() { return royalAssailantBootsArmorValue; }
public static void setRoyalAssailantBootsArmorValue(int v) { royalAssailantBootsArmorValue = v; }
public static double royalAssailantArmorToughness() { return royalAssailantArmorToughness; }
public static void setRoyalAssailantArmorToughness(double v) { royalAssailantArmorToughness = v; }
public static double royalAssailantArmorKnockbackResistance() { return royalAssailantArmorKnockbackResistance; }
public static void setRoyalAssailantArmorKnockbackResistance(double v) { royalAssailantArmorKnockbackResistance = v; }
public static double royalAssailantHelmetDoubleDamageChance() { return royalAssailantHelmetDoubleDamageChance; }
public static void setRoyalAssailantHelmetDoubleDamageChance(double v) { royalAssailantHelmetDoubleDamageChance = v; }
public static double royalAssailantChestplateDoubleDamageChance() { return royalAssailantChestplateDoubleDamageChance; }
public static void setRoyalAssailantChestplateDoubleDamageChance(double v) { royalAssailantChestplateDoubleDamageChance = v; }
public static double royalAssailantLeggingsDoubleDamageChance() { return royalAssailantLeggingsDoubleDamageChance; }
public static void setRoyalAssailantLeggingsDoubleDamageChance(double v) { royalAssailantLeggingsDoubleDamageChance = v; }
public static double royalAssailantBootsDoubleDamageChance() { return royalAssailantBootsDoubleDamageChance; }
public static void setRoyalAssailantBootsDoubleDamageChance(double v) { royalAssailantBootsDoubleDamageChance = v; }
public static double royalGuardianSwordAttackDamage() { return royalGuardianSwordAttackDamage; }
public static void setRoyalGuardianSwordAttackDamage(double v) { royalGuardianSwordAttackDamage = v; }
public static double royalGuardianSwordAttackSpeed() { return royalGuardianSwordAttackSpeed; }
public static void setRoyalGuardianSwordAttackSpeed(double v) { royalGuardianSwordAttackSpeed = v; }
public static double royalAssailantBattleAxeAttackDamage() { return royalAssailantBattleAxeAttackDamage; }
public static void setRoyalAssailantBattleAxeAttackDamage(double v) { royalAssailantBattleAxeAttackDamage = v; }
public static double royalAssailantBattleAxeAttackSpeed() { return royalAssailantBattleAxeAttackSpeed; }
public static void setRoyalAssailantBattleAxeAttackSpeed(double v) { royalAssailantBattleAxeAttackSpeed = v; }
public static double royalWeaponAttackReachBonus() { return royalWeaponAttackReachBonus; }
public static void setRoyalWeaponAttackReachBonus(double v) { royalWeaponAttackReachBonus = v; }
public static double royalWeaponAttackKnockbackBonus() { return royalWeaponAttackKnockbackBonus; }
public static void setRoyalWeaponAttackKnockbackBonus(double v) { royalWeaponAttackKnockbackBonus = v; }
public static int royalWeaponDurability() { return royalWeaponDurability; }
public static void setRoyalWeaponDurability(int v) { royalWeaponDurability = v; }
public static int royalWeaponEnchantability() { return royalWeaponEnchantability; }
public static void setRoyalWeaponEnchantability(int v) { royalWeaponEnchantability = v; }
public static int royalGuardianShieldDurability() { return royalGuardianShieldDurability; }
public static void setRoyalGuardianShieldDurability(int v) { royalGuardianShieldDurability = v; }
public static double royalBoltDamage() { return royalBoltDamage; }
public static void setRoyalBoltDamage(double v) { royalBoltDamage = v; }
public static int royalEggHatchChance() { return royalEggHatchChance; }
public static void setRoyalEggHatchChance(int v) { royalEggHatchChance = v; }
public static double nightmareSwordBaseDamage() { return nightmareSwordBaseDamage; }
public static void setNightmareSwordBaseDamage(double v) { nightmareSwordBaseDamage = v; }
@@ -2282,6 +2421,48 @@ public final class AntarchySettings {
public static double windVortexLaunchStrength() { return windVortexLaunchStrength; }
public static void setWindVortexLaunchStrength(double value) { windVortexLaunchStrength = value; }
public static boolean eyeOfTheStormEnabled() { return eyeOfTheStormEnabled; }
public static void setEyeOfTheStormEnabled(boolean value) { eyeOfTheStormEnabled = value; }
public static int eyeOfTheStormUpdraftCooldownTicks() { return eyeOfTheStormUpdraftCooldownTicks; }
public static void setEyeOfTheStormUpdraftCooldownTicks(int value) { eyeOfTheStormUpdraftCooldownTicks = value; }
public static double eyeOfTheStormUpdraftLaunchStrength() { return eyeOfTheStormUpdraftLaunchStrength; }
public static void setEyeOfTheStormUpdraftLaunchStrength(double value) { eyeOfTheStormUpdraftLaunchStrength = value; }
public static double eyeOfTheStormUpdraftHeight() { return eyeOfTheStormUpdraftHeight; }
public static void setEyeOfTheStormUpdraftHeight(double value) { eyeOfTheStormUpdraftHeight = value; }
public static double eyeOfTheStormUpdraftRadius() { return eyeOfTheStormUpdraftRadius; }
public static void setEyeOfTheStormUpdraftRadius(double value) { eyeOfTheStormUpdraftRadius = value; }
public static int eyeOfTheStormUpdraftDurationTicks() { return eyeOfTheStormUpdraftDurationTicks; }
public static void setEyeOfTheStormUpdraftDurationTicks(int value) { eyeOfTheStormUpdraftDurationTicks = value; }
public static int eyeOfTheStormSurgeCooldownTicks() { return eyeOfTheStormSurgeCooldownTicks; }
public static void setEyeOfTheStormSurgeCooldownTicks(int value) { eyeOfTheStormSurgeCooldownTicks = value; }
public static double eyeOfTheStormSurgeRange() { return eyeOfTheStormSurgeRange; }
public static void setEyeOfTheStormSurgeRange(double value) { eyeOfTheStormSurgeRange = value; }
public static int eyeOfTheStormSurgeDurationTicks() { return eyeOfTheStormSurgeDurationTicks; }
public static void setEyeOfTheStormSurgeDurationTicks(int value) { eyeOfTheStormSurgeDurationTicks = value; }
public static double eyeOfTheStormSurgeRadius() { return eyeOfTheStormSurgeRadius; }
public static void setEyeOfTheStormSurgeRadius(double value) { eyeOfTheStormSurgeRadius = value; }
public static double eyeOfTheStormSurgeHeight() { return eyeOfTheStormSurgeHeight; }
public static void setEyeOfTheStormSurgeHeight(double value) { eyeOfTheStormSurgeHeight = value; }
public static double eyeOfTheStormSurgePullStrength() { return eyeOfTheStormSurgePullStrength; }
public static void setEyeOfTheStormSurgePullStrength(double value) { eyeOfTheStormSurgePullStrength = value; }
public static double eyeOfTheStormSurgeReturnStrength() { return eyeOfTheStormSurgeReturnStrength; }
public static void setEyeOfTheStormSurgeReturnStrength(double value) { eyeOfTheStormSurgeReturnStrength = value; }
public static float eyeOfTheStormSurgeDamage() { return eyeOfTheStormSurgeDamage; }
public static void setEyeOfTheStormSurgeDamage(float value) { eyeOfTheStormSurgeDamage = value; }
public static double vortexLensMinRadius() { return vortexLensMinRadius; }
public static void setVortexLensMinRadius(double value) { vortexLensMinRadius = value; }
@@ -6,7 +6,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
public final class ConfigResetGuard {
public static final int RESET_GENERATION = 8;
public static final int RESET_GENERATION = 9;
private static final String MARKER_FILE_NAME = ".config_generation";
private ConfigResetGuard() {
@@ -139,6 +139,18 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked")
public static Supplier<EntityType<HerculesBeetleEntity>> HERCULES_BEETLE = (Supplier<EntityType<HerculesBeetleEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrinceEntity>> PRINCE = (Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrinceEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrincessEntity>> PRINCESS = (Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrincessEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity>> ROYAL_BOLT = (Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> PRINCE_EGG = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> PRINCESS_EGG = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.RoyalEggBlockEntity>> ROYAL_EGG_BLOCK_ENTITY = (Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.RoyalEggBlockEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<EntityType<com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity>> OURANWOOD_DEER = (Supplier<EntityType<com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<EntityType<com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity>> GLIMMER = (Supplier<EntityType<com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity>>) UNBOUND;
@@ -665,6 +677,30 @@ public final class AntarchyObjects {
HERCULES_BEETLE = supplier;
}
public static void setPrince(Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrinceEntity>> supplier) {
PRINCE = supplier;
}
public static void setPrincess(Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.PrincessEntity>> supplier) {
PRINCESS = supplier;
}
public static void setRoyalBolt(Supplier<EntityType<com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity>> supplier) {
ROYAL_BOLT = supplier;
}
public static void setPrinceEgg(Supplier<Block> supplier) {
PRINCE_EGG = supplier;
}
public static void setPrincessEgg(Supplier<Block> supplier) {
PRINCESS_EGG = supplier;
}
public static void setRoyalEggBlockEntity(Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.RoyalEggBlockEntity>> supplier) {
ROYAL_EGG_BLOCK_ENTITY = supplier;
}
public static void setOuranwoodDeer(Supplier<EntityType<com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity>> supplier) {
OURANWOOD_DEER = supplier;
}
@@ -0,0 +1,24 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity;
import com.mojang.serialization.MapCodec;
import net.minecraft.world.entity.EntityType;
public class PrinceEggBlock extends RoyalEggBlock {
public static final MapCodec<PrinceEggBlock> CODEC = simpleCodec(PrinceEggBlock::new);
public PrinceEggBlock(Properties properties) {
super(properties);
}
@Override
public MapCodec<PrinceEggBlock> codec() {
return CODEC;
}
@Override
protected EntityType<? extends RoyalMountEntity> mountType() {
return AntarchyObjects.PRINCE.get();
}
}
@@ -0,0 +1,24 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity;
import com.mojang.serialization.MapCodec;
import net.minecraft.world.entity.EntityType;
public class PrincessEggBlock extends RoyalEggBlock {
public static final MapCodec<PrincessEggBlock> CODEC = simpleCodec(PrincessEggBlock::new);
public PrincessEggBlock(Properties properties) {
super(properties);
}
@Override
public MapCodec<PrincessEggBlock> codec() {
return CODEC;
}
@Override
protected EntityType<? extends RoyalMountEntity> mountType() {
return AntarchyObjects.PRINCESS.get();
}
}
@@ -0,0 +1,138 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.block.entity.RoyalEggBlockEntity;
import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity;
import java.util.UUID;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.RenderShape;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import org.jetbrains.annotations.Nullable;
public abstract class RoyalEggBlock extends BaseEntityBlock {
public static final IntegerProperty HATCH = BlockStateProperties.HATCH;
private static final int MAX_HATCH = 2;
protected RoyalEggBlock(Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(HATCH, 0));
}
protected abstract EntityType<? extends RoyalMountEntity> mountType();
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(HATCH);
}
@Override
protected RenderShape getRenderShape(BlockState state) {
return RenderShape.MODEL;
}
@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new RoyalEggBlockEntity(pos, state);
}
@Override
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
super.setPlacedBy(level, pos, state, placer, stack);
if (!level.isClientSide && placer instanceof Player player
&& level.getBlockEntity(pos) instanceof RoyalEggBlockEntity egg) {
egg.setPlacerUuid(player.getUUID());
}
}
@Override
public void attack(BlockState state, Level level, BlockPos pos, Player player) {
if (level instanceof ServerLevel serverLevel) {
this.teleport(state, serverLevel, pos);
}
}
private void teleport(BlockState state, ServerLevel level, BlockPos pos) {
RandomSource random = level.random;
for (int attempt = 0; attempt < 32; attempt++) {
BlockPos target = pos.offset(
random.nextInt(16) - random.nextInt(16),
random.nextInt(8) - random.nextInt(8),
random.nextInt(16) - random.nextInt(16));
if (level.getBlockState(target).isAir() && target.getY() > level.getMinBuildHeight()) {
RoyalEggBlockEntity source = level.getBlockEntity(pos) instanceof RoyalEggBlockEntity be ? be : null;
UUID placer = source == null ? null : source.getPlacerUuid();
int hatch = state.getValue(HATCH);
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 2);
level.setBlock(target, state.setValue(HATCH, Math.max(0, hatch - 1)), 2);
if (level.getBlockEntity(target) instanceof RoyalEggBlockEntity moved) {
moved.setPlacerUuid(placer);
}
level.levelEvent(2003, pos, 0);
level.playSound(null, pos, SoundEvents.ENDER_DRAGON_FLAP, SoundSource.BLOCKS, 0.6F, 1.4F);
return;
}
}
}
@Override
protected boolean isRandomlyTicking(BlockState state) {
return true;
}
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (random.nextInt(Math.max(1, AntarchySettings.royalEggHatchChance())) != 0) {
return;
}
int hatch = state.getValue(HATCH);
if (hatch < MAX_HATCH) {
level.setBlock(pos, state.setValue(HATCH, hatch + 1), 2);
level.playSound(null, pos, SoundEvents.TURTLE_EGG_CRACK, SoundSource.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
return;
}
this.hatch(level, pos);
}
private void hatch(ServerLevel level, BlockPos pos) {
UUID placer = level.getBlockEntity(pos) instanceof RoyalEggBlockEntity be ? be.getPlacerUuid() : null;
level.playSound(null, pos, SoundEvents.TURTLE_EGG_HATCH, SoundSource.BLOCKS, 0.9F, 1.0F);
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
RoyalMountEntity mount = this.mountType().create(level);
if (mount == null) {
return;
}
mount.moveTo(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, level.random.nextFloat() * 360.0F, 0.0F);
mount.setBaby(true);
mount.finalizeSpawn(level, level.getCurrentDifficultyAt(pos), MobSpawnType.BREEDING, null);
if (placer != null) {
mount.setTame(true, true);
mount.setOwnerUUID(placer);
if (level.getPlayerByUUID(placer) instanceof ServerPlayer owner) {
mount.tame(owner);
}
}
level.addFreshEntity(mount);
level.sendParticles(ParticleTypes.HAPPY_VILLAGER, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, 24, 0.4D, 0.4D, 0.4D, 0.0D);
}
}
@@ -0,0 +1,146 @@
package com.craisinlord.antarchy.content.block;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
public class RoyalLeavesBlock extends LeavesBlock {
public static final MapCodec<RoyalLeavesBlock> CODEC = Block.simpleCodec(RoyalLeavesBlock::new);
public static final IntegerProperty ROYAL_DISTANCE = IntegerProperty.create("royal_distance", 1, 17);
public static final BooleanProperty PERSISTENT = LeavesBlock.PERSISTENT;
public static final BooleanProperty WATERLOGGED = LeavesBlock.WATERLOGGED;
public static final int ROYAL_MAX_DISTANCE = 16;
public static final int ROYAL_DECAY_DISTANCE = ROYAL_MAX_DISTANCE + 1;
public RoyalLeavesBlock(BlockBehaviour.Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any()
.setValue(DISTANCE, DECAY_DISTANCE)
.setValue(ROYAL_DISTANCE, ROYAL_DECAY_DISTANCE)
.setValue(PERSISTENT, false)
.setValue(WATERLOGGED, false));
}
@Override
public MapCodec<RoyalLeavesBlock> codec() {
return CODEC;
}
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos());
BlockState state = this.defaultBlockState()
.setValue(PERSISTENT, true)
.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER);
return recalculateDistance(state, context.getLevel(), context.getClickedPos());
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(LeavesBlock.DISTANCE, ROYAL_DISTANCE, PERSISTENT, WATERLOGGED);
}
@Override
protected boolean isRandomlyTicking(BlockState state) {
return decaying(state);
}
@Override
protected boolean decaying(BlockState state) {
return !state.getValue(PERSISTENT) && state.getValue(ROYAL_DISTANCE) > ROYAL_MAX_DISTANCE;
}
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (decaying(state)) {
dropResources(state, level, pos);
level.removeBlock(pos, false);
}
}
@Override
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
level.setBlock(pos, recalculateDistance(state, level, pos), Block.UPDATE_ALL);
}
@Override
protected BlockState updateShape(
BlockState state,
Direction direction,
BlockState neighborState,
LevelAccessor level,
BlockPos pos,
BlockPos neighborPos
) {
if (state.getValue(WATERLOGGED)) {
level.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level));
}
int neighborDistance = Math.min(ROYAL_DECAY_DISTANCE, getDistanceAt(neighborState) + 1);
int currentDistance = state.getValue(ROYAL_DISTANCE);
if (neighborDistance != 1 || currentDistance != neighborDistance) {
level.scheduleTick(pos, this, 1);
}
return state;
}
private static BlockState recalculateDistance(BlockState state, LevelReader level, BlockPos pos) {
int bestDistance = ROYAL_DECAY_DISTANCE;
BlockPos.MutableBlockPos cursor = new BlockPos.MutableBlockPos();
for (Direction direction : Direction.values()) {
cursor.setWithOffset(pos, direction);
bestDistance = Math.min(bestDistance, getDistanceAt(level.getBlockState(cursor)) + 1);
if (bestDistance == 1) {
break;
}
}
return setRoyalDistance(state, Math.min(ROYAL_DECAY_DISTANCE, bestDistance));
}
private static BlockState setRoyalDistance(BlockState state, int distance) {
int royalDistance = Math.max(1, Math.min(ROYAL_DECAY_DISTANCE, distance));
int vanillaDistance = Math.min(LeavesBlock.DECAY_DISTANCE, royalDistance);
return state
.setValue(ROYAL_DISTANCE, royalDistance)
.setValue(LeavesBlock.DISTANCE, vanillaDistance);
}
private static int getDistanceAt(BlockState state) {
if (state.is(BlockTags.LOGS)) {
return 0;
}
if (state.hasProperty(ROYAL_DISTANCE)) {
return state.getValue(ROYAL_DISTANCE);
}
if (state.hasProperty(LeavesBlock.DISTANCE)) {
return state.getValue(LeavesBlock.DISTANCE);
}
return ROYAL_DECAY_DISTANCE;
}
public static BlockState setRoyalDistanceForWorldgen(BlockState state, int distance) {
return setRoyalDistance(state, distance);
}
}
@@ -1,22 +1,39 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.advancement.AntarchyAdvancements;
import com.craisinlord.antarchy.content.worldgen.royal.RoyalTreeGrowers;
import com.mojang.serialization.MapCodec;
import java.util.LinkedHashMap;
import java.util.Map;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BonemealableBlock;
import net.minecraft.world.level.block.BushBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class RoyalSaplingBlock extends BushBlock {
public class RoyalSaplingBlock extends BushBlock implements BonemealableBlock {
public static final MapCodec<RoyalSaplingBlock> CODEC = Block.simpleCodec(RoyalSaplingBlock::new);
private static final ResourceLocation LET_IT_GROW_ADVANCEMENT = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "let_it_grow");
private static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
public RoyalSaplingBlock(BlockBehaviour.Properties properties) {
@@ -40,8 +57,7 @@ public class RoyalSaplingBlock extends BushBlock {
@Override
protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) {
BlockState belowState = level.getBlockState(pos.below());
return belowState.is(BlockTags.DIRT);
return level.getBlockState(pos.below()).is(BlockTags.DIRT);
}
@Override
@@ -57,4 +73,87 @@ public class RoyalSaplingBlock extends BushBlock {
? super.updateShape(state, direction, neighborState, level, pos, neighborPos)
: Blocks.AIR.defaultBlockState();
}
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (level.getMaxLocalRawBrightness(pos.above()) >= 9 && random.nextInt(7) == 0) {
this.growRoyalTree(level, pos, random);
}
}
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state) {
return true;
}
@Override
public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) {
return random.nextFloat() < 0.45F;
}
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
this.growRoyalTree(level, pos, random);
}
private void growRoyalTree(ServerLevel level, BlockPos pos, RandomSource random) {
Map<BlockPos, BlockState> footprint = this.findFootprint(level, pos);
if (footprint == null) {
return;
}
BlockPos origin = footprint.keySet().iterator().next();
ResourceKey<ConfiguredFeature<?, ?>> variant = switch (random.nextInt(3)) {
case 0 -> RoyalTreeGrowers.ROYAL_TREE_SMALL;
case 1 -> RoyalTreeGrowers.ROYAL_TREE_MEDIUM;
default -> RoyalTreeGrowers.ROYAL_TREE_LARGE;
};
Holder.Reference<ConfiguredFeature<?, ?>> feature = level.registryAccess()
.lookupOrThrow(Registries.CONFIGURED_FEATURE)
.getOrThrow(variant);
for (BlockPos saplingPos : footprint.keySet()) {
level.removeBlock(saplingPos, false);
}
if (feature.value().place(level, level.getChunkSource().getGenerator(), random, origin)) {
for (ServerPlayer player : level.getEntitiesOfClass(ServerPlayer.class, new AABB(origin).inflate(8.0D))) {
AntarchyAdvancements.award(player, LET_IT_GROW_ADVANCEMENT);
}
return;
}
for (Map.Entry<BlockPos, BlockState> entry : footprint.entrySet()) {
level.setBlock(entry.getKey(), entry.getValue(), Block.UPDATE_ALL);
}
}
private Map<BlockPos, BlockState> findFootprint(ServerLevel level, BlockPos pos) {
for (int offsetX = 0; offsetX < 2; offsetX++) {
for (int offsetZ = 0; offsetZ < 2; offsetZ++) {
BlockPos origin = pos.offset(-offsetX, 0, -offsetZ);
Map<BlockPos, BlockState> blocks = new LinkedHashMap<>();
boolean matches = true;
for (int x = 0; x < 2 && matches; x++) {
for (int z = 0; z < 2; z++) {
BlockPos checkPos = origin.offset(x, 0, z);
BlockState checkState = level.getBlockState(checkPos);
if (!checkState.is(this)) {
matches = false;
break;
}
blocks.put(checkPos, checkState);
}
}
if (matches) {
return blocks;
}
}
}
return null;
}
}
@@ -0,0 +1,42 @@
package com.craisinlord.antarchy.content.block.entity;
import com.craisinlord.antarchy.content.AntarchyObjects;
import java.util.UUID;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
public class RoyalEggBlockEntity extends BlockEntity {
@Nullable
private UUID placerUuid;
public RoyalEggBlockEntity(BlockPos pos, BlockState state) {
super(AntarchyObjects.ROYAL_EGG_BLOCK_ENTITY.get(), pos, state);
}
@Nullable
public UUID getPlacerUuid() {
return this.placerUuid;
}
public void setPlacerUuid(@Nullable UUID placerUuid) {
this.placerUuid = placerUuid;
this.setChanged();
}
@Override
protected void loadAdditional(CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) {
super.loadAdditional(tag, registries);
this.placerUuid = tag.hasUUID("Placer") ? tag.getUUID("Placer") : null;
}
@Override
protected void saveAdditional(CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) {
super.saveAdditional(tag, registries);
if (this.placerUuid != null) {
tag.putUUID("Placer", this.placerUuid);
}
}
}
@@ -32,8 +32,8 @@ public final class HoverboardTrailSystem {
private static final float CORE_HALF_WIDTH = 0.0225f;
private static final float GLOW_HALF_WIDTH = 0.055f;
private static final double MIN_DISTANCE_BETWEEN_POINTS = 0.04D;
private static final double LATERAL_OFFSET = 0.34D;
private static final double REAR_OFFSET = 0.52D;
private static final double LATERAL_OFFSET = 0.5275D;
private static final double REAR_OFFSET = 0.77D;
private static final double HEIGHT_OFFSET = 0.14D;
private static final float[] DEFAULT_COLOR = rgb(0xC9A0FF);
@@ -0,0 +1,23 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class RoyalMountModel extends GeoModel<RoyalMountEntity> {
@Override
public ResourceLocation getModelResource(RoyalMountEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/" + animatable.geoNameForRender() + ".geo.json");
}
@Override
public ResourceLocation getTextureResource(RoyalMountEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/" + animatable.geoNameForRender() + ".png");
}
@Override
public ResourceLocation getAnimationResource(RoyalMountEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/" + animatable.geoNameForRender() + ".animation.json");
}
}
@@ -0,0 +1,19 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation;
public class RoyalBoltRenderer extends EntityRenderer<RoyalBoltEntity> {
private static final ResourceLocation TEXTURE = ResourceLocation.withDefaultNamespace("textures/particle/generic_0.png");
public RoyalBoltRenderer(EntityRendererProvider.Context context) {
super(context);
}
@Override
public ResourceLocation getTextureLocation(RoyalBoltEntity entity) {
return TEXTURE;
}
}
@@ -0,0 +1,34 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.RoyalMountModel;
import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class RoyalMountRenderer extends GeoEntityRenderer<RoyalMountEntity> {
public RoyalMountRenderer(EntityRendererProvider.Context context) {
super(context, new RoyalMountModel());
this.shadowRadius = 1.1F;
}
@Override
public RenderType getRenderType(RoyalMountEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) {
return RenderType.entityCutoutNoCull(texture);
}
@Override
public void preRender(PoseStack poseStack, RoyalMountEntity animatable, BakedGeoModel model, @Nullable MultiBufferSource bufferSource,
@Nullable VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int colour) {
super.preRender(poseStack, animatable, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, colour);
float scale = animatable.getAgeScale();
poseStack.scale(scale, scale, scale);
this.shadowRadius = 1.1F * scale;
}
}
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.creative;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant;
import com.craisinlord.antarchy.content.item.GlimmerBottleItem;
import com.craisinlord.antarchy.content.item.royal.RoyalGearHelper;
import com.craisinlord.antarchy.content.item.ultimate.UltimateGearHelper;
import java.util.HashMap;
import java.util.List;
@@ -406,6 +407,7 @@ public final class CreativeTabContents {
entry("growth_ray", "combat"),
entry("gravity_gun", "combat"),
entry("portal_gun", "combat"),
entry("eye_of_the_storm", "combat"),
entry("water_cannon", "combat"),
entry("attitude_adjuster", "combat"),
entry("lucid_pearl", "combat"),
@@ -423,6 +425,19 @@ public final class CreativeTabContents {
entry("blood_crystal_chestplate", "combat"),
entry("blood_crystal_leggings", "combat"),
entry("blood_crystal_boots", "combat"),
entry("royal_guardian_sword", "combat"),
entry("royal_guardian_helmet", "combat"),
entry("royal_guardian_chestplate", "combat"),
entry("royal_guardian_leggings", "combat"),
entry("royal_guardian_boots", "combat"),
entry("royal_guardian_shield", "combat"),
entry("royal_assailant_battleaxe", "combat"),
entry("royal_assailant_helmet", "combat"),
entry("royal_assailant_chestplate", "combat"),
entry("royal_assailant_leggings", "combat"),
entry("royal_assailant_boots", "combat"),
entry("prince_egg", "spawn_eggs"),
entry("princess_egg", "spawn_eggs"),
entry("tigers_eye_helmet", "combat"),
entry("tigers_eye_chestplate", "combat"),
entry("tigers_eye_leggings", "combat"),
@@ -618,6 +633,10 @@ public final class CreativeTabContents {
output.accept(UltimateGearHelper.createUltimateArmorStack(item(entry.path()), holders));
continue;
}
if (isRoyalArmor(entry.path())) {
output.accept(RoyalGearHelper.createRoyalArmorStack(item(entry.path()), holders));
continue;
}
if ("ultimate_bow".equals(entry.path())) {
output.accept(UltimateGearHelper.createUltimateBowStack(item(entry.path()), holders));
continue;
@@ -644,6 +663,17 @@ public final class CreativeTabContents {
|| "ultimate_boots".equals(path);
}
private static boolean isRoyalArmor(String path) {
return "royal_guardian_helmet".equals(path)
|| "royal_guardian_chestplate".equals(path)
|| "royal_guardian_leggings".equals(path)
|| "royal_guardian_boots".equals(path)
|| "royal_assailant_helmet".equals(path)
|| "royal_assailant_chestplate".equals(path)
|| "royal_assailant_leggings".equals(path)
|| "royal_assailant_boots".equals(path);
}
private static void acceptPotionFamily(AntarchyTabOutput output, String path) {
Holder<Potion> potion = potion(path);
if (potion == null) {
@@ -53,6 +53,8 @@ public class HoverboardEntity extends PathfinderMob implements GeoEntity {
private static final double MAX_HOVER_HEIGHT = 5.0D;
private static final double ASCEND_SPEED = 0.15D;
private static final double SETTLE_DESCEND_SPEED = 0.08D;
private static final double FAST_DESCEND_SPEED = 0.9D;
private static final double FAST_DESCEND_RAMP = 0.2D;
private static final double DAMPING = 0.955D;
private static final double RIDER_Y_OFFSET = 0.65D;
@@ -206,23 +208,31 @@ public class HoverboardEntity extends PathfinderMob implements GeoEntity {
double supportHeight = this.findSupportHeight(gravityDirection);
if (!gravityDirection.isInverted()) {
double maxY = supportHeight + MAX_HOVER_HEIGHT;
if (this.getY() > maxY) {
return -SETTLE_DESCEND_SPEED;
}
if (holdingJump) {
return this.getY() >= maxY ? 0.0D : ASCEND_SPEED;
}
return this.getY() <= supportHeight ? 0.0D : -SETTLE_DESCEND_SPEED;
if (this.getY() <= supportHeight) {
return 0.0D;
}
double heightAboveBand = this.getY() - maxY;
if (heightAboveBand > 0.0D) {
return -Mth.clamp(SETTLE_DESCEND_SPEED + heightAboveBand * FAST_DESCEND_RAMP, SETTLE_DESCEND_SPEED, FAST_DESCEND_SPEED);
}
return -SETTLE_DESCEND_SPEED;
}
double minY = supportHeight - MAX_HOVER_HEIGHT;
if (this.getY() < minY) {
return SETTLE_DESCEND_SPEED;
}
if (holdingJump) {
return this.getY() <= minY ? 0.0D : -ASCEND_SPEED;
}
return this.getY() >= supportHeight ? 0.0D : SETTLE_DESCEND_SPEED;
if (this.getY() >= supportHeight) {
return 0.0D;
}
double depthBelowBand = minY - this.getY();
if (depthBelowBand > 0.0D) {
return Mth.clamp(SETTLE_DESCEND_SPEED + depthBelowBand * FAST_DESCEND_RAMP, SETTLE_DESCEND_SPEED, FAST_DESCEND_SPEED);
}
return SETTLE_DESCEND_SPEED;
}
private double findSupportHeight(AntarchyGravityDirection gravityDirection) {
@@ -0,0 +1,29 @@
package com.craisinlord.antarchy.content.entity.royal;
import com.craisinlord.antarchy.content.AntarchyObjects;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.level.Level;
public class PrinceEntity extends RoyalMountEntity {
public PrinceEntity(EntityType<? extends PrinceEntity> entityType, Level level) {
super(entityType, level);
}
public static AttributeSupplier.Builder createAttributes() {
return RoyalMountEntity.createBaseAttributes()
.add(Attributes.MAX_HEALTH, 120.0D)
.add(Attributes.ATTACK_DAMAGE, 14.0D);
}
@Override
protected String geoName() {
return "prince";
}
@Override
protected EntityType<? extends RoyalBoltEntity> boltType() {
return AntarchyObjects.ROYAL_BOLT.get();
}
}
@@ -0,0 +1,30 @@
package com.craisinlord.antarchy.content.entity.royal;
import com.craisinlord.antarchy.content.AntarchyObjects;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.level.Level;
public class PrincessEntity extends RoyalMountEntity {
public PrincessEntity(EntityType<? extends PrincessEntity> entityType, Level level) {
super(entityType, level);
}
public static AttributeSupplier.Builder createAttributes() {
return RoyalMountEntity.createBaseAttributes()
.add(Attributes.MAX_HEALTH, 110.0D)
.add(Attributes.ATTACK_DAMAGE, 10.0D)
.add(Attributes.FLYING_SPEED, 0.95D);
}
@Override
protected String geoName() {
return "princess";
}
@Override
protected EntityType<? extends RoyalBoltEntity> boltType() {
return AntarchyObjects.ROYAL_BOLT.get();
}
}
@@ -0,0 +1,70 @@
package com.craisinlord.antarchy.content.entity.royal;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;
public class RoyalBoltEntity extends AbstractHurtingProjectile {
public RoyalBoltEntity(EntityType<? extends RoyalBoltEntity> entityType, Level level) {
super(entityType, level);
}
@Override
protected double getDefaultGravity() {
return 0.02D;
}
@Override
protected float getInertia() {
return 0.97F;
}
@Override
protected boolean shouldBurn() {
return false;
}
@Override
protected ParticleOptions getTrailParticle() {
return ParticleTypes.END_ROD;
}
@Override
protected void onHitEntity(EntityHitResult result) {
super.onHitEntity(result);
if (this.level().isClientSide) {
return;
}
Entity target = result.getEntity();
Entity owner = this.getOwner();
if (target == owner || (owner != null && target == owner.getVehicle())) {
return;
}
float damage = (float) AntarchySettings.royalBoltDamage();
target.hurt(this.damageSources().mobProjectile(this, owner instanceof LivingEntity le ? le : null), damage);
if (target instanceof LivingEntity living) {
living.knockback(0.35D, this.getX() - target.getX(), this.getZ() - target.getZ());
}
}
@Override
protected void onHit(HitResult result) {
super.onHit(result);
if (!this.level().isClientSide) {
this.level().broadcastEntityEvent(this, (byte) 3);
this.discard();
}
}
@Override
public boolean isPickable() {
return false;
}
}
@@ -0,0 +1,603 @@
package com.craisinlord.antarchy.content.entity.royal;
import com.craisinlord.antarchy.config.AntarchySettings;
import java.util.UUID;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AgeableMob;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.control.FlyingMoveControl;
import net.minecraft.world.entity.ai.control.MoveControl;
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.SitWhenOrderedToGoal;
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal;
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal;
import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation;
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.entity.animal.FlyingAnimal;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.pathfinder.PathType;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.animatable.GeoEntity;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.animation.AnimationController;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public abstract class RoyalMountEntity extends TamableAnimal implements GeoEntity, FlyingAnimal {
public static final int ANIM_IDLE = 0;
public static final int ANIM_WALK = 1;
public static final int ANIM_FLY = 2;
public static final int ANIM_BITE = 3;
public static final int ANIM_FLY_BITE = 4;
public static final int ANIM_SHOOT = 5;
public static final int ANIM_FLY_SHOOT = 6;
private static final EntityDataAccessor<Integer> ANIM_STATE =
SynchedEntityData.defineId(RoyalMountEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> FLYING =
SynchedEntityData.defineId(RoyalMountEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Boolean> SADDLED =
SynchedEntityData.defineId(RoyalMountEntity.class, EntityDataSerializers.BOOLEAN);
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation QUIRK_ANIM = RawAnimation.begin().thenLoop("quirk");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation FLY_ANIM = RawAnimation.begin().thenLoop("fly");
private static final RawAnimation BITE_ANIM = RawAnimation.begin().thenPlay("bite");
private static final RawAnimation FLY_BITE_ANIM = RawAnimation.begin().thenPlay("fly_bite");
private static final RawAnimation SHOOT_ANIM = RawAnimation.begin().thenPlay("shoot");
private static final RawAnimation FLY_SHOOT_ANIM = RawAnimation.begin().thenPlay("fly_shoot");
private static final int ACTION_TICKS = 12;
private static final int BITE_HIT_TICK = 6;
private static final int GROW_TICKS = 24000;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private final MoveControl groundMoveControl;
private final MoveControl flyingMoveControl;
private final PathNavigation groundNavigation;
private final PathNavigation flyingNavigation;
private int actionTicks;
private boolean actionHit;
private int spitCooldown;
private int quirkTimer;
private boolean riderAscendPressed;
private boolean riderDescendPressed;
protected RoyalMountEntity(EntityType<? extends RoyalMountEntity> entityType, Level level) {
super(entityType, level);
this.groundMoveControl = new MoveControl(this);
this.flyingMoveControl = new FlyingMoveControl(this, 20, true);
this.groundNavigation = new GroundPathNavigation(this, level);
FlyingPathNavigation flying = new FlyingPathNavigation(this, level);
flying.setCanFloat(true);
this.flyingNavigation = flying;
this.moveControl = this.groundMoveControl;
this.navigation = this.groundNavigation;
this.setPathfindingMalus(PathType.WATER, -1.0F);
this.setPathfindingMalus(PathType.LAVA, -1.0F);
this.xpReward = 20;
}
public static AttributeSupplier.Builder createBaseAttributes() {
return Mob.createMobAttributes()
.add(Attributes.MAX_HEALTH, 120.0D)
.add(Attributes.ATTACK_DAMAGE, 12.0D)
.add(Attributes.MOVEMENT_SPEED, 0.28D)
.add(Attributes.FLYING_SPEED, 0.9D)
.add(Attributes.FOLLOW_RANGE, 48.0D)
.add(Attributes.KNOCKBACK_RESISTANCE, 0.6D)
.add(Attributes.ARMOR, 10.0D)
.add(Attributes.STEP_HEIGHT, 1.5D);
}
protected abstract String geoName();
protected abstract EntityType<? extends RoyalBoltEntity> boltType();
@Override
protected PathNavigation createNavigation(Level level) {
GroundPathNavigation navigation = new GroundPathNavigation(this, level);
navigation.setCanFloat(true);
return navigation;
}
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(1, new SitWhenOrderedToGoal(this));
this.goalSelector.addGoal(2, new RoyalMountSpitGoal(this));
this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.MeleeAttackGoal(this, 1.2D, true) {
@Override
protected void checkAndPerformAttack(LivingEntity target) {
if (this.getTicksUntilNextAttack() <= 0 && this.canPerformAttack(target)) {
this.resetAttackCooldown();
RoyalMountEntity.this.startBite();
}
}
@Override
public boolean canUse() {
return !RoyalMountEntity.this.isBaby() && !RoyalMountEntity.this.isVehicle() && super.canUse();
}
});
this.goalSelector.addGoal(4, new RoyalMountFollowOwnerGoal(this));
this.goalSelector.addGoal(6, new WaterAvoidingRandomStrollGoal(this, 0.8D) {
@Override
public boolean canUse() {
return !RoyalMountEntity.this.isVehicle() && !RoyalMountEntity.this.isOrderedToSit() && super.canUse();
}
});
this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 12.0F));
this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers());
}
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
builder.define(ANIM_STATE, ANIM_IDLE);
builder.define(FLYING, false);
builder.define(SADDLED, false);
}
@Override
public void addAdditionalSaveData(CompoundTag tag) {
super.addAdditionalSaveData(tag);
tag.putBoolean("Saddled", this.isSaddled());
tag.putBoolean("Flying", this.isFlying());
}
@Override
public void readAdditionalSaveData(CompoundTag tag) {
super.readAdditionalSaveData(tag);
this.setSaddled(tag.getBoolean("Saddled"));
this.setFlying(tag.getBoolean("Flying"));
}
public boolean isFlying() {
return this.entityData.get(FLYING);
}
public void setFlying(boolean flying) {
if (this.entityData.get(FLYING) != flying) {
this.entityData.set(FLYING, flying);
this.moveControl = flying ? this.flyingMoveControl : this.groundMoveControl;
this.navigation = flying ? this.flyingNavigation : this.groundNavigation;
this.setNoGravity(flying);
}
}
public boolean isSaddled() {
return this.entityData.get(SADDLED);
}
public void setSaddled(boolean saddled) {
this.entityData.set(SADDLED, saddled);
}
public int getAnimState() {
return this.entityData.get(ANIM_STATE);
}
private void setAnimState(int state) {
this.entityData.set(ANIM_STATE, state);
}
public float getAgeScale() {
if (!this.isBaby()) {
return 1.0F;
}
float progress = 1.0F - Mth.clamp(-this.getAge() / (float) GROW_TICKS, 0.0F, 1.0F);
return 0.35F + 0.65F * progress;
}
@Override
public boolean isFood(ItemStack stack) {
return isGoldenTreat(stack);
}
public static boolean isGoldenTreat(ItemStack stack) {
if (stack.isEmpty()) {
return false;
}
String path = net.minecraft.core.registries.BuiltInRegistries.ITEM.getKey(stack.getItem()).getPath();
return path.contains("gold") || path.contains("golden");
}
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
if (this.isFood(stack)) {
if (!this.level().isClientSide) {
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
this.heal(8.0F);
if (this.isBaby()) {
this.ageUp((int) (-this.getAge() * 0.1F), true);
}
if (!this.isTame() && this.random.nextInt(3) == 0) {
this.tame(player);
this.level().broadcastEntityEvent(this, (byte) 7);
} else {
this.level().broadcastEntityEvent(this, (byte) 6);
}
}
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
if (this.isTame() && this.isOwnedBy(player)) {
if (!this.isSaddled() && stack.is(Items.SADDLE)) {
if (!this.level().isClientSide) {
this.setSaddled(true);
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
this.playSound(SoundEvents.HORSE_SADDLE, 1.0F, 1.0F);
}
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
if (stack.isEmpty() && player.isSecondaryUseActive()) {
if (this.isSaddled()) {
if (!this.level().isClientSide) {
this.setSaddled(false);
this.spawnAtLocation(new ItemStack(Items.SADDLE));
}
} else if (!this.level().isClientSide) {
this.setOrderedToSit(!this.isOrderedToSit());
this.setInSittingPose(this.isOrderedToSit());
this.navigation.stop();
this.setTarget(null);
}
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
if (stack.isEmpty() && this.isSaddled() && !this.isBaby() && !player.isPassenger()) {
if (!this.level().isClientSide) {
this.setOrderedToSit(false);
this.setInSittingPose(false);
player.startRiding(this);
}
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
}
return super.mobInteract(player, hand);
}
@Nullable
@Override
public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob other) {
return null;
}
@Override
public boolean canMate(net.minecraft.world.entity.animal.Animal other) {
return false;
}
@Override
public void tick() {
super.tick();
if (this.isBaby()) {
this.refreshDimensions();
}
if (this.level().isClientSide) {
return;
}
if (this.spitCooldown > 0) {
this.spitCooldown--;
}
if (this.actionTicks > 0) {
this.actionTicks--;
if (!this.actionHit && this.actionTicks <= ACTION_TICKS - BITE_HIT_TICK
&& (this.getAnimState() == ANIM_BITE || this.getAnimState() == ANIM_FLY_BITE)) {
this.actionHit = true;
this.applyBiteDamage();
}
if (this.actionTicks == 0) {
this.updateAmbientAnimState();
}
return;
}
this.tickFlightState();
this.updateAmbientAnimState();
if (this.quirkTimer > 0) {
this.quirkTimer--;
}
if (this.getAnimState() == ANIM_IDLE && this.quirkTimer == 0 && this.random.nextInt(600) == 0) {
this.quirkTimer = 80;
}
}
private void tickFlightState() {
if (this.isVehicle()) {
return;
}
if (this.isFlying() && this.onGround() && this.getTarget() == null) {
this.setFlying(false);
}
}
private void updateAmbientAnimState() {
if (this.actionTicks > 0) {
return;
}
if (this.isFlying() || !this.onGround()) {
this.setAnimState(ANIM_FLY);
return;
}
boolean moving;
if (this.getControllingPassenger() instanceof Player rider) {
moving = Math.abs(rider.zza) > 0.05F || Math.abs(rider.xxa) > 0.05F;
} else {
moving = this.getDeltaMovement().horizontalDistanceSqr() > 0.0025D;
}
this.setAnimState(moving ? ANIM_WALK : ANIM_IDLE);
}
public void startBite() {
if (this.actionTicks > 0) {
return;
}
this.actionTicks = ACTION_TICKS;
this.actionHit = false;
this.setAnimState(this.isFlying() ? ANIM_FLY_BITE : ANIM_BITE);
this.triggerAnim("main", this.isFlying() ? "fly_bite" : "bite");
}
private void applyBiteDamage() {
LivingEntity target = this.getTarget();
if (target == null && this.getControllingPassenger() instanceof Player) {
target = this.frontTarget();
}
if (target != null && target.distanceTo(this) < 5.0D) {
target.hurt(this.damageSources().mobAttack(this), (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE));
}
}
@Nullable
private LivingEntity frontTarget() {
Vec3 look = this.getLookAngle();
Vec3 eye = this.getEyePosition();
LivingEntity best = null;
double bestDot = 0.3D;
for (LivingEntity candidate : this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(6.0D))) {
if (candidate == this || candidate == this.getControllingPassenger() || candidate == this.getOwner()) {
continue;
}
Vec3 to = candidate.getEyePosition().subtract(eye);
double dist = to.length();
if (dist > 6.0D || dist < 1.0E-3D) {
continue;
}
double dot = to.scale(1.0D / dist).dot(look);
if (dot > bestDot) {
bestDot = dot;
best = candidate;
}
}
return best;
}
public void startSpitVolley(@Nullable LivingEntity target) {
if (this.spitCooldown > 0 || this.level().isClientSide) {
return;
}
this.spitCooldown = 40;
this.actionTicks = ACTION_TICKS;
this.actionHit = true;
this.setAnimState(this.isFlying() ? ANIM_FLY_SHOOT : ANIM_SHOOT);
this.triggerAnim("main", this.isFlying() ? "fly_shoot" : "shoot");
Vec3 aim;
if (target != null) {
aim = target.getEyePosition().subtract(this.getEyePosition()).normalize();
} else if (this.getControllingPassenger() instanceof Player rider) {
aim = rider.getLookAngle();
} else {
aim = this.getLookAngle();
}
Vec3 right = new Vec3(-aim.z, 0.0D, aim.x).normalize();
for (int i = -1; i <= 1; i++) {
Vec3 dir = aim.add(right.scale(i * 0.14D)).normalize();
RoyalBoltEntity bolt = new RoyalBoltEntity(this.boltType(), this.level());
bolt.setOwner(this);
Vec3 spawn = this.getEyePosition().add(aim.scale(1.6D)).add(right.scale(i * 0.9D));
bolt.setPos(spawn.x, spawn.y, spawn.z);
bolt.shoot(dir.x, dir.y, dir.z, 1.4F, 1.0F);
this.level().addFreshEntity(bolt);
}
this.playSound(SoundEvents.BREEZE_SHOOT, 1.2F, 0.9F);
}
public boolean toggleMountedFlight(ServerPlayer player) {
if (!this.canControl(player)) {
return false;
}
this.setFlying(!this.isFlying());
if (this.isFlying()) {
this.setDeltaMovement(this.getDeltaMovement().add(0.0D, 0.4D, 0.0D));
this.hasImpulse = true;
}
return true;
}
public void handleMountedBite(ServerPlayer player) {
if (this.canControl(player)) {
this.startBite();
}
}
public void handleMountedSpit(ServerPlayer player) {
if (this.canControl(player)) {
this.startSpitVolley(null);
}
}
public void setRiderAscend(boolean pressed) {
this.riderAscendPressed = pressed;
}
public void setRiderDescend(boolean pressed) {
this.riderDescendPressed = pressed;
}
private boolean canControl(ServerPlayer player) {
return this.isTame() && this.isOwnedBy(player) && this.getControllingPassenger() == player;
}
@Nullable
@Override
public LivingEntity getControllingPassenger() {
return this.getFirstPassenger() instanceof Player player && this.isSaddled() && this.isOwnedBy(player) ? player : null;
}
@Override
public boolean canAddPassenger(Entity passenger) {
return this.getPassengers().isEmpty();
}
@Override
protected void positionRider(Entity passenger, MoveFunction moveFunction) {
if (!this.hasPassenger(passenger)) {
return;
}
double yOffset = (this.isFlying() ? 1.55D : 1.35D) * this.getAgeScale();
Vec3 back = this.getLookAngle().scale(-0.35D * this.getAgeScale());
moveFunction.accept(passenger, this.getX() + back.x, this.getY() + yOffset, this.getZ() + back.z);
}
@Override
protected Vec3 getRiddenInput(Player rider, Vec3 travelVector) {
double vertical = 0.0D;
if (this.isFlying()) {
if (this.riderAscendPressed) {
vertical += 0.4D;
}
if (this.riderDescendPressed || rider.isSecondaryUseActive()) {
vertical -= 0.4D;
}
if (rider.zza > 0.0F) {
vertical -= Math.sin(Math.toRadians(rider.getXRot())) * 0.6D;
}
}
return new Vec3(rider.xxa * 0.35D, vertical, rider.zza);
}
@Override
protected float getRiddenSpeed(Player rider) {
return (float) this.getAttributeValue(this.isFlying() ? Attributes.FLYING_SPEED : Attributes.MOVEMENT_SPEED)
* (this.isFlying() ? 0.4F : 1.0F);
}
@Override
public void travel(Vec3 travelVector) {
if (!(this.getControllingPassenger() instanceof Player rider) || !this.isVehicle()) {
super.travel(travelVector);
return;
}
this.setYRot(rider.getYRot());
this.yBodyRot = this.getYRot();
this.yHeadRot = this.getYRot();
this.setXRot(rider.getXRot() * 0.5F);
Vec3 input = this.getRiddenInput(rider, travelVector);
this.setSpeed(this.getRiddenSpeed(rider));
if (this.isFlying()) {
this.moveRelative(this.getSpeed(), new Vec3(input.x, 0.0D, input.z));
Vec3 motion = this.getDeltaMovement();
this.setDeltaMovement(motion.x, (motion.y + input.y) * 0.9D, motion.z);
this.move(MoverType.SELF, this.getDeltaMovement());
this.setDeltaMovement(this.getDeltaMovement().scale(0.91D));
this.fallDistance = 0.0F;
} else {
super.travel(new Vec3(input.x, travelVector.y, input.z));
}
}
@Override
public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) {
return false;
}
@Override
public float maxUpStep() {
return 1.5F;
}
@Override
public boolean removeWhenFarAway(double distanceToClosestPlayer) {
return false;
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "main", 2, this::animController)
.triggerableAnim("bite", BITE_ANIM)
.triggerableAnim("fly_bite", FLY_BITE_ANIM)
.triggerableAnim("shoot", SHOOT_ANIM)
.triggerableAnim("fly_shoot", FLY_SHOOT_ANIM));
}
private PlayState animController(AnimationState<RoyalMountEntity> state) {
return switch (this.getAnimState()) {
case ANIM_WALK -> state.setAndContinue(WALK_ANIM);
case ANIM_FLY, ANIM_FLY_BITE, ANIM_FLY_SHOOT -> state.setAndContinue(FLY_ANIM);
default -> state.setAndContinue(this.quirkTimer > 0 ? QUIRK_ANIM : IDLE_ANIM);
};
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
public String geoNameForRender() {
return this.geoName();
}
}
@@ -0,0 +1,84 @@
package com.craisinlord.antarchy.content.entity.royal;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.phys.Vec3;
public class RoyalMountFollowOwnerGoal extends Goal {
private static final double START_DISTANCE = 12.0D;
private static final double STOP_DISTANCE = 6.0D;
private static final double TELEPORT_DISTANCE = 48.0D;
private final RoyalMountEntity mount;
private LivingEntity owner;
private int recalcTimer;
public RoyalMountFollowOwnerGoal(RoyalMountEntity mount) {
this.mount = mount;
}
@Override
public boolean canUse() {
if (!this.mount.isTame() || this.mount.isVehicle() || this.mount.isOrderedToSit()) {
return false;
}
LivingEntity potentialOwner = this.mount.getOwner();
if (potentialOwner == null || potentialOwner.isSpectator()) {
return false;
}
if (this.mount.distanceToSqr(potentialOwner) < START_DISTANCE * START_DISTANCE) {
return false;
}
this.owner = potentialOwner;
return true;
}
@Override
public boolean canContinueToUse() {
return !this.mount.getNavigation().isDone()
&& this.mount.distanceToSqr(this.owner) > STOP_DISTANCE * STOP_DISTANCE
&& !this.mount.isOrderedToSit();
}
@Override
public void start() {
this.recalcTimer = 0;
}
@Override
public void stop() {
this.owner = null;
this.mount.getNavigation().stop();
this.mount.setFlying(false);
}
@Override
public void tick() {
this.mount.getLookControl().setLookAt(this.owner, 10.0F, this.mount.getMaxHeadXRot());
double distanceSqr = this.mount.distanceToSqr(this.owner);
if (distanceSqr > TELEPORT_DISTANCE * TELEPORT_DISTANCE) {
this.mount.teleportTo(this.owner.getX(), this.owner.getY(), this.owner.getZ());
return;
}
boolean ownerAirborne = !this.owner.onGround() || (this.owner.getY() - this.mount.getY()) > 3.0D;
this.mount.setFlying(ownerAirborne || distanceSqr > 24.0D * 24.0D);
if (--this.recalcTimer <= 0) {
this.recalcTimer = 10;
if (this.mount.isFlying()) {
Vec3 to = this.owner.position().subtract(this.mount.position());
Vec3 step = this.mount.position().add(to.normalize().scale(Math.min(to.length(), 8.0D)));
this.mount.getMoveControl().setWantedPosition(step.x, step.y + 1.0D, step.z, 1.2D);
} else {
this.mount.getNavigation().moveTo(this.owner, 1.1D);
}
}
}
@Override
public boolean requiresUpdateEveryTick() {
return true;
}
}
@@ -0,0 +1,49 @@
package com.craisinlord.antarchy.content.entity.royal;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.goal.Goal;
public class RoyalMountSpitGoal extends Goal {
private final RoyalMountEntity mount;
private int cooldown;
public RoyalMountSpitGoal(RoyalMountEntity mount) {
this.mount = mount;
}
@Override
public boolean canUse() {
if (this.mount.isBaby() || this.mount.isVehicle() || this.mount.isOrderedToSit()) {
return false;
}
LivingEntity target = this.mount.getTarget();
if (target == null || !target.isAlive()) {
return false;
}
double distance = this.mount.distanceTo(target);
return distance > 5.0D && distance < 20.0D && this.mount.hasLineOfSight(target);
}
@Override
public void start() {
this.cooldown = 20;
}
@Override
public void tick() {
LivingEntity target = this.mount.getTarget();
if (target == null) {
return;
}
this.mount.getLookControl().setLookAt(target, 30.0F, 30.0F);
if (this.cooldown-- <= 0) {
this.mount.startSpitVolley(target);
this.cooldown = 60;
}
}
@Override
public boolean requiresUpdateEveryTick() {
return true;
}
}
@@ -58,6 +58,10 @@ public class WindVortexEntity extends Entity {
private static final String AXIS_X_KEY = "AxisX";
private static final String AXIS_Y_KEY = "AxisY";
private static final String AXIS_Z_KEY = "AxisZ";
private static final String TRAVEL_X_KEY = "TravelX";
private static final String TRAVEL_Y_KEY = "TravelY";
private static final String TRAVEL_Z_KEY = "TravelZ";
private static final String TRAVELLING_KEY = "Travelling";
private static final double BASE_RADIUS = 0.35D;
private static final double DRIFT_FRICTION = 0.96D;
@@ -65,13 +69,17 @@ public class WindVortexEntity extends Entity {
public enum VortexMode {
UPWARD,
LENS_PULL,
LENS_PUSH
LENS_PUSH,
GATHER_RETURN
}
private int age;
private int durationTicks = 140;
private double pullStrength = 0.32D;
private double launchStrength = 1.0D;
private float damageOverride = -1.0F;
private Vec3 travelVelocity = Vec3.ZERO;
private boolean travelling = false;
private final Map<UUID, Double> carriedProgress = new HashMap<>();
@Nullable
private UUID ownerUuid;
@@ -130,9 +138,22 @@ public class WindVortexEntity extends Entity {
return;
}
Vec3 drift = this.getDeltaMovement().multiply(DRIFT_FRICTION, DRIFT_FRICTION, DRIFT_FRICTION);
this.setDeltaMovement(drift);
this.move(net.minecraft.world.entity.MoverType.SELF, drift);
if (this.travelling) {
Vec3 from = this.position();
Vec3 to = from.add(this.travelVelocity);
HitResult blockHit = this.level().clip(
new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this));
if (blockHit.getType() != HitResult.Type.MISS) {
this.fadeOut();
return;
}
this.setDeltaMovement(this.travelVelocity);
this.move(net.minecraft.world.entity.MoverType.SELF, this.travelVelocity);
} else {
Vec3 drift = this.getDeltaMovement().multiply(DRIFT_FRICTION, DRIFT_FRICTION, DRIFT_FRICTION);
this.setDeltaMovement(drift);
this.move(net.minecraft.world.entity.MoverType.SELF, drift);
}
if ((this.tickCount & 1) == 0) {
this.applyVortexForces();
@@ -210,6 +231,12 @@ public class WindVortexEntity extends Entity {
continue;
}
if (mode == VortexMode.GATHER_RETURN && this.age >= this.gatherReturnAtAge()) {
this.launchTowardOwner(entity);
iterator.remove();
continue;
}
if (mode == VortexMode.UPWARD && progress >= 0.92D) {
this.launch(entity, this.radialVectorAt(entity, progress, basis), progress, basis);
iterator.remove();
@@ -264,7 +291,7 @@ public class WindVortexEntity extends Entity {
double horizontal = Math.max(0.08D, radialVector.length());
Vec3 radial = radialVector.lengthSqr() < 1.0E-6D ? basis.sideA : radialVector.scale(1.0D / horizontal);
Vec3 tangent = basis.axis.cross(radial).normalize();
double targetRadius = mode == VortexMode.LENS_PULL
double targetRadius = mode == VortexMode.LENS_PULL || mode == VortexMode.GATHER_RETURN
? Math.max(0.05D, radius * 0.18D)
: Mth.lerp(shapeProgress, BASE_RADIUS, radius * 0.82D);
double radialError = targetRadius - horizontal;
@@ -276,6 +303,7 @@ public class WindVortexEntity extends Entity {
case LENS_PULL -> -(0.18D + (1.0D - progress) * 0.18D) * massScale;
case LENS_PUSH -> (0.18D + progress * 0.22D) * massScale;
case UPWARD -> (0.13D + progress * 0.16D) * massScale;
case GATHER_RETURN -> (0.05D + progress * 0.08D) * massScale;
} * playerScale;
if (mode == VortexMode.UPWARD && entity instanceof Player && entity.onGround()) {
axialSpeed = Math.max(axialSpeed, 0.38D);
@@ -315,8 +343,36 @@ public class WindVortexEntity extends Entity {
if (living.getType().is(AntarchyTags.Entities.WIND_VORTEX_IMMUNE)) {
return;
}
float damage = (float) (2.0D * Mth.clamp(this.getTopRadius() / 1.5D, 0.5D, 3.0D));
living.hurt(this.damageSource(), damage);
living.hurt(this.damageSource(), this.resolveDamage());
}
private float resolveDamage() {
if (this.damageOverride >= 0.0F) {
return this.damageOverride;
}
return (float) (2.0D * Mth.clamp(this.getTopRadius() / 1.5D, 0.5D, 3.0D));
}
private int gatherReturnAtAge() {
return Math.max(10, (int) (this.durationTicks * 0.55D));
}
private void launchTowardOwner(Entity entity) {
Entity owner = this.getOwnerEntity();
Vec3 target = owner != null ? owner.getEyePosition() : this.position().add(0.0D, 1.0D, 0.0D);
Vec3 toOwner = target.subtract(entity.position());
double distance = toOwner.length();
Vec3 direction = distance < 1.0E-4D ? new Vec3(0.0D, 1.0D, 0.0D) : toOwner.scale(1.0D / distance);
double arc = Mth.clamp(distance * 0.06D, 0.25D, 1.1D);
double power = this.launchStrength * Mth.clamp(distance / 6.0D, 0.6D, 2.0D);
entity.setDeltaMovement(direction.scale(power).add(0.0D, arc, 0.0D));
entity.fallDistance = 0.0F;
entity.hasImpulse = true;
entity.hurtMarked = true;
if (this.isDamaging() && entity instanceof LivingEntity living
&& !living.getType().is(AntarchyTags.Entities.WIND_VORTEX_IMMUNE)) {
living.hurt(this.damageSource(), this.resolveDamage());
}
}
private DamageSource damageSource() {
@@ -393,11 +449,21 @@ public class WindVortexEntity extends Entity {
this.age = 0;
}
public void setTravel(Vec3 velocity) {
this.travelVelocity = velocity;
this.travelling = true;
this.noPhysics = true;
}
public void setVortexStrengths(double pullStrength, double launchStrength) {
this.pullStrength = Math.max(0.0D, pullStrength);
this.launchStrength = Math.max(0.0D, launchStrength);
}
public void setDamageOverride(float damage) {
this.damageOverride = damage;
}
public void removeFromLens() {
this.fadeOut();
}
@@ -424,6 +490,11 @@ public class WindVortexEntity extends Entity {
this.setDamaging(tag.getBoolean(DAMAGING_KEY));
this.setMode(VortexMode.values()[Mth.clamp(tag.getInt(MODE_KEY), 0, VortexMode.values().length - 1)]);
this.setAxis(new Vec3(tag.getFloat(AXIS_X_KEY), tag.getFloat(AXIS_Y_KEY), tag.getFloat(AXIS_Z_KEY)));
this.travelling = tag.getBoolean(TRAVELLING_KEY);
this.travelVelocity = new Vec3(tag.getDouble(TRAVEL_X_KEY), tag.getDouble(TRAVEL_Y_KEY), tag.getDouble(TRAVEL_Z_KEY));
if (this.travelling) {
this.noPhysics = true;
}
if (tag.hasUUID(OWNER_KEY)) {
this.ownerUuid = tag.getUUID(OWNER_KEY);
}
@@ -442,6 +513,10 @@ public class WindVortexEntity extends Entity {
tag.putFloat(AXIS_X_KEY, (float) this.getAxis().x);
tag.putFloat(AXIS_Y_KEY, (float) this.getAxis().y);
tag.putFloat(AXIS_Z_KEY, (float) this.getAxis().z);
tag.putBoolean(TRAVELLING_KEY, this.travelling);
tag.putDouble(TRAVEL_X_KEY, this.travelVelocity.x);
tag.putDouble(TRAVEL_Y_KEY, this.travelVelocity.y);
tag.putDouble(TRAVEL_Z_KEY, this.travelVelocity.z);
if (this.ownerUuid != null) {
tag.putUUID(OWNER_KEY, this.ownerUuid);
}
@@ -0,0 +1,181 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.client.model.ResourceBackedGeoItemModel;
import com.craisinlord.antarchy.content.client.renderer.AnimatedHeldItemRenderer;
import com.craisinlord.antarchy.content.entity.vortex.WindVortexEntity;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
import net.minecraft.ChatFormatting;
import net.minecraft.core.Direction;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.UseAnim;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import software.bernie.geckolib.animatable.GeoItem;
import software.bernie.geckolib.animatable.client.GeoRenderProvider;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.animation.AnimationController;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public class EyeOfTheStormItem extends Item implements GeoItem {
private static final ResourceLocation MODEL_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "geo/eye_of_the_storm.geo.json");
private static final ResourceLocation TEXTURE_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "textures/item/eye_of_the_storm/eye_of_the_storm.png");
private static final ResourceLocation ANIMATION_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "animations/eye_of_the_storm.animation.json");
private static final String IDLE_CONTROLLER = "idle_controller";
private static final String IDLE_ANIMATION = "spinning_idle";
private static final Map<UUID, Long> LAST_UPDRAFT_TICK = new ConcurrentHashMap<>();
private static final Map<UUID, Long> LAST_SURGE_TICK = new ConcurrentHashMap<>();
private static final float SURGE_PROJECTILE_SPEED = 0.9F;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
public EyeOfTheStormItem(Properties properties) {
super(properties);
GeoItem.registerSyncedAnimatable(this);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand usedHand) {
ItemStack stack = player.getItemInHand(usedHand);
if (!AntarchySettings.eyeOfTheStormEnabled()) {
return InteractionResultHolder.fail(stack);
}
if (level.isClientSide) {
return InteractionResultHolder.consume(stack);
}
long now = level.getGameTime();
Long last = LAST_UPDRAFT_TICK.get(player.getUUID());
if (last != null && now - last < AntarchySettings.eyeOfTheStormUpdraftCooldownTicks()) {
return InteractionResultHolder.fail(stack);
}
LAST_UPDRAFT_TICK.put(player.getUUID(), now);
ServerLevel serverLevel = (ServerLevel) level;
WindVortexEntity vortex = WindVortexEntity.create(
serverLevel,
AntarchyObjects.WIND_VORTEX.get(),
player.position(),
Vec3.ZERO,
player,
false
);
vortex.setMode(WindVortexEntity.VortexMode.UPWARD);
vortex.setAxis(Direction.UP);
vortex.setVortexSize((float) AntarchySettings.eyeOfTheStormUpdraftHeight(), (float) AntarchySettings.eyeOfTheStormUpdraftRadius());
vortex.setVortexDurationTicks(AntarchySettings.eyeOfTheStormUpdraftDurationTicks());
serverLevel.addFreshEntity(vortex);
player.setDeltaMovement(player.getDeltaMovement().add(0.0D, AntarchySettings.eyeOfTheStormUpdraftLaunchStrength(), 0.0D));
player.hasImpulse = true;
player.resetFallDistance();
if (player instanceof ServerPlayer serverPlayer) {
serverPlayer.connection.send(new ClientboundSetEntityMotionPacket(serverPlayer));
}
serverLevel.playSound(null, player.getX(), player.getY(), player.getZ(),
SoundEvents.BREEZE_WIND_CHARGE_BURST, SoundSource.PLAYERS, 0.9F, 1.1F);
player.awardStat(Stats.ITEM_USED.get(this));
stack.hurtAndBreak(1, player, usedHand == InteractionHand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND);
return InteractionResultHolder.consume(stack);
}
public void firePrimary(ServerLevel level, Player player, ItemStack stack) {
if (!AntarchySettings.eyeOfTheStormEnabled() || player.getMainHandItem() != stack) {
return;
}
long now = level.getGameTime();
Long last = LAST_SURGE_TICK.get(player.getUUID());
if (last != null && now - last < AntarchySettings.eyeOfTheStormSurgeCooldownTicks()) {
return;
}
LAST_SURGE_TICK.put(player.getUUID(), now);
Vec3 look = player.getViewVector(1.0F);
Vec3 spawn = player.getEyePosition().add(look);
WindVortexEntity vortex = WindVortexEntity.create(
level,
AntarchyObjects.WIND_VORTEX.get(),
spawn,
Vec3.ZERO,
player,
true
);
vortex.setMode(WindVortexEntity.VortexMode.UPWARD);
vortex.setAxis(Direction.UP);
vortex.setVortexSize((float) AntarchySettings.eyeOfTheStormSurgeHeight(), (float) AntarchySettings.eyeOfTheStormSurgeRadius());
vortex.setVortexDurationTicks(AntarchySettings.eyeOfTheStormSurgeDurationTicks());
vortex.setVortexStrengths(AntarchySettings.eyeOfTheStormSurgePullStrength(), AntarchySettings.eyeOfTheStormSurgeReturnStrength());
vortex.setDamageOverride(AntarchySettings.eyeOfTheStormSurgeDamage());
vortex.setTravel(look.scale(SURGE_PROJECTILE_SPEED));
level.addFreshEntity(vortex);
level.playSound(null, spawn.x, spawn.y, spawn.z,
SoundEvents.BREEZE_WIND_CHARGE_BURST, SoundSource.PLAYERS, 1.0F, 0.8F);
player.awardStat(Stats.ITEM_USED.get(this));
stack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND);
}
@Override
public UseAnim getUseAnimation(ItemStack stack) {
return UseAnim.NONE;
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.updraft").withStyle(ChatFormatting.AQUA));
tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.surge").withStyle(ChatFormatting.AQUA));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, IDLE_CONTROLLER, state ->
state.setAndContinue(RawAnimation.begin().thenLoop(IDLE_ANIMATION))));
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
@Override
public void createGeoRenderer(Consumer<GeoRenderProvider> consumer) {
consumer.accept(new GeoRenderProvider() {
private AnimatedHeldItemRenderer<EyeOfTheStormItem> renderer;
@Override
public net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer getGeoItemRenderer() {
if (this.renderer == null) {
this.renderer = new AnimatedHeldItemRenderer<>(new ResourceBackedGeoItemModel<>(MODEL_LOCATION, TEXTURE_LOCATION, ANIMATION_LOCATION));
}
return this.renderer;
}
});
}
}
@@ -0,0 +1,157 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.item.royal.RoyalGearHelper;
import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.core.Holder;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.component.ItemAttributeModifiers;
import net.minecraft.world.level.Level;
public class RoyalAssailantArmorItem extends ArmorItem {
private final Type armorType;
public RoyalAssailantArmorItem(Holder<ArmorMaterial> material, Type type, Properties properties) {
super(material, type, properties.stacksTo(1).durability(type.getDurability(AntarchySettings.royalArmorDurabilityMultiplier())));
this.armorType = type;
}
public Type getArmorType() {
return this.armorType;
}
@Override
public int getDefense() {
return switch (this.armorType) {
case HELMET -> AntarchySettings.royalAssailantHelmetArmorValue();
case CHESTPLATE, BODY -> AntarchySettings.royalAssailantChestplateArmorValue();
case LEGGINGS -> AntarchySettings.royalAssailantLeggingsArmorValue();
case BOOTS -> AntarchySettings.royalAssailantBootsArmorValue();
};
}
@Override
public float getToughness() {
return (float) AntarchySettings.royalAssailantArmorToughness();
}
private double getDoubleDamageChance() {
return switch (this.armorType) {
case HELMET -> AntarchySettings.royalAssailantHelmetDoubleDamageChance();
case CHESTPLATE, BODY -> AntarchySettings.royalAssailantChestplateDoubleDamageChance();
case LEGGINGS -> AntarchySettings.royalAssailantLeggingsDoubleDamageChance();
case BOOTS -> AntarchySettings.royalAssailantBootsDoubleDamageChance();
};
}
@Override
public ItemAttributeModifiers getDefaultAttributeModifiers() {
String prefix = "royal_assailant_" + this.armorType.getName();
EquipmentSlotGroup slot = EquipmentSlotGroup.bySlot(this.armorType.getSlot());
ItemAttributeModifiers.Builder builder = ItemAttributeModifiers.builder()
.add(Attributes.ARMOR,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_armor"), getDefense(), AttributeModifier.Operation.ADD_VALUE),
slot)
.add(Attributes.ARMOR_TOUGHNESS,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_armor_toughness"), getToughness(), AttributeModifier.Operation.ADD_VALUE),
slot);
float knockbackResistance = (float) AntarchySettings.royalAssailantArmorKnockbackResistance();
if (knockbackResistance > 0.0F) {
builder.add(Attributes.KNOCKBACK_RESISTANCE,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_knockback_resistance"), knockbackResistance, AttributeModifier.Operation.ADD_VALUE),
slot);
}
double doubleDamageChance = getDoubleDamageChance();
if (doubleDamageChance > 0.0) {
builder.add(AntarchyObjects.DOUBLE_DAMAGE_CHANCE.get(),
new AttributeModifier(ResourceLocation.fromNamespaceAndPath("antarchy", prefix + "_double_damage_chance"), doubleDamageChance, AttributeModifier.Operation.ADD_VALUE),
slot);
}
return builder.build();
}
@Override
public boolean isEnchantable(ItemStack stack) {
return stack.getCount() == 1;
}
@Override
public int getEnchantmentValue() {
return AntarchySettings.royalArmorEnchantability();
}
@Override
public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) {
super.inventoryTick(stack, level, entity, slotId, isSelected);
RoyalGearHelper.ensureRoyalArmorEnchantments(stack, level.registryAccess());
if (level.isClientSide || this.armorType != Type.CHESTPLATE || !(entity instanceof LivingEntity living)) {
return;
}
if (!isWearingChestplate(living)) {
clearToggledInversion(living);
}
}
@Override
public void onCraftedBy(ItemStack stack, Level level, Player player) {
super.onCraftedBy(stack, level, player);
RoyalGearHelper.ensureRoyalArmorEnchantments(stack, level.registryAccess());
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
int pct = (int) Math.round(getDoubleDamageChance() * 100);
tooltipComponents.add(Component.translatable("tooltip.antarchy.nightmare_armor_double_damage", pct).withStyle(ChatFormatting.LIGHT_PURPLE));
if (this.armorType == Type.CHESTPLATE) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.royal_assailant_chestplate.invert").withStyle(ChatFormatting.AQUA));
}
if (this.armorType == Type.BOOTS) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.royal_assailant_boots.fall").withStyle(ChatFormatting.AQUA));
}
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
public static boolean isWearingChestplate(LivingEntity entity) {
return entity.getItemBySlot(EquipmentSlot.CHEST).getItem() instanceof RoyalAssailantArmorItem armor
&& armor.armorType == Type.CHESTPLATE;
}
public static void toggleInversion(ServerPlayer player) {
if (!isWearingChestplate(player)) {
return;
}
MobEffectInstance existing = player.getEffect(AntarchyObjects.INVERTED_EFFECT.get());
if (existing != null && existing.isInfiniteDuration()) {
player.removeEffect(AntarchyObjects.INVERTED_EFFECT.get());
} else {
player.addEffect(new MobEffectInstance(AntarchyObjects.INVERTED_EFFECT.get(), -1, 0, false, false, true));
}
}
private static void clearToggledInversion(LivingEntity entity) {
MobEffectInstance existing = entity.getEffect(AntarchyObjects.INVERTED_EFFECT.get());
if (existing != null && existing.isInfiniteDuration()) {
entity.removeEffect(AntarchyObjects.INVERTED_EFFECT.get());
}
}
}
@@ -0,0 +1,49 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.item.AxeItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Tier;
import net.minecraft.world.item.component.ItemAttributeModifiers;
public class RoyalAssailantBattleAxeItem extends AxeItem {
private static final ResourceLocation REACH_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "royal_assailant_battleaxe_reach");
private static final ResourceLocation KNOCKBACK_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "royal_assailant_battleaxe_knockback");
private final Tier tier;
public RoyalAssailantBattleAxeItem(Tier tier, Item.Properties properties) {
super(tier, properties);
this.tier = tier;
}
@Override
public ItemAttributeModifiers getDefaultAttributeModifiers() {
return AxeItem.createAttributes(
this.tier,
(float) AntarchySettings.royalAssailantBattleAxeAttackDamage(),
(float) AntarchySettings.royalAssailantBattleAxeAttackSpeed())
.withModifierAdded(
Attributes.ENTITY_INTERACTION_RANGE,
new AttributeModifier(REACH_MODIFIER_ID, AntarchySettings.royalWeaponAttackReachBonus(), AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.withModifierAdded(
Attributes.ATTACK_KNOCKBACK,
new AttributeModifier(KNOCKBACK_MODIFIER_ID, AntarchySettings.royalWeaponAttackKnockbackBonus() + 1.0D, AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND);
}
@Override
public boolean isEnchantable(ItemStack stack) {
return stack.getCount() == 1;
}
@Override
public int getEnchantmentValue() {
return AntarchySettings.royalWeaponEnchantability();
}
}
@@ -0,0 +1,87 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.item.royal.RoyalGearHelper;
import net.minecraft.core.Holder;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.ItemAttributeModifiers;
import net.minecraft.world.level.Level;
public class RoyalGuardianArmorItem extends ArmorItem {
private final Type armorType;
public RoyalGuardianArmorItem(Holder<ArmorMaterial> material, Type type, Properties properties) {
super(material, type, properties.stacksTo(1).durability(type.getDurability(AntarchySettings.royalArmorDurabilityMultiplier())));
this.armorType = type;
}
public Type getArmorType() {
return this.armorType;
}
@Override
public int getDefense() {
return switch (this.armorType) {
case HELMET -> AntarchySettings.royalGuardianHelmetArmorValue();
case CHESTPLATE, BODY -> AntarchySettings.royalGuardianChestplateArmorValue();
case LEGGINGS -> AntarchySettings.royalGuardianLeggingsArmorValue();
case BOOTS -> AntarchySettings.royalGuardianBootsArmorValue();
};
}
@Override
public float getToughness() {
return (float) AntarchySettings.royalGuardianArmorToughness();
}
@Override
public ItemAttributeModifiers getDefaultAttributeModifiers() {
String prefix = "royal_guardian_" + this.armorType.getName();
EquipmentSlotGroup slot = EquipmentSlotGroup.bySlot(this.armorType.getSlot());
ItemAttributeModifiers.Builder builder = ItemAttributeModifiers.builder()
.add(Attributes.ARMOR,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_armor"), getDefense(), AttributeModifier.Operation.ADD_VALUE),
slot)
.add(Attributes.ARMOR_TOUGHNESS,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_armor_toughness"), getToughness(), AttributeModifier.Operation.ADD_VALUE),
slot);
float knockbackResistance = (float) AntarchySettings.royalGuardianArmorKnockbackResistance();
if (knockbackResistance > 0.0F) {
builder.add(Attributes.KNOCKBACK_RESISTANCE,
new AttributeModifier(ResourceLocation.withDefaultNamespace(prefix + "_knockback_resistance"), knockbackResistance, AttributeModifier.Operation.ADD_VALUE),
slot);
}
return builder.build();
}
@Override
public boolean isEnchantable(ItemStack stack) {
return stack.getCount() == 1;
}
@Override
public int getEnchantmentValue() {
return AntarchySettings.royalArmorEnchantability();
}
@Override
public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) {
super.inventoryTick(stack, level, entity, slotId, isSelected);
RoyalGearHelper.ensureRoyalArmorEnchantments(stack, level.registryAccess());
}
@Override
public void onCraftedBy(ItemStack stack, Level level, Player player) {
super.onCraftedBy(stack, level, player);
RoyalGearHelper.ensureRoyalArmorEnchantments(stack, level.registryAccess());
}
}
@@ -0,0 +1,37 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import java.util.List;
import java.util.function.Supplier;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.ShieldItem;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.crafting.Ingredient;
public class RoyalGuardianShieldItem extends ShieldItem {
private final Supplier<Ingredient> repairIngredient;
public RoyalGuardianShieldItem(Item.Properties properties, Supplier<Ingredient> repairIngredient) {
super(properties);
this.repairIngredient = repairIngredient;
}
@Override
public boolean isValidRepairItem(ItemStack stack, ItemStack repairCandidate) {
return this.repairIngredient.get().test(repairCandidate) || super.isValidRepairItem(stack, repairCandidate);
}
@Override
public int getEnchantmentValue() {
return AntarchySettings.royalWeaponEnchantability();
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.royal_guardian_shield").withStyle(ChatFormatting.GOLD));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
}
@@ -0,0 +1,49 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
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.component.ItemAttributeModifiers;
public class RoyalGuardianSwordItem extends SwordItem {
private static final ResourceLocation REACH_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "royal_guardian_sword_reach");
private static final ResourceLocation KNOCKBACK_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "royal_guardian_sword_knockback");
private final Tier tier;
public RoyalGuardianSwordItem(Tier tier, Item.Properties properties) {
super(tier, properties);
this.tier = tier;
}
@Override
public ItemAttributeModifiers getDefaultAttributeModifiers() {
return SwordItem.createAttributes(
this.tier,
(int) Math.round(AntarchySettings.royalGuardianSwordAttackDamage()),
(float) AntarchySettings.royalGuardianSwordAttackSpeed())
.withModifierAdded(
Attributes.ENTITY_INTERACTION_RANGE,
new AttributeModifier(REACH_MODIFIER_ID, AntarchySettings.royalWeaponAttackReachBonus(), AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.withModifierAdded(
Attributes.ATTACK_KNOCKBACK,
new AttributeModifier(KNOCKBACK_MODIFIER_ID, AntarchySettings.royalWeaponAttackKnockbackBonus(), AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND);
}
@Override
public boolean isEnchantable(ItemStack stack) {
return stack.getCount() == 1;
}
@Override
public int getEnchantmentValue() {
return AntarchySettings.royalWeaponEnchantability();
}
}
@@ -0,0 +1,51 @@
package com.craisinlord.antarchy.content.item.royal;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.item.RoyalAssailantArmorItem;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.item.enchantment.ItemEnchantments;
public final class RoyalGearHelper {
private RoyalGearHelper() {
}
public static ItemStack createRoyalArmorStack(net.minecraft.world.item.Item item, HolderLookup.Provider registries) {
ItemStack stack = new ItemStack(item);
ensureRoyalArmorEnchantments(stack, registries);
return stack;
}
public static void ensureRoyalArmorEnchantments(ItemStack stack, HolderLookup.Provider registries) {
if (!AntarchySettings.royalArmorComesEnchanted()) {
return;
}
int level = AntarchySettings.royalArmorProtectionLevel();
ItemEnchantments.Mutable enchantments = new ItemEnchantments.Mutable(stack.getEnchantments());
setLevel(enchantments, registries, Enchantments.PROTECTION, level);
setLevel(enchantments, registries, Enchantments.FIRE_PROTECTION, level);
setLevel(enchantments, registries, Enchantments.PROJECTILE_PROTECTION, level);
setLevel(enchantments, registries, Enchantments.BLAST_PROTECTION, level);
EnchantmentHelper.setEnchantments(stack, enchantments.toImmutable().withTooltip(true));
}
private static void setLevel(ItemEnchantments.Mutable enchantments, HolderLookup.Provider registries,
ResourceKey<Enchantment> key, int level) {
var enchantment = registries.lookupOrThrow(Registries.ENCHANTMENT).getOrThrow(key);
if (enchantments.getLevel(enchantment) < level) {
enchantments.set(enchantment, level);
}
}
public static boolean hasUpwardFallImmunityBoots(LivingEntity entity) {
return entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof RoyalAssailantArmorItem armor
&& armor.getArmorType() == net.minecraft.world.item.ArmorItem.Type.BOOTS;
}
}
@@ -0,0 +1,17 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record EyeOfStormPrimaryPayload() implements CustomPacketPayload {
public static final Type<EyeOfStormPrimaryPayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "eye_of_storm_primary"));
public static final StreamCodec<ByteBuf, EyeOfStormPrimaryPayload> STREAM_CODEC = StreamCodec.unit(new EyeOfStormPrimaryPayload());
@Override
public Type<EyeOfStormPrimaryPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,26 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record RoyalMountActionPayload(int action) implements CustomPacketPayload {
public static final int FLIGHT_TOGGLE = 0;
public static final int BITE = 1;
public static final int SPIT = 2;
public static final Type<RoyalMountActionPayload> TYPE =
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "royal_mount_action"));
public static final StreamCodec<ByteBuf, RoyalMountActionPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.VAR_INT, RoyalMountActionPayload::action,
RoyalMountActionPayload::new
);
@Override
public Type<RoyalMountActionPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,23 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record RoyalMountVerticalPayload(boolean ascend, boolean descend) implements CustomPacketPayload {
public static final Type<RoyalMountVerticalPayload> TYPE =
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "royal_mount_vertical"));
public static final StreamCodec<ByteBuf, RoyalMountVerticalPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.BOOL, RoyalMountVerticalPayload::ascend,
ByteBufCodecs.BOOL, RoyalMountVerticalPayload::descend,
RoyalMountVerticalPayload::new
);
@Override
public Type<RoyalMountVerticalPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,18 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record ToggleRoyalInversionPayload() implements CustomPacketPayload {
public static final Type<ToggleRoyalInversionPayload> TYPE =
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "toggle_royal_inversion"));
public static final StreamCodec<ByteBuf, ToggleRoyalInversionPayload> STREAM_CODEC = StreamCodec.unit(new ToggleRoyalInversionPayload());
@Override
public Type<ToggleRoyalInversionPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,29 @@
package com.craisinlord.antarchy.content.worldgen.royal;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
public record RoyalTreeConfiguration(
BlockStateProvider trunkProvider,
BlockStateProvider leavesProvider,
IntProvider height,
IntProvider trunkDrift,
IntProvider canopyRadius,
IntProvider canopyLayers,
IntProvider branchCount,
IntProvider strutCount
) implements FeatureConfiguration {
public static final Codec<RoyalTreeConfiguration> CODEC = RecordCodecBuilder.create(instance -> instance.group(
BlockStateProvider.CODEC.fieldOf("trunk_provider").forGetter(RoyalTreeConfiguration::trunkProvider),
BlockStateProvider.CODEC.fieldOf("leaves_provider").forGetter(RoyalTreeConfiguration::leavesProvider),
IntProvider.codec(6, 48).fieldOf("height").forGetter(RoyalTreeConfiguration::height),
IntProvider.codec(0, 12).fieldOf("trunk_drift").forGetter(RoyalTreeConfiguration::trunkDrift),
IntProvider.codec(2, 14).fieldOf("canopy_radius").forGetter(RoyalTreeConfiguration::canopyRadius),
IntProvider.codec(1, 8).fieldOf("canopy_layers").forGetter(RoyalTreeConfiguration::canopyLayers),
IntProvider.codec(0, 8).fieldOf("branch_count").forGetter(RoyalTreeConfiguration::branchCount),
IntProvider.codec(0, 4).fieldOf("strut_count").forGetter(RoyalTreeConfiguration::strutCount)
).apply(instance, RoyalTreeConfiguration::new));
}
@@ -0,0 +1,266 @@
package com.craisinlord.antarchy.content.worldgen.royal;
import com.craisinlord.antarchy.content.block.RoyalLeavesBlock;
import com.mojang.serialization.Codec;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
public class RoyalTreeFeature extends Feature<RoyalTreeConfiguration> {
public RoyalTreeFeature(Codec<RoyalTreeConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<RoyalTreeConfiguration> context) {
WorldGenLevel level = context.level();
BlockPos origin = context.origin();
RandomSource random = context.random();
RoyalTreeConfiguration config = context.config();
for (int dx = 0; dx <= 1; dx++) {
for (int dz = 0; dz <= 1; dz++) {
BlockPos ground = origin.offset(dx, -1, dz);
if (!level.getBlockState(ground).isFaceSturdy(level, ground, Direction.UP)) {
return false;
}
if (!canReplace(level, origin.offset(dx, 0, dz))) {
return false;
}
}
}
Set<BlockPos> logs = new HashSet<>();
Set<BlockPos> leaves = new HashSet<>();
int height = config.height().sample(random);
int drift = config.trunkDrift().sample(random);
int backBend = Math.round(drift * 0.45F);
Direction driftDir = Direction.Plane.HORIZONTAL.getRandomDirection(random);
int splitLen = 2 + random.nextInt(3);
int splitStartY = Math.max(2, height - splitLen);
int[] topOffset = curveOffset(splitStartY, height, drift, backBend, driftDir);
for (int y = 0; y < splitStartY; y++) {
int[] off = curveOffset(y, height, drift, backBend, driftDir);
for (int dx = 0; dx <= 1; dx++) {
for (int dz = 0; dz <= 1; dz++) {
placeLog(level, random, config, origin.offset(off[0] + dx, y, off[1] + dz), logs);
}
}
}
placeButtress(level, random, config, origin, logs);
int struts = Mth.clamp(config.strutCount().sample(random), 0, 4);
int[][] corners = {{0, 0}, {1, 0}, {0, 1}, {1, 1}};
List<int[]> pool = new ArrayList<>(List.of(corners));
Collections.shuffle(pool, new Random(random.nextLong()));
for (int i = 0; i < struts && i < pool.size(); i++) {
int[] corner = pool.get(i);
int outX = corner[0] == 1 ? 1 : -1;
int outZ = corner[1] == 1 ? 1 : -1;
for (int y = splitStartY; y <= height; y++) {
int spread = Math.min((y - splitStartY + 1) / 2, 2);
int sx = topOffset[0] + corner[0] + outX * spread;
int sz = topOffset[1] + corner[1] + outZ * spread;
placeLog(level, random, config, origin.offset(sx, y, sz), logs);
}
}
int radius = config.canopyRadius().sample(random);
int layers = config.canopyLayers().sample(random);
BlockPos canopyCenter = origin.offset(topOffset[0], height, topOffset[1]);
placeCanopy(level, random, config, canopyCenter, radius, layers, 2, 2, leaves);
int branches = Mth.clamp(config.branchCount().sample(random), 0, 8);
int branchSpan = Math.max(1, height - 6);
for (int b = 0; b < branches; b++) {
int startY = 3 + random.nextInt(branchSpan);
int[] branchOff = curveOffset(startY, height, drift, backBend, driftDir);
Direction branchDir = Direction.Plane.HORIZONTAL.getRandomDirection(random);
int branchLen = 2 + random.nextInt(5);
int bx = branchOff[0] + (branchDir.getStepX() > 0 ? 1 : 0);
int bz = branchOff[1] + (branchDir.getStepZ() > 0 ? 1 : 0);
BlockPos cursor = origin.offset(bx, startY, bz);
for (int s = 1; s <= branchLen; s++) {
cursor = cursor.relative(branchDir);
if (s % 2 == 0) {
cursor = cursor.above();
}
placeLog(level, random, config, cursor, logs);
}
int padRadius = 2 + random.nextInt(3);
placeCanopy(level, random, config, cursor.above(), padRadius, Math.max(2, padRadius - 1), 1, 0, leaves);
}
refreshLeafDistances(level, leaves, logs);
return true;
}
private void placeButtress(WorldGenLevel level, RandomSource random, RoyalTreeConfiguration config, BlockPos origin, Set<BlockPos> logs) {
int legs = 2 + random.nextInt(3);
List<Direction> dirs = new ArrayList<>(Direction.Plane.HORIZONTAL.stream().toList());
Collections.shuffle(dirs, new Random(random.nextLong()));
for (int i = 0; i < legs && i < dirs.size(); i++) {
Direction dir = dirs.get(i);
int len = 2 + random.nextInt(3);
int startX = dir.getStepX() > 0 ? 1 : 0;
int startZ = dir.getStepZ() > 0 ? 1 : 0;
BlockPos cursor = origin.offset(startX, 0, startZ);
for (int s = 1; s <= len; s++) {
cursor = cursor.relative(dir);
int downY = -(s / 2);
BlockPos upper = cursor.offset(0, downY, 0);
BlockPos lower = cursor.offset(0, downY - 1, 0);
setBlock(level, upper, config.trunkProvider().getState(random, upper));
setBlock(level, lower, config.trunkProvider().getState(random, lower));
logs.add(upper.immutable());
logs.add(lower.immutable());
}
}
}
private void placeCanopy(
WorldGenLevel level,
RandomSource random,
RoyalTreeConfiguration config,
BlockPos center,
int radius,
int layers,
int shell,
int bottomRecess,
Set<BlockPos> leaves
) {
float rf = Math.max(1.0F, radius);
for (int dx = -radius - 1; dx <= radius + 1; dx++) {
for (int dz = -radius - 1; dz <= radius + 1; dz++) {
float d = Mth.sqrt(dx * dx + dz * dz);
float norm = d / rf;
if (norm > 1.05F) {
continue;
}
int rimCut = 0;
if (norm > 0.7F && random.nextFloat() < 0.38F) {
rimCut = 1;
}
if (d - rimCut > rf) {
continue;
}
int topY = Math.round(layers * Mth.sqrt(Math.max(0.0F, 1.0F - norm * norm)));
if (topY < 1) {
topY = 1;
}
int bottomY = Math.round(bottomRecess * (1.0F - Math.min(1.0F, norm)));
if (bottomY > topY) {
continue;
}
for (int y = bottomY; y <= topY; y++) {
boolean interior = topY - y >= shell && y - bottomY >= shell && rf - d >= shell;
if (interior) {
continue;
}
placeLeaf(level, random, config, center.offset(dx, y, dz), leaves);
}
}
}
}
private void placeLog(WorldGenLevel level, RandomSource random, RoyalTreeConfiguration config, BlockPos pos, Set<BlockPos> logs) {
if (!canReplace(level, pos)) {
return;
}
setBlock(level, pos, config.trunkProvider().getState(random, pos));
logs.add(pos.immutable());
}
private void placeLeaf(WorldGenLevel level, RandomSource random, RoyalTreeConfiguration config, BlockPos pos, Set<BlockPos> leaves) {
BlockState existing = level.getBlockState(pos);
if (!existing.isAir() && !existing.canBeReplaced() && !(existing.getBlock() instanceof LeavesBlock)) {
return;
}
setBlock(level, pos, config.leavesProvider().getState(random, pos));
leaves.add(pos.immutable());
}
private void refreshLeafDistances(WorldGenLevel level, Set<BlockPos> leafPositions, Set<BlockPos> logPositions) {
ArrayDeque<BlockPos> queue = new ArrayDeque<>(logPositions);
Map<BlockPos, Integer> distances = new HashMap<>();
for (BlockPos logPos : logPositions) {
distances.put(logPos, 0);
}
while (!queue.isEmpty()) {
BlockPos current = queue.removeFirst();
int currentDistance = distances.getOrDefault(current, 0);
if (currentDistance >= RoyalLeavesBlock.ROYAL_MAX_DISTANCE) {
continue;
}
for (Direction direction : Direction.values()) {
BlockPos next = current.relative(direction);
if (distances.containsKey(next)) {
continue;
}
if (!(level.getBlockState(next).getBlock() instanceof LeavesBlock)) {
continue;
}
distances.put(next, currentDistance + 1);
queue.addLast(next);
}
}
for (BlockPos pos : leafPositions) {
BlockState state = level.getBlockState(pos);
if (!(state.getBlock() instanceof RoyalLeavesBlock)) {
continue;
}
int distance = Math.min(
RoyalLeavesBlock.ROYAL_DECAY_DISTANCE,
distances.getOrDefault(pos, RoyalLeavesBlock.ROYAL_DECAY_DISTANCE)
);
if (state.getValue(RoyalLeavesBlock.ROYAL_DISTANCE) != distance) {
setBlock(level, pos, RoyalLeavesBlock.setRoyalDistanceForWorldgen(state, distance));
}
}
}
private static boolean canReplace(WorldGenLevel level, BlockPos pos) {
BlockState state = level.getBlockState(pos);
return state.isAir() || state.canBeReplaced() || state.getBlock() instanceof LeavesBlock;
}
private static int[] curveOffset(int y, int height, int drift, int backBend, Direction dir) {
float f = height <= 1 ? 0.0F : (float) y / (height - 1);
float outPhase = smoothstep(0.0F, 0.6F, f);
float backPhase = smoothstep(0.55F, 1.0F, f);
int step = Math.round(drift * outPhase - backBend * backPhase);
return new int[]{dir.getStepX() * step, dir.getStepZ() * step};
}
private static float smoothstep(float edge0, float edge1, float x) {
float t = Mth.clamp((x - edge0) / (edge1 - edge0), 0.0F, 1.0F);
return t * t * (3.0F - 2.0F * t);
}
}
@@ -0,0 +1,20 @@
package com.craisinlord.antarchy.content.worldgen.royal;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
public final class RoyalTreeGrowers {
public static final ResourceKey<ConfiguredFeature<?, ?>> ROYAL_TREE_SMALL = featureKey("royal_tree_small");
public static final ResourceKey<ConfiguredFeature<?, ?>> ROYAL_TREE_MEDIUM = featureKey("royal_tree_medium");
public static final ResourceKey<ConfiguredFeature<?, ?>> ROYAL_TREE_LARGE = featureKey("royal_tree_large");
private RoyalTreeGrowers() {
}
private static ResourceKey<ConfiguredFeature<?, ?>> featureKey(String path) {
return ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path));
}
}
@@ -51,17 +51,19 @@ public class TruffaloTreeFeature extends Feature<TruffaloTreeConfiguration> {
for (int i = 0; i < height; i++) {
trunk[i] = origin.above(i);
}
BlockPos capCenter = trunk[height - 1].above();
BlockPos capBase = trunk[height - 1].above();
for (BlockPos pos : trunk) {
if (!canReplace(level, pos)) {
return false;
}
}
for (int dx = -1; dx <= 1; dx++) {
for (int dz = -1; dz <= 1; dz++) {
if (!canReplace(level, capCenter.offset(dx, 0, dz))) {
return false;
for (int dy = 0; dy <= 2; dy++) {
for (int dx = -1; dx <= 1; dx++) {
for (int dz = -1; dz <= 1; dz++) {
if (!canReplace(level, capBase.offset(dx, dy, dz))) {
return false;
}
}
}
}
@@ -72,9 +74,11 @@ public class TruffaloTreeFeature extends Feature<TruffaloTreeConfiguration> {
Block tuft = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, color.getName() + "_truffalo_tuft"));
BlockState tuftState = tuft.defaultBlockState();
for (int dx = -1; dx <= 1; dx++) {
for (int dz = -1; dz <= 1; dz++) {
setBlock(level, capCenter.offset(dx, 0, dz), tuftState);
for (int dy = 0; dy <= 2; dy++) {
for (int dx = -1; dx <= 1; dx++) {
for (int dz = -1; dz <= 1; dz++) {
setBlock(level, capBase.offset(dx, dy, dz), tuftState);
}
}
}
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.mixins.gravity;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.item.EyeOfTheStormItem;
import com.craisinlord.antarchy.content.item.GravityGunItem;
import com.craisinlord.antarchy.content.item.PrimordialArmorItem;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
@@ -22,13 +23,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class PlayerAttackMixin {
@Inject(method = "attack", at = @At("HEAD"), cancellable = true)
private void antarchy$blockGravityGunMelee(Entity target, CallbackInfo ci) {
if (!AntarchySettings.gravityGunEnabled()) {
return;
}
Player player = (Player) (Object) this;
ItemStack mainHand = player.getMainHandItem();
if (mainHand.getItem() instanceof GravityGunItem) {
if (AntarchySettings.gravityGunEnabled() && mainHand.getItem() instanceof GravityGunItem) {
ci.cancel();
return;
}
if (AntarchySettings.eyeOfTheStormEnabled() && mainHand.getItem() instanceof EyeOfTheStormItem) {
ci.cancel();
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,13 @@
{
"variants": {
"hatch=0": {
"model": "antarchy:block/prince_egg"
},
"hatch=1": {
"model": "antarchy:block/prince_egg"
},
"hatch=2": {
"model": "antarchy:block/prince_egg"
}
}
}
@@ -0,0 +1,13 @@
{
"variants": {
"hatch=0": {
"model": "antarchy:block/princess_egg"
},
"hatch=1": {
"model": "antarchy:block/princess_egg"
},
"hatch=2": {
"model": "antarchy:block/princess_egg"
}
}
}
@@ -0,0 +1,313 @@
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 128,
"texture_height": 128,
"visible_bounds_width": 8,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
"name": "prince",
"pivot": [0, 8.16667, 7.33333]
},
{
"name": "body",
"parent": "prince",
"pivot": [0, 8.16667, 7.33333]
},
{
"name": "right_leg",
"parent": "body",
"pivot": [-6.25, 10.75, 8.5],
"cubes": [
{"origin": [-9, 4, 5], "size": [5, 9, 8], "inflate": 0.1, "uv": [0, 68]}
]
},
{
"name": "right_foot",
"parent": "right_leg",
"pivot": [-6, 4.91667, 10.58333],
"cubes": [
{"origin": [-8, 0, 8], "size": [4, 5, 5], "uv": [90, 90]},
{"origin": [-8, 0, 6], "size": [4, 2, 2], "uv": [56, 25]},
{"origin": [-8, 2, 8], "size": [4, 2, 5], "inflate": 0.05, "uv": [74, 42]}
]
},
{
"name": "left_leg",
"parent": "body",
"pivot": [6.25, 10.75, 8.5],
"cubes": [
{"origin": [4, 4, 5], "size": [5, 9, 8], "inflate": 0.1, "uv": [74, 25]}
]
},
{
"name": "left_foot",
"parent": "left_leg",
"pivot": [6, 4.91667, 10.58333],
"cubes": [
{"origin": [4, 0, 8], "size": [4, 5, 5], "uv": [92, 63]},
{"origin": [4, 0, 6], "size": [4, 2, 2], "uv": [94, 16]},
{"origin": [4, 2, 8], "size": [4, 2, 5], "inflate": 0.05, "uv": [88, 9]}
]
},
{
"name": "torso",
"parent": "body",
"pivot": [0, 3, 5],
"cubes": [
{"origin": [-6, 3, -3], "size": [12, 14, 16], "uv": [0, 0]},
{"origin": [-1, 17, 2], "size": [2, 5, 4], "uv": [0, 0]}
]
},
{
"name": "tail",
"parent": "torso",
"pivot": [0, 12.75, 13],
"cubes": [
{"origin": [-4, 6.75, 11], "size": [8, 10, 12], "uv": [0, 30]}
]
},
{
"name": "tail2",
"parent": "tail",
"pivot": [0, 13, 23],
"cubes": [
{"origin": [-3, 8.5, 22], "size": [6, 8, 11], "uv": [40, 30]}
]
},
{
"name": "tail3",
"parent": "tail2",
"pivot": [0, 13.25, 32],
"cubes": [
{"origin": [-2, 10.25, 32], "size": [4, 6, 11], "uv": [32, 65]},
{"origin": [-6, 12.25, 41], "size": [12, 2, 7], "uv": [56, 16]},
{"origin": [-1.5, 12.25, 48], "size": [3, 2, 4], "uv": [92, 42]}
]
},
{
"name": "neck",
"parent": "torso",
"pivot": [0, 13.5, -1.16667],
"cubes": [
{"origin": [-3.5, 9, -8], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65]}
]
},
{
"name": "neck2",
"parent": "neck",
"pivot": [0, 13.75, -6],
"cubes": [
{"origin": [-3, 10.5, -14], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49]}
]
},
{
"name": "neck3",
"parent": "neck2",
"pivot": [0, 14, -12],
"cubes": [
{"origin": [-2.5, 11.5, -20], "size": [5, 5, 8], "uv": [26, 82]}
]
},
{
"name": "head",
"parent": "neck3",
"pivot": [0, 14, -20],
"cubes": [
{"origin": [-3.5, 11.5, -27], "size": [7, 5, 7], "uv": [82, 112]},
{"origin": [-4.5, 12.5, -22], "size": [2, 2, 4], "pivot": [-7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [92, 73]},
{"origin": [-6.5, 12.5, -20], "size": [2, 2, 4], "pivot": [-7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [52, 93]},
{"origin": [2.5, 12.5, -22], "size": [2, 2, 4], "pivot": [7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [64, 93]},
{"origin": [4.5, 12.5, -20], "size": [2, 2, 4], "pivot": [7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [76, 93]},
{"origin": [-2.5, 11.5, -34], "size": [5, 5, 7], "uv": [0, 85]},
{"origin": [-2.5, 10.25, -34], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97]},
{"origin": [-0.5, 16.5, -32], "size": [1, 2, 2], "uv": [32, 59]}
]
},
{
"name": "jaw",
"parent": "head",
"pivot": [0, 11.5, -20],
"cubes": [
{"origin": [-3.5, 9.5, -27], "size": [7, 2, 7], "uv": [88, 0]},
{"origin": [-3.5, 11.5, -24], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52]},
{"origin": [3.5, 11.5, -24], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82]},
{"origin": [-2.5, 9.5, -34], "size": [5, 2, 7], "uv": [90, 81]}
]
},
{
"name": "neck_right",
"parent": "torso",
"pivot": [-3.87868, 13.25, 0.95465],
"rotation": [0, 45, 0],
"cubes": [
{"origin": [-7.37868, 8.75, -5.87868], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65]}
]
},
{
"name": "neck_right2",
"parent": "neck_right",
"pivot": [-3.87868, 13.5, -3.87868],
"cubes": [
{"origin": [-6.87868, 10.25, -11.87868], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49]}
]
},
{
"name": "neck_right3",
"parent": "neck_right2",
"pivot": [-3.87868, 13.75, -9.87868],
"cubes": [
{"origin": [-6.37868, 11.25, -17.87868], "size": [5, 5, 8], "uv": [26, 82]}
]
},
{
"name": "head_right",
"parent": "neck_right3",
"pivot": [-3.87868, 13.75, -17.87868],
"cubes": [
{"origin": [-7.37868, 11.25, -24.87868], "size": [7, 5, 7], "uv": [82, 100]},
{"origin": [-8.37868, 12.25, -19.87868], "size": [2, 2, 4], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 73]},
{"origin": [-8.37868, 8.25, -21.87868], "size": [2, 2, 4], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 51]},
{"origin": [-8.37868, 8.25, -17.87868], "size": [2, 4, 2], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [51, 70]},
{"origin": [-1.62132, 12.25, -19.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 73], "mirror": true},
{"origin": [-1.62132, 8.25, -17.87868], "size": [2, 4, 2], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [51, 70], "mirror": true},
{"origin": [-1.62132, 8.25, -21.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 51], "mirror": true},
{"origin": [-6.37868, 11.25, -31.87868], "size": [5, 5, 7], "uv": [0, 85]},
{"origin": [-6.37868, 10, -31.87868], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97]},
{"origin": [-4.37868, 16.25, -29.87868], "size": [1, 2, 2], "uv": [32, 59]}
]
},
{
"name": "jaw_right",
"parent": "head_right",
"pivot": [-3.87868, 11.25, -17.87868],
"cubes": [
{"origin": [-7.37868, 9.25, -24.87868], "size": [7, 2, 7], "uv": [88, 0]},
{"origin": [-7.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52]},
{"origin": [-0.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82]},
{"origin": [-6.37868, 9.25, -31.87868], "size": [5, 2, 7], "uv": [90, 81]}
]
},
{
"name": "neck_left",
"parent": "torso",
"pivot": [3.87868, 13.25, 0.95465],
"rotation": [0, -45, 0],
"cubes": [
{"origin": [0.37868, 8.75, -5.87868], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65], "mirror": true}
]
},
{
"name": "neck_left2",
"parent": "neck_left",
"pivot": [3.87868, 13.5, -3.87868],
"cubes": [
{"origin": [0.87868, 10.25, -11.87868], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49], "mirror": true}
]
},
{
"name": "neck_left3",
"parent": "neck_left2",
"pivot": [3.87868, 13.75, -9.87868],
"cubes": [
{"origin": [1.37868, 11.25, -17.87868], "size": [5, 5, 8], "uv": [26, 82], "mirror": true}
]
},
{
"name": "head_left",
"parent": "neck_left3",
"pivot": [3.87868, 13.75, -17.87868],
"cubes": [
{"origin": [0.37868, 11.25, -24.87868], "size": [7, 5, 7], "uv": [62, 81], "mirror": true},
{"origin": [6.37868, 12.25, -17.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -19.37868], "rotation": [135, 0, 0], "uv": [92, 73], "mirror": true},
{"origin": [-0.62132, 12.25, -17.87868], "size": [2, 2, 4], "pivot": [-3.12132, 13.75, -19.37868], "rotation": [135, 0, 0], "uv": [64, 93], "mirror": true},
{"origin": [1.37868, 11.25, -31.87868], "size": [5, 5, 7], "uv": [0, 85], "mirror": true},
{"origin": [1.37868, 10, -31.87868], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97], "mirror": true},
{"origin": [3.37868, 16.25, -29.87868], "size": [1, 2, 2], "uv": [32, 59], "mirror": true}
]
},
{
"name": "jaw_left",
"parent": "head_left",
"pivot": [3.87868, 11.25, -17.87868],
"cubes": [
{"origin": [0.37868, 9.25, -24.87868], "size": [7, 2, 7], "uv": [88, 0], "mirror": true},
{"origin": [7.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52], "mirror": true},
{"origin": [0.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82], "mirror": true},
{"origin": [1.37868, 9.25, -31.87868], "size": [5, 2, 7], "uv": [90, 81], "mirror": true}
]
},
{
"name": "right_upper_wing",
"parent": "torso",
"pivot": [-6, 17, -3],
"cubes": [
{"origin": [-18, 17, -3], "size": [12, 0, 16], "uv": [8, 95]}
]
},
{
"name": "right_upper_wing2",
"parent": "right_upper_wing",
"pivot": [-18, 17, -3],
"cubes": [
{"origin": [-35, 17, -3], "size": [17, 0, 16], "uv": [32, 99]}
]
},
{
"name": "right_lower_wing2",
"parent": "torso",
"pivot": [-6, 13, -3],
"cubes": [
{"origin": [-18, 13, -3], "size": [12, 0, 16], "uv": [8, 95]}
]
},
{
"name": "right_lower_wing3",
"parent": "right_lower_wing2",
"pivot": [-18, 13, -3],
"cubes": [
{"origin": [-35, 13, -3], "size": [17, 0, 16], "uv": [32, 99]}
]
},
{
"name": "left_lower_wing2",
"parent": "torso",
"pivot": [6, 13, -3],
"cubes": [
{"origin": [6, 13, -3], "size": [12, 0, 16], "uv": [8, 95], "mirror": true}
]
},
{
"name": "left_lower_wing3",
"parent": "left_lower_wing2",
"pivot": [18, 13, -3],
"cubes": [
{"origin": [18, 13, -3], "size": [17, 0, 16], "uv": [32, 99], "mirror": true}
]
},
{
"name": "left_upper_wing",
"parent": "torso",
"pivot": [6, 17, -3],
"cubes": [
{"origin": [6, 17, -3], "size": [12, 0, 16], "uv": [8, 95], "mirror": true}
]
},
{
"name": "left_upper_wing2",
"parent": "left_upper_wing",
"pivot": [18, 17, -3],
"cubes": [
{"origin": [18, 17, -3], "size": [17, 0, 16], "uv": [32, 99], "mirror": true}
]
}
]
}
]
}
@@ -0,0 +1,339 @@
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 128,
"texture_height": 128,
"visible_bounds_width": 8,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
"name": "princess",
"pivot": [0, 8.16667, 7.33333]
},
{
"name": "body",
"parent": "princess",
"pivot": [0, 8.16667, 7.33333]
},
{
"name": "right_leg",
"parent": "body",
"pivot": [-6.25, 10.75, 8.5],
"cubes": [
{"origin": [-9, 4, 5], "size": [5, 9, 8], "inflate": 0.1, "uv": [0, 68]}
]
},
{
"name": "right_foot",
"parent": "right_leg",
"pivot": [-6, 4.91667, 10.58333],
"cubes": [
{"origin": [-8, 0, 8], "size": [4, 5, 5], "uv": [90, 90]},
{"origin": [-8, 0, 6], "size": [4, 2, 2], "uv": [56, 25]},
{"origin": [-8, 2, 8], "size": [4, 2, 5], "inflate": 0.05, "uv": [74, 42]}
]
},
{
"name": "left_leg",
"parent": "body",
"pivot": [6.25, 10.75, 8.5],
"cubes": [
{"origin": [4, 4, 5], "size": [5, 9, 8], "inflate": 0.1, "uv": [74, 25]}
]
},
{
"name": "left_foot",
"parent": "left_leg",
"pivot": [6, 4.91667, 10.58333],
"cubes": [
{"origin": [4, 0, 8], "size": [4, 5, 5], "uv": [92, 63]},
{"origin": [4, 0, 6], "size": [4, 2, 2], "uv": [94, 16]},
{"origin": [4, 2, 8], "size": [4, 2, 5], "inflate": 0.05, "uv": [88, 9]}
]
},
{
"name": "torso",
"parent": "body",
"pivot": [0, 3, 5],
"cubes": [
{"origin": [-6, 3, -3], "size": [12, 14, 16], "uv": [0, 0]},
{"origin": [-1, 17, 2], "size": [2, 5, 4], "uv": [0, 0]}
]
},
{
"name": "tail",
"parent": "torso",
"pivot": [0, 12.75, 13],
"cubes": [
{"origin": [-4, 6.75, 11], "size": [8, 10, 12], "uv": [0, 30]}
]
},
{
"name": "tail2",
"parent": "tail",
"pivot": [0, 13, 23],
"cubes": [
{"origin": [-3, 8.5, 22], "size": [6, 8, 11], "uv": [40, 30]}
]
},
{
"name": "tail3",
"parent": "tail2",
"pivot": [0, 13.25, 32],
"cubes": [
{"origin": [-2, 10.25, 32], "size": [4, 6, 11], "uv": [32, 65]},
{"origin": [-6, 12.25, 41], "size": [12, 2, 7], "uv": [56, 16]},
{"origin": [-1.5, 12.25, 48], "size": [3, 2, 4], "uv": [92, 42]}
]
},
{
"name": "neck",
"parent": "torso",
"pivot": [0, 13.5, -1.16667],
"cubes": [
{"origin": [-3.5, 9, -8], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65]}
]
},
{
"name": "neck2",
"parent": "neck",
"pivot": [0, 13.75, -6],
"cubes": [
{"origin": [-3, 10.5, -14], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49]}
]
},
{
"name": "neck3",
"parent": "neck2",
"pivot": [0, 14, -12],
"cubes": [
{"origin": [-2.5, 11.5, -20], "size": [5, 5, 8], "uv": [26, 82]}
]
},
{
"name": "head",
"parent": "neck3",
"pivot": [0, 14, -20],
"cubes": [
{"origin": [-3.5, 11.5, -27], "size": [7, 5, 7], "uv": [62, 81]},
{"origin": [-4.5, 12.5, -22], "size": [2, 2, 4], "pivot": [-7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [92, 73]},
{"origin": [-6.5, 12.5, -20], "size": [2, 2, 4], "pivot": [-7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [52, 93]},
{"origin": [2.5, 12.5, -22], "size": [2, 2, 4], "pivot": [7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [64, 93]},
{"origin": [4.5, 12.5, -20], "size": [2, 2, 4], "pivot": [7, 14, -23.5], "rotation": [67.5, 0, 0], "uv": [76, 93]},
{"origin": [-2.5, 11.5, -34], "size": [5, 5, 7], "uv": [0, 85]},
{"origin": [-2.5, 10.25, -34], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97]},
{"origin": [-0.5, 16.5, -32], "size": [1, 2, 2], "uv": [32, 59]}
]
},
{
"name": "jaw",
"parent": "head",
"pivot": [0, 11.5, -20],
"cubes": [
{"origin": [-3.5, 9.5, -27], "size": [7, 2, 7], "uv": [88, 0]},
{"origin": [-3.5, 11.5, -24], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52]},
{"origin": [3.5, 11.5, -24], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82]},
{"origin": [-2.5, 9.5, -34], "size": [5, 2, 7], "uv": [90, 81]}
]
},
{
"name": "neck_right",
"parent": "torso",
"pivot": [-3.87868, 13.25, 0.95465],
"rotation": [0, 45, 0],
"cubes": [
{"origin": [-7.37868, 8.75, -5.87868], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65]}
]
},
{
"name": "neck_right2",
"parent": "neck_right",
"pivot": [-3.87868, 13.5, -3.87868],
"cubes": [
{"origin": [-6.87868, 10.25, -11.87868], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49]}
]
},
{
"name": "neck_right3",
"parent": "neck_right2",
"pivot": [-3.87868, 13.75, -9.87868],
"cubes": [
{"origin": [-6.37868, 11.25, -17.87868], "size": [5, 5, 8], "uv": [26, 82]}
]
},
{
"name": "head_right",
"parent": "neck_right3",
"pivot": [-3.87868, 13.75, -17.87868],
"cubes": [
{"origin": [-7.37868, 11.25, -24.87868], "size": [7, 5, 7], "uv": [62, 81]},
{"origin": [-8.37868, 12.25, -19.87868], "size": [2, 2, 4], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 73]},
{"origin": [-8.37868, 8.25, -21.87868], "size": [2, 2, 4], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 51]},
{"origin": [-8.37868, 8.25, -17.87868], "size": [2, 4, 2], "pivot": [-10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [51, 70]},
{"origin": [-1.62132, 12.25, -19.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 73], "mirror": true},
{"origin": [-1.62132, 8.25, -17.87868], "size": [2, 4, 2], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [51, 70], "mirror": true},
{"origin": [-1.62132, 8.25, -21.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -21.37868], "rotation": [67.5, 0, 0], "uv": [92, 51], "mirror": true},
{"origin": [-6.37868, 11.25, -31.87868], "size": [5, 5, 7], "uv": [0, 85]},
{"origin": [-6.37868, 10, -31.87868], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97]},
{"origin": [-4.37868, 16.25, -29.87868], "size": [1, 2, 2], "uv": [32, 59]}
]
},
{
"name": "jaw_right",
"parent": "head_right",
"pivot": [-3.87868, 11.25, -17.87868],
"cubes": [
{"origin": [-7.37868, 9.25, -24.87868], "size": [7, 2, 7], "uv": [88, 0]},
{"origin": [-7.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52]},
{"origin": [-0.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82]},
{"origin": [-6.37868, 9.25, -31.87868], "size": [5, 2, 7], "uv": [90, 81]}
]
},
{
"name": "neck_left",
"parent": "torso",
"pivot": [3.87868, 13.25, 0.95465],
"rotation": [0, -45, 0],
"cubes": [
{"origin": [0.37868, 8.75, -5.87868], "size": [7, 8, 8], "inflate": 0.1, "uv": [62, 65], "mirror": true}
]
},
{
"name": "neck_left2",
"parent": "neck_left",
"pivot": [3.87868, 13.5, -3.87868],
"cubes": [
{"origin": [0.87868, 10.25, -11.87868], "size": [6, 6, 8], "inflate": 0.1, "uv": [72, 49], "mirror": true}
]
},
{
"name": "neck_left3",
"parent": "neck_left2",
"pivot": [3.87868, 13.75, -9.87868],
"cubes": [
{"origin": [1.37868, 11.25, -17.87868], "size": [5, 5, 8], "uv": [26, 82], "mirror": true}
]
},
{
"name": "head_left",
"parent": "neck_left3",
"pivot": [3.87868, 13.75, -17.87868],
"cubes": [
{"origin": [0.37868, 11.25, -24.87868], "size": [7, 5, 7], "uv": [62, 81], "mirror": true},
{"origin": [6.37868, 12.25, -17.87868], "size": [2, 2, 4], "pivot": [10.87868, 13.75, -19.37868], "rotation": [135, 0, 0], "uv": [92, 73], "mirror": true},
{"origin": [-0.62132, 12.25, -17.87868], "size": [2, 2, 4], "pivot": [-3.12132, 13.75, -19.37868], "rotation": [135, 0, 0], "uv": [64, 93], "mirror": true},
{"origin": [1.37868, 11.25, -31.87868], "size": [5, 5, 7], "uv": [0, 85], "mirror": true},
{"origin": [1.37868, 10, -31.87868], "size": [5, 2, 7], "inflate": -0.1, "uv": [0, 97], "mirror": true},
{"origin": [3.37868, 16.25, -29.87868], "size": [1, 2, 2], "uv": [32, 59], "mirror": true}
]
},
{
"name": "jaw_left",
"parent": "head_left",
"pivot": [3.87868, 11.25, -17.87868],
"cubes": [
{"origin": [0.37868, 9.25, -24.87868], "size": [7, 2, 7], "uv": [88, 0], "mirror": true},
{"origin": [7.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [32, 52], "mirror": true},
{"origin": [0.37868, 11.25, -21.87868], "size": [0, 3, 4], "inflate": 0.05, "uv": [52, 82], "mirror": true},
{"origin": [1.37868, 9.25, -31.87868], "size": [5, 2, 7], "uv": [90, 81], "mirror": true}
]
},
{
"name": "right_upper_wing",
"parent": "torso",
"pivot": [-6, 17, -3],
"cubes": [
{"origin": [-18, 17, -3], "size": [12, 0, 16], "uv": [8, 95]}
]
},
{
"name": "right_upper_wing2",
"parent": "right_upper_wing",
"pivot": [-18, 17, -3],
"cubes": [
{"origin": [-35, 17, -3], "size": [17, 0, 16], "uv": [32, 99]}
]
},
{
"name": "right_lower_wing2",
"parent": "torso",
"pivot": [-6, 13, -3],
"cubes": [
{"origin": [-18, 13, -3], "size": [12, 0, 16], "uv": [8, 95]}
]
},
{
"name": "right_lower_wing3",
"parent": "right_lower_wing2",
"pivot": [-18, 13, -3],
"cubes": [
{"origin": [-35, 13, -3], "size": [17, 0, 16], "uv": [32, 99]}
]
},
{
"name": "left_lower_wing2",
"parent": "torso",
"pivot": [6, 13, -3],
"cubes": [
{"origin": [6, 13, -3], "size": [12, 0, 16], "uv": [8, 95], "mirror": true}
]
},
{
"name": "left_lower_wing3",
"parent": "left_lower_wing2",
"pivot": [18, 13, -3],
"cubes": [
{"origin": [18, 13, -3], "size": [17, 0, 16], "uv": [32, 99], "mirror": true}
]
},
{
"name": "left_upper_wing",
"parent": "torso",
"pivot": [6, 17, -3],
"cubes": [
{"origin": [6, 17, -3], "size": [12, 0, 16], "uv": [8, 95], "mirror": true}
]
},
{
"name": "left_upper_wing2",
"parent": "left_upper_wing",
"pivot": [18, 17, -3],
"cubes": [
{"origin": [18, 17, -3], "size": [17, 0, 16], "uv": [32, 99], "mirror": true}
]
},
{
"name": "orb_center",
"parent": "torso",
"pivot": [0, 6, -1],
"cubes": [
{"origin": [-4, 2, -9], "size": [8, 8, 8], "uv": [40, 49]}
]
},
{
"name": "orb_right",
"parent": "torso",
"pivot": [-3.58579, 5, 0.41421],
"rotation": [0, 45, 0],
"cubes": [
{"origin": [-7.58579, 1, -7.58579], "size": [8, 8, 8], "uv": [0, 52]}
]
},
{
"name": "orb_left",
"parent": "torso",
"pivot": [3.58579, 5, 0.41421],
"rotation": [0, -45, 0],
"cubes": [
{"origin": [-0.41421, 1, -7.58579], "size": [8, 8, 8], "uv": [56, 0]}
]
}
]
}
]
}
@@ -0,0 +1,225 @@
{
"format_version": "1.21.110",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.royal_guardian_sword - Converted",
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 2,
"visible_bounds_height": 4,
"visible_bounds_offset": [0, 1, 0]
},
"bones": [
{
"name": "royal_guardian_sword",
"pivot": [0.35, -7.75, 0]
},
{
"name": "guard",
"parent": "royal_guardian_sword",
"pivot": [0.35, -7.75, 0],
"cubes": [
{
"origin": [-1.5, -6.5, -1.25],
"size": [3, 1, 2.5],
"uv": {
"north": {"uv": [31, 9], "uv_size": [3, 1]},
"east": {"uv": [22, 9], "uv_size": [3, 1]},
"south": {"uv": [31, 9], "uv_size": [3, 1]},
"west": {"uv": [28, 9], "uv_size": [3, 1]},
"up": {"uv": [25, 6], "uv_size": [3, 2.5]},
"down": {"uv": [28, 8.5], "uv_size": [3, -2.5]}
}
},
{
"origin": [-1, -9.5, -1],
"size": [2, 3, 2],
"uv": {
"north": {"uv": [16, 24], "uv_size": [2, 3]},
"east": {"uv": [14, 24], "uv_size": [2, 3]},
"south": {"uv": [20, 24], "uv_size": [2, 3]},
"west": {"uv": [18, 24], "uv_size": [2, 3]},
"up": {"uv": [16, 22], "uv_size": [2, 2]},
"down": {"uv": [18, 24], "uv_size": [2, -2]}
}
},
{
"origin": [0.2, -9.5, -5.2],
"size": [0, 3, 4],
"pivot": [0.2, -8, -0.2],
"rotation": [0, -45, 0],
"uv": {
"north": {"uv": [26, 14], "uv_size": [0, 3]},
"east": {"uv": [30, 14], "uv_size": [-4, 3]},
"south": {"uv": [30, 14], "uv_size": [0, 3]},
"west": {"uv": [26, 14], "uv_size": [4, 3]},
"up": {"uv": [26, 10], "uv_size": [0, 4]},
"down": {"uv": [26, 14], "uv_size": [0, -4]}
}
}
]
},
{
"name": "group2",
"parent": "guard",
"pivot": [-3.1, -7.05, 0.5],
"cubes": [
{
"origin": [-0.41644, -5.62638, -1.25],
"size": [1, 5, 2.5],
"inflate": -0.005,
"pivot": [-0.5, -6.43592, 0.75],
"rotation": [0, 0, -100],
"uv": {
"north": {"uv": [21, 17], "uv_size": [1, 5]},
"east": {"uv": [18.5, 17], "uv_size": [2.5, 5]},
"south": {"uv": [22, 17], "uv_size": [-1, 5]},
"west": {"uv": [14.5, 17], "uv_size": [2.5, 5]},
"up": {"uv": [17, 14.5], "uv_size": [1, 2.5]},
"down": {"uv": [17, 17], "uv_size": [1, -2.5]}
}
},
{
"origin": [-0.58356, -5.62638, -1.25],
"size": [1, 5, 2.5],
"inflate": -0.005,
"pivot": [0.5, -6.43592, 0.75],
"rotation": [0, 0, 100],
"uv": {
"north": {"uv": [22, 17], "uv_size": [-1, 5]},
"east": {"uv": [14.5, 17], "uv_size": [2.5, 5]},
"south": {"uv": [21, 17], "uv_size": [1, 5]},
"west": {"uv": [18.5, 17], "uv_size": [2.5, 5]},
"up": {"uv": [17, 14.5], "uv_size": [1, 2.5]},
"down": {"uv": [17, 17], "uv_size": [1, -2.5]}
}
}
]
},
{
"name": "group",
"parent": "guard",
"pivot": [-3.1, -7.05, 0.5]
},
{
"name": "handle",
"parent": "royal_guardian_sword",
"pivot": [3, -15, -3],
"cubes": [
{
"origin": [-0.5, -14, -0.5],
"size": [1, 7, 1],
"uv": {
"north": {"uv": [27, 18], "uv_size": [1, 7]},
"east": {"uv": [26, 18], "uv_size": [1, 7]},
"south": {"uv": [29, 18], "uv_size": [1, 7]},
"west": {"uv": [28, 18], "uv_size": [1, 7]},
"up": {"uv": [27, 17], "uv_size": [1, 1]},
"down": {"uv": [28, 18], "uv_size": [1, -1]}
}
},
{
"origin": [-0.5, -14, -0.5],
"size": [1, 8, 1],
"inflate": 0.2,
"uv": {
"north": {"uv": [23, 18], "uv_size": [1, 8]},
"east": {"uv": [22, 18], "uv_size": [1, 8]},
"south": {"uv": [25, 18], "uv_size": [1, 8]},
"west": {"uv": [24, 18], "uv_size": [1, 8]},
"up": {"uv": [23, 17], "uv_size": [1, 1]},
"down": {"uv": [24, 18], "uv_size": [1, -1]}
}
},
{
"origin": [-1.5, -16, -1.5],
"size": [3, 3, 3],
"uv": {
"north": {"uv": [23, 3], "uv_size": [3, 3]},
"east": {"uv": [23, 3], "uv_size": [3, 3]},
"south": {"uv": [23, 3], "uv_size": [3, 3]},
"west": {"uv": [23, 3], "uv_size": [3, 3]},
"up": {"uv": [17, 0], "uv_size": [3, 3]},
"down": {"uv": [20, 3], "uv_size": [3, -3]}
}
}
]
},
{
"name": "blade",
"parent": "royal_guardian_sword",
"pivot": [6, -5, -3],
"cubes": [
{
"origin": [1.5, -6, 0],
"size": [1, 34, 0],
"uv": {
"north": {"uv": [10, 0], "uv_size": [1, 34]},
"east": {"uv": [10, 0], "uv_size": [0, 34]},
"south": {"uv": [11, 0], "uv_size": [1, 34]},
"west": {"uv": [11, 0], "uv_size": [0, 34]},
"up": {"uv": [10, 0], "uv_size": [1, 0]},
"down": {"uv": [11, 0], "uv_size": [1, 0]}
}
},
{
"origin": [-2, -6, -0.5],
"size": [4, 33.625, 1],
"uv": {
"north": {"uv": [1, 1], "uv_size": [4, 33]},
"east": {"uv": [0, 1], "uv_size": [1, 33]},
"south": {"uv": [6, 1], "uv_size": [4, 33]},
"west": {"uv": [5, 1], "uv_size": [1, 33]},
"up": {"uv": [1, 0], "uv_size": [4, 1]},
"down": {"uv": [5, 1], "uv_size": [4, -1]}
}
},
{
"origin": [-2.1, 26.525, -0.5],
"size": [2.8, 2.8, 1],
"inflate": 0.005,
"pivot": [0, 28.625, 0],
"rotation": [0, 0, -45],
"uv": {
"north": {"uv": [27, 1], "uv_size": [2, 2]},
"east": {"uv": [26, 1], "uv_size": [1, 2]},
"south": {"uv": [30, 1], "uv_size": [2, 2]},
"west": {"uv": [29, 1], "uv_size": [1, 2]},
"up": {"uv": [27, 0], "uv_size": [2, 1]},
"down": {"uv": [29, 1], "uv_size": [2, -1]}
}
},
{
"origin": [-1.9, 26.3, 0],
"size": [3.525, 3.525, 0],
"inflate": 0.005,
"pivot": [0, 28.2, 0],
"rotation": [0, 0, -45],
"uv": {
"north": {"uv": [26, 3], "uv_size": [3, 3]},
"east": {"uv": [26, 3], "uv_size": [0, 3]},
"south": {"uv": [29, 3], "uv_size": [3, 3]},
"west": {"uv": [29, 3], "uv_size": [0, 3]},
"up": {"uv": [26, 3], "uv_size": [3, 0]},
"down": {"uv": [29, 3], "uv_size": [3, 0]}
}
},
{
"origin": [-2.5, -6, 0],
"size": [1, 34, 0],
"uv": {
"north": {"uv": [12, 0], "uv_size": [1, 34]},
"east": {"uv": [12, 0], "uv_size": [0, 34]},
"south": {"uv": [13, 0], "uv_size": [1, 34]},
"west": {"uv": [13, 0], "uv_size": [0, 34]},
"up": {"uv": [12, 0], "uv_size": [1, 0]},
"down": {"uv": [13, 0], "uv_size": [1, 0]}
}
}
]
}
]
}
]
}
@@ -526,6 +526,23 @@
"tooltip.antarchy.blood_crystal_katana.launch": "Launches you forward on hit.",
"tooltip.antarchy.blood_crystal_katana.dash": "Reaches distant targets you look at; a full swing grants brief immunity.",
"tooltip.antarchy.blood_crystal_katana.trail": "Leaves a crimson trail behind you.",
"item.antarchy.eye_of_the_storm": "Eye of the Storm",
"tooltip.antarchy.eye_of_the_storm.updraft": "Use to summon a vortex beneath you that flings you skyward.",
"tooltip.antarchy.eye_of_the_storm.surge": "Attack to hurl a vortex that gathers foes, batters them, and flings them back at you.",
"item.antarchy.royal_guardian_helmet": "Royal Guardian Helmet",
"item.antarchy.royal_guardian_chestplate": "Royal Guardian Chestplate",
"item.antarchy.royal_guardian_leggings": "Royal Guardian Leggings",
"item.antarchy.royal_guardian_boots": "Royal Guardian Boots",
"item.antarchy.royal_guardian_sword": "Royal Guardian Sword",
"item.antarchy.royal_guardian_shield": "Royal Guardian Shield",
"item.antarchy.royal_assailant_helmet": "Royal Assailant Helmet",
"item.antarchy.royal_assailant_chestplate": "Royal Assailant Chestplate",
"item.antarchy.royal_assailant_leggings": "Royal Assailant Leggings",
"item.antarchy.royal_assailant_boots": "Royal Assailant Boots",
"item.antarchy.royal_assailant_battleaxe": "Royal Assailant Battle Axe",
"tooltip.antarchy.royal_guardian_shield": "An upgraded shield fit for a king's guard.",
"tooltip.antarchy.royal_assailant_chestplate.invert": "Press the inversion key to toggle inverted gravity on and off.",
"tooltip.antarchy.royal_assailant_boots.fall": "Cancels fall damage while falling upward.",
"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",
@@ -533,8 +550,8 @@
"item.antarchy.jerry_nucleus": "Jerry Nucleus",
"tooltip.antarchy.jerry_nucleus.hatch": "While holding, interact with 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",
"key.antarchy.hercules_beetle_flight_toggle": "Hercules Beetle Flight Toggle",
"key.antarchy.mount_special": "Mount: Special / Charge",
"key.antarchy.mount_flight_toggle": "Mount: Toggle Flight",
"item.antarchy.jumpy_bug_leg": "Jumpy Bug Leg",
"item.antarchy.jumpy_boots": "Jumpy Boots",
"tooltip.antarchy.jumpy_boots": "Sneak to charge, then jump to spring upward.",
@@ -683,6 +700,7 @@
"item.antarchy.alpha_mantis_spawn_egg": "Alpha Mantis Spawn Egg",
"biome.antarchy.moleworm_caves": "Moleworm Caves",
"biome.antarchy.elythia_meadow": "Elythian Meadows",
"biome.antarchy.truffalo_forest": "Truffalo Forest",
"biome.antarchy.elythia_ocean": "Elythian Ocean",
"biome.antarchy.butterfly_fields": "Butterfly Fields",
"biome.antarchy.ouranwood_forest": "Ouranwood Forest",
@@ -1117,6 +1135,11 @@
"entity.antarchy.creeping_horror": "Creeping Horror",
"entity.antarchy.lurking_terror": "Lurking Terror",
"entity.antarchy.hercules_beetle": "Hercules Beetle",
"entity.antarchy.prince": "Prince",
"entity.antarchy.princess": "Princess",
"entity.antarchy.royal_bolt": "Royal Bolt",
"block.antarchy.prince_egg": "Prince Egg",
"block.antarchy.princess_egg": "Princess Egg",
"item.antarchy.jumpy_bug_spawn_egg": "Jumpy Bug Spawn Egg",
"item.antarchy.spit_bug_spawn_egg": "Spit Bug Spawn Egg",
"item.antarchy.stink_bug_spawn_egg": "Stink Bug Spawn Egg",
@@ -1217,6 +1240,7 @@
"item.antarchy.tigers_eye_armor.activate": "Press %s to mimic the block beneath you",
"item.antarchy.tigers_eye_armor.active_bonus": "Doubles detection reduction while active",
"key.antarchy.tigers_eye_camouflage": "Adaptive Camouflage",
"key.antarchy.royal_inversion_toggle": "Royal Assailant: Toggle Inversion",
"message.antarchy.tiger_eye_camouflage.activated": "Adaptive Camouflage activated",
"message.antarchy.tiger_eye_camouflage.disabled": "Adaptive Camouflage disabled",
"message.antarchy.tiger_eye_camouflage.full_set_required": "A full set of Tiger's Eye armor is required",
@@ -1,104 +1,498 @@
{
"ambientocclusion": false,
"format_version": "1.21.11",
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [
64,
64
],
"textures": {
"particle": "minecraft:block/flower_pot",
"flowerpot": "minecraft:block/flower_pot",
"dirt": "minecraft:block/dirt",
"stem": "antarchy:block/spider_lily_stem",
"flower": "antarchy:block/spider_lily_top"
"1": "antarchy:block/prince_egg",
"particle": "antarchy:block/prince_egg"
},
"elements": [
{
"from": [5, 0, 5],
"to": [6, 6, 11],
"from": [
6,
15,
6
],
"to": [
10,
16,
10
],
"faces": {
"down": { "uv": [5, 5, 6, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [5, 5, 6, 11], "texture": "#flowerpot" },
"north": { "uv": [10, 10, 11, 16], "texture": "#flowerpot" },
"south": { "uv": [5, 10, 6, 16], "texture": "#flowerpot" },
"west": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" },
"east": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" }
"north": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"east": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"south": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"west": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"up": {
"uv": [
6,
7,
5,
6
],
"texture": "#1",
"cullface": "up"
}
}
},
{
"from": [10, 0, 5],
"to": [11, 6, 11],
"from": [
5,
14,
5
],
"to": [
11,
15,
11
],
"faces": {
"down": { "uv": [10, 5, 11, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [10, 5, 11, 11], "texture": "#flowerpot" },
"north": { "uv": [5, 10, 6, 16], "texture": "#flowerpot" },
"south": { "uv": [10, 10, 11, 16], "texture": "#flowerpot" },
"west": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" },
"east": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" }
"north": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"east": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"south": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"west": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"up": {
"uv": [
7.5,
5.25,
6,
3.75
],
"texture": "#1"
}
}
},
{
"from": [6, 0, 5],
"to": [10, 6, 6],
"from": [
4,
13,
4
],
"to": [
12,
14,
12
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0,
-1,
0
]
},
"faces": {
"down": { "uv": [6, 10, 10, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 5, 10, 6], "texture": "#flowerpot" },
"north": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" },
"south": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" }
"north": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"east": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"south": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"west": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"up": {
"uv": [
5,
8,
3,
6
],
"texture": "#1"
}
}
},
{
"from": [6, 0, 10],
"to": [10, 6, 11],
"from": [
3,
0,
3
],
"to": [
13,
13,
13
],
"faces": {
"down": { "uv": [6, 5, 10, 6], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 10, 10, 11], "texture": "#flowerpot" },
"north": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" },
"south": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" }
"north": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"east": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"south": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"west": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"up": {
"uv": [
8.5,
2.5,
6,
0
],
"texture": "#1"
},
"down": {
"uv": [
8.5,
0,
6,
2.5
],
"texture": "#1",
"cullface": "down"
}
}
},
{
"from": [6, 0, 6],
"to": [10, 4, 10],
"from": [
2,
1,
2
],
"to": [
14,
11,
14
],
"faces": {
"down": { "uv": [6, 12, 10, 16], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 6, 10, 10], "texture": "#dirt" }
"north": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"east": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"south": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"west": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"up": {
"uv": [
3,
6.5,
0,
3.5
],
"texture": "#1"
},
"down": {
"uv": [
3,
3.5,
0,
6.5
],
"texture": "#1"
}
}
},
{
"from": [2.6, 4, 8],
"to": [13.4, 16, 8],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"from": [
1,
3,
1
],
"to": [
15,
8,
15
],
"faces": {
"north": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 },
"south": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 }
}
},
{
"from": [8, 4, 2.6],
"to": [8, 16, 13.4],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"west": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 },
"east": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 }
}
},
{
"from": [2.6, 4, 8],
"to": [13.4, 16, 8],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"north": { "uv": [0, 0, 16, 16], "texture": "#flower" },
"south": { "uv": [0, 0, 16, 16], "texture": "#flower" }
}
},
{
"from": [8, 4, 2.6],
"to": [8, 16, 13.4],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"west": { "uv": [0, 0, 16, 16], "texture": "#flower" },
"east": { "uv": [0, 0, 16, 16], "texture": "#flower" }
"north": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"east": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"south": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"west": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"up": {
"uv": [
3.5,
3.5,
0,
0
],
"texture": "#1"
},
"down": {
"uv": [
3.5,
0,
0,
3.5
],
"texture": "#1"
}
}
}
]
],
"display": {
"thirdperson_righthand": {
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"thirdperson_lefthand": {
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"firstperson_righthand": {
"rotation": [
0,
45,
0
],
"scale": [
0.4,
0.4,
0.4
]
},
"firstperson_lefthand": {
"rotation": [
0,
-135,
0
],
"scale": [
0.4,
0.4,
0.4
]
},
"ground": {
"translation": [
0,
3,
0
],
"scale": [
0.25,
0.25,
0.25
]
},
"gui": {
"rotation": [
30,
-135,
0
],
"scale": [
0.625,
0.625,
0.625
]
},
"fixed": {
"scale": [
0.5,
0.5,
0.5
]
}
}
}
@@ -1,104 +1,498 @@
{
"ambientocclusion": false,
"format_version": "1.21.11",
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [
64,
64
],
"textures": {
"particle": "minecraft:block/flower_pot",
"flowerpot": "minecraft:block/flower_pot",
"dirt": "minecraft:block/dirt",
"stem": "antarchy:block/spider_lily_stem",
"flower": "antarchy:block/spider_lily_top"
"1": "antarchy:block/princess_egg",
"particle": "antarchy:block/princess_egg"
},
"elements": [
{
"from": [5, 0, 5],
"to": [6, 6, 11],
"from": [
6,
15,
6
],
"to": [
10,
16,
10
],
"faces": {
"down": { "uv": [5, 5, 6, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [5, 5, 6, 11], "texture": "#flowerpot" },
"north": { "uv": [10, 10, 11, 16], "texture": "#flowerpot" },
"south": { "uv": [5, 10, 6, 16], "texture": "#flowerpot" },
"west": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" },
"east": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" }
"north": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"east": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"south": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"west": {
"uv": [
6,
5.5,
7,
5.75
],
"texture": "#1"
},
"up": {
"uv": [
6,
7,
5,
6
],
"texture": "#1",
"cullface": "up"
}
}
},
{
"from": [10, 0, 5],
"to": [11, 6, 11],
"from": [
5,
14,
5
],
"to": [
11,
15,
11
],
"faces": {
"down": { "uv": [10, 5, 11, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [10, 5, 11, 11], "texture": "#flowerpot" },
"north": { "uv": [5, 10, 6, 16], "texture": "#flowerpot" },
"south": { "uv": [10, 10, 11, 16], "texture": "#flowerpot" },
"west": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" },
"east": { "uv": [5, 10, 11, 16], "texture": "#flowerpot" }
"north": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"east": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"south": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"west": {
"uv": [
6,
5.25,
7.5,
5.5
],
"texture": "#1"
},
"up": {
"uv": [
7.5,
5.25,
6,
3.75
],
"texture": "#1"
}
}
},
{
"from": [6, 0, 5],
"to": [10, 6, 6],
"from": [
4,
13,
4
],
"to": [
12,
14,
12
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0,
-1,
0
]
},
"faces": {
"down": { "uv": [6, 10, 10, 11], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 5, 10, 6], "texture": "#flowerpot" },
"north": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" },
"south": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" }
"north": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"east": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"south": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"west": {
"uv": [
3.5,
3.25,
5.5,
3.5
],
"texture": "#1"
},
"up": {
"uv": [
5,
8,
3,
6
],
"texture": "#1"
}
}
},
{
"from": [6, 0, 10],
"to": [10, 6, 11],
"from": [
3,
0,
3
],
"to": [
13,
13,
13
],
"faces": {
"down": { "uv": [6, 5, 10, 6], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 10, 10, 11], "texture": "#flowerpot" },
"north": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" },
"south": { "uv": [6, 10, 10, 16], "texture": "#flowerpot" }
"north": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"east": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"south": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"west": {
"uv": [
3.5,
0,
6,
3.25
],
"texture": "#1"
},
"up": {
"uv": [
8.5,
2.5,
6,
0
],
"texture": "#1"
},
"down": {
"uv": [
8.5,
0,
6,
2.5
],
"texture": "#1",
"cullface": "down"
}
}
},
{
"from": [6, 0, 6],
"to": [10, 4, 10],
"from": [
2,
1,
2
],
"to": [
14,
11,
14
],
"faces": {
"down": { "uv": [6, 12, 10, 16], "texture": "#flowerpot", "cullface": "down" },
"up": { "uv": [6, 6, 10, 10], "texture": "#dirt" }
"north": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"east": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"south": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"west": {
"uv": [
3,
3.5,
6,
6
],
"texture": "#1"
},
"up": {
"uv": [
3,
6.5,
0,
3.5
],
"texture": "#1"
},
"down": {
"uv": [
3,
3.5,
0,
6.5
],
"texture": "#1"
}
}
},
{
"from": [2.6, 4, 8],
"to": [13.4, 16, 8],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"from": [
1,
3,
1
],
"to": [
15,
8,
15
],
"faces": {
"north": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 },
"south": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 }
}
},
{
"from": [8, 4, 2.6],
"to": [8, 16, 13.4],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"west": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 },
"east": { "uv": [0, 0, 16, 16], "texture": "#stem", "tintindex": 0 }
}
},
{
"from": [2.6, 4, 8],
"to": [13.4, 16, 8],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"north": { "uv": [0, 0, 16, 16], "texture": "#flower" },
"south": { "uv": [0, 0, 16, 16], "texture": "#flower" }
}
},
{
"from": [8, 4, 2.6],
"to": [8, 16, 13.4],
"rotation": { "origin": [8, 8, 8], "axis": "y", "angle": 45, "rescale": true },
"shade": false,
"faces": {
"west": { "uv": [0, 0, 16, 16], "texture": "#flower" },
"east": { "uv": [0, 0, 16, 16], "texture": "#flower" }
"north": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"east": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"south": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"west": {
"uv": [
6,
2.5,
9.5,
3.75
],
"texture": "#1"
},
"up": {
"uv": [
3.5,
3.5,
0,
0
],
"texture": "#1"
},
"down": {
"uv": [
3.5,
0,
0,
3.5
],
"texture": "#1"
}
}
}
]
],
"display": {
"thirdperson_righthand": {
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"thirdperson_lefthand": {
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"firstperson_righthand": {
"rotation": [
0,
45,
0
],
"scale": [
0.4,
0.4,
0.4
]
},
"firstperson_lefthand": {
"rotation": [
0,
-135,
0
],
"scale": [
0.4,
0.4,
0.4
]
},
"ground": {
"translation": [
0,
3,
0
],
"scale": [
0.25,
0.25,
0.25
]
},
"gui": {
"rotation": [
30,
-135,
0
],
"scale": [
0.625,
0.625,
0.625
]
},
"fixed": {
"scale": [
0.5,
0.5,
0.5
]
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"gui_light": "front",
"textures": {
"layer0": "antarchy:item/eye_of_the_storm/eye_of_the_storm_item"
}
}
@@ -0,0 +1,138 @@
{
"parent": "builtin/entity",
"display": {
"thirdperson_righthand": {
"rotation": [
0,
0,
-90
],
"translation": [
-5.25,
-1.85,
-5
],
"scale": [
0.8,
0.8,
0.8
]
},
"thirdperson_lefthand": {
"rotation": [
0,
0,
-90
],
"translation": [
-5.25,
-1.85,
-5
],
"scale": [
0.8,
0.8,
0.8
]
},
"firstperson_righthand": {
"rotation": [
10,
0,
0
],
"translation": [
-1,
0,
0.5
],
"scale": [
0.6,
0.6,
0.6
]
},
"firstperson_lefthand": {
"rotation": [
10,
0,
0
],
"translation": [
-1,
0,
0.5
],
"scale": [
0.6,
0.6,
0.6
]
},
"ground": {
"translation": [
0,
2,
0
],
"scale": [
0.5,
0.5,
0.5
]
},
"gui": {
"rotation": [
30,
-135,
0
],
"translation": [
0.25,
-4.75,
0
],
"scale": [
0.85,
0.85,
0.85
]
},
"head": {
"translation": [
0,
0,
-8.25
]
},
"fixed": {
"rotation": [
90,
45,
90
],
"translation": [
5.25,
3.75,
0
]
},
"on_shelf": {
"rotation": [
90,
0,
90
],
"translation": [
8.25,
0,
0
],
"scale": [
1.3,
1.3,
1.3
]
}
}
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:block/prince_egg"
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:block/princess_egg"
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:item/royal_assailant_battleaxe_held"
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"gui_light": "front",
"textures": {
"layer0": "antarchy:item/royal_assailant/royal_assailant_battleaxe_item"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_assailant/royal_assailant_boots"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_assailant/royal_assailant_chestplate"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_assailant/royal_assailant_helmet"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_assailant/royal_assailant_leggings"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_guardian/royal_guardian_boots"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_guardian/royal_guardian_chestplate"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_guardian/royal_guardian_helmet"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:item/royal_guardian/royal_guardian_leggings"
}
}
@@ -1,156 +1,641 @@
{
"format_version": "1.21.11",
"credit": "Made with Blockbench",
"texture_size": [64, 64],
"textures": {
"0": "royal_guardian_shield",
"particle": "royal_guardian_shield"
},
"elements": [
{
"from": [7, 2, 9],
"to": [9, 8, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [0.5, -3, 7]},
"faces": {
"north": {"uv": [10.75, 10.25, 11.25, 11.75], "texture": "#0"},
"east": {"uv": [6, 9, 7.25, 10.5], "texture": "#0"},
"south": {"uv": [2, 11, 2.5, 12.5], "texture": "#0"},
"west": {"uv": [6, 10.5, 7.25, 12], "texture": "#0"},
"up": {"uv": [3, 12.25, 2.5, 11], "texture": "#0"},
"down": {"uv": [3.5, 11, 3, 12.25], "texture": "#0"}
}
},
{
"from": [-2.185, -5.81, 6.99],
"to": [9.11, 5.485, 9.01],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 4.375, 8]},
"faces": {
"north": {"uv": [8, 0, 10.75, 2.75], "texture": "#0"},
"east": {"uv": [7.25, 9, 7.75, 11.75], "texture": "#0"},
"south": {"uv": [8, 2.75, 10.75, 5.5], "texture": "#0"},
"west": {"uv": [10.75, 0, 11.25, 2.75], "texture": "#0"},
"up": {"uv": [13.5, 3.25, 10.75, 2.75], "texture": "#0"},
"down": {"uv": [13.5, 3.25, 10.75, 3.75], "texture": "#0"}
}
},
{
"from": [0, -2, 7],
"to": [16, 16, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [0.5, 0, 7]},
"faces": {
"north": {"uv": [0, 0, 4, 4.5], "texture": "#0"},
"east": {"uv": [0, 9, 0.5, 13.5], "texture": "#0"},
"south": {"uv": [4, 0, 8, 4.5], "texture": "#0"},
"west": {"uv": [0.5, 9, 1, 13.5], "texture": "#0"},
"up": {"uv": [6, 9.5, 2, 9], "texture": "#0"},
"down": {"uv": [6, 9.5, 2, 10], "texture": "#0"}
}
},
{
"from": [0, -10, 7],
"to": [16, -2, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [0.5, -8, 7]},
"faces": {
"north": {"uv": [12, 12, 16, 14], "texture": "#0"},
"east": {"uv": [11.5, 11.5, 12, 16], "texture": "#0"},
"south": {"uv": [12, 14, 16, 16], "texture": "#0"},
"west": {"uv": [11.5, 11.5, 12, 16], "texture": "#0"},
"up": {"uv": [6, 9.5, 2, 9], "texture": "#0"},
"down": {"uv": [6, 9.5, 2, 10], "texture": "#0"}
}
},
{
"from": [-2.535, -6.36, 6.59],
"to": [9.41, 5.585, 9.41],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 4.175, 8]},
"faces": {
"north": {"uv": [8, 5.5, 10.75, 8.25], "texture": "#0"},
"east": {"uv": [10.75, 3.75, 11.25, 6.5], "texture": "#0"},
"south": {"uv": [8, 5.5, 10.75, 8.25], "rotation": 90, "texture": "#0"},
"west": {"uv": [10.75, 6.5, 11.25, 9.25], "texture": "#0"},
"up": {"uv": [13.5, 9.75, 10.75, 9.25], "texture": "#0"},
"down": {"uv": [13.5, 9.75, 10.75, 10.25], "texture": "#0"}
}
},
{
"from": [-0.4, -2.3, 6.6],
"to": [16.4, 16.5, 9.4],
"rotation": {"angle": 0, "axis": "y", "origin": [0.5, 0.1, 7]},
"faces": {
"north": {"uv": [0, 4.5, 4, 9], "texture": "#0"},
"east": {"uv": [1, 9, 1.5, 13.5], "texture": "#0"},
"south": {"uv": [0, 4.5, 4, 9], "texture": "#0"},
"west": {"uv": [1.5, 9, 2, 13.5], "texture": "#0"},
"up": {"uv": [6, 10.5, 2, 10], "texture": "#0"},
"down": {"uv": [6, 10.5, 2, 11], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, -90, 0],
"translation": [3.75, 1, 2.5]
},
"thirdperson_lefthand": {
"rotation": [0, -90, 0],
"translation": [3.5, 1, 2.5]
},
"firstperson_righthand": {
"rotation": [-5, 0, 5],
"translation": [0.5, 1, 0.5],
"scale": [0.6, 0.6, 0.6]
},
"firstperson_lefthand": {
"rotation": [-5, 0, 5],
"translation": [0.5, 1, 0.5],
"scale": [0.6, 0.6, 0.6]
},
"ground": {
"translation": [0, 4, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [-154.79, 33.92, -172.56],
"translation": [0, 1.5, 0],
"scale": [0.5, 0.5, 0.5]
},
"fixed": {
"translation": [0, 3, 0],
"scale": [0.5, 0.5, 0.5]
},
"on_shelf": {
"rotation": [0, -180, 0]
}
},
"groups": [
{
"name": "royal_guardian_shield",
"origin": [8, 5.075, 1],
"scope": 0,
"color": 0,
"children": [
{
"name": "handle",
"origin": [0, -3, 0],
"scope": 0,
"color": 0,
"children": [0]
},
{
"name": "shield_base",
"origin": [8, 5.075, 1],
"scope": 0,
"color": 0,
"children": [1, 2, 3]
},
{
"name": "shield_border",
"origin": [8, 5.075, 1],
"scope": 0,
"color": 0,
"children": [4, 5]
}
]
}
]
}
"format_version": "1.21.11",
"credit": "Made with Blockbench",
"texture_size": [
64,
64
],
"textures": {
"0": "antarchy:item/royal_guardian/royal_guardian_shield",
"particle": "antarchy:item/royal_guardian/royal_guardian_shield"
},
"elements": [
{
"from": [
7,
2,
9
],
"to": [
9,
8,
14
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0.5,
-3,
7
]
},
"faces": {
"north": {
"uv": [
10.75,
10.25,
11.25,
11.75
],
"texture": "#0"
},
"east": {
"uv": [
6,
9,
7.25,
10.5
],
"texture": "#0"
},
"south": {
"uv": [
2,
11,
2.5,
12.5
],
"texture": "#0"
},
"west": {
"uv": [
6,
10.5,
7.25,
12
],
"texture": "#0"
},
"up": {
"uv": [
3,
12.25,
2.5,
11
],
"texture": "#0"
},
"down": {
"uv": [
3.5,
11,
3,
12.25
],
"texture": "#0"
}
}
},
{
"from": [
-2.185,
-5.81,
6.99
],
"to": [
9.11,
5.485,
9.01
],
"rotation": {
"angle": 45,
"axis": "z",
"origin": [
8,
4.375,
8
]
},
"faces": {
"north": {
"uv": [
8,
0,
10.75,
2.75
],
"texture": "#0"
},
"east": {
"uv": [
7.25,
9,
7.75,
11.75
],
"texture": "#0"
},
"south": {
"uv": [
8,
2.75,
10.75,
5.5
],
"texture": "#0"
},
"west": {
"uv": [
10.75,
0,
11.25,
2.75
],
"texture": "#0"
},
"up": {
"uv": [
13.5,
3.25,
10.75,
2.75
],
"texture": "#0"
},
"down": {
"uv": [
13.5,
3.25,
10.75,
3.75
],
"texture": "#0"
}
}
},
{
"from": [
0,
-2,
7
],
"to": [
16,
16,
9
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0.5,
0,
7
]
},
"faces": {
"north": {
"uv": [
0,
0,
4,
4.5
],
"texture": "#0"
},
"east": {
"uv": [
0,
9,
0.5,
13.5
],
"texture": "#0"
},
"south": {
"uv": [
4,
0,
8,
4.5
],
"texture": "#0"
},
"west": {
"uv": [
0.5,
9,
1,
13.5
],
"texture": "#0"
},
"up": {
"uv": [
6,
9.5,
2,
9
],
"texture": "#0"
},
"down": {
"uv": [
6,
9.5,
2,
10
],
"texture": "#0"
}
}
},
{
"from": [
0,
-10,
7
],
"to": [
16,
-2,
9
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0.5,
-8,
7
]
},
"faces": {
"north": {
"uv": [
12,
12,
16,
14
],
"texture": "#0"
},
"east": {
"uv": [
11.5,
11.5,
12,
16
],
"texture": "#0"
},
"south": {
"uv": [
12,
14,
16,
16
],
"texture": "#0"
},
"west": {
"uv": [
11.5,
11.5,
12,
16
],
"texture": "#0"
},
"up": {
"uv": [
6,
9.5,
2,
9
],
"texture": "#0"
},
"down": {
"uv": [
6,
9.5,
2,
10
],
"texture": "#0"
}
}
},
{
"from": [
-2.535,
-6.36,
6.59
],
"to": [
9.41,
5.585,
9.41
],
"rotation": {
"angle": 45,
"axis": "z",
"origin": [
8,
4.175,
8
]
},
"faces": {
"north": {
"uv": [
8,
5.5,
10.75,
8.25
],
"texture": "#0"
},
"east": {
"uv": [
10.75,
3.75,
11.25,
6.5
],
"texture": "#0"
},
"south": {
"uv": [
8,
5.5,
10.75,
8.25
],
"rotation": 90,
"texture": "#0"
},
"west": {
"uv": [
10.75,
6.5,
11.25,
9.25
],
"texture": "#0"
},
"up": {
"uv": [
13.5,
9.75,
10.75,
9.25
],
"texture": "#0"
},
"down": {
"uv": [
13.5,
9.75,
10.75,
10.25
],
"texture": "#0"
}
}
},
{
"from": [
-0.4,
-2.3,
6.6
],
"to": [
16.4,
16.5,
9.4
],
"rotation": {
"angle": 0,
"axis": "y",
"origin": [
0.5,
0.1,
7
]
},
"faces": {
"north": {
"uv": [
0,
4.5,
4,
9
],
"texture": "#0"
},
"east": {
"uv": [
1,
9,
1.5,
13.5
],
"texture": "#0"
},
"south": {
"uv": [
0,
4.5,
4,
9
],
"texture": "#0"
},
"west": {
"uv": [
1.5,
9,
2,
13.5
],
"texture": "#0"
},
"up": {
"uv": [
6,
10.5,
2,
10
],
"texture": "#0"
},
"down": {
"uv": [
6,
10.5,
2,
11
],
"texture": "#0"
}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [
0,
-90,
0
],
"translation": [
3.75,
1,
2.5
]
},
"thirdperson_lefthand": {
"rotation": [
0,
-90,
0
],
"translation": [
3.5,
1,
2.5
]
},
"firstperson_righthand": {
"rotation": [
-5,
0,
5
],
"translation": [
0.5,
1,
0.5
],
"scale": [
0.6,
0.6,
0.6
]
},
"firstperson_lefthand": {
"rotation": [
-5,
0,
5
],
"translation": [
0.5,
1,
0.5
],
"scale": [
0.6,
0.6,
0.6
]
},
"ground": {
"translation": [
0,
4,
0
],
"scale": [
0.25,
0.25,
0.25
]
},
"gui": {
"rotation": [
-154.79,
33.92,
-172.56
],
"translation": [
0,
1.5,
0
],
"scale": [
0.5,
0.5,
0.5
]
},
"fixed": {
"translation": [
0,
3,
0
],
"scale": [
0.5,
0.5,
0.5
]
},
"on_shelf": {
"rotation": [
0,
-180,
0
]
}
},
"groups": [
{
"name": "royal_guardian_shield",
"origin": [
8,
5.075,
1
],
"scope": 0,
"color": 0,
"children": [
{
"name": "handle",
"origin": [
0,
-3,
0
],
"scope": 0,
"color": 0,
"children": [
0
]
},
{
"name": "shield_base",
"origin": [
8,
5.075,
1
],
"scope": 0,
"color": 0,
"children": [
1,
2,
3
]
},
{
"name": "shield_border",
"origin": [
8,
5.075,
1
],
"scope": 0,
"color": 0,
"children": [
4,
5
]
}
]
}
]
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:item/royal_guardian_sword_held"
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"gui_light": "front",
"textures": {
"layer0": "antarchy:item/royal_guardian/royal_guardian_sword_item"
}
}
@@ -1069,6 +1069,22 @@
}
]
},
"haywire": {
"sounds": [
{
"name": "antarchy:music/game/thoraxis/haywire",
"stream": true
}
]
},
"inversion_layer": {
"sounds": [
{
"name": "antarchy:music/game/thoraxis/inversion_layer",
"stream": true
}
]
},
"music.game.thoraxis": {
"sounds": [
{
@@ -1080,6 +1096,16 @@
"name": "antarchy:whistling_void",
"type": "event",
"stream": true
},
{
"name": "antarchy:haywire",
"type": "event",
"stream": true
},
{
"name": "antarchy:inversion_layer",
"type": "event",
"stream": true
}
]
},
Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

@@ -7,7 +7,18 @@
"type": {
"tag": "antarchy:horde_common"
}
}
},
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"dimension": "antarchy:cavaryn"
}
}
}
]
},
"trigger": "minecraft:player_killed_entity"
}
@@ -83,7 +83,7 @@
}
},
{
"biome": "antarchy:elythia_meadow",
"biome": "antarchy:truffalo_forest",
"parameters": {
"temperature": 0.68,
"humidity": 0.96,
@@ -203,7 +203,7 @@
}
},
{
"biome": "antarchy:elythia_meadow",
"biome": "antarchy:truffalo_forest",
"parameters": {
"temperature": 0.62,
"humidity": 0.98,
@@ -311,7 +311,7 @@
}
},
{
"biome": "antarchy:elythia_meadow",
"biome": "antarchy:truffalo_forest",
"parameters": {
"temperature": 0.7,
"humidity": 0.95,
@@ -0,0 +1,10 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [ { "type": "minecraft:item", "name": "antarchy:prince_egg" } ],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}
@@ -0,0 +1,10 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [ { "type": "minecraft:item", "name": "antarchy:princess_egg" } ],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "combat",
"pattern": [
" V",
" T ",
"T "
],
"key": {
"V": {
"item": "antarchy:vortex_charge"
},
"T": {
"item": "antarchy:titanium_ingot"
}
},
"result": {
"id": "antarchy:eye_of_the_storm",
"count": 1
}
}
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
"SSS",
"SBS",
"SSS"
],
"key": {
"S": {
"item": "antarchy:queen_scale"
},
"B": {
"item": "antarchy:battle_axe"
}
},
"result": {
"id": "antarchy:royal_assailant_battleaxe",
"count": 1
}
}
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
"SSS",
"SUS",
"SSS"
],
"key": {
"S": { "item": "antarchy:queen_scale" },
"U": { "item": "antarchy:ultimate_boots" }
},
"result": {
"id": "antarchy:royal_assailant_boots",
"count": 1
}
}
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
"SSS",
"SUS",
"SSS"
],
"key": {
"S": { "item": "antarchy:queen_scale" },
"U": { "item": "antarchy:ultimate_chestplate" }
},
"result": {
"id": "antarchy:royal_assailant_chestplate",
"count": 1
}
}
Loaded 100 of 179 files, more files were not shown because too many files have changed in this diff. Show more