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

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

No files matched your search

@@ -426,6 +426,7 @@ public final class AntarchySettings {
private static double ductTapeRepairPercentPerUse = 0.25D; private static double ductTapeRepairPercentPerUse = 0.25D;
private static double ultimateArmorKnockbackResistance = 0.1D; private static double ultimateArmorKnockbackResistance = 0.1D;
private static double nightmareArmorKnockbackResistance = 0.1D; private static double nightmareArmorKnockbackResistance = 0.1D;
private static double primordialArmorKnockbackPerPiece = 0.5D;
private static int fallenKingCrownArmorValue = 2; private static int fallenKingCrownArmorValue = 2;
private static double fallenKingCrownArmorToughness = 0.0D; private static double fallenKingCrownArmorToughness = 0.0D;
private static boolean elythiaFireflyParticlesEnabled = true; private static boolean elythiaFireflyParticlesEnabled = true;
@@ -2275,6 +2276,9 @@ public final class AntarchySettings {
public static double nightmareArmorKnockbackResistance() { return nightmareArmorKnockbackResistance; } public static double nightmareArmorKnockbackResistance() { return nightmareArmorKnockbackResistance; }
public static void setNightmareArmorKnockbackResistance(double value) { nightmareArmorKnockbackResistance = value; } public static void setNightmareArmorKnockbackResistance(double value) { nightmareArmorKnockbackResistance = value; }
public static double primordialArmorKnockbackPerPiece() { return primordialArmorKnockbackPerPiece; }
public static void setPrimordialArmorKnockbackPerPiece(double value) { primordialArmorKnockbackPerPiece = value; }
public static int fallenKingCrownArmorValue() { return fallenKingCrownArmorValue; } public static int fallenKingCrownArmorValue() { return fallenKingCrownArmorValue; }
public static void setFallenKingCrownArmorValue(int value) { fallenKingCrownArmorValue = value; } public static void setFallenKingCrownArmorValue(int value) { fallenKingCrownArmorValue = value; }
@@ -103,6 +103,12 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Supplier<Block> CRACKED_SHELLSTONE_BRICKS = (Supplier<Block>) UNBOUND; public static Supplier<Block> CRACKED_SHELLSTONE_BRICKS = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Supplier<Block> MOSSY_SHELLSTONE_BRICK_STAIRS = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> MOSSY_SHELLSTONE_BRICK_SLAB = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> MOSSY_SHELLSTONE_BRICK_WALL = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> SHELLSTONE_STAIRS = (Supplier<Block>) UNBOUND; public static Supplier<Block> SHELLSTONE_STAIRS = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Supplier<Block> SHELLSTONE_SLAB = (Supplier<Block>) UNBOUND; public static Supplier<Block> SHELLSTONE_SLAB = (Supplier<Block>) UNBOUND;
@@ -228,6 +234,9 @@ public final class AntarchyObjects {
Supplier<Block> chiseledShellstone, Supplier<Block> chiseledShellstone,
Supplier<Block> mossyShellstoneBricks, Supplier<Block> mossyShellstoneBricks,
Supplier<Block> crackedShellstoneBricks, Supplier<Block> crackedShellstoneBricks,
Supplier<Block> mossyShellstoneBrickStairs,
Supplier<Block> mossyShellstoneBrickSlab,
Supplier<Block> mossyShellstoneBrickWall,
Supplier<Block> shellstoneStairs, Supplier<Block> shellstoneStairs,
Supplier<Block> shellstoneSlab, Supplier<Block> shellstoneSlab,
Supplier<Block> shellstoneWall, Supplier<Block> shellstoneWall,
@@ -305,6 +314,9 @@ public final class AntarchyObjects {
CHISELED_SHELLSTONE = chiseledShellstone; CHISELED_SHELLSTONE = chiseledShellstone;
MOSSY_SHELLSTONE_BRICKS = mossyShellstoneBricks; MOSSY_SHELLSTONE_BRICKS = mossyShellstoneBricks;
CRACKED_SHELLSTONE_BRICKS = crackedShellstoneBricks; CRACKED_SHELLSTONE_BRICKS = crackedShellstoneBricks;
MOSSY_SHELLSTONE_BRICK_STAIRS = mossyShellstoneBrickStairs;
MOSSY_SHELLSTONE_BRICK_SLAB = mossyShellstoneBrickSlab;
MOSSY_SHELLSTONE_BRICK_WALL = mossyShellstoneBrickWall;
SHELLSTONE_STAIRS = shellstoneStairs; SHELLSTONE_STAIRS = shellstoneStairs;
SHELLSTONE_SLAB = shellstoneSlab; SHELLSTONE_SLAB = shellstoneSlab;
SHELLSTONE_WALL = shellstoneWall; SHELLSTONE_WALL = shellstoneWall;
@@ -9,7 +9,7 @@ public class ToreterrorRenderer extends GeoEntityRenderer<ToreterrorEntity> {
public ToreterrorRenderer(EntityRendererProvider.Context context) { public ToreterrorRenderer(EntityRendererProvider.Context context) {
super(context, new ToreterrorModel()); super(context, new ToreterrorModel());
this.shadowRadius = 2.0F; this.shadowRadius = 1.6F;
} }
@Override @Override
@@ -29,7 +29,8 @@ public class WaterBombRenderer extends EntityRenderer<WaterBombEntity> {
public void render(WaterBombEntity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource buffer, int packedLight) { public void render(WaterBombEntity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource buffer, int packedLight) {
poseStack.pushPose(); poseStack.pushPose();
poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation()); poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation());
poseStack.scale(0.5F, 0.5F, 0.5F); float scale = entity.isHuge() ? 1.5F : 0.5F;
poseStack.scale(scale, scale, scale);
VertexConsumer vertexConsumer = buffer.getBuffer(RenderType.entityTranslucent(WATER_TEXTURE)); VertexConsumer vertexConsumer = buffer.getBuffer(RenderType.entityTranslucent(WATER_TEXTURE));
PoseStack.Pose pose = poseStack.last(); PoseStack.Pose pose = poseStack.last();
@@ -5,6 +5,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
public final class AntarchyDamageSources { public final class AntarchyDamageSources {
public static DamageSource krakenMauling(ServerLevel level, Entity attacker) { public static DamageSource krakenMauling(ServerLevel level, Entity attacker) {
@@ -87,6 +88,34 @@ public final class AntarchyDamageSources {
); );
} }
public static DamageSource toreterrorSpin(ServerLevel level, Entity attacker) {
return new DamageSource(
level.registryAccess()
.registryOrThrow(Registries.DAMAGE_TYPE)
.getHolderOrThrow(AntarchyDamageTypes.TORETERROR_SPIN),
attacker
);
}
public static DamageSource toreterrorJump(ServerLevel level, Entity attacker) {
return new DamageSource(
level.registryAccess()
.registryOrThrow(Registries.DAMAGE_TYPE)
.getHolderOrThrow(AntarchyDamageTypes.TORETERROR_JUMP),
attacker
);
}
public static DamageSource waterSoaked(Level level, @Nullable Entity directEntity, @Nullable Entity causingEntity) {
return new DamageSource(
level.registryAccess()
.registryOrThrow(Registries.DAMAGE_TYPE)
.getHolderOrThrow(AntarchyDamageTypes.WATER_SOAKED),
directEntity,
causingEntity
);
}
private AntarchyDamageSources() { private AntarchyDamageSources() {
} }
} }
@@ -61,6 +61,24 @@ public final class AntarchyDamageTypes {
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cornea_stalk_prick") ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cornea_stalk_prick")
); );
public static final ResourceKey<DamageType> TORETERROR_SPIN =
ResourceKey.create(
Registries.DAMAGE_TYPE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "toreterror_spin")
);
public static final ResourceKey<DamageType> TORETERROR_JUMP =
ResourceKey.create(
Registries.DAMAGE_TYPE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "toreterror_jump")
);
public static final ResourceKey<DamageType> WATER_SOAKED =
ResourceKey.create(
Registries.DAMAGE_TYPE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "water_soaked")
);
private AntarchyDamageTypes() { private AntarchyDamageTypes() {
} }
} }
@@ -133,10 +133,19 @@ public class BomberEntity extends Monster implements GeoEntity {
@Override @Override
public boolean hurt(DamageSource source, float amount) { public boolean hurt(DamageSource source, float amount) {
if (source.is(DamageTypeTags.IS_FIRE)) { if (source.is(DamageTypeTags.IS_FIRE) || source.is(DamageTypeTags.IS_EXPLOSION)) {
this.primeFuse(); this.primeFuse();
return false; return false;
} }
if (this.detonating) {
Entity attacker = source.getDirectEntity();
if (attacker != null) {
Vec3 knockDir = this.position().subtract(attacker.position()).normalize();
this.push(knockDir.x * 0.5, 0.2, knockDir.z * 0.5);
this.hurtMarked = true;
}
return false;
}
Entity directEntity = source.getDirectEntity(); Entity directEntity = source.getDirectEntity();
if (directEntity instanceof AbstractArrow arrow && arrow.isOnFire()) { if (directEntity instanceof AbstractArrow arrow && arrow.isOnFire()) {
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects; import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@@ -25,6 +26,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
import net.minecraft.world.entity.ai.goal.MoveTowardsTargetGoal;
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; 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.HurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
@@ -53,6 +55,8 @@ import java.util.UUID;
public class ToreterrorEntity extends Monster implements GeoEntity { public class ToreterrorEntity extends Monster implements GeoEntity {
private static final EntityDataAccessor<Integer> ANIMATION_STATE = SynchedEntityData.defineId(ToreterrorEntity.class, EntityDataSerializers.INT); private static final EntityDataAccessor<Integer> ANIMATION_STATE = SynchedEntityData.defineId(ToreterrorEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> PHASE_2 = SynchedEntityData.defineId(ToreterrorEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Boolean> JUMP_SHAKING = SynchedEntityData.defineId(ToreterrorEntity.class, EntityDataSerializers.BOOLEAN);
private static final int ANIM_IDLE = 0; private static final int ANIM_IDLE = 0;
private static final int ANIM_WALK = 1; private static final int ANIM_WALK = 1;
@@ -60,29 +64,37 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
private static final int ANIM_JUMP_ATTACK = 3; private static final int ANIM_JUMP_ATTACK = 3;
private static final int ANIM_SPIN = 4; private static final int ANIM_SPIN = 4;
private static final int ANIM_DEATH = 5; private static final int ANIM_DEATH = 5;
private static final int ANIM_RAPID_SHOOT = 6;
private static final int ATTACK_RAPID_FIRE = 0;
private static final int ATTACK_HUGE_BOMB = 1;
private static final int ATTACK_BOMBERS = 2;
private static final int DEATH_TICKS = 60; private static final int DEATH_TICKS = 60;
private static final int SHOOT_TOTAL_TICKS = 80; private static final int SHOOT_TOTAL_TICKS = 75;
private static final int SHOOT_FIRE_START_TICK = 12; private static final int SHOOT_FIRE_START_TICK = 12;
private static final int SHOOT_FIRE_END_TICK = 68; private static final int RAPID_FIRE_INTERVAL = 4;
private static final int SHOOT_FIRE_INTERVAL = 8; private static final int RAPID_FIRE_END_TICK = 60;
private static final int SHOOT_BOMBER_TICK = 12; private static final int SHOOT_BOMBER_TICK = 12;
private static final int SHOOT_BOMBER_SECOND_TICK = 32;
private static final int JUMP_TOTAL_TICKS = 40; private static final int JUMP_TOTAL_TICKS = 40;
private static final int JUMP_LAUNCH_TICK = 10; private static final int JUMP_LAUNCH_TICK = 10;
private static final int JUMP_SHAKE_TICKS = 25;
private static final int SPIN_TOTAL_TICKS = 40; private static final int SPIN_TOTAL_TICKS = 40;
private static final int SPIN_START_TICK = 3; private static final int SPIN_START_TICK = 3;
private static final int SPIN_END_TICK = 22; private static final int SPIN_END_TICK = 22;
private static final int SPIN_HIT_INTERVAL = 5; private static final int SPIN_HIT_INTERVAL = 5;
private static final double RANGED_MIN_RANGE_SQR = 9.0D; private static final double CLOSE_RANGE_SQR = 64.0D;
private static final double JUMP_RANGE_SQR = 400.0D;
private static final double RANGED_MAX_RANGE_SQR = 625.0D; private static final double RANGED_MAX_RANGE_SQR = 625.0D;
private static final double MELEE_RANGE_SQR = 9.0D;
private static final double SPIN_RADIUS = 4.5D; private static final double SPIN_RADIUS = 4.5D;
private static final double JUMP_SHOCKWAVE_RADIUS = 6.0D; private static final double JUMP_SHOCKWAVE_RADIUS = 6.0D;
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("Idle"); private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("Idle");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation SHOOT_ANIM = RawAnimation.begin().thenPlay("shoot").thenLoop("Idle"); private static final RawAnimation SHOOT_ANIM = RawAnimation.begin().thenPlay("shoot").thenLoop("Idle");
private static final RawAnimation RAPID_SHOOT_ANIM = RawAnimation.begin().thenLoop("shoot");
private static final RawAnimation JUMP_ANIM = RawAnimation.begin().thenPlay("jump_attack").thenLoop("Idle"); private static final RawAnimation JUMP_ANIM = RawAnimation.begin().thenPlay("jump_attack").thenLoop("Idle");
private static final RawAnimation SPIN_ANIM = RawAnimation.begin().thenPlay("spin_attack").thenLoop("Idle"); private static final RawAnimation SPIN_ANIM = RawAnimation.begin().thenPlay("spin_attack").thenLoop("Idle");
private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlayAndHold("death"); private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlayAndHold("death");
@@ -98,9 +110,11 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
private int spinCooldown; private int spinCooldown;
private boolean jumpLaunched; private boolean jumpLaunched;
private boolean shockwaveApplied; private boolean shockwaveApplied;
private boolean shootUseWaterBombs; private int jumpShakeTicks;
private int shootAttackType;
private boolean shootBomberFired; private boolean shootBomberFired;
private int shootNextFireElapsed; private boolean shootBomberFiredSecond;
private int rapidFireNextTick;
private final Map<UUID, Integer> spinHitCooldowns = new HashMap<>(); private final Map<UUID, Integer> spinHitCooldowns = new HashMap<>();
public ToreterrorEntity(EntityType<? extends ToreterrorEntity> entityType, Level level) { public ToreterrorEntity(EntityType<? extends ToreterrorEntity> entityType, Level level) {
@@ -112,7 +126,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
return Mob.createMobAttributes() return Mob.createMobAttributes()
.add(Attributes.MAX_HEALTH, AntarchySettings.toreterrorHealth()) .add(Attributes.MAX_HEALTH, AntarchySettings.toreterrorHealth())
.add(Attributes.ATTACK_DAMAGE, 8.0D) .add(Attributes.ATTACK_DAMAGE, 8.0D)
.add(Attributes.MOVEMENT_SPEED, 0.25D) .add(Attributes.MOVEMENT_SPEED, 0.325D)
.add(Attributes.FOLLOW_RANGE, 48.0D) .add(Attributes.FOLLOW_RANGE, 48.0D)
.add(Attributes.KNOCKBACK_RESISTANCE, 0.85D) .add(Attributes.KNOCKBACK_RESISTANCE, 0.85D)
.add(Attributes.ARMOR, 10.0D); .add(Attributes.ARMOR, 10.0D);
@@ -127,6 +141,8 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
protected void defineSynchedData(SynchedEntityData.Builder builder) { protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder); super.defineSynchedData(builder);
builder.define(ANIMATION_STATE, ANIM_IDLE); builder.define(ANIMATION_STATE, ANIM_IDLE);
builder.define(PHASE_2, false);
builder.define(JUMP_SHAKING, false);
} }
@Override @Override
@@ -134,9 +150,10 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
this.goalSelector.addGoal(1, new ToreterrorRangedGoal()); this.goalSelector.addGoal(1, new ToreterrorRangedGoal());
this.goalSelector.addGoal(2, new ToreterrorJumpGoal()); this.goalSelector.addGoal(2, new ToreterrorJumpGoal());
this.goalSelector.addGoal(3, new ToreterrorSpinGoal()); this.goalSelector.addGoal(3, new ToreterrorSpinGoal());
this.goalSelector.addGoal(4, new MoveTowardsTargetGoal(this, 1.0D, 64.0F));
this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 16.0F)); this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 16.0F));
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 0.6D)); this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 0.5D));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers()); this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers());
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::canTargetEntity)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::canTargetEntity));
} }
@@ -151,6 +168,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
return switch (animState) { return switch (animState) {
case ANIM_WALK -> state.setAndContinue(WALK_ANIM); case ANIM_WALK -> state.setAndContinue(WALK_ANIM);
case ANIM_SHOOT -> state.setAndContinue(SHOOT_ANIM); case ANIM_SHOOT -> state.setAndContinue(SHOOT_ANIM);
case ANIM_RAPID_SHOOT -> state.setAndContinue(RAPID_SHOOT_ANIM);
case ANIM_JUMP_ATTACK -> state.setAndContinue(JUMP_ANIM); case ANIM_JUMP_ATTACK -> state.setAndContinue(JUMP_ANIM);
case ANIM_SPIN -> state.setAndContinue(SPIN_ANIM); case ANIM_SPIN -> state.setAndContinue(SPIN_ANIM);
case ANIM_DEATH -> state.setAndContinue(DEATH_ANIM); case ANIM_DEATH -> state.setAndContinue(DEATH_ANIM);
@@ -171,6 +189,12 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
if (this.shootCooldown > 0) this.shootCooldown--; if (this.shootCooldown > 0) this.shootCooldown--;
if (this.jumpCooldown > 0) this.jumpCooldown--; if (this.jumpCooldown > 0) this.jumpCooldown--;
if (this.spinCooldown > 0) this.spinCooldown--; if (this.spinCooldown > 0) this.spinCooldown--;
if (this.jumpShakeTicks > 0) {
this.jumpShakeTicks--;
if (this.jumpShakeTicks <= 0) {
this.entityData.set(JUMP_SHAKING, false);
}
}
this.spinHitCooldowns.replaceAll((uuid, cd) -> cd - 1); this.spinHitCooldowns.replaceAll((uuid, cd) -> cd - 1);
this.spinHitCooldowns.entrySet().removeIf(e -> e.getValue() <= 0); this.spinHitCooldowns.entrySet().removeIf(e -> e.getValue() <= 0);
@@ -193,6 +217,37 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
} }
@Override
public boolean hurt(DamageSource source, float amount) {
if (!this.isPhase2()) {
float halfHealth = this.getMaxHealth() * 0.5F;
if (this.getHealth() - amount <= halfHealth) {
float capDamage = this.getHealth() - halfHealth;
if (capDamage <= 0.0F) {
this.enterPhase2();
return false;
}
boolean result = super.hurt(source, capDamage);
if (result) this.enterPhase2();
return result;
}
}
return super.hurt(source, amount);
}
private void enterPhase2() {
this.entityData.set(PHASE_2, true);
this.bossEvent.setColor(BossEvent.BossBarColor.RED);
}
public boolean isPhase2() {
return this.entityData.get(PHASE_2);
}
public boolean isJumpShaking() {
return this.entityData.get(JUMP_SHAKING);
}
@Override @Override
public void startSeenByPlayer(ServerPlayer player) { public void startSeenByPlayer(ServerPlayer player) {
super.startSeenByPlayer(player); super.startSeenByPlayer(player);
@@ -283,18 +338,32 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
} }
private void tickShootAnimation() { private void tickShootAnimation() {
this.setAnimationState(ANIM_SHOOT);
int elapsed = SHOOT_TOTAL_TICKS - this.shootAnimTicks; int elapsed = SHOOT_TOTAL_TICKS - this.shootAnimTicks;
if (this.shootUseWaterBombs) { switch (this.shootAttackType) {
if (elapsed >= this.shootNextFireElapsed && this.shootNextFireElapsed <= SHOOT_FIRE_END_TICK) { case ATTACK_RAPID_FIRE -> {
this.shootNextFireElapsed += SHOOT_FIRE_INTERVAL; this.setAnimationState(ANIM_RAPID_SHOOT);
this.fireWaterBomb(); if (elapsed >= this.rapidFireNextTick && elapsed < RAPID_FIRE_END_TICK) {
this.rapidFireNextTick += RAPID_FIRE_INTERVAL;
this.fireRapidBomb();
} }
} else { }
case ATTACK_HUGE_BOMB -> {
this.setAnimationState(ANIM_SHOOT);
if (elapsed == SHOOT_FIRE_START_TICK) {
this.fireHugeBomb();
}
}
default -> {
this.setAnimationState(ANIM_SHOOT);
if (!this.shootBomberFired && elapsed >= SHOOT_BOMBER_TICK) { if (!this.shootBomberFired && elapsed >= SHOOT_BOMBER_TICK) {
this.shootBomberFired = true; this.shootBomberFired = true;
this.fireBomberBurst(); this.fireBomberBurst();
} }
if (this.isPhase2() && !this.shootBomberFiredSecond && elapsed >= SHOOT_BOMBER_SECOND_TICK) {
this.shootBomberFiredSecond = true;
this.fireBomberBurst();
}
}
} }
this.getNavigation().stop(); this.getNavigation().stop();
this.setDeltaMovement(this.getDeltaMovement().scale(0.85D)); this.setDeltaMovement(this.getDeltaMovement().scale(0.85D));
@@ -322,6 +391,8 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
if (this.jumpLaunched && this.onGround() && elapsed > JUMP_LAUNCH_TICK + 3 && !this.shockwaveApplied) { if (this.jumpLaunched && this.onGround() && elapsed > JUMP_LAUNCH_TICK + 3 && !this.shockwaveApplied) {
this.shockwaveApplied = true; this.shockwaveApplied = true;
this.applyJumpShockwave(); this.applyJumpShockwave();
this.jumpShakeTicks = JUMP_SHAKE_TICKS;
this.entityData.set(JUMP_SHAKING, true);
} }
this.jumpAnimTicks--; this.jumpAnimTicks--;
if (this.jumpAnimTicks <= 0) { if (this.jumpAnimTicks <= 0) {
@@ -344,15 +415,54 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
} }
} }
private void fireWaterBomb() { private Vec3 calcLaunchVelocity(Vec3 from, Vec3 to, double minSpeed) {
Vec3 diff = to.subtract(from);
double dh = Math.sqrt(diff.x * diff.x + diff.z * diff.z);
double dy = diff.y;
double gravity = AntarchySettings.waterBombGravity();
// Choose travel time based on horizontal distance at minSpeed, minimum 8 ticks
double t = Math.max(8.0, dh / minSpeed);
double vx = diff.x / t;
double vz = diff.z / t;
// Compensate for gravity accumulating over t ticks
double vy = dy / t + 0.5 * gravity * t;
return new Vec3(vx, vy, vz);
}
private void fireRapidBomb() {
if (!(this.level() instanceof ServerLevel serverLevel)) return; if (!(this.level() instanceof ServerLevel serverLevel)) return;
LivingEntity target = this.getTarget(); LivingEntity target = this.getTarget();
if (target == null) return; if (target == null) return;
Vec3 from = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 to = new Vec3(target.getX(), target.getEyeY(), target.getZ());
Vec3 baseVel = calcLaunchVelocity(from, to, 1.5);
int count = this.isPhase2() ? 2 : 1;
for (int i = 0; i < count; i++) {
double spread = count > 1 ? (i - 0.5) * 0.15 : 0.0;
Vec3 vel = new Vec3(baseVel.x + spread, baseVel.y, baseVel.z - spread);
WaterBombEntity bomb = new WaterBombEntity(this.level(), this); WaterBombEntity bomb = new WaterBombEntity(this.level(), this);
bomb.moveTo(this.getX(), this.getEyeY(), this.getZ(), this.getYRot(), 0); bomb.setPos(from.x, from.y, from.z);
bomb.shootFromRotation(this, this.getXRot(), this.getYRot(), 0.0F, 1.4F, 1.5F); bomb.setDeltaMovement(vel);
bomb.hasImpulse = true;
serverLevel.addFreshEntity(bomb); serverLevel.addFreshEntity(bomb);
} }
}
private void fireHugeBomb() {
if (!(this.level() instanceof ServerLevel serverLevel)) return;
LivingEntity target = this.getTarget();
if (target == null) return;
this.getLookControl().setLookAt(target, 30.0F, 30.0F);
Vec3 from = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 to = new Vec3(target.getX(), target.getY(), target.getZ());
Vec3 vel = calcLaunchVelocity(from, to, 0.9);
WaterBombEntity bomb = new WaterBombEntity(this.level(), this, true);
bomb.setPos(from.x, from.y, from.z);
bomb.setDeltaMovement(vel);
bomb.hasImpulse = true;
serverLevel.addFreshEntity(bomb);
}
private void fireBomberBurst() { private void fireBomberBurst() {
if (!(this.level() instanceof ServerLevel serverLevel)) return; if (!(this.level() instanceof ServerLevel serverLevel)) return;
@@ -380,7 +490,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
List<LivingEntity> victims = this.level().getEntitiesOfClass(LivingEntity.class, shockArea, this::canTargetEntity); List<LivingEntity> victims = this.level().getEntitiesOfClass(LivingEntity.class, shockArea, this::canTargetEntity);
float damage = (float) AntarchySettings.toreterrorJumpAttackDamage(); float damage = (float) AntarchySettings.toreterrorJumpAttackDamage();
for (LivingEntity victim : victims) { for (LivingEntity victim : victims) {
victim.hurt(this.damageSources().mobAttack(this), damage); victim.hurt(AntarchyDamageSources.toreterrorJump(serverLevel, this), damage);
Vec3 knockDir = victim.position().subtract(this.position()).normalize().add(0, 0.4D, 0); Vec3 knockDir = victim.position().subtract(this.position()).normalize().add(0, 0.4D, 0);
double knockback = AntarchySettings.toreterrorJumpAttackKnockback(); double knockback = AntarchySettings.toreterrorJumpAttackKnockback();
victim.push(knockDir.x * knockback, 0.5D, knockDir.z * knockback); victim.push(knockDir.x * knockback, 0.5D, knockDir.z * knockback);
@@ -393,14 +503,14 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
private void applySpinDamage() { private void applySpinDamage() {
if (!(this.level() instanceof ServerLevel)) return; if (!(this.level() instanceof ServerLevel)) return;
AABB spinArea = this.getBoundingBox().inflate(SPIN_RADIUS, 2.0D, SPIN_RADIUS); AABB spinArea = this.getBoundingBox().inflate(SPIN_RADIUS, SPIN_RADIUS, SPIN_RADIUS);
List<LivingEntity> victims = this.level().getEntitiesOfClass(LivingEntity.class, spinArea, this::canTargetEntity); List<LivingEntity> victims = this.level().getEntitiesOfClass(LivingEntity.class, spinArea, this::canTargetEntity);
float damage = (float) AntarchySettings.toreterrorSpinDamage(); float damage = (float) AntarchySettings.toreterrorSpinDamage();
double knockback = AntarchySettings.toreterrorSpinKnockback(); double knockback = AntarchySettings.toreterrorSpinKnockback();
for (LivingEntity victim : victims) { for (LivingEntity victim : victims) {
UUID id = victim.getUUID(); UUID id = victim.getUUID();
if (this.spinHitCooldowns.getOrDefault(id, 0) > 0) continue; if (this.spinHitCooldowns.getOrDefault(id, 0) > 0) continue;
if (victim.hurt(this.damageSources().mobAttack(this), damage)) { if (victim.hurt(AntarchyDamageSources.toreterrorSpin((ServerLevel) this.level(), this), damage)) {
this.spinHitCooldowns.put(id, 20); this.spinHitCooldowns.put(id, 20);
Vec3 knockDir = victim.position().subtract(this.position()).normalize(); Vec3 knockDir = victim.position().subtract(this.position()).normalize();
victim.push(knockDir.x * knockback, 0.35D, knockDir.z * knockback); victim.push(knockDir.x * knockback, 0.35D, knockDir.z * knockback);
@@ -428,16 +538,26 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false; if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false;
if (ToreterrorEntity.this.shootCooldown > 0) return false; if (ToreterrorEntity.this.shootCooldown > 0) return false;
double distSqr = ToreterrorEntity.this.distanceToSqr(target); double distSqr = ToreterrorEntity.this.distanceToSqr(target);
return distSqr >= RANGED_MIN_RANGE_SQR && distSqr <= RANGED_MAX_RANGE_SQR return distSqr > CLOSE_RANGE_SQR && distSqr <= RANGED_MAX_RANGE_SQR
&& ToreterrorEntity.this.hasLineOfSight(target); && ToreterrorEntity.this.hasLineOfSight(target);
} }
@Override @Override
public void start() { public void start() {
ToreterrorEntity.this.shootAnimTicks = SHOOT_TOTAL_TICKS; ToreterrorEntity.this.shootAnimTicks = SHOOT_TOTAL_TICKS;
ToreterrorEntity.this.shootUseWaterBombs = ToreterrorEntity.this.random.nextFloat() < (float) AntarchySettings.toreterrorRangedWaterBombChance();
ToreterrorEntity.this.shootNextFireElapsed = SHOOT_FIRE_START_TICK;
ToreterrorEntity.this.shootBomberFired = false; ToreterrorEntity.this.shootBomberFired = false;
ToreterrorEntity.this.shootBomberFiredSecond = false;
ToreterrorEntity.this.rapidFireNextTick = 0;
float roll = ToreterrorEntity.this.random.nextFloat();
if (ToreterrorEntity.this.isPhase2()) {
if (roll < 0.5F) ToreterrorEntity.this.shootAttackType = ATTACK_RAPID_FIRE;
else if (roll < 0.65F) ToreterrorEntity.this.shootAttackType = ATTACK_HUGE_BOMB;
else ToreterrorEntity.this.shootAttackType = ATTACK_BOMBERS;
} else {
if (roll < 0.5F) ToreterrorEntity.this.shootAttackType = ATTACK_RAPID_FIRE;
else if (roll < 0.7F) ToreterrorEntity.this.shootAttackType = ATTACK_HUGE_BOMB;
else ToreterrorEntity.this.shootAttackType = ATTACK_BOMBERS;
}
} }
@Override @Override
@@ -462,7 +582,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false; if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false;
if (ToreterrorEntity.this.jumpCooldown > 0) return false; if (ToreterrorEntity.this.jumpCooldown > 0) return false;
double distSqr = ToreterrorEntity.this.distanceToSqr(target); double distSqr = ToreterrorEntity.this.distanceToSqr(target);
return distSqr <= RANGED_MAX_RANGE_SQR && ToreterrorEntity.this.onGround(); return distSqr <= JUMP_RANGE_SQR && ToreterrorEntity.this.onGround();
} }
@Override @Override
@@ -493,7 +613,7 @@ public class ToreterrorEntity extends Monster implements GeoEntity {
LivingEntity target = ToreterrorEntity.this.getTarget(); LivingEntity target = ToreterrorEntity.this.getTarget();
if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false; if (target == null || ToreterrorEntity.this.isInAttackAnimation()) return false;
if (ToreterrorEntity.this.spinCooldown > 0) return false; if (ToreterrorEntity.this.spinCooldown > 0) return false;
return ToreterrorEntity.this.distanceToSqr(target) <= MELEE_RANGE_SQR && ToreterrorEntity.this.onGround(); return ToreterrorEntity.this.distanceToSqr(target) <= CLOSE_RANGE_SQR && ToreterrorEntity.this.onGround();
} }
@Override @Override
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects; import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.damage.AntarchyDamageSources;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@@ -18,6 +19,8 @@ import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.network.syncher.SynchedEntityData;
import java.util.HashMap; import java.util.HashMap;
@@ -26,6 +29,8 @@ import java.util.UUID;
public class WaterBombEntity extends ThrowableProjectile { public class WaterBombEntity extends ThrowableProjectile {
private static final EntityDataAccessor<Boolean> HUGE = SynchedEntityData.defineId(WaterBombEntity.class, EntityDataSerializers.BOOLEAN);
private int lifetimeTicks; private int lifetimeTicks;
private final Map<UUID, Integer> hitCooldowns = new HashMap<>(); private final Map<UUID, Integer> hitCooldowns = new HashMap<>();
@@ -39,8 +44,18 @@ public class WaterBombEntity extends ThrowableProjectile {
this.lifetimeTicks = AntarchySettings.waterBombLifetimeTicks(); this.lifetimeTicks = AntarchySettings.waterBombLifetimeTicks();
} }
public WaterBombEntity(Level level, LivingEntity owner, boolean huge) {
this(level, owner);
this.entityData.set(HUGE, huge);
}
@Override @Override
protected void defineSynchedData(SynchedEntityData.Builder builder) { protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(HUGE, false);
}
public boolean isHuge() {
return this.entityData.get(HUGE);
} }
@Override @Override
@@ -75,8 +90,8 @@ public class WaterBombEntity extends ThrowableProjectile {
UUID id = entity.getUUID(); UUID id = entity.getUUID();
if (this.hitCooldowns.getOrDefault(id, 0) > 0) return; if (this.hitCooldowns.getOrDefault(id, 0) > 0) return;
float damage = (float) AntarchySettings.waterBombDamage(); float damage = (float) AntarchySettings.waterBombDamage() * (this.isHuge() ? 3.0F : 1.0F);
if (living.hurt(this.damageSources().thrown(this, this.getOwner()), damage)) { if (living.hurt(AntarchyDamageSources.waterSoaked(this.level(), this, this.getOwner()), damage)) {
this.hitCooldowns.put(id, 15); this.hitCooldowns.put(id, 15);
Vec3 knockDir = living.position().subtract(this.position()).normalize(); Vec3 knockDir = living.position().subtract(this.position()).normalize();
double knockback = AntarchySettings.waterBombKnockback(); double knockback = AntarchySettings.waterBombKnockback();
@@ -89,10 +104,19 @@ public class WaterBombEntity extends ThrowableProjectile {
protected void onHitBlock(BlockHitResult result) { protected void onHitBlock(BlockHitResult result) {
BlockPos hitPos = result.getBlockPos().relative(result.getDirection()); BlockPos hitPos = result.getBlockPos().relative(result.getDirection());
Level level = this.level(); Level level = this.level();
if (this.isHuge()) {
for (BlockPos pos : BlockPos.betweenClosed(hitPos.offset(-1, 0, -1), hitPos.offset(1, 0, 1))) {
if (level.isEmptyBlock(pos)) {
level.setBlock(pos, Blocks.WATER.defaultBlockState(), 3);
level.scheduleTick(pos, Fluids.WATER, 2);
}
}
} else {
if (level.isEmptyBlock(hitPos) && level.getBlockState(hitPos.below()).isSolid()) { if (level.isEmptyBlock(hitPos) && level.getBlockState(hitPos.below()).isSolid()) {
level.setBlock(hitPos, Blocks.WATER.defaultBlockState().setValue(LiquidBlock.LEVEL, 2), 3); level.setBlock(hitPos, Blocks.WATER.defaultBlockState().setValue(LiquidBlock.LEVEL, 1), 3);
level.scheduleTick(hitPos, Fluids.WATER, 2); level.scheduleTick(hitPos, Fluids.WATER, 2);
} }
}
this.discard(); this.discard();
} }
@@ -100,11 +124,13 @@ public class WaterBombEntity extends ThrowableProjectile {
public void addAdditionalSaveData(CompoundTag tag) { public void addAdditionalSaveData(CompoundTag tag) {
super.addAdditionalSaveData(tag); super.addAdditionalSaveData(tag);
tag.putInt("LifetimeTicks", this.lifetimeTicks); tag.putInt("LifetimeTicks", this.lifetimeTicks);
tag.putBoolean("Huge", this.isHuge());
} }
@Override @Override
public void readAdditionalSaveData(CompoundTag tag) { public void readAdditionalSaveData(CompoundTag tag) {
super.readAdditionalSaveData(tag); super.readAdditionalSaveData(tag);
this.lifetimeTicks = tag.contains("LifetimeTicks") ? tag.getInt("LifetimeTicks") : AntarchySettings.waterBombLifetimeTicks(); this.lifetimeTicks = tag.contains("LifetimeTicks") ? tag.getInt("LifetimeTicks") : AntarchySettings.waterBombLifetimeTicks();
if (tag.contains("Huge")) this.entityData.set(HUGE, tag.getBoolean("Huge"));
} }
} }
@@ -1,12 +1,144 @@
package com.craisinlord.antarchy.content.item; package com.craisinlord.antarchy.content.item;
import java.util.List;
import java.util.Locale;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.ChatFormatting;
import net.minecraft.core.Holder; import net.minecraft.core.Holder;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
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.item.ArmorItem; import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ArmorMaterial; 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 PrimordialArmorItem extends ArmorItem { public class PrimordialArmorItem extends ArmorItem {
private final Type armorType;
public PrimordialArmorItem(Holder<ArmorMaterial> material, Type type, Properties properties) { public PrimordialArmorItem(Holder<ArmorMaterial> material, Type type, Properties properties) {
super(material, type, properties); super(material, type, properties);
this.armorType = type;
}
@Override
public ItemAttributeModifiers getDefaultAttributeModifiers() {
String prefix = "primordial_" + this.armorType.getName();
ItemAttributeModifiers.Builder builder = ItemAttributeModifiers.builder()
.add(
Attributes.ARMOR,
new AttributeModifier(
ResourceLocation.withDefaultNamespace(prefix + "_armor"),
getDefense(),
AttributeModifier.Operation.ADD_VALUE
),
EquipmentSlotGroup.bySlot(this.armorType.getSlot())
)
.add(
Attributes.ARMOR_TOUGHNESS,
new AttributeModifier(
ResourceLocation.withDefaultNamespace(prefix + "_armor_toughness"),
getToughness(),
AttributeModifier.Operation.ADD_VALUE
),
EquipmentSlotGroup.bySlot(this.armorType.getSlot())
);
double knockbackResistance = getKnockbackResistance(this.armorType);
if (knockbackResistance > 0.0D) {
builder.add(
Attributes.KNOCKBACK_RESISTANCE,
new AttributeModifier(
ResourceLocation.withDefaultNamespace(prefix + "_knockback_resistance"),
knockbackResistance,
AttributeModifier.Operation.ADD_VALUE
),
EquipmentSlotGroup.bySlot(this.armorType.getSlot())
);
}
builder.add(
Attributes.ATTACK_KNOCKBACK,
new AttributeModifier(
ResourceLocation.withDefaultNamespace(prefix + "_attack_knockback"),
AntarchySettings.primordialArmorKnockbackPerPiece(),
AttributeModifier.Operation.ADD_VALUE
),
EquipmentSlotGroup.bySlot(this.armorType.getSlot())
);
return builder.build();
}
@Override
public int getDefense() {
return super.getDefense();
}
@Override
public float getToughness() {
return super.getToughness();
}
@Override
public boolean isEnchantable(ItemStack stack) {
return stack.getCount() == 1;
}
@Override
public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) {
if (!level.isClientSide && this.armorType == Type.HELMET && entity instanceof LivingEntity living) {
if (living.getItemBySlot(EquipmentSlot.HEAD) == stack) {
living.addEffect(new MobEffectInstance(MobEffects.WATER_BREATHING, 40, 0, false, false, true));
}
}
super.inventoryTick(stack, level, entity, slotId, isSelected);
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
if (this.armorType == Type.HELMET) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.primordial_helmet_water_breathing").withStyle(ChatFormatting.AQUA));
}
String knockbackDealt = String.format(Locale.ROOT, "%.1f", AntarchySettings.primordialArmorKnockbackPerPiece());
tooltipComponents.add(Component.translatable("tooltip.antarchy.primordial_armor_knockback_dealt", knockbackDealt).withStyle(ChatFormatting.YELLOW));
tooltipComponents.add(Component.translatable("tooltip.antarchy.primordial_armor_set_bonus").withStyle(ChatFormatting.DARK_GREEN));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
public static double getKnockbackDealtBonus(LivingEntity entity) {
int pieces = 0;
for (ItemStack armorStack : entity.getArmorSlots()) {
if (armorStack.getItem() instanceof PrimordialArmorItem) {
pieces++;
}
}
return pieces * AntarchySettings.primordialArmorKnockbackPerPiece();
}
public static boolean hasFullSet(LivingEntity entity) {
return entity.getItemBySlot(EquipmentSlot.HEAD).getItem() instanceof PrimordialArmorItem
&& entity.getItemBySlot(EquipmentSlot.CHEST).getItem() instanceof PrimordialArmorItem
&& entity.getItemBySlot(EquipmentSlot.LEGS).getItem() instanceof PrimordialArmorItem
&& entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof PrimordialArmorItem;
}
private static double getKnockbackResistance(Type armorType) {
return switch (armorType) {
case HELMET -> 0.20D;
case CHESTPLATE, BODY -> 0.30D;
case LEGGINGS -> 0.30D;
case BOOTS -> 0.20D;
};
} }
} }
@@ -293,4 +293,5 @@ public abstract class LivingEntityMixin {
); );
original.call(level, particle, pos.x, pos.y, pos.z, dx, dy, dz); original.call(level, particle, pos.x, pos.y, pos.z, dx, dy, dz);
} }
} }
@@ -2,9 +2,14 @@ package com.craisinlord.antarchy.mixins.gravity;
import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.item.GravityGunItem; import com.craisinlord.antarchy.content.item.GravityGunItem;
import com.craisinlord.antarchy.content.item.PrimordialArmorItem;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
@@ -27,4 +32,34 @@ public abstract class PlayerAttackMixin {
ci.cancel(); ci.cancel();
} }
} }
/*
* Primordial's full set bonus makes player melee knockback ignore the target's knockback resistance.
*/
@WrapOperation(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;knockback(DDD)V"))
private void antarchy$ignorePrimordialKnockbackResistance(LivingEntity target, double strength, double x, double z, Operation<Void> original) {
Player player = (Player) (Object) this;
if (!PrimordialArmorItem.hasFullSet(player)) {
original.call(target, strength, x, z);
return;
}
if (strength <= 0.0D) {
return;
}
target.hasImpulse = true;
while (x * x + z * z < 1.0E-5D) {
x = (Math.random() - Math.random()) * 0.01D;
z = (Math.random() - Math.random()) * 0.01D;
}
Vec3 previousMovement = target.getDeltaMovement();
Vec3 knockback = new Vec3(x, 0.0D, z).normalize().scale(strength);
target.setDeltaMovement(
previousMovement.x / 2.0D - knockback.x,
target.onGround() ? Math.min(0.4D, previousMovement.y / 2.0D + strength) : previousMovement.y,
previousMovement.z / 2.0D - knockback.z
);
}
} }
@@ -0,0 +1,13 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/mossy_shellstone_bricks"
},
"type=bottom": {
"model": "antarchy:block/mossy_shellstone_brick_slab"
},
"type=top": {
"model": "antarchy:block/mossy_shellstone_brick_slab_top"
}
}
}
@@ -0,0 +1,209 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_shellstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/mossy_shellstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,40 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/mossy_shellstone_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -37,6 +37,9 @@
"block.antarchy.shellstone_bricks": "Shellstone Bricks", "block.antarchy.shellstone_bricks": "Shellstone Bricks",
"block.antarchy.chiseled_shellstone": "Chiseled Shellstone", "block.antarchy.chiseled_shellstone": "Chiseled Shellstone",
"block.antarchy.mossy_shellstone_bricks": "Mossy Shellstone Bricks", "block.antarchy.mossy_shellstone_bricks": "Mossy Shellstone Bricks",
"block.antarchy.mossy_shellstone_brick_stairs": "Mossy Shellstone Brick Stairs",
"block.antarchy.mossy_shellstone_brick_slab": "Mossy Shellstone Brick Slab",
"block.antarchy.mossy_shellstone_brick_wall": "Mossy Shellstone Brick Wall",
"block.antarchy.cracked_shellstone_bricks": "Cracked Shellstone Bricks", "block.antarchy.cracked_shellstone_bricks": "Cracked Shellstone Bricks",
"block.antarchy.shellstone_stairs": "Shellstone Stairs", "block.antarchy.shellstone_stairs": "Shellstone Stairs",
"block.antarchy.shellstone_slab": "Shellstone Slab", "block.antarchy.shellstone_slab": "Shellstone Slab",
@@ -195,6 +198,9 @@
"tooltip.antarchy.nightmare_armor_double_damage": "%s%% chance to deal double damage", "tooltip.antarchy.nightmare_armor_double_damage": "%s%% chance to deal double damage",
"tooltip.antarchy.nightmare_armor_set_bonus": "Full Set: Wither & Dread immunity", "tooltip.antarchy.nightmare_armor_set_bonus": "Full Set: Wither & Dread immunity",
"tooltip.antarchy.nightmare_sword": "Deals more damage as your health drops.", "tooltip.antarchy.nightmare_sword": "Deals more damage as your health drops.",
"tooltip.antarchy.primordial_helmet_water_breathing": "Grants the wearer Water Breathing",
"tooltip.antarchy.primordial_armor_knockback_dealt": "Adds %s attack knockback per piece",
"tooltip.antarchy.primordial_armor_set_bonus": "Full Set: Attacks ignore enemy knockback resistance",
"attribute.antarchy.double_damage_chance": "Double Damage Chance", "attribute.antarchy.double_damage_chance": "Double Damage Chance",
"attribute.antarchy.bloodglass_max_hearts": "Max Bloodglass Hearts", "attribute.antarchy.bloodglass_max_hearts": "Max Bloodglass Hearts",
"item.antarchy.molevore_nose": "Molevore Nose", "item.antarchy.molevore_nose": "Molevore Nose",
@@ -211,6 +217,9 @@
"item.antarchy.shellstone_bricks": "Shellstone Bricks", "item.antarchy.shellstone_bricks": "Shellstone Bricks",
"item.antarchy.chiseled_shellstone": "Chiseled Shellstone", "item.antarchy.chiseled_shellstone": "Chiseled Shellstone",
"item.antarchy.mossy_shellstone_bricks": "Mossy Shellstone Bricks", "item.antarchy.mossy_shellstone_bricks": "Mossy Shellstone Bricks",
"item.antarchy.mossy_shellstone_brick_stairs": "Mossy Shellstone Brick Stairs",
"item.antarchy.mossy_shellstone_brick_slab": "Mossy Shellstone Brick Slab",
"item.antarchy.mossy_shellstone_brick_wall": "Mossy Shellstone Brick Wall",
"item.antarchy.cracked_shellstone_bricks": "Cracked Shellstone Bricks", "item.antarchy.cracked_shellstone_bricks": "Cracked Shellstone Bricks",
"item.antarchy.shellstone_stairs": "Shellstone Stairs", "item.antarchy.shellstone_stairs": "Shellstone Stairs",
"item.antarchy.shellstone_slab": "Shellstone Slab", "item.antarchy.shellstone_slab": "Shellstone Slab",
@@ -464,6 +473,12 @@
"death.attack.emperor_scorpion_sting": "%1$s was stung by the Emperor Scorpion", "death.attack.emperor_scorpion_sting": "%1$s was stung by the Emperor Scorpion",
"death.attack.emperor_scorpion_sting.player": "%1$s was stung by the Emperor Scorpion while fighting %2$s", "death.attack.emperor_scorpion_sting.player": "%1$s was stung by the Emperor Scorpion while fighting %2$s",
"death.attack.cornea_stalk_prick": "%1$s was pricked to death by a Cornea Stalk", "death.attack.cornea_stalk_prick": "%1$s was pricked to death by a Cornea Stalk",
"death.attack.toreterror_spin": "%1$s was beybladed to death by Toreterror",
"death.attack.toreterror_spin.player": "%1$s was beybladed to death by Toreterror",
"death.attack.toreterror_jump": "%1$s was pounded to death by Toreterror",
"death.attack.toreterror_jump.player": "%1$s was pounded to death by Toreterror",
"death.attack.water_soaked": "%1$s was super soaked to death by %2$s",
"death.attack.water_soaked.player": "%1$s was super soaked to death by %2$s",
"entity.antarchy.lucid": "Lucid", "entity.antarchy.lucid": "Lucid",
"item.antarchy.lucid_spawn_egg": "Lucid Spawn Egg", "item.antarchy.lucid_spawn_egg": "Lucid Spawn Egg",
"item.antarchy.lucid_eye": "Lucid Eye", "item.antarchy.lucid_eye": "Lucid Eye",
@@ -670,6 +685,12 @@
"death.attack.emperor_scorpion_sting": "%1$s was stung by the Emperor Scorpion", "death.attack.emperor_scorpion_sting": "%1$s was stung by the Emperor Scorpion",
"death.attack.emperor_scorpion_sting.player": "%1$s was stung by the Emperor Scorpion while fighting %2$s", "death.attack.emperor_scorpion_sting.player": "%1$s was stung by the Emperor Scorpion while fighting %2$s",
"death.attack.cornea_stalk_prick": "%1$s was pricked to death by a Cornea Stalk", "death.attack.cornea_stalk_prick": "%1$s was pricked to death by a Cornea Stalk",
"death.attack.toreterror_spin": "%1$s was beybladed to death by Toreterror",
"death.attack.toreterror_spin.player": "%1$s was beybladed to death by Toreterror",
"death.attack.toreterror_jump": "%1$s was pounded to death by Toreterror",
"death.attack.toreterror_jump.player": "%1$s was pounded to death by Toreterror",
"death.attack.water_soaked": "%1$s was super soaked to death by %2$s",
"death.attack.water_soaked.player": "%1$s was super soaked to death by %2$s",
"entity.antarchy.reverie": "Reverie", "entity.antarchy.reverie": "Reverie",
"biome.antarchy.thoraxis": "Thoraxis", "biome.antarchy.thoraxis": "Thoraxis",
"biome.antarchy.nightmare_wastes": "Nightmare Wastes", "biome.antarchy.nightmare_wastes": "Nightmare Wastes",
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "antarchy:block/shellstone/mossy_shellstone_bricks",
"side": "antarchy:block/shellstone/mossy_shellstone_bricks",
"top": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "antarchy:block/shellstone/mossy_shellstone_bricks",
"side": "antarchy:block/shellstone/mossy_shellstone_bricks",
"top": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/stairs",
"textures": {
"bottom": "antarchy:block/shellstone/mossy_shellstone_bricks",
"side": "antarchy:block/shellstone/mossy_shellstone_bricks",
"top": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/inner_stairs",
"textures": {
"bottom": "antarchy:block/shellstone/mossy_shellstone_bricks",
"side": "antarchy:block/shellstone/mossy_shellstone_bricks",
"top": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/outer_stairs",
"textures": {
"bottom": "antarchy:block/shellstone/mossy_shellstone_bricks",
"side": "antarchy:block/shellstone/mossy_shellstone_bricks",
"top": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_wall_post",
"textures": {
"wall": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_wall_side",
"textures": {
"wall": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_wall_side_tall",
"textures": {
"wall": "antarchy:block/shellstone/mossy_shellstone_bricks"
}
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:block/mossy_shellstone_brick_slab"
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:block/mossy_shellstone_brick_stairs"
}
@@ -0,0 +1,3 @@
{
"parent": "antarchy:block/mossy_shellstone_brick_wall_inventory"
}
@@ -2,21 +2,21 @@
"parent": "builtin/entity", "parent": "builtin/entity",
"display": { "display": {
"thirdperson_righthand": { "thirdperson_righthand": {
"translation": [0, -2, 5], "translation": [0, -6, 5],
"scale": [0.7, 0.7, 0.7] "scale": [0.7, 0.7, 0.7]
}, },
"thirdperson_lefthand": { "thirdperson_lefthand": {
"translation": [0, -2, 5], "translation": [0, -6, 5],
"scale": [0.7, 0.7, 0.7] "scale": [0.7, 0.7, 0.7]
}, },
"firstperson_righthand": { "firstperson_righthand": {
"rotation": [10, 0, -5], "rotation": [10, 0, -2],
"translation": [2, 0, 1], "translation": [0, 0, 2],
"scale": [0.5, 0.5, 0.5] "scale": [0.5, 0.5, 0.5]
}, },
"firstperson_lefthand": { "firstperson_lefthand": {
"rotation": [10, 0, -5], "rotation": [10, 0, -2],
"translation": [2, 0, 1], "translation": [0, 0, 2],
"scale": [0.5, 0.5, 0.5] "scale": [0.5, 0.5, 0.5]
}, },
"gui": { "gui": {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

@@ -0,0 +1,7 @@
{
"message_id": "toreterror_jump",
"scaling": "when_caused_by_living_non_player",
"exhaustion": 0.1,
"effects": "hurt",
"death_message_type": "default"
}
@@ -0,0 +1,7 @@
{
"message_id": "toreterror_spin",
"scaling": "when_caused_by_living_non_player",
"exhaustion": 0.1,
"effects": "hurt",
"death_message_type": "default"
}
@@ -0,0 +1,7 @@
{
"message_id": "water_soaked",
"scaling": "when_caused_by_living_non_player",
"exhaustion": 0.1,
"effects": "hurt",
"death_message_type": "default"
}
@@ -0,0 +1,35 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"conditions": [
{
"block": "antarchy:mossy_shellstone_brick_slab",
"condition": "minecraft:block_state_property",
"properties": {
"type": "double"
}
}
],
"count": 2.0,
"function": "minecraft:set_count"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "antarchy:mossy_shellstone_brick_slab"
}
],
"rolls": 1.0
}
],
"random_sequence": "antarchy:blocks/mossy_shellstone_brick_slab"
}
@@ -0,0 +1,16 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "antarchy:mossy_shellstone_brick_stairs"
}
],
"rolls": 1.0
}
],
"random_sequence": "antarchy:blocks/mossy_shellstone_brick_stairs"
}
@@ -0,0 +1,16 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "antarchy:mossy_shellstone_brick_wall"
}
],
"rolls": 1.0
}
],
"random_sequence": "antarchy:blocks/mossy_shellstone_brick_wall"
}
@@ -18,6 +18,7 @@
{ {
"function": "minecraft:looting_enchant", "function": "minecraft:looting_enchant",
"count": { "count": {
"type": "minecraft:uniform",
"min": 0.0, "min": 0.0,
"max": 1.0 "max": 1.0
} }
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "antarchy:mossy_shellstone_bricks"
}
},
"pattern": [
"###"
],
"result": {
"count": 6,
"id": "antarchy:mossy_shellstone_brick_slab"
}
}
@@ -0,0 +1,9 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "antarchy:mossy_shellstone_bricks"
},
"result": {
"id": "antarchy:mossy_shellstone_brick_slab"
}
}
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "antarchy:mossy_shellstone_bricks"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"count": 4,
"id": "antarchy:mossy_shellstone_brick_stairs"
}
}
@@ -0,0 +1,9 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "antarchy:mossy_shellstone_bricks"
},
"result": {
"id": "antarchy:mossy_shellstone_brick_stairs"
}
}
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "antarchy:mossy_shellstone_bricks"
}
},
"pattern": [
"###",
"###"
],
"result": {
"count": 6,
"id": "antarchy:mossy_shellstone_brick_wall"
}
}
@@ -0,0 +1,9 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "antarchy:mossy_shellstone_bricks"
},
"result": {
"id": "antarchy:mossy_shellstone_brick_wall"
}
}
@@ -1,15 +0,0 @@
{
"values": [
"minecraft:bedrock",
"minecraft:obsidian",
"minecraft:crying_obsidian",
"minecraft:reinforced_deepslate",
"minecraft:barrier",
"minecraft:end_portal_frame",
"minecraft:end_portal",
"minecraft:nether_portal",
"minecraft:spawner",
"minecraft:trial_spawner",
"minecraft:vault"
]
}
@@ -0,0 +1,32 @@
{
"replace": false,
"values": [
"#minecraft:is_ocean",
"#minecraft:is_deep_ocean",
"#minecraft:is_beach",
{
"id": "#neoforge:is_ocean",
"required": false
},
{
"id": "#c:ocean",
"required": false
},
{
"id": "#c:shallow_ocean",
"required": false
},
{
"id": "#c:deep_ocean",
"required": false
},
{
"id": "#neoforge:is_beach",
"required": false
},
{
"id": "#c:beach",
"required": false
}
]
}
@@ -0,0 +1,23 @@
{
"replace": false,
"values": [
"#minecraft:is_ocean",
"#minecraft:is_deep_ocean",
{
"id": "#neoforge:is_ocean",
"required": false
},
{
"id": "#c:ocean",
"required": false
},
{
"id": "#c:shallow_ocean",
"required": false
},
{
"id": "#c:deep_ocean",
"required": false
}
]
}
@@ -0,0 +1,18 @@
{
"type": "minecraft:ore",
"config": {
"discard_chance_on_air_exposure": 0.0,
"size": 64,
"targets": [
{
"state": {
"Name": "antarchy:shellstone"
},
"target": {
"predicate_type": "minecraft:tag_match",
"tag": "minecraft:base_stone_overworld"
}
}
]
}
}
@@ -0,0 +1,27 @@
{
"feature": "antarchy:shellstone_blob",
"placement": [
{
"type": "minecraft:count",
"count": 2
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"absolute": 60
},
"min_inclusive": {
"absolute": 0
}
}
},
{
"type": "minecraft:biome"
}
]
}
@@ -0,0 +1,27 @@
{
"feature": "antarchy:shellstone_blob",
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 6
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"absolute": 128
},
"min_inclusive": {
"absolute": 64
}
}
},
{
"type": "minecraft:biome"
}
]
}
@@ -0,0 +1,15 @@
{
"type": "integrated_api:generic_structure",
"start_pool": "antarchy:toreterror_arena/toreterror_arena",
"size": 2,
"valid_biome_radius_check": 1,
"biomes": "#antarchy:has_structure/toreterror_arena_biomes",
"step": "surface_structures",
"terrain_adaptation": "none",
"project_start_to_heightmap": "WORLD_SURFACE_WG",
"start_height": {
"absolute": 1
},
"spawn_overrides": {},
"liquid_settings": "ignore_waterlogging"
}
@@ -0,0 +1,14 @@
{
"structures": [
{
"structure": "antarchy:toreterror_arena",
"weight": 1
}
],
"placement": {
"salt": 1528736139,
"spacing": 75,
"separation": 68,
"type": "integrated_api:advanced_random_spread"
}
}
@@ -0,0 +1,15 @@
{
"name": "antarchy:toreterror_arena/toreterror_arena",
"fallback": "minecraft:empty",
"elements": [
{
"weight": 1,
"element": {
"location": "antarchy:toreterror_arena/toreterror_arena",
"processors": "antarchy:generic_processor",
"projection": "rigid",
"element_type": "integrated_api:integrated_api_single_pool_element"
}
}
]
}
@@ -0,0 +1,15 @@
{
"name": "antarchy:toreterror_arena/toreterror_arena_bottom",
"fallback": "minecraft:empty",
"elements": [
{
"weight": 1,
"element": {
"location": "antarchy:toreterror_arena/toreterror_arena_bottom",
"processors": "antarchy:generic_processor",
"projection": "rigid",
"element_type": "integrated_api:integrated_api_single_pool_element"
}
}
]
}
@@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"antarchy:toreterror_arena",
"antarchy:fallen_kingdom_castle",
"antarchy:trayaurus_lab"
]
}
@@ -41,6 +41,9 @@
"antarchy:shellstone_bricks", "antarchy:shellstone_bricks",
"antarchy:chiseled_shellstone", "antarchy:chiseled_shellstone",
"antarchy:mossy_shellstone_bricks", "antarchy:mossy_shellstone_bricks",
"antarchy:mossy_shellstone_brick_stairs",
"antarchy:mossy_shellstone_brick_slab",
"antarchy:mossy_shellstone_brick_wall",
"antarchy:cracked_shellstone_bricks", "antarchy:cracked_shellstone_bricks",
"antarchy:shellstone_stairs", "antarchy:shellstone_stairs",
"antarchy:shellstone_slab", "antarchy:shellstone_slab",
@@ -6,6 +6,9 @@
"antarchy:shellstone_bricks", "antarchy:shellstone_bricks",
"antarchy:chiseled_shellstone", "antarchy:chiseled_shellstone",
"antarchy:mossy_shellstone_bricks", "antarchy:mossy_shellstone_bricks",
"antarchy:mossy_shellstone_brick_stairs",
"antarchy:mossy_shellstone_brick_slab",
"antarchy:mossy_shellstone_brick_wall",
"antarchy:cracked_shellstone_bricks", "antarchy:cracked_shellstone_bricks",
"antarchy:shellstone_stairs", "antarchy:shellstone_stairs",
"antarchy:shellstone_slab", "antarchy:shellstone_slab",
@@ -7,6 +7,7 @@
"antarchy:shellstone_slab", "antarchy:shellstone_slab",
"antarchy:polished_shellstone_slab", "antarchy:polished_shellstone_slab",
"antarchy:shellstone_brick_slab", "antarchy:shellstone_brick_slab",
"antarchy:mossy_shellstone_brick_slab",
"antarchy:dream_sandstone_slab", "antarchy:dream_sandstone_slab",
"antarchy:smooth_dream_sandstone_slab", "antarchy:smooth_dream_sandstone_slab",
"antarchy:cut_dream_sandstone_slab", "antarchy:cut_dream_sandstone_slab",
@@ -7,6 +7,7 @@
"antarchy:shellstone_stairs", "antarchy:shellstone_stairs",
"antarchy:polished_shellstone_stairs", "antarchy:polished_shellstone_stairs",
"antarchy:shellstone_brick_stairs", "antarchy:shellstone_brick_stairs",
"antarchy:mossy_shellstone_brick_stairs",
"antarchy:dream_sandstone_stairs", "antarchy:dream_sandstone_stairs",
"antarchy:smooth_dream_sandstone_stairs", "antarchy:smooth_dream_sandstone_stairs",
"antarchy:cut_titanium_stairs", "antarchy:cut_titanium_stairs",
@@ -7,6 +7,7 @@
"antarchy:nyxite_brick_wall", "antarchy:nyxite_brick_wall",
"antarchy:shellstone_wall", "antarchy:shellstone_wall",
"antarchy:polished_shellstone_wall", "antarchy:polished_shellstone_wall",
"antarchy:shellstone_brick_wall" "antarchy:shellstone_brick_wall",
"antarchy:mossy_shellstone_brick_wall"
] ]
} }
@@ -7,6 +7,7 @@
"antarchy:shellstone_slab", "antarchy:shellstone_slab",
"antarchy:polished_shellstone_slab", "antarchy:polished_shellstone_slab",
"antarchy:shellstone_brick_slab", "antarchy:shellstone_brick_slab",
"antarchy:mossy_shellstone_brick_slab",
"antarchy:dream_sandstone_slab", "antarchy:dream_sandstone_slab",
"antarchy:smooth_dream_sandstone_slab", "antarchy:smooth_dream_sandstone_slab",
"antarchy:cut_dream_sandstone_slab", "antarchy:cut_dream_sandstone_slab",
@@ -7,6 +7,7 @@
"antarchy:shellstone_stairs", "antarchy:shellstone_stairs",
"antarchy:polished_shellstone_stairs", "antarchy:polished_shellstone_stairs",
"antarchy:shellstone_brick_stairs", "antarchy:shellstone_brick_stairs",
"antarchy:mossy_shellstone_brick_stairs",
"antarchy:dream_sandstone_stairs", "antarchy:dream_sandstone_stairs",
"antarchy:smooth_dream_sandstone_stairs", "antarchy:smooth_dream_sandstone_stairs",
"antarchy:cut_uranium_stairs", "antarchy:cut_uranium_stairs",
@@ -7,6 +7,7 @@
"antarchy:shellstone_wall", "antarchy:shellstone_wall",
"antarchy:polished_shellstone_wall", "antarchy:polished_shellstone_wall",
"antarchy:shellstone_brick_wall", "antarchy:shellstone_brick_wall",
"antarchy:mossy_shellstone_brick_wall",
"antarchy:dream_sandstone_wall" "antarchy:dream_sandstone_wall"
] ]
} }
@@ -188,6 +188,7 @@ public final class AntarchyConfigModuleFabric {
|| name.startsWith("nightmareLeggings") || name.startsWith("nightmareLeggings")
|| name.startsWith("nightmareBoots") || name.startsWith("nightmareBoots")
|| name.startsWith("nightmareArmorDreadAura") || name.startsWith("nightmareArmorDreadAura")
|| name.startsWith("primordialArmor")
|| name.startsWith("nightmareSword") || name.startsWith("nightmareSword")
|| name.startsWith("basiliskDagger") || name.startsWith("basiliskDagger")
|| name.startsWith("squidzooka") || name.startsWith("squidzooka")
@@ -3,17 +3,52 @@ package com.craisinlord.antarchy.fabric;
import com.craisinlord.antarchy.Antarchy; import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.item.BloodCrystalShardItem; import com.craisinlord.antarchy.content.item.BloodCrystalShardItem;
import com.craisinlord.antarchy.fabric.network.AntarchyFabricNetworking; import com.craisinlord.antarchy.fabric.network.AntarchyFabricNetworking;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
public final class AntarchyFabric implements ModInitializer { public final class AntarchyFabric implements ModInitializer {
private static final TagKey<net.minecraft.world.level.biome.Biome> SHELLSTONE_BIOMES = TagKey.create(
Registries.BIOME,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "has_shellstone")
);
private static final ResourceKey<PlacedFeature> SHELLSTONE_UPPER = ResourceKey.create(
Registries.PLACED_FEATURE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "shellstone_upper")
);
private static final ResourceKey<PlacedFeature> SHELLSTONE_LOWER = ResourceKey.create(
Registries.PLACED_FEATURE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "shellstone_lower")
);
@Override @Override
public void onInitialize() { public void onInitialize() {
AntarchyFabricNetworking.register(); AntarchyFabricNetworking.register();
AntarchyConfigModuleFabric.init(); AntarchyConfigModuleFabric.init();
AntarchyFabricContent.register(); AntarchyFabricContent.register();
registerWorldgenFeatures();
AntarchyFabricEvents.register(); AntarchyFabricEvents.register();
BloodglassManager.register(); BloodglassManager.register();
Antarchy.init(); Antarchy.init();
BloodCrystalShardItem.SYNC_BLOODGLASS = BloodglassManager::syncBloodglass; BloodCrystalShardItem.SYNC_BLOODGLASS = BloodglassManager::syncBloodglass;
} }
private static void registerWorldgenFeatures() {
BiomeModifications.addFeature(
BiomeSelectors.tag(SHELLSTONE_BIOMES),
GenerationStep.Decoration.UNDERGROUND_ORES,
SHELLSTONE_UPPER
);
BiomeModifications.addFeature(
BiomeSelectors.tag(SHELLSTONE_BIOMES),
GenerationStep.Decoration.UNDERGROUND_ORES,
SHELLSTONE_LOWER
);
}
} }
@@ -538,6 +538,12 @@ public final class AntarchyFabricContent {
() -> new Block(AntarchyObjects.shellstoneProperties())); () -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks", public static final DeferredBlock<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties())); () -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<net.minecraft.world.level.block.StairBlock> MOSSY_SHELLSTONE_BRICK_STAIRS = BLOCKS.register("mossy_shellstone_brick_stairs",
() -> new net.minecraft.world.level.block.StairBlock(MOSSY_SHELLSTONE_BRICKS.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<net.minecraft.world.level.block.SlabBlock> MOSSY_SHELLSTONE_BRICK_SLAB = BLOCKS.register("mossy_shellstone_brick_slab",
() -> new net.minecraft.world.level.block.SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<net.minecraft.world.level.block.WallBlock> MOSSY_SHELLSTONE_BRICK_WALL = BLOCKS.register("mossy_shellstone_brick_wall",
() -> new net.minecraft.world.level.block.WallBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<net.minecraft.world.level.block.StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs", public static final DeferredBlock<net.minecraft.world.level.block.StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs",
() -> new net.minecraft.world.level.block.StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties())); () -> new net.minecraft.world.level.block.StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<net.minecraft.world.level.block.SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab", public static final DeferredBlock<net.minecraft.world.level.block.SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab",
@@ -1083,6 +1089,9 @@ public final class AntarchyFabricContent {
public static final DeferredItem<net.minecraft.world.item.BlockItem> CHISELED_SHELLSTONE_ITEM = ITEMS.registerSimpleBlockItem(CHISELED_SHELLSTONE); public static final DeferredItem<net.minecraft.world.item.BlockItem> CHISELED_SHELLSTONE_ITEM = ITEMS.registerSimpleBlockItem(CHISELED_SHELLSTONE);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(MOSSY_SHELLSTONE_BRICKS); public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(MOSSY_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> CRACKED_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(CRACKED_SHELLSTONE_BRICKS); public static final DeferredItem<net.minecraft.world.item.BlockItem> CRACKED_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(CRACKED_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(MOSSY_SHELLSTONE_BRICK_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_SLAB_ITEM = ITEMS.registerSimpleBlockItem(MOSSY_SHELLSTONE_BRICK_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_WALL_ITEM = ITEMS.registerSimpleBlockItem(MOSSY_SHELLSTONE_BRICK_WALL);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_STAIRS); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_SLAB_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_SLAB); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_SLAB_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_WALL_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_WALL); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_WALL_ITEM = ITEMS.registerSimpleBlockItem(SHELLSTONE_WALL);
@@ -1580,7 +1589,7 @@ public final class AntarchyFabricContent {
new Item.Properties().stacksTo(1).rarity(Rarity.RARE).fireResistant().durability(ArmorItem.Type.BOOTS.getDurability(37)))); new Item.Properties().stacksTo(1).rarity(Rarity.RARE).fireResistant().durability(ArmorItem.Type.BOOTS.getDurability(37))));
public static final DeferredHolder<EntityType<?>, EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror", public static final DeferredHolder<EntityType<?>, EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror",
() -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER) () -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER)
.sized(2.5F, 3.0F) .sized(2.0F, 3.0F)
.clientTrackingRange(14) .clientTrackingRange(14)
.build("toreterror")); .build("toreterror"));
public static final DeferredHolder<EntityType<?>, EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb", public static final DeferredHolder<EntityType<?>, EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb",
@@ -1771,27 +1780,33 @@ public final class AntarchyFabricContent {
"polished_nyxite_stairs", "polished_nyxite_slab", "polished_nyxite_wall", "polished_nyxite_stairs", "polished_nyxite_slab", "polished_nyxite_wall",
"nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall", "nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall",
"pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1; "pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1;
case "antimetal", "polished_antimetal" -> 2; case "shellstone", "polished_shellstone", "shellstone_bricks", "chiseled_shellstone",
"mossy_shellstone_bricks", "cracked_shellstone_bricks",
"shellstone_stairs", "shellstone_slab", "shellstone_wall",
"polished_shellstone_stairs", "polished_shellstone_slab", "polished_shellstone_wall",
"shellstone_brick_stairs", "shellstone_brick_slab", "shellstone_brick_wall",
"mossy_shellstone_brick_stairs", "mossy_shellstone_brick_slab", "mossy_shellstone_brick_wall" -> 2;
case "antimetal", "polished_antimetal" -> 3;
case "dream_sand", "dream_sandstone", "chiseled_dream_sandstone", case "dream_sand", "dream_sandstone", "chiseled_dream_sandstone",
"cut_dream_sandstone", "smooth_dream_sandstone", "cut_dream_sandstone", "smooth_dream_sandstone",
"dream_sandstone_stairs", "dream_sandstone_slab", "dream_sandstone_wall", "dream_sandstone_stairs", "dream_sandstone_slab", "dream_sandstone_wall",
"smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab", "smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab",
"cut_dream_sandstone_slab" -> 3; "cut_dream_sandstone_slab" -> 4;
case "umbral_moss_block", "umbral_moss_carpet" -> 4; case "umbral_moss_block", "umbral_moss_carpet" -> 5;
case "torchflower_bush", "hushweed", "orange_milkweed", "pink_milkweed" -> 5; case "torchflower_bush", "hushweed", "orange_milkweed", "pink_milkweed" -> 6;
case "blood_crystal_block", "budding_blood_crystal", case "blood_crystal_block", "budding_blood_crystal",
"small_blood_crystal_bud", "medium_blood_crystal_bud", "small_blood_crystal_bud", "medium_blood_crystal_bud",
"large_blood_crystal_bud", "blood_crystal_cluster" -> 6; "large_blood_crystal_bud", "blood_crystal_cluster" -> 7;
case "uranium_ore", "deepslate_uranium_ore", "titanium_ore", "deepslate_titanium_ore", case "uranium_ore", "deepslate_uranium_ore", "titanium_ore", "deepslate_titanium_ore",
"uranium_block", "titanium_block", "raw_uranium_block", "raw_titanium_block", "uranium_block", "titanium_block", "raw_uranium_block", "raw_titanium_block",
"cut_uranium", "cut_titanium", "cut_uranium_slab", "cut_titanium_slab", "cut_uranium", "cut_titanium", "cut_uranium_slab", "cut_titanium_slab",
"cut_uranium_stairs", "cut_titanium_stairs", "chiseled_uranium", "cut_uranium_stairs", "cut_titanium_stairs", "chiseled_uranium",
"chiseled_titanium", "uranium_bulb", "titanium_bulb", "chiseled_titanium", "uranium_bulb", "titanium_bulb",
"uranium_door", "titanium_door", "uranium_trapdoor", "titanium_trapdoor", "uranium_door", "titanium_door", "uranium_trapdoor", "titanium_trapdoor",
"uranium_bars", "titanium_bars" -> 7; "uranium_bars", "titanium_bars" -> 8;
case "infested_rooted_dirt", "infested_coarse_dirt", "triffid_goo_block", case "infested_rooted_dirt", "infested_coarse_dirt", "triffid_goo_block",
"cloud_block" -> 8; "cloud_block" -> 9;
case "dream_torch", "dream_lantern", "dream_campfire", "dream_fire", "dream_fire_ceiling" -> 9; case "dream_torch", "dream_lantern", "dream_campfire", "dream_fire", "dream_fire_ceiling" -> 10;
case "easter_bunny_spawn_egg", "flying_squirrel_spawn_egg", "caterpillar_spawn_egg", case "easter_bunny_spawn_egg", "flying_squirrel_spawn_egg", "caterpillar_spawn_egg",
"butterfly_spawn_egg", "reverie_spawn_egg", "brutalfly_spawn_egg", "butterfly_spawn_egg", "reverie_spawn_egg", "brutalfly_spawn_egg",
"red_ant_spawn_egg", "brown_ant_spawn_egg", "rainbow_ant_spawn_egg", "red_ant_spawn_egg", "brown_ant_spawn_egg", "rainbow_ant_spawn_egg",
@@ -2215,6 +2230,9 @@ public final class AntarchyFabricContent {
() -> CHISELED_SHELLSTONE.get(), () -> CHISELED_SHELLSTONE.get(),
() -> MOSSY_SHELLSTONE_BRICKS.get(), () -> MOSSY_SHELLSTONE_BRICKS.get(),
() -> CRACKED_SHELLSTONE_BRICKS.get(), () -> CRACKED_SHELLSTONE_BRICKS.get(),
() -> MOSSY_SHELLSTONE_BRICK_STAIRS.get(),
() -> MOSSY_SHELLSTONE_BRICK_SLAB.get(),
() -> MOSSY_SHELLSTONE_BRICK_WALL.get(),
() -> SHELLSTONE_STAIRS.get(), () -> SHELLSTONE_STAIRS.get(),
() -> SHELLSTONE_SLAB.get(), () -> SHELLSTONE_SLAB.get(),
() -> SHELLSTONE_WALL.get(), () -> SHELLSTONE_WALL.get(),
@@ -0,0 +1,47 @@
package com.craisinlord.antarchy.fabric.mixin.client;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GameRenderer.class)
public abstract class ToreterrorCameraShakeMixin {
private static final double MAX_SHAKE_RANGE = 48.0D;
@Shadow @Final private Minecraft minecraft;
@Inject(method = "bobView", at = @At("TAIL"))
private void applyToreterrorShake(PoseStack poseStack, float partialTick, CallbackInfo ci) {
if (minecraft.level == null || minecraft.player == null) return;
Vec3 cameraPos = minecraft.gameRenderer.getMainCamera().getPosition();
float shakeStrength = 0.0F;
for (ToreterrorEntity toreterror : minecraft.level.getEntitiesOfClass(
ToreterrorEntity.class,
minecraft.player.getBoundingBox().inflate(MAX_SHAKE_RANGE),
t -> t.isAlive() && t.isJumpShaking()
)) {
double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0)));
if (distance > MAX_SHAKE_RANGE) continue;
shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 2.0F);
}
if (shakeStrength <= 0.0F) return;
float time = (float) (minecraft.player.tickCount + partialTick);
poseStack.mulPose(Axis.YP.rotationDegrees(Mth.sin(time * 1.5F) * shakeStrength * 2.5F));
poseStack.mulPose(Axis.XP.rotationDegrees(Mth.cos(time * 1.8F) * shakeStrength * 2.0F));
poseStack.mulPose(Axis.ZP.rotationDegrees(Mth.sin(time * 2.2F) * shakeStrength * 1.5F));
}
}
@@ -19,6 +19,7 @@
], ],
"client": [ "client": [
"client.NightmareCameraShakeMixin", "client.NightmareCameraShakeMixin",
"client.ToreterrorCameraShakeMixin",
"client.DuctTapeInputMixin", "client.DuctTapeInputMixin",
"client.AntiwaterFogMixin", "client.AntiwaterFogMixin",
"client.GravityGunMouseScrollMixin", "client.GravityGunMouseScrollMixin",
@@ -237,6 +237,7 @@ public final class AntarchyConfigModuleNeoforge {
AntarchySettings.setNightmareBootsArmorToughness(AntarchyToolsConfig.nightmareBootsArmorToughness()); AntarchySettings.setNightmareBootsArmorToughness(AntarchyToolsConfig.nightmareBootsArmorToughness());
AntarchySettings.setNightmareArmorKnockbackResistance(AntarchyToolsConfig.nightmareArmorKnockbackResistance()); AntarchySettings.setNightmareArmorKnockbackResistance(AntarchyToolsConfig.nightmareArmorKnockbackResistance());
AntarchySettings.setNightmareArmorDreadAuraRangePerPiece(AntarchyToolsConfig.nightmareArmorDreadAuraRangePerPiece()); AntarchySettings.setNightmareArmorDreadAuraRangePerPiece(AntarchyToolsConfig.nightmareArmorDreadAuraRangePerPiece());
AntarchySettings.setPrimordialArmorKnockbackPerPiece(AntarchyToolsConfig.primordialArmorKnockbackPerPiece());
AntarchySettings.setNightmareSwordBaseDamage(AntarchyToolsConfig.nightmareSwordBaseDamage()); AntarchySettings.setNightmareSwordBaseDamage(AntarchyToolsConfig.nightmareSwordBaseDamage());
AntarchySettings.setNightmareSwordAttackSpeed(AntarchyToolsConfig.nightmareSwordAttackSpeed()); AntarchySettings.setNightmareSwordAttackSpeed(AntarchyToolsConfig.nightmareSwordAttackSpeed());
AntarchySettings.setNightmareSwordScalingFactor(AntarchyToolsConfig.nightmareSwordScalingFactor()); AntarchySettings.setNightmareSwordScalingFactor(AntarchyToolsConfig.nightmareSwordScalingFactor());
@@ -195,6 +195,9 @@ public class AntarchyNeoforge {
() -> AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE.get(), () -> AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS.get(), () -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS.get(),
() -> AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS.get(), () -> AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_STAIRS.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_SLAB.get(),
() -> AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_WALL.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS.get(), () -> AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_SLAB.get(), () -> AntarchyNeoforgeBlocks.SHELLSTONE_SLAB.get(),
() -> AntarchyNeoforgeBlocks.SHELLSTONE_WALL.get(), () -> AntarchyNeoforgeBlocks.SHELLSTONE_WALL.get(),
@@ -111,6 +111,7 @@ public final class AntarchyToolsConfig {
private static final ModConfigSpec.DoubleValue NIGHTMARE_BOOTS_ARMOR_TOUGHNESS; private static final ModConfigSpec.DoubleValue NIGHTMARE_BOOTS_ARMOR_TOUGHNESS;
private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE; private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE; private static final ModConfigSpec.DoubleValue NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE;
private static final ModConfigSpec.DoubleValue PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_BASE_DAMAGE; private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_BASE_DAMAGE;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_ATTACK_SPEED; private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_ATTACK_SPEED;
private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_SCALING_FACTOR; private static final ModConfigSpec.DoubleValue NIGHTMARE_SWORD_SCALING_FACTOR;
@@ -326,6 +327,7 @@ public final class AntarchyToolsConfig {
"Full set (4 pieces) gives 5.0 blocks by default." "Full set (4 pieces) gives 5.0 blocks by default."
) )
.defineInRange("dreadAuraRangePerPiece", 1.25D, 0.0D, 64.0D); .defineInRange("dreadAuraRangePerPiece", 1.25D, 0.0D, 64.0D);
PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE = b.comment("Attack knockback added by each Primordial Armor piece.") .defineInRange("primordialArmorKnockbackPerPiece", 0.5D, 0.0D, 16.0D);
b.pop(); b.pop();
b.push("nightmareSword"); b.push("nightmareSword");
@@ -532,6 +534,7 @@ public final class AntarchyToolsConfig {
static double nightmareBootsArmorToughness() { return NIGHTMARE_BOOTS_ARMOR_TOUGHNESS.get(); } static double nightmareBootsArmorToughness() { return NIGHTMARE_BOOTS_ARMOR_TOUGHNESS.get(); }
static double nightmareArmorKnockbackResistance() { return NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE.get(); } static double nightmareArmorKnockbackResistance() { return NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE.get(); }
static double nightmareArmorDreadAuraRangePerPiece() { return NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE.get(); } static double nightmareArmorDreadAuraRangePerPiece() { return NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE.get(); }
static double primordialArmorKnockbackPerPiece() { return PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE.get(); }
static double nightmareSwordBaseDamage() { return NIGHTMARE_SWORD_BASE_DAMAGE.get(); } static double nightmareSwordBaseDamage() { return NIGHTMARE_SWORD_BASE_DAMAGE.get(); }
static double nightmareSwordAttackSpeed() { return NIGHTMARE_SWORD_ATTACK_SPEED.get(); } static double nightmareSwordAttackSpeed() { return NIGHTMARE_SWORD_ATTACK_SPEED.get(); }
static double nightmareSwordScalingFactor() { return NIGHTMARE_SWORD_SCALING_FACTOR.get(); } static double nightmareSwordScalingFactor() { return NIGHTMARE_SWORD_SCALING_FACTOR.get(); }
@@ -0,0 +1,45 @@
package com.craisinlord.antarchy.neoforge.client;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.ViewportEvent;
@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ToreterrorCameraShakeHandler {
private static final double MAX_SHAKE_RANGE = 48.0D;
private ToreterrorCameraShakeHandler() {
}
@SubscribeEvent
public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null) return;
Vec3 cameraPos = event.getCamera().getPosition();
float shakeStrength = 0.0F;
for (ToreterrorEntity toreterror : mc.level.getEntitiesOfClass(
ToreterrorEntity.class,
mc.player.getBoundingBox().inflate(MAX_SHAKE_RANGE),
t -> t.isAlive() && t.isJumpShaking()
)) {
double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0)));
if (distance > MAX_SHAKE_RANGE) continue;
shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 2.0D);
}
if (shakeStrength <= 0.0F) return;
float time = (float) (mc.player.tickCount + event.getPartialTick());
event.setYaw(event.getYaw() + Mth.sin(time * 1.5F) * shakeStrength * 2.5F);
event.setPitch(event.getPitch() + Mth.cos(time * 1.8F) * shakeStrength * 2.0F);
event.setRoll(event.getRoll() + Mth.sin(time * 2.2F) * shakeStrength * 1.5F);
}
}
@@ -136,6 +136,12 @@ public final class AntarchyNeoforgeBlocks {
() -> new Block(AntarchyObjects.shellstoneProperties())); () -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks", public static final DeferredBlock<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties())); () -> new Block(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<StairBlock> MOSSY_SHELLSTONE_BRICK_STAIRS = BLOCKS.register("mossy_shellstone_brick_stairs",
() -> new StairBlock(MOSSY_SHELLSTONE_BRICKS.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<SlabBlock> MOSSY_SHELLSTONE_BRICK_SLAB = BLOCKS.register("mossy_shellstone_brick_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<WallBlock> MOSSY_SHELLSTONE_BRICK_WALL = BLOCKS.register("mossy_shellstone_brick_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs", public static final DeferredBlock<StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs",
() -> new StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties())); () -> new StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final DeferredBlock<SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab", public static final DeferredBlock<SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab",
@@ -183,6 +183,9 @@ public class AntarchyNeoforgeCreativeModeTabs {
event.accept(AntarchyNeoforgeItems.SHELLSTONE_BRICK_WALL_ITEM.get()); event.accept(AntarchyNeoforgeItems.SHELLSTONE_BRICK_WALL_ITEM.get());
event.accept(AntarchyNeoforgeItems.CHISELED_SHELLSTONE_ITEM.get()); event.accept(AntarchyNeoforgeItems.CHISELED_SHELLSTONE_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICKS_ITEM.get()); event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICKS_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_STAIRS_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_SLAB_ITEM.get());
event.accept(AntarchyNeoforgeItems.MOSSY_SHELLSTONE_BRICK_WALL_ITEM.get());
event.accept(AntarchyNeoforgeItems.CRACKED_SHELLSTONE_BRICKS_ITEM.get()); event.accept(AntarchyNeoforgeItems.CRACKED_SHELLSTONE_BRICKS_ITEM.get());
event.accept(AntarchyNeoforgeItems.NYXITE_ITEM.get()); event.accept(AntarchyNeoforgeItems.NYXITE_ITEM.get());
event.accept(AntarchyNeoforgeItems.NYXITE_STAIRS_ITEM.get()); event.accept(AntarchyNeoforgeItems.NYXITE_STAIRS_ITEM.get());
@@ -315,73 +318,81 @@ public class AntarchyNeoforgeCreativeModeTabs {
"nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall", "nyxite_brick_stairs", "nyxite_brick_slab", "nyxite_brick_wall",
"pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1; "pale_nyxite", "nyxite_spike", "potent_nyxite" -> 1;
// 2 - Antimetal blocks // 2 - Shellstone blocks
case "antimetal", "polished_antimetal" -> 2; case "shellstone", "polished_shellstone", "shellstone_bricks", "chiseled_shellstone",
"mossy_shellstone_bricks", "cracked_shellstone_bricks",
"shellstone_stairs", "shellstone_slab", "shellstone_wall",
"polished_shellstone_stairs", "polished_shellstone_slab", "polished_shellstone_wall",
"shellstone_brick_stairs", "shellstone_brick_slab", "shellstone_brick_wall",
"mossy_shellstone_brick_stairs", "mossy_shellstone_brick_slab", "mossy_shellstone_brick_wall" -> 2;
// 3 - Dream sand and blocks // 3 - Antimetal blocks
case "antimetal", "polished_antimetal" -> 3;
// 4 - Dream sand and blocks
case "dream_sand", "dream_sandstone", "chiseled_dream_sandstone", case "dream_sand", "dream_sandstone", "chiseled_dream_sandstone",
"cut_dream_sandstone", "smooth_dream_sandstone", "cut_dream_sandstone", "smooth_dream_sandstone",
"dream_sandstone_stairs", "dream_sandstone_slab", "dream_sandstone_wall", "dream_sandstone_stairs", "dream_sandstone_slab", "dream_sandstone_wall",
"smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab", "smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab",
"cut_dream_sandstone_slab" -> 3; "cut_dream_sandstone_slab" -> 4;
// 4 - Umbral moss // 5 - Umbral moss
case "umbral_moss_block", "umbral_moss_carpet" -> 4; case "umbral_moss_block", "umbral_moss_carpet" -> 5;
// 5 - All ores + metal storage/decorative blocks // 6 - All ores + metal storage/decorative blocks
case "uranium_ore", "deepslate_uranium_ore", "titanium_ore", "deepslate_titanium_ore", case "uranium_ore", "deepslate_uranium_ore", "titanium_ore", "deepslate_titanium_ore",
"uranium_block", "titanium_block", "uranium_block", "titanium_block",
"cut_uranium", "cut_titanium", "cut_uranium_slab", "cut_titanium_slab", "cut_uranium", "cut_titanium", "cut_uranium_slab", "cut_titanium_slab",
"cut_uranium_stairs", "cut_titanium_stairs", "cut_uranium_stairs", "cut_titanium_stairs",
"chiseled_uranium", "chiseled_titanium", "chiseled_uranium", "chiseled_titanium",
"uranium_door", "titanium_door", "uranium_trapdoor", "titanium_trapdoor", "uranium_door", "titanium_door", "uranium_trapdoor", "titanium_trapdoor",
"uranium_bars", "titanium_bars", "uranium_bulb", "titanium_bulb" -> 5; "uranium_bars", "titanium_bars", "uranium_bulb", "titanium_bulb" -> 6;
// 6 - Raw ores // 7 - Raw ores
case "raw_uranium", "raw_titanium", "raw_uranium_scrap", "raw_titanium_scrap", case "raw_uranium", "raw_titanium", "raw_uranium_scrap", "raw_titanium_scrap",
"raw_uranium_block", "raw_titanium_block" -> 6; "raw_uranium_block", "raw_titanium_block" -> 7;
// 7 - Blood crystal blocks (not the shard ingredient) // 8 - Blood crystal blocks (not the shard ingredient)
case "blood_crystal_block", "small_blood_crystal_bud", "medium_blood_crystal_bud", case "blood_crystal_block", "small_blood_crystal_bud", "medium_blood_crystal_bud",
"large_blood_crystal_bud", "budding_blood_crystal", "blood_crystal_cluster" -> 7; "large_blood_crystal_bud", "budding_blood_crystal", "blood_crystal_cluster" -> 8;
// 8 - Ouranwood leaves // 9 - Ouranwood leaves
case "ouranwood_leaves" -> 8; case "ouranwood_leaves" -> 9;
// 9 - Saplings / seeds // 10 - Saplings / seeds
case "duplicator_sapling", "ouranwood_acorn" -> 9; case "duplicator_sapling", "ouranwood_acorn" -> 10;
// 10 - Plants and flowers // 11 - Plants and flowers
case "orange_milkweed", "pink_milkweed", "torchflower_bush", "hushweed", case "orange_milkweed", "pink_milkweed", "torchflower_bush", "hushweed",
"triffid_goo_block", "wasp_nest", "triffid_goo_block", "wasp_nest",
"red_ant_nest", "brown_ant_nest", "rainbow_ant_nest" -> 10; "red_ant_nest", "brown_ant_nest", "rainbow_ant_nest" -> 11;
// 11 - Dream lighting // 12 - Dream lighting
case "dream_torch", "dream_lantern", "dream_campfire" -> 11; case "dream_torch", "dream_lantern", "dream_campfire" -> 12;
// 12 - Antimetal scaffolding // 13 - Antimetal scaffolding
case "antimetal_scaffolding" -> 12; case "antimetal_scaffolding" -> 13;
// 13 - Infested blocks // 14 - Infested blocks
case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg" -> 13; case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg" -> 14;
// 14 - Tools // 15 - Tools
case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe", case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe",
"duct_tape", "diamond_minecart", "gravity_sculk_sensor" -> 14; "duct_tape", "diamond_minecart", "gravity_sculk_sensor" -> 15;
// 15 - Liquid buckets // 16 - Liquid buckets
case "ichor_bucket", "antiwater_bucket", "cloud_bucket" -> 15; case "ichor_bucket", "antiwater_bucket", "cloud_bucket" -> 16;
// 16 - Misc wearables / gadgets // 17 - Misc wearables / gadgets
case "moggles", "brutalfly_elytra", "fallen_king_crown" -> 16; case "moggles", "brutalfly_elytra", "fallen_king_crown" -> 17;
// 17 - Weapons // 18 - Weapons
case "battle_axe", "basilisk_dagger", "squidzooka", "shrink_ray", "growth_ray", case "battle_axe", "basilisk_dagger", "squidzooka", "shrink_ray", "growth_ray",
"gravity_gun", "water_cannon", "nightmare_sword", "lucid_pearl", "scorpion_whip", "blood_crystal_katana", "gravity_gun", "water_cannon", "nightmare_sword", "lucid_pearl", "scorpion_whip", "blood_crystal_katana",
"big_bertha", "big_bertha_blade", "big_bertha_handle", "big_bertha_hilt", "big_bertha", "big_bertha_blade", "big_bertha_handle", "big_bertha_hilt",
"ultimate_sword", "ultimate_mace" -> 17; "ultimate_sword", "ultimate_mace" -> 18;
// 18 - Armor sets // 19 - Armor sets
case "primordial_helmet", "primordial_chestplate", case "primordial_helmet", "primordial_chestplate",
"primordial_leggings", "primordial_boots", "primordial_leggings", "primordial_boots",
"blood_crystal_helmet", "blood_crystal_chestplate", "blood_crystal_helmet", "blood_crystal_chestplate",
@@ -389,34 +400,34 @@ public class AntarchyNeoforgeCreativeModeTabs {
"nightmare_helmet", "nightmare_chestplate", "nightmare_helmet", "nightmare_chestplate",
"nightmare_leggings", "nightmare_boots", "nightmare_leggings", "nightmare_boots",
"ultimate_helmet", "ultimate_chestplate", "ultimate_helmet", "ultimate_chestplate",
"ultimate_leggings", "ultimate_boots" -> 18; "ultimate_leggings", "ultimate_boots" -> 19;
// 19 - Ranged weapons // 20 - Ranged weapons
case "ultimate_bow", "ultimate_crossbow" -> 19; case "ultimate_bow", "ultimate_crossbow" -> 20;
// 20 - Foods // 21 - Foods
case "cloud_shark_fin_soup", "mud_pie", "rainbow_sugar", case "cloud_shark_fin_soup", "mud_pie", "rainbow_sugar",
"blood_crystal_apple" -> 20; "blood_crystal_apple" -> 21;
// 21 - Crafting ingredients // 22 - Crafting ingredients
case "blood_crystal_shard", "cloud_shark_fin", "basilisk_fang", "kraken_tooth", case "blood_crystal_shard", "cloud_shark_fin", "basilisk_fang", "kraken_tooth",
"emperor_scorpion_stinger", "nightmare_scale", "molevore_nose", "emperor_scorpion_stinger", "nightmare_scale", "molevore_nose",
"moleworm", "uranium_nugget", "titanium_nugget", "moleworm", "uranium_nugget", "titanium_nugget",
"uranium_ingot", "titanium_ingot", "lucid_eye", "uranium_ingot", "titanium_ingot", "lucid_eye",
"mantis_claw", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear", "mantis_claw", "jumpy_bug_leg", "brutalfly_wing", "cornea_ear",
"primordial_scute", "triffid_goo", "vortex_eye" -> 21; "primordial_scute", "triffid_goo", "vortex_eye" -> 22;
// 22 - Arrows (reserved for future arrow types) // 23 - Arrows (reserved for future arrow types)
// 23 - Potions // 24 - Potions
case "reverie_bottle" -> 23; case "reverie_bottle" -> 24;
// 24 - Spawn eggs // 25 - Spawn eggs
default -> { default -> {
if (!path.endsWith("_spawn_egg")) { if (!path.endsWith("_spawn_egg")) {
org.slf4j.LoggerFactory.getLogger("Antarchy/CreativeTab").warn("Unmatched creative tab item: '{}'", path); org.slf4j.LoggerFactory.getLogger("Antarchy/CreativeTab").warn("Unmatched creative tab item: '{}'", path);
} }
yield path.endsWith("_spawn_egg") ? 24 : 99; yield path.endsWith("_spawn_egg") ? 25 : 99;
} }
}; };
} }
@@ -244,7 +244,7 @@ public final class AntarchyNeoforgeEntites {
.build("brutalfly_orb")); .build("brutalfly_orb"));
public static final DeferredHolder<EntityType<?>, EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror", public static final DeferredHolder<EntityType<?>, EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror",
() -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER) () -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER)
.sized(2.5F, 3.0F) .sized(2.0F, 3.0F)
.clientTrackingRange(14) .clientTrackingRange(14)
.build("toreterror")); .build("toreterror"));
public static final DeferredHolder<EntityType<?>, EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb", public static final DeferredHolder<EntityType<?>, EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb",
@@ -235,6 +235,9 @@ public final class AntarchyNeoforgeItems {
public static final DeferredItem<net.minecraft.world.item.BlockItem> CHISELED_SHELLSTONE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE); public static final DeferredItem<net.minecraft.world.item.BlockItem> CHISELED_SHELLSTONE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_SHELLSTONE);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS); public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> CRACKED_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS); public static final DeferredItem<net.minecraft.world.item.BlockItem> CRACKED_SHELLSTONE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CRACKED_SHELLSTONE_BRICKS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_SHELLSTONE_BRICK_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_SHELLSTONE_BRICK_WALL);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_STAIRS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_SLAB); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_SLAB);
public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_WALL); public static final DeferredItem<net.minecraft.world.item.BlockItem> SHELLSTONE_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.SHELLSTONE_WALL);
@@ -0,0 +1,9 @@
{
"type": "neoforge:add_features",
"biomes": "#antarchy:has_shellstone",
"features": [
"antarchy:shellstone_upper",
"antarchy:shellstone_lower"
],
"step": "underground_ores"
}