tweaked thoraxis gen

This commit is contained in:
craisinlord committed 2026-09-03 22:06:03 -05:00
1 parent 867fef9d0a
commit bb43425edc
40 files changed
+422 -343

No files matched your search

@@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"minecraft:soul_sand_valley",
"antarchy:dream_dunes"
]
}
@@ -14,7 +14,6 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
@@ -47,7 +46,11 @@ public class UpwardFallingBlockEntity extends Entity {
public UpwardFallingBlockEntity(EntityType<UpwardFallingBlockEntity> type, Level level) {
super(type, level);
this.blocksBuilding = true;
// This entity has its own simple upward-flight and landing checks below. Do not
// send it through the normal entity collision solver: Thoraxis can create many of
// these at once while chunks are loading, and swept entity collision is needlessly
// expensive for a block that only collides with the block directly above it.
this.noPhysics = true;
}
@Override
@@ -126,7 +129,7 @@ public class UpwardFallingBlockEntity extends Entity {
double beforeY = getY();
setDeltaMovement(getDeltaMovement().add(0.0, getRiseAccel(), 0.0));
move(MoverType.SELF, getDeltaMovement());
setPos(getX(), getY() + getDeltaMovement().y, getZ());
setDeltaMovement(getDeltaMovement().scale(DRAG));
distanceTraveled += Math.max(0.0, getY() - beforeY);
@@ -154,7 +157,8 @@ public class UpwardFallingBlockEntity extends Entity {
boolean hitScaffolding = above.getBlock() instanceof AntimetalScaffoldingBlock;
if (this.verticalCollision || hitScaffolding) {
boolean hitCeiling = !above.isAir() && !above.getCollisionShape(level(), headPos).isEmpty();
if (hitCeiling || hitScaffolding) {
placeAtLanding(blockState, headPos.below());
return;
}
@@ -3,6 +3,7 @@ package com.craisinlord.antarchy.content.entity.royal;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.entity.royal.beam.RoyalBeamElement;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
@@ -21,6 +22,15 @@ public class PrincessEntity extends RoyalMountEntity {
AntarchySettings.princessFollowRange());
}
@Override
protected RoyalBeamElement boltElement(int lateralIndex) {
return switch (lateralIndex) {
case -1 -> RoyalBeamElement.FIRE;
case 1 -> RoyalBeamElement.ICE;
default -> RoyalBeamElement.LIGHTNING;
};
}
@Override
protected String geoName() {
return "princess";
@@ -337,7 +337,7 @@ public abstract class RoyalMountEntity extends TamableAnimal implements GeoEntit
return InteractionResult.sidedSuccess(this.level().isClientSide);
}
if (stack.isEmpty() && this.isSaddled() && !this.isBaby() && !player.isPassenger()) {
if (stack.isEmpty() && !this.isBaby() && !player.isPassenger()) {
if (!this.level().isClientSide) {
this.setOrderedToSit(false);
this.setInSittingPose(false);
@@ -553,7 +553,7 @@ public abstract class RoyalMountEntity extends TamableAnimal implements GeoEntit
@Nullable
@Override
public LivingEntity getControllingPassenger() {
return this.getFirstPassenger() instanceof Player player && this.isSaddled() && this.isOwnedBy(player) ? player : null;
return this.getFirstPassenger() instanceof Player player && this.isOwnedBy(player) ? player : null;
}
@Override
@@ -47,6 +47,15 @@ public class PeachTreeFeature extends Feature<PeachTreeConfiguration> {
}
List<BlockPos> trunkPath = buildTrunkPath(origin, height, random);
for (BlockPos trunkPos : trunkPath) {
for (int dx = 0; dx < trunkWidth; dx++) {
for (int dz = 0; dz < trunkWidth; dz++) {
if (!canReplace(level, trunkPos.offset(dx, 0, dz))) {
return false;
}
}
}
}
Set<BlockPos> logPositions = new LinkedHashSet<>();
Set<BlockPos> leafPositions = new LinkedHashSet<>();
@@ -431,7 +440,7 @@ public class PeachTreeFeature extends Feature<PeachTreeConfiguration> {
private static boolean canReplace(WorldGenLevel level, BlockPos pos) {
BlockState state = level.getBlockState(pos);
return state.isAir() || state.canBeReplaced() || state.getBlock() instanceof LeavesBlock;
return state.isAir() || state.getBlock() instanceof LeavesBlock;
}
private static Direction.Axis axisForSegment(BlockPos from, BlockPos to) {
@@ -0,0 +1,63 @@
package com.craisinlord.antarchy.content.worldgen.thoraxis;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.block.SimpleDirectionalVineBlock;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
/** Places the complete natural-grown shape so every segment gets the body state. */
public final class NaturalDirectionalVineFeature extends Feature<NoneFeatureConfiguration> {
private final ResourceLocation blockId;
private final Direction direction;
private final int minimumLength;
private final int maximumLength;
public NaturalDirectionalVineFeature(Codec<NoneFeatureConfiguration> codec, String blockName,
Direction direction, int minimumLength, int maximumLength) {
super(codec);
this.blockId = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, blockName);
this.direction = direction;
this.minimumLength = minimumLength;
this.maximumLength = maximumLength;
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
WorldGenLevel level = context.level();
BlockPos origin = context.origin();
Block block = BuiltInRegistries.BLOCK.get(this.blockId);
RandomSource random = context.random();
int length = Mth.randomBetweenInclusive(random, this.minimumLength, this.maximumLength);
boolean placed = false;
for (int index = 0; index < length; index++) {
BlockPos pos = origin.relative(this.direction, index);
if (!level.getBlockState(pos).isAir()) {
break;
}
BlockState state = block.defaultBlockState()
.setValue(SimpleDirectionalVineBlock.GROWTH_DIRECTION, this.direction)
.setValue(SimpleDirectionalVineBlock.DISTANCE, Math.min(index, 15))
.setValue(SimpleDirectionalVineBlock.TOP_CAP, this.direction == Direction.UP && index == length - 1)
.setValue(SimpleDirectionalVineBlock.BOTTOM_CAP, this.direction == Direction.DOWN && index == length - 1);
if (!state.canSurvive(level, pos)) {
break;
}
level.setBlock(pos, state, Block.UPDATE_CLIENTS);
placed = true;
}
return placed;
}
}
@@ -22,8 +22,8 @@ public final class ThoraxisBiomeSource extends BiomeSource {
private static final int REGION_DETAIL_SCALE = 41;
private static final int VERTICAL_NOISE_SCALE = 8;
private static final double DUNES_SELECTOR_CUTOFF = 0.38D;
private static final double DREAM_DUNES_SELECTOR_CUTOFF = 0.12D;
private static final double HILLS_SELECTOR_CUTOFF = 0.24D;
private static final double DREAM_DUNES_SELECTOR_CUTOFF = 0.42D;
private static final double HILLS_SELECTOR_CUTOFF = 0.33D;
private static final double NADIR_FOREST_SELECTOR_MIN = 0.54D;
private static final double NADIR_FOREST_SELECTOR_MAX = 0.56D;
private static final ResourceKey<Biome> NIGHTMARE_WASTES = ResourceKey.create(
@@ -53,8 +53,8 @@ public final class ThoraxisBiomeSource extends BiomeSource {
public static final MapCodec<ThoraxisBiomeSource> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
MultiNoiseBiomeSource.DIRECT_CODEC.forGetter(ThoraxisBiomeSource::parameters),
Codec.INT.optionalFieldOf("dream_dunes_max_y", 96).forGetter(ThoraxisBiomeSource::dreamDunesMaxY),
Codec.INT.optionalFieldOf("umbral_hills_max_y", 100).forGetter(ThoraxisBiomeSource::umbralHillsMaxY),
Codec.INT.optionalFieldOf("dream_dunes_max_y", 160).forGetter(ThoraxisBiomeSource::dreamDunesMaxY),
Codec.INT.optionalFieldOf("umbral_hills_max_y", 160).forGetter(ThoraxisBiomeSource::umbralHillsMaxY),
Codec.INT.optionalFieldOf("lucid_pools_min_y", 116).forGetter(ThoraxisBiomeSource::lucidPoolsMinY),
Codec.INT.optionalFieldOf("nadir_forest_min_y", 128).forGetter(ThoraxisBiomeSource::nadirForestMinY)
).apply(instance, ThoraxisBiomeSource::new));
@@ -72,8 +72,8 @@ public class TyphoniteSpikeFeature extends Feature<TyphoniteSpikeConfiguration>
Column column = optional.get();
OptionalInt ceiling = column.getCeiling();
OptionalInt floor = column.getFloor();
boolean canGrowDown = ceiling.isPresent() && isTyphonite(level.getBlockState(pos.atY(ceiling.getAsInt())));
boolean canGrowUp = floor.isPresent() && isTyphonite(level.getBlockState(pos.atY(floor.getAsInt())));
boolean canGrowDown = ceiling.isPresent() && isTyphoniteAnchor(level.getBlockState(pos.atY(ceiling.getAsInt())));
boolean canGrowUp = floor.isPresent() && isTyphoniteAnchor(level.getBlockState(pos.atY(floor.getAsInt())));
if (!canGrowDown && !canGrowUp) {
return false;
}
@@ -194,7 +194,8 @@ public class TyphoniteSpikeFeature extends Feature<TyphoniteSpikeConfiguration>
);
}
private static boolean isTyphonite(BlockState state) {
return BuiltInRegistries.BLOCK.getKey(state.getBlock()).equals(TYPHONITE_ID);
private static boolean isTyphoniteAnchor(BlockState state) {
ResourceLocation blockId = BuiltInRegistries.BLOCK.getKey(state.getBlock());
return blockId.equals(TYPHONITE_ID) || blockId.equals(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "verdant_nyxium"));
}
}
@@ -0,0 +1,116 @@
package com.craisinlord.antarchy.content.worldgen.thoraxis;
import com.craisinlord.antarchy.Antarchy;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.PointedDripstoneBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
public final class TyphoniteSwirlFeature extends Feature<NoneFeatureConfiguration> {
private static final ResourceLocation TYPHONITE_SPIKE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "typhonite_spike");
public TyphoniteSwirlFeature(Codec<NoneFeatureConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
WorldGenLevel level = context.level();
BlockPos origin = context.origin();
RandomSource random = context.random();
int height = Mth.randomBetweenInclusive(random, 15, 30);
int arms = Mth.randomBetweenInclusive(random, 1, 3);
double twist = (0.18D + random.nextDouble() * 0.22D) * (random.nextBoolean() ? 1.0D : -1.0D);
double radius = 3.0D + random.nextDouble() * 4.0D;
boolean placed = false;
for (int y = 0; y < Math.max(4, height / 3); y++) {
placed |= placeMass(level, origin.above(y), 1 + (y < 3 ? 1 : 0), random);
}
for (int arm = 0; arm < arms; arm++) {
double phase = (Math.PI * 2.0D * arm / arms) + random.nextDouble() * 0.8D;
for (int y = 0; y < height; y++) {
double progress = y / (double) Math.max(1, height - 1);
double angle = phase + y * twist;
double currentRadius = radius * (0.12D + progress * 0.95D) + Math.sin(y * 0.7D + phase) * 1.2D;
int x = Mth.floor(origin.getX() + Math.cos(angle) * currentRadius);
int z = Mth.floor(origin.getZ() + Math.sin(angle) * currentRadius);
BlockPos pos = new BlockPos(x, origin.getY() + y, z);
if (placeMass(level, pos, 1 + (random.nextFloat() < 0.35F ? 1 : 0), random)) {
placed = true;
if (random.nextFloat() < 0.12F) {
placed |= placeSpike(level, pos, random, random.nextBoolean() ? Direction.UP : Direction.DOWN);
}
}
if (random.nextFloat() < 0.18F) {
BlockPos sidePos = pos.offset(random.nextInt(3) - 1, random.nextInt(3) - 1, random.nextInt(3) - 1);
if (placeMass(level, sidePos, 1, random)) {
placed = true;
}
}
}
}
return placed;
}
private static BlockState materialState(RandomSource random, int y, int height) {
String blockName = random.nextFloat() < 0.18F ? "veined_typhonite" : "typhonite";
Block block = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, blockName));
return block.defaultBlockState();
}
private static boolean placeIfAir(WorldGenLevel level, BlockPos pos, BlockState state) {
if (!level.getBlockState(pos).isAir()) {
return false;
}
level.setBlock(pos, state, Block.UPDATE_CLIENTS);
return true;
}
private static boolean placeMass(WorldGenLevel level, BlockPos center, int radius, RandomSource random) {
boolean placed = false;
for (int dx = -radius; dx <= radius; dx++) {
for (int dz = -radius; dz <= radius; dz++) {
if (dx * dx + dz * dz > radius * radius + 1 || random.nextFloat() < 0.08F) {
continue;
}
placed |= placeIfAir(level, center.offset(dx, 0, dz), materialState(random, 0, 0));
}
}
return placed;
}
private static boolean placeSpike(WorldGenLevel level, BlockPos pos, RandomSource random, Direction direction) {
Block spike = BuiltInRegistries.BLOCK.get(TYPHONITE_SPIKE);
int length = 2 + random.nextInt(4);
boolean placed = false;
for (int i = 0; i < length; i++) {
BlockPos spikePos = pos.relative(direction, i + 1);
if (!level.getBlockState(spikePos).isAir()) {
break;
}
BlockState state = spike.defaultBlockState()
.setValue(PointedDripstoneBlock.TIP_DIRECTION, direction)
.setValue(PointedDripstoneBlock.THICKNESS, i == length - 1 ? net.minecraft.world.level.block.state.properties.DripstoneThickness.TIP : net.minecraft.world.level.block.state.properties.DripstoneThickness.MIDDLE)
.setValue(PointedDripstoneBlock.WATERLOGGED, false);
if (!state.canSurvive(level, spikePos)) {
break;
}
level.setBlock(spikePos, state, Block.UPDATE_CLIENTS);
placed = true;
}
return placed;
}
}
@@ -1,27 +0,0 @@
package com.craisinlord.antarchy.mixins;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.entity.UpwardFallingBlockEntity;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.state.BlockState;
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.CallbackInfoReturnable;
@Mixin(UpwardFallingBlockEntity.class)
public abstract class DreamSandFallingSpeedMixin {
private static final ResourceLocation DREAM_SAND_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "dream_sand");
@Shadow public abstract BlockState getBlockState();
@Inject(method = "getRiseAccel", at = @At("RETURN"), cancellable = true, remap = false)
private void antarchy$slowDreamSandRise(CallbackInfoReturnable<Double> cir) {
if (BuiltInRegistries.BLOCK.getKey(this.getBlockState().getBlock()).equals(DREAM_SAND_ID)) {
cir.setReturnValue(cir.getReturnValue() * AntarchySettings.dreamSandFallingBlockGravityMultiplier());
}
}
}
@@ -14,8 +14,6 @@
"BloodCrystalKatanaDashPhaseMixin",
"BloodglassMixin",
"DreamFireBlockMixin",
"DreamSandFallingSpeedMixin",
"DreamSandLowGravityMixin",
"DiodeBlockMixin",
"FarChunkSetBlockWarningMixin",
"FireVisualBaseFireBlockMixin",
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/pointed_dripstone",
"x": 180,
"textures": {
"cross": "antarchy:block/typhonite/typhonite_spike_base"
}
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/pointed_dripstone",
"x": 180,
"textures": {
"cross": "antarchy:block/typhonite/typhonite_spike_middle"
}
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/pointed_dripstone",
"x": 180,
"textures": {
"cross": "antarchy:block/typhonite/typhonite_spike_middle"
}
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/pointed_dripstone",
"x": 180,
"textures": {
"cross": "antarchy:block/typhonite/typhonite_spike_tip"
}
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/pointed_dripstone",
"x": 180,
"textures": {
"cross": "antarchy:block/typhonite/typhonite_spike_tip"
}
@@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"antarchy:mossy_ouranwood_wood"
"antarchy:mossy_ouranwood_wood",
"antarchy:mossy_ouranwood_log"
]
}
@@ -53,7 +53,8 @@
[],
[
"antarchy:bluestone_ore",
"antarchy:dimensional_tears"
"antarchy:dimensional_tears",
"antarchy:typhonite_veined_ore"
],
[],
[
@@ -61,6 +62,7 @@
],
[
"antarchy:typhonite_spikes",
"antarchy:typhonite_swirls",
"antarchy:patch_ceiling_fire"
],
[
@@ -1,14 +1,4 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "antarchy:gorevine",
"Properties": {
"growth_direction": "down"
}
}
}
}
"type": "antarchy:gorevine",
"config": {}
}
@@ -1,17 +1,4 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "antarchy:spiraling_vines",
"Properties": {
"growth_direction": "up",
"top_cap": "true",
"bottom_cap": "true",
"distance": "0"
}
}
}
}
"type": "antarchy:spiraling_vines",
"config": {}
}
@@ -0,0 +1,4 @@
{
"type": "antarchy:typhonite_swirls",
"config": {}
}
@@ -0,0 +1,18 @@
{
"type": "minecraft:ore",
"config": {
"size": 16,
"discard_chance_on_air_exposure": 0.35,
"targets": [
{
"target": {
"predicate_type": "minecraft:block_match",
"block": "antarchy:typhonite"
},
"state": {
"Name": "antarchy:veined_typhonite"
}
}
]
}
}
@@ -1,7 +1,7 @@
{
"type": "minecraft:random_patch",
"config": {
"tries": 24,
"tries": 1,
"xz_spread": 4,
"y_spread": 2,
"feature": "antarchy:whirlflower"
@@ -7,7 +7,7 @@
"type": "minecraft:add",
"argument1": {
"type": "minecraft:y_clamped_gradient",
"from_y": -256,
"from_y": -96,
"to_y": -1,
"from_value": -2.0,
"to_value": 1.05
@@ -186,10 +186,27 @@
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"max_threshold": 1.7976931348623157e+308,
"min_threshold": 0.0,
"noise": "minecraft:nether_state_selector"
"type": "minecraft:stone_depth",
"add_surface_depth": true,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "ceiling"
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "antarchy:dream_sand"
}
}
},
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:stone_depth",
"add_surface_depth": false,
"offset": 0,
"secondary_depth_range": 0,
"surface_type": "ceiling"
},
"then_run": {
"type": "minecraft:block",
@@ -201,10 +218,10 @@
{
"type": "minecraft:block",
"result_state": {
"Name": "antarchy:dream_sandstone",
"Properties": {
"vertical_direction": "down"
}
"Name": "antarchy:dream_sandstone",
"Properties": {
"vertical_direction": "down"
}
}
}
]
@@ -320,30 +337,6 @@
"then_run": {
"type": "minecraft:sequence",
"sequence": [
{
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"noise": "minecraft:gravel",
"min_threshold": -0.022,
"max_threshold": 0.022
},
"then_run": {
"type": "minecraft:condition",
"if_true": {
"type": "minecraft:noise_threshold",
"noise": "minecraft:calcite",
"min_threshold": -0.35,
"max_threshold": 1.7976931348623157e+308
},
"then_run": {
"type": "minecraft:block",
"result_state": {
"Name": "antarchy:veined_typhonite"
}
}
}
},
{
"type": "minecraft:condition",
"if_true": {
@@ -5,8 +5,8 @@
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 3,
"max_inclusive": 7
"min_inclusive": 6,
"max_inclusive": 12
}
},
{
@@ -5,8 +5,8 @@
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 8,
"max_inclusive": 16
"min_inclusive": 24,
"max_inclusive": 40
}
},
{
@@ -5,8 +5,8 @@
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 6,
"max_inclusive": 12
"min_inclusive": 5,
"max_inclusive": 10
}
},
{
@@ -0,0 +1,19 @@
{
"feature": "antarchy:typhonite_swirls",
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 8
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
@@ -0,0 +1,27 @@
{
"feature": "antarchy:typhonite_veined_ore",
"placement": [
{
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 4,
"max_inclusive": 8
}
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"min_inclusive": { "absolute": 8 },
"max_inclusive": { "absolute": 220 }
}
},
{
"type": "minecraft:biome"
}
]
}
@@ -5,8 +5,8 @@
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 8,
"max_inclusive": 16
"min_inclusive": 24,
"max_inclusive": 40
}
},
{
@@ -5,8 +5,8 @@
"type": "minecraft:count",
"count": {
"type": "minecraft:uniform",
"min_inclusive": 6,
"max_inclusive": 12
"min_inclusive": 2,
"max_inclusive": 5
}
},
{
@@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"minecraft:soul_sand_valley",
"antarchy:dream_dunes"
]
}
@@ -1,113 +0,0 @@
package com.craisinlord.antarchy.fabric.mixin;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.movement.DreamSandLowGravityAccess;
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricBlocks;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.LivingEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LivingEntity.class)
public abstract class DreamSandMovementMixin {
@Inject(method = "jumpFromGround", at = @At("TAIL"))
private void antarchy$handleDreamSandJump(CallbackInfo ci) {
LivingEntity self = (LivingEntity) (Object) this;
if (self.level().isClientSide()) return;
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
if (!AntarchySettings.dreamSandEnabled() || antarchy$isDreamSandLowGravityBlacklisted(self)) {
access.antarchy$clearDreamSandLowGravity();
} else if (antarchy$isStandingOnDreamSand(self)) {
antarchy$startDreamSandLowGravity(self, access);
}
}
@Inject(method = "tick", at = @At("TAIL"))
private void antarchy$tickDreamSandLowGravity(CallbackInfo ci) {
LivingEntity self = (LivingEntity) (Object) this;
if (self.level().isClientSide()) return;
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
int landingGraceTicks = access.antarchy$getDreamSandLandingGraceTicks();
if (landingGraceTicks > 0) {
access.antarchy$setDreamSandLandingGraceTicks(landingGraceTicks - 1);
}
if (!AntarchySettings.dreamSandEnabled() || antarchy$isDreamSandLowGravityBlacklisted(self)) {
return;
}
if (!access.antarchy$isDreamSandLowGravityActive()
&& !self.onGround()
&& antarchy$isStandingOnDreamSand(self)) {
antarchy$startDreamSandLowGravity(self, access);
}
if (!access.antarchy$isDreamSandLowGravityActive()) {
return;
}
int remainingTicks = access.antarchy$getDreamSandLowGravityTicksRemaining();
if (remainingTicks > 0) {
access.antarchy$setDreamSandLowGravityTicksRemaining(remainingTicks - 1);
}
if (access.antarchy$getDreamSandLowGravityTicksRemaining() <= 0) {
access.antarchy$clearDreamSandLowGravity();
return;
}
if (antarchy$isOnSolidGround(self)) {
access.antarchy$setDreamSandLowGravityActive(false);
access.antarchy$setDreamSandLowGravityTicksRemaining(0);
access.antarchy$setDreamSandLandingGraceTicks(2);
} else if (!self.onGround() && self.getDeltaMovement().y < 0.0D) {
self.setDeltaMovement(
self.getDeltaMovement().x,
self.getDeltaMovement().y * AntarchySettings.dreamSandGravityMultiplier(),
self.getDeltaMovement().z
);
}
}
@Inject(method = "causeFallDamage", at = @At("HEAD"), cancellable = true)
private void antarchy$handleDreamSandFall(float fallDistance, float multiplier, DamageSource source, CallbackInfoReturnable<Boolean> cir) {
LivingEntity self = (LivingEntity) (Object) this;
DreamSandLowGravityAccess access = (DreamSandLowGravityAccess) self;
if (!AntarchySettings.dreamSandEnabled()
|| antarchy$isDreamSandLowGravityBlacklisted(self)
|| (!access.antarchy$isDreamSandLowGravityActive() && access.antarchy$getDreamSandLandingGraceTicks() <= 0)) {
return;
}
self.resetFallDistance();
cir.setReturnValue(false);
}
private static boolean antarchy$isOnSolidGround(LivingEntity livingEntity) {
return livingEntity.onGround() && livingEntity.getBlockStateOn().blocksMotion();
}
private static boolean antarchy$isStandingOnDreamSand(LivingEntity livingEntity) {
return livingEntity.getBlockStateOn().is(AntarchyFabricBlocks.DREAM_SAND.get());
}
private static void antarchy$startDreamSandLowGravity(LivingEntity self, DreamSandLowGravityAccess access) {
self.setDeltaMovement(
self.getDeltaMovement().x,
self.getDeltaMovement().y * AntarchySettings.dreamSandJumpVelocityMultiplier(),
self.getDeltaMovement().z
);
access.antarchy$setDreamSandLowGravityActive(true);
access.antarchy$setDreamSandLowGravityTicksRemaining((int) Math.max(1L, Math.round(AntarchySettings.dreamSandEffectDurationSeconds() * 20.0D)));
access.antarchy$setDreamSandLandingGraceTicks(0);
}
private static boolean antarchy$isDreamSandLowGravityBlacklisted(LivingEntity livingEntity) {
return livingEntity.getType().is(AntarchyTags.Entities.DREAM_SAND_LOW_GRAVITY_BLACKLIST);
}
}
@@ -21,6 +21,7 @@ import com.craisinlord.antarchy.content.worldgen.thoraxis.AntiwaterSpringsFeatur
import com.craisinlord.antarchy.content.worldgen.thoraxis.NyxiteSpikeFeature;
import com.craisinlord.antarchy.content.worldgen.thoraxis.TyphoniteSpikeConfiguration;
import com.craisinlord.antarchy.content.worldgen.thoraxis.TyphoniteSpikeFeature;
import com.craisinlord.antarchy.content.worldgen.thoraxis.TyphoniteSwirlFeature;
import com.craisinlord.antarchy.content.worldgen.thoraxis.PotentNyxiteFeature;
import com.craisinlord.antarchy.fabric.content.fluid.AntiwaterFluid;
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
@@ -696,6 +697,10 @@ public final class AntarchyFabricMisc {
() -> new LumenLilyPadFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.elythia.GlimmeringReedFeature> GLIMMERING_REEDS = FEATURES.register("glimmering_reeds",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GlimmeringReedFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.thoraxis.NaturalDirectionalVineFeature> SPIRALING_VINES = FEATURES.register("spiraling_vines",
() -> new com.craisinlord.antarchy.content.worldgen.thoraxis.NaturalDirectionalVineFeature(NoneFeatureConfiguration.CODEC, "spiraling_vines", net.minecraft.core.Direction.UP, 4, 12));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.thoraxis.NaturalDirectionalVineFeature> GOREVINE = FEATURES.register("gorevine",
() -> new com.craisinlord.antarchy.content.worldgen.thoraxis.NaturalDirectionalVineFeature(NoneFeatureConfiguration.CODEC, "gorevine", net.minecraft.core.Direction.DOWN, 8, 16));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature> GIANT_LILY_PAD_PATCH = FEATURES.register("giant_lily_pad_patch",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature(NoneFeatureConfiguration.CODEC));
@@ -742,6 +747,8 @@ public final class AntarchyFabricMisc {
() -> new NyxiteSpikeFeature(NyxiteSpikeConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, TyphoniteSpikeFeature> TYPHONITE_SPIKES = FEATURES.register("typhonite_spikes",
() -> new TyphoniteSpikeFeature(TyphoniteSpikeConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, TyphoniteSwirlFeature> TYPHONITE_SWIRLS = FEATURES.register("typhonite_swirls",
() -> new TyphoniteSwirlFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, ChitinSpikeFeature> CAVARYN_CHITIN_SPIKES = FEATURES.register("cavaryn_chitin_spikes",
@@ -17,7 +17,6 @@
"BloodglassEffectMixin",
"BloodglassRespawnMixin",
"DreamCampfireBlockEntityMixin",
"DreamSandMovementMixin",
"JumpyBootsFallDamageMixin",
"entity.MultipartEntityLevelRegistryMixin",
"WoodTypeInvoker",
@@ -165,6 +165,23 @@ public final class AntarchyConfigModuleNeoforge {
AntarchySettings.setKingBeamTerrainCap(AntarchyMobsConfig.kingBeamTerrainCap());
AntarchySettings.setRoyalDecreeCooldownTicks(AntarchyMobsConfig.royalDecreeCooldownTicks());
AntarchySettings.setRoyalEggHatchChance(AntarchyMobsConfig.royalEggHatchChance());
AntarchySettings.setRoyalBoltDamage(AntarchyMobsConfig.royalBoltDamage());
AntarchySettings.setPrinceHealth(AntarchyMobsConfig.princeHealth());
AntarchySettings.setPrinceAttackDamage(AntarchyMobsConfig.princeAttackDamage());
AntarchySettings.setPrinceMovementSpeed(AntarchyMobsConfig.princeMovementSpeed());
AntarchySettings.setPrinceFlyingSpeed(AntarchyMobsConfig.princeFlyingSpeed());
AntarchySettings.setPrinceArmor(AntarchyMobsConfig.princeArmor());
AntarchySettings.setPrinceKnockbackResistance(AntarchyMobsConfig.princeKnockbackResistance());
AntarchySettings.setPrinceFollowRange(AntarchyMobsConfig.princeFollowRange());
AntarchySettings.setPrincessHealth(AntarchyMobsConfig.princessHealth());
AntarchySettings.setPrincessAttackDamage(AntarchyMobsConfig.princessAttackDamage());
AntarchySettings.setPrincessMovementSpeed(AntarchyMobsConfig.princessMovementSpeed());
AntarchySettings.setPrincessFlyingSpeed(AntarchyMobsConfig.princessFlyingSpeed());
AntarchySettings.setPrincessArmor(AntarchyMobsConfig.princessArmor());
AntarchySettings.setPrincessKnockbackResistance(AntarchyMobsConfig.princessKnockbackResistance());
AntarchySettings.setPrincessFollowRange(AntarchyMobsConfig.princessFollowRange());
AntarchySettings.setBrutalflyHealth(AntarchyMobsConfig.brutalflyHealth());
AntarchySettings.setBrutalflySwipeDamage(AntarchyMobsConfig.brutalflySwipeDamage());
AntarchySettings.setBrutalflySpitDamage(AntarchyMobsConfig.brutalflySpitDamage());
@@ -130,6 +130,25 @@ public final class AntarchyMobsConfig {
private static final ModConfigSpec.IntValue KING_BEAM_DURATION_TICKS, KING_BEAM_COOLDOWN_TICKS, KING_BEAM_TERRAIN_CAP;
private static final ModConfigSpec.IntValue ROYAL_DECREE_COOLDOWN_TICKS;
// Royal mounts
private static final ModConfigSpec.IntValue ROYAL_EGG_HATCH_CHANCE;
private static final ModConfigSpec.DoubleValue ROYAL_BOLT_DAMAGE;
private static final ModConfigSpec.DoubleValue PRINCE_HEALTH;
private static final ModConfigSpec.DoubleValue PRINCE_ATTACK_DAMAGE;
private static final ModConfigSpec.DoubleValue PRINCE_MOVEMENT_SPEED;
private static final ModConfigSpec.DoubleValue PRINCE_FLYING_SPEED;
private static final ModConfigSpec.DoubleValue PRINCE_ARMOR;
private static final ModConfigSpec.DoubleValue PRINCE_KNOCKBACK_RESISTANCE;
private static final ModConfigSpec.DoubleValue PRINCE_FOLLOW_RANGE;
private static final ModConfigSpec.DoubleValue PRINCESS_HEALTH;
private static final ModConfigSpec.DoubleValue PRINCESS_ATTACK_DAMAGE;
private static final ModConfigSpec.DoubleValue PRINCESS_MOVEMENT_SPEED;
private static final ModConfigSpec.DoubleValue PRINCESS_FLYING_SPEED;
private static final ModConfigSpec.DoubleValue PRINCESS_ARMOR;
private static final ModConfigSpec.DoubleValue PRINCESS_KNOCKBACK_RESISTANCE;
private static final ModConfigSpec.DoubleValue PRINCESS_FOLLOW_RANGE;
// Brutalfly
@@ -574,6 +593,25 @@ public final class AntarchyMobsConfig {
ROYAL_DECREE_COOLDOWN_TICKS = b.comment("Cooldown in ticks between the end of one King decree and the next.").defineInRange("royalDecreeCooldownTicks", 1200, 1, 72000);
b.pop();
b.push("royalMounts");
ROYAL_EGG_HATCH_CHANCE = b.comment("Chance denominator for a royal egg advancing one hatch stage on a random tick.").defineInRange("eggHatchChance", 3, 1, 100000);
ROYAL_BOLT_DAMAGE = b.comment("Direct damage dealt by a Prince or Princess royal bolt.").defineInRange("boltDamage", 6.0D, 0.0D, 1024.0D);
PRINCE_HEALTH = b.comment("Prince base max health.").defineInRange("princeHealth", 120.0D, 1.0D, 32768.0D);
PRINCE_ATTACK_DAMAGE = b.comment("Prince bite damage.").defineInRange("princeAttackDamage", 14.0D, 0.0D, 1024.0D);
PRINCE_MOVEMENT_SPEED = b.comment("Prince grounded movement speed.").defineInRange("princeMovementSpeed", 0.28D, 0.0D, 10.0D);
PRINCE_FLYING_SPEED = b.comment("Prince flying movement speed.").defineInRange("princeFlyingSpeed", 0.9D, 0.0D, 10.0D);
PRINCE_ARMOR = b.comment("Prince armor value.").defineInRange("princeArmor", 10.0D, 0.0D, 1024.0D);
PRINCE_KNOCKBACK_RESISTANCE = b.comment("Prince knockback resistance.").defineInRange("princeKnockbackResistance", 0.6D, 0.0D, 1.0D);
PRINCE_FOLLOW_RANGE = b.comment("Prince owner and target range.").defineInRange("princeFollowRange", 48.0D, 1.0D, 256.0D);
PRINCESS_HEALTH = b.comment("Princess base max health.").defineInRange("princessHealth", 110.0D, 1.0D, 32768.0D);
PRINCESS_ATTACK_DAMAGE = b.comment("Princess bite damage.").defineInRange("princessAttackDamage", 10.0D, 0.0D, 1024.0D);
PRINCESS_MOVEMENT_SPEED = b.comment("Princess grounded movement speed.").defineInRange("princessMovementSpeed", 0.28D, 0.0D, 10.0D);
PRINCESS_FLYING_SPEED = b.comment("Princess flying movement speed.").defineInRange("princessFlyingSpeed", 0.95D, 0.0D, 10.0D);
PRINCESS_ARMOR = b.comment("Princess armor value.").defineInRange("princessArmor", 8.0D, 0.0D, 1024.0D);
PRINCESS_KNOCKBACK_RESISTANCE = b.comment("Princess knockback resistance.").defineInRange("princessKnockbackResistance", 0.5D, 0.0D, 1.0D);
PRINCESS_FOLLOW_RANGE = b.comment("Princess owner and target range.").defineInRange("princessFollowRange", 48.0D, 1.0D, 256.0D);
b.pop();
// Brutalfly
@@ -970,6 +1008,23 @@ public final class AntarchyMobsConfig {
static int kingBeamTerrainCap() { return KING_BEAM_TERRAIN_CAP.get(); }
static int royalDecreeCooldownTicks() { return ROYAL_DECREE_COOLDOWN_TICKS.get(); }
static int royalEggHatchChance() { return ROYAL_EGG_HATCH_CHANCE.get(); }
static double royalBoltDamage() { return ROYAL_BOLT_DAMAGE.get(); }
static double princeHealth() { return PRINCE_HEALTH.get(); }
static double princeAttackDamage() { return PRINCE_ATTACK_DAMAGE.get(); }
static double princeMovementSpeed() { return PRINCE_MOVEMENT_SPEED.get(); }
static double princeFlyingSpeed() { return PRINCE_FLYING_SPEED.get(); }
static double princeArmor() { return PRINCE_ARMOR.get(); }
static double princeKnockbackResistance() { return PRINCE_KNOCKBACK_RESISTANCE.get(); }
static double princeFollowRange() { return PRINCE_FOLLOW_RANGE.get(); }
static double princessHealth() { return PRINCESS_HEALTH.get(); }
static double princessAttackDamage() { return PRINCESS_ATTACK_DAMAGE.get(); }
static double princessMovementSpeed() { return PRINCESS_MOVEMENT_SPEED.get(); }
static double princessFlyingSpeed() { return PRINCESS_FLYING_SPEED.get(); }
static double princessArmor() { return PRINCESS_ARMOR.get(); }
static double princessKnockbackResistance() { return PRINCESS_KNOCKBACK_RESISTANCE.get(); }
static double princessFollowRange() { return PRINCESS_FOLLOW_RANGE.get(); }
static double brutalflyHealth() { return BRUTALFLY_HEALTH.get(); }
static double brutalflySwipeDamage() { return BRUTALFLY_SWIPE_DAMAGE.get(); }
static double brutalflySpitDamage() { return BRUTALFLY_SPIT_DAMAGE.get(); }
@@ -27,7 +27,6 @@ import com.craisinlord.antarchy.content.horde.CavarynHordeManager;
import com.craisinlord.antarchy.content.item.*;
import com.craisinlord.antarchy.content.worldgen.thoraxis.ThoraxisUndersideManager;
import com.craisinlord.antarchy.content.item.ultimate.UltimateGearHelper;
import com.craisinlord.antarchy.content.movement.DreamSandLowGravityAccess;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.portal.PermanentPortalManager;
import com.craisinlord.antarchy.content.time.TimeDilationManager;
@@ -113,15 +112,12 @@ public final class AntarchyNeoForgeEvents {
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleParalyzedRightClickItem);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleParalyzedEntityInteract);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleParalyzedEntityInteractSpecific);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleDreamSandJump);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickDreadAndIchor);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickScorpionWhips);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickWormHooks);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickDreamSandLowGravity);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickMinersDreamExcavations);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleAntiwaterDamage);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleAntiwaterFall);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleDreamSandFall);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodCrystalBootsFall);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassShield);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodCrystalArmorEquip);
@@ -144,7 +140,6 @@ public final class AntarchyNeoForgeEvents {
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleFallenKingCrownKill);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleDreadBedSleep);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleStartTracking);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleDreamSandLogout);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleTigerEyeLogout);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleTigerEyeDeath);
NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleTigerEyeRespawn);
@@ -285,19 +280,6 @@ public final class AntarchyNeoForgeEvents {
static void registerReloadListeners(AddReloadListenerEvent event) {
event.addListener(new DrTrayaurusTradeManager());
}
static void handleDreamSandLogout(PlayerEvent.PlayerLoggedOutEvent event) {
clearDreamSandLowGravity(event.getEntity());
}
private static void clearDreamSandLowGravity(LivingEntity livingEntity) {
DreamSandLowGravityAccess access = dreamSandAccess(livingEntity);
access.antarchy$setDreamSandLowGravityActive(false);
access.antarchy$setDreamSandLowGravityTicksRemaining(0);
access.antarchy$setDreamSandLandingGraceTicks(0);
}
private static DreamSandLowGravityAccess dreamSandAccess(LivingEntity livingEntity) {
return (DreamSandLowGravityAccess) livingEntity;
}
static void handleStartTracking(PlayerEvent.StartTracking event) {
if (event.getTarget().level().isClientSide()) {
return;
@@ -423,7 +405,6 @@ public final class AntarchyNeoForgeEvents {
static void handleDreadDeath(LivingDeathEvent event) {
LivingEntity entity = event.getEntity();
clearDreamSandLowGravity(entity);
if (!entity.hasEffect(AntarchyNeoforgeMisc.DREAD)) {
return;
}
@@ -1027,24 +1008,6 @@ public final class AntarchyNeoForgeEvents {
return player.hasEffect(AntarchyNeoforgeMisc.PARALYZED);
}
static void handleDreamSandJump(LivingEvent.LivingJumpEvent event) {
LivingEntity livingEntity = event.getEntity();
if (!AntarchySettings.dreamSandEnabled() || isDreamSandLowGravityBlacklisted(livingEntity)) {
clearDreamSandLowGravity(livingEntity);
} else if (isStandingOnDreamSand(livingEntity)) {
livingEntity.setDeltaMovement(
livingEntity.getDeltaMovement().x,
livingEntity.getDeltaMovement().y * AntarchySettings.dreamSandJumpVelocityMultiplier(),
livingEntity.getDeltaMovement().z
);
DreamSandLowGravityAccess access = dreamSandAccess(livingEntity);
access.antarchy$setDreamSandLowGravityActive(true);
access.antarchy$setDreamSandLowGravityTicksRemaining((int) Math.max(1L, Math.round(AntarchySettings.dreamSandEffectDurationSeconds() * 20.0D)));
access.antarchy$setDreamSandLandingGraceTicks(0);
}
}
static void tickDreadAndIchor(PlayerTickEvent.Post event) {
Player player = event.getEntity();
if (player.level().isClientSide()) {
@@ -1074,51 +1037,6 @@ public final class AntarchyNeoForgeEvents {
}
}
static void tickDreamSandLowGravity(EntityTickEvent.Post event) {
if (!(event.getEntity() instanceof LivingEntity livingEntity)) {
return;
}
DreamSandLowGravityAccess access = dreamSandAccess(livingEntity);
int landingGraceTicks = access.antarchy$getDreamSandLandingGraceTicks();
if (landingGraceTicks > 0) {
access.antarchy$setDreamSandLandingGraceTicks(landingGraceTicks - 1);
}
if (!AntarchySettings.dreamSandEnabled() || isDreamSandLowGravityBlacklisted(livingEntity) || !access.antarchy$isDreamSandLowGravityActive()) {
return;
}
int remainingTicks = access.antarchy$getDreamSandLowGravityTicksRemaining();
if (remainingTicks > 0) {
access.antarchy$setDreamSandLowGravityTicksRemaining(remainingTicks - 1);
}
if (access.antarchy$getDreamSandLowGravityTicksRemaining() <= 0) {
clearDreamSandLowGravity(livingEntity);
return;
}
if (isOnSolidGround(livingEntity)) {
access.antarchy$setDreamSandLowGravityActive(false);
access.antarchy$setDreamSandLowGravityTicksRemaining(0);
access.antarchy$setDreamSandLandingGraceTicks(2);
} else if (!livingEntity.onGround() && livingEntity.getDeltaMovement().y < 0.0D) {
livingEntity.setDeltaMovement(
livingEntity.getDeltaMovement().x,
livingEntity.getDeltaMovement().y * AntarchySettings.dreamSandGravityMultiplier(),
livingEntity.getDeltaMovement().z
);
}
}
private static boolean isOnSolidGround(LivingEntity livingEntity) {
return livingEntity.onGround() && livingEntity.getBlockStateOn().blocksMotion();
}
private static boolean isStandingOnDreamSand(LivingEntity livingEntity) {
return livingEntity.level().getBlockState(livingEntity.getOnPosLegacy()).is(AntarchyNeoforgeBlocks.DREAM_SAND.get());
}
static void handleAntiwaterFall(LivingFallEvent event) {
LivingEntity livingEntity = event.getEntity();
if (intersectsAntiwater(livingEntity, livingEntity.getBoundingBox().inflate(0.05D))) {
@@ -1126,22 +1044,6 @@ public final class AntarchyNeoForgeEvents {
}
}
static void handleDreamSandFall(LivingFallEvent event) {
LivingEntity livingEntity = event.getEntity();
DreamSandLowGravityAccess access = dreamSandAccess(livingEntity);
if (!AntarchySettings.dreamSandEnabled()
|| isDreamSandLowGravityBlacklisted(livingEntity)
|| (!access.antarchy$isDreamSandLowGravityActive() && access.antarchy$getDreamSandLandingGraceTicks() <= 0)) {
return;
}
event.setCanceled(true);
}
private static boolean isDreamSandLowGravityBlacklisted(LivingEntity livingEntity) {
return livingEntity.getType().is(AntarchyTags.Entities.DREAM_SAND_LOW_GRAVITY_BLACKLIST);
}
private static boolean intersectsAntiwater(Entity entity, AABB box) {
BlockPos.MutableBlockPos cursor = new BlockPos.MutableBlockPos();
@@ -288,6 +288,10 @@ public final class AntarchyNeoforgeMisc {
() -> new LumenLilyPadFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.elythia.GlimmeringReedFeature> GLIMMERING_REEDS = FEATURES.register("glimmering_reeds",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GlimmeringReedFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, NaturalDirectionalVineFeature> SPIRALING_VINES = FEATURES.register("spiraling_vines",
() -> new NaturalDirectionalVineFeature(NoneFeatureConfiguration.CODEC, "spiraling_vines", net.minecraft.core.Direction.UP, 4, 12));
public static final DeferredHolder<Feature<?>, NaturalDirectionalVineFeature> GOREVINE = FEATURES.register("gorevine",
() -> new NaturalDirectionalVineFeature(NoneFeatureConfiguration.CODEC, "gorevine", net.minecraft.core.Direction.DOWN, 8, 16));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature> GIANT_LILY_PAD_PATCH = FEATURES.register("giant_lily_pad_patch",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature> GIANT_LILY_PAD_PATCH_PEACH_FOREST = FEATURES.register("giant_lily_pad_patch_peach_forest",
@@ -320,6 +324,8 @@ public final class AntarchyNeoforgeMisc {
() -> new NyxiteSpikeFeature(NyxiteSpikeConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, TyphoniteSpikeFeature> TYPHONITE_SPIKES = FEATURES.register("typhonite_spikes",
() -> new TyphoniteSpikeFeature(TyphoniteSpikeConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, TyphoniteSwirlFeature> TYPHONITE_SWIRLS = FEATURES.register("typhonite_swirls",
() -> new TyphoniteSwirlFeature(NoneFeatureConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, ChitinSpikeFeature> CAVARYN_CHITIN_SPIKES = FEATURES.register("cavaryn_chitin_spikes",
() -> new ChitinSpikeFeature(ChitinSpikeConfiguration.CODEC));
public static final DeferredHolder<Feature<?>, CavarynBileVeinFeature> CAVARYN_BILE_VEINS = FEATURES.register("cavaryn_bile_veins",