glimmer reed, tuft recipes, dimensional tear sounds, nyxium roots, many missing tags, configured support

This commit is contained in:
craisinlord committed 2026-09-02 22:18:24 -05:00
1 parent 4ecd7906d6
commit 867fef9d0a
148 files changed
+1832 -79

No files matched your search

@@ -322,6 +322,8 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked")
public static Supplier<Block> LUMEN_FROGLIGHT = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> GLIMMERING_REED = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> OURANWOOD_ACORN_BLOCK = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> MOSSY_OURANWOOD_LOG = (Supplier<Block>) UNBOUND;
@@ -779,6 +781,10 @@ public final class AntarchyObjects {
LUMEN_FROGLIGHT = supplier;
}
public static void setGlimmeringReed(Supplier<Block> supplier) {
GLIMMERING_REED = supplier;
}
public static void setSpiritApple(Supplier<Item> supplier) {
SPIRIT_APPLE = supplier;
}
@@ -63,6 +63,10 @@ public final class AntarchySoundEvents {
public static Supplier<SoundEvent> THORAXIS_LUCID_POOLS_AMBIENT = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> THORAXIS_LUCID_POOLS_ADDITIONS = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> THORAXIS_LUCID_POOLS_MOOD = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> DIMENSIONAL_TEAR_OPEN = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> DIMENSIONAL_TEAR_IDLE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> DIMENSIONAL_TEAR_CREATURE_LEAVES = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> DIMENSIONAL_TEAR_CLOSE = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> LUCID_AMBIENT = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> LUCID_FLYING = (Supplier<SoundEvent>) UNBOUND;
public static Supplier<SoundEvent> LUCID_ATTACK = (Supplier<SoundEvent>) UNBOUND;
@@ -613,4 +617,16 @@ public final class AntarchySoundEvents {
PRINCESS_FLY = princessFly;
PRINCESS_STEP = princessStep;
}
public static void bindDimensionalTearSounds(
Supplier<SoundEvent> dimensionalTearOpen,
Supplier<SoundEvent> dimensionalTearIdle,
Supplier<SoundEvent> dimensionalTearCreatureLeaves,
Supplier<SoundEvent> dimensionalTearClose
) {
DIMENSIONAL_TEAR_OPEN = dimensionalTearOpen;
DIMENSIONAL_TEAR_IDLE = dimensionalTearIdle;
DIMENSIONAL_TEAR_CREATURE_LEAVES = dimensionalTearCreatureLeaves;
DIMENSIONAL_TEAR_CLOSE = dimensionalTearClose;
}
}
@@ -46,6 +46,7 @@ public final class AntarchyTags {
public static final TagKey<Block> ANTIMETAL_INVERSION_BLOCKS = TagKey.create(Registries.BLOCK, id("antimetal_inversion_blocks"));
public static final TagKey<Block> TIGER_EYE_CAMOUFLAGE_BLACKLIST = TagKey.create(Registries.BLOCK, id("tiger_eye_camouflage_blacklist"));
public static final TagKey<Block> LUCID_ANCHOR_BASE_BLOCKS = TagKey.create(Registries.BLOCK, id("lucid_anchor_base_blocks"));
public static final TagKey<Block> NYXIUM = TagKey.create(Registries.BLOCK, id("nyxium"));
private Blocks() {
}
@@ -125,6 +126,7 @@ public final class AntarchyTags {
public static final TagKey<Item> GLIMMER_AUGMENT_ELKA = TagKey.create(Registries.ITEM, id("glimmer_augment_elka"));
public static final TagKey<Item> HFCS_CANNOT_AMERICANIZE = TagKey.create(Registries.ITEM, id("hfcs_cannot_americanize"));
public static final TagKey<Item> TIGER_EYE_ARMOR = TagKey.create(Registries.ITEM, id("tigers_eye_armor"));
public static final TagKey<Item> BIG_BERTHA_INGREDIENT = TagKey.create(Registries.ITEM, id("big_bertha_ingredient"));
private Items() {
}
@@ -29,6 +29,8 @@ public class DirectionalNyxiumBlock extends Block implements BonemealableBlock {
private static final ResourceLocation NADIR_SAPLING_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "nadir_sapling");
private static final ResourceLocation WHIRLFLOWER_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "whirlflower");
private static final ResourceLocation SPIRALING_VINES_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "spiraling_vines");
private static final ResourceLocation NADIR_ROOTS_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "nadir_roots");
private static final ResourceLocation VERDANT_ROOTS_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "verdant_roots");
private final Type type;
public DirectionalNyxiumBlock(BlockBehaviour.Properties properties, Type type) {
@@ -93,9 +95,17 @@ public class DirectionalNyxiumBlock extends Block implements BonemealableBlock {
if (direction == Direction.DOWN && random.nextInt(7) == 0) {
yield NADIR_SAPLING_ID;
}
yield random.nextInt(4) == 0 ? DUSKBELL_ID : NADIR_FERN_ID;
yield switch (random.nextInt(5)) {
case 0 -> DUSKBELL_ID;
case 1, 2 -> NADIR_ROOTS_ID;
default -> NADIR_FERN_ID;
};
}
case VERDANT -> random.nextInt(3) == 0 ? SPIRALING_VINES_ID : WHIRLFLOWER_ID;
case VERDANT -> switch (random.nextInt(5)) {
case 0, 1 -> VERDANT_ROOTS_ID;
case 2 -> SPIRALING_VINES_ID;
default -> WHIRLFLOWER_ID;
};
};
Block block = BuiltInRegistries.BLOCK.get(id);
BlockState growthState = block.defaultBlockState();
@@ -1,5 +1,6 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -49,15 +50,14 @@ public class DirectionalThoraxisFlowerBlock extends BushBlock {
@Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
return true;
return state.is(AntarchyTags.Blocks.NYXIUM);
}
@Override
protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) {
Direction growthDirection = state.getValue(VERTICAL_DIRECTION);
BlockPos supportPos = pos.relative(growthDirection.getOpposite());
BlockState supportState = level.getBlockState(supportPos);
return supportState.isFaceSturdy(level, supportPos, growthDirection);
return this.mayPlaceOn(level.getBlockState(supportPos), level, supportPos);
}
@Override
@@ -0,0 +1,84 @@
package com.craisinlord.antarchy.content.block;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.ItemInteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.BonemealableBlock;
import net.minecraft.world.level.block.DoublePlantBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
import net.minecraft.world.phys.BlockHitResult;
/** A two-block-tall, light-emitting reed found around Lumen pools. */
public final class GlimmeringReedBlock extends DoublePlantBlock implements BonemealableBlock {
public static final MapCodec<GlimmeringReedBlock> CODEC = Block.simpleCodec(GlimmeringReedBlock::new);
public GlimmeringReedBlock(BlockBehaviour.Properties properties) {
super(properties);
}
@Override
public MapCodec<GlimmeringReedBlock> codec() {
return CODEC;
}
@Override
protected ItemInteractionResult useItemOn(
ItemStack stack,
BlockState state,
Level level,
BlockPos pos,
Player player,
InteractionHand hand,
BlockHitResult hitResult
) {
if (player.getItemInHand(hand).is(Items.BONE_MEAL)) {
popResource(level, pos, new ItemStack(state.getBlock().asItem(), 1));
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
return super.useItemOn(stack, state, level, pos, player, hand, hitResult);
}
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state) {
return true;
}
@Override
public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) {
return true;
}
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
}
@Override
public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) {
super.animateTick(state, level, pos, random);
if (state.getValue(HALF) != DoubleBlockHalf.UPPER || random.nextInt(8) != 0) {
return;
}
double x = pos.getX() + 0.15D + random.nextDouble() * 0.7D;
double y = pos.getY() + 0.76D + random.nextDouble() * 0.18D;
double z = pos.getZ() + 0.15D + random.nextDouble() * 0.7D;
level.addParticle(ParticleTypes.GLOW, x, y, z, 0.0D, 0.02D, 0.0D);
if (random.nextInt(4) == 0) {
level.addParticle(ParticleTypes.ENCHANT, x, y + 0.02D, z, 0.0D, 0.015D, 0.0D);
}
}
}
@@ -6,7 +6,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
public class GorevineBlock extends SimpleDirectionalVineBlock {
public static final MapCodec<GorevineBlock> CODEC = simpleCodec(GorevineBlock::new);
private static final int MAX_GROWTH_DISTANCE = 12;
private static final int MAX_GROWTH_DISTANCE = 7;
public GorevineBlock(BlockBehaviour.Properties properties) {
super(properties);
@@ -27,7 +27,7 @@ public class SimpleDirectionalVineBlock extends BushBlock implements Bonemealabl
public static final EnumProperty<Direction> GROWTH_DIRECTION = EnumProperty.create("growth_direction", Direction.class, Direction.UP, Direction.DOWN);
public static final BooleanProperty TOP_CAP = BooleanProperty.create("top_cap");
public static final BooleanProperty BOTTOM_CAP = BooleanProperty.create("bottom_cap");
public static final IntegerProperty DISTANCE = IntegerProperty.create("distance", 0, 6);
public static final IntegerProperty DISTANCE = IntegerProperty.create("distance", 0, 15);
protected static final int MAX_DISTANCE = 6;
protected static final VoxelShape SHAPE = Block.box(4.0D, 0.0D, 4.0D, 12.0D, 16.0D, 12.0D);
@@ -153,9 +153,10 @@ public class SimpleDirectionalVineBlock extends BushBlock implements Bonemealabl
return;
}
int nextDistance = Math.min(state.getValue(DISTANCE) + 1, maxDistance());
BlockState grownState = this.defaultBlockState()
.setValue(GROWTH_DIRECTION, direction)
.setValue(DISTANCE, state.getValue(DISTANCE) + 1);
.setValue(DISTANCE, nextDistance);
level.setBlock(targetPos, grownState, Block.UPDATE_ALL);
BlockState posState = level.getBlockState(pos);
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -27,7 +28,6 @@ public class WhirlflowerBlock extends BushBlock {
private static final VoxelShape UP_SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 13.0D, 13.0D);
private static final VoxelShape DOWN_SHAPE = Block.box(3.0D, 3.0D, 3.0D, 13.0D, 16.0D, 13.0D);
private static final ResourceLocation VEINED_TYPHONITE_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "veined_typhonite");
private static final ResourceLocation VERDANT_NYXIUM_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "verdant_nyxium");
public WhirlflowerBlock(BlockBehaviour.Properties properties) {
super(properties);
@@ -54,8 +54,8 @@ public class WhirlflowerBlock extends BushBlock {
@Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
ResourceLocation id = BuiltInRegistries.BLOCK.getKey(state.getBlock());
return id.equals(VEINED_TYPHONITE_ID) || id.equals(VERDANT_NYXIUM_ID);
return state.is(AntarchyTags.Blocks.NYXIUM)
|| BuiltInRegistries.BLOCK.getKey(state.getBlock()).equals(VEINED_TYPHONITE_ID);
}
@Override
@@ -221,6 +221,8 @@ public final class CreativeTabContents {
entry("nadir_fern", "natural_blocks"),
entry("large_nadir_fern", "natural_blocks"),
entry("duskbell", "natural_blocks"),
entry("nadir_roots", "natural_blocks"),
entry("verdant_roots", "natural_blocks"),
entry("typhonite_pillar", "building_blocks"),
entry("antigravel", "natural_blocks"),
entry("budding_blood_crystal", "building_blocks"),
@@ -340,6 +342,7 @@ public final class CreativeTabContents {
entry("duplicator_sapling", "natural_blocks"),
entry("orange_milkweed", "natural_blocks"),
entry("pink_milkweed", "natural_blocks"),
entry("glimmering_reed", "natural_blocks"),
entry("camellia", "natural_blocks"),
entry("spider_lily", "natural_blocks"),
entry("lotus", "natural_blocks"),
@@ -100,9 +100,13 @@ public class ManticoreEntity extends Monster implements GeoEntity {
}
public static boolean canSpawn(EntityType<ManticoreEntity> type, ServerLevelAccessor level, MobSpawnType spawnReason, BlockPos pos, RandomSource random) {
if (spawnReason == MobSpawnType.SPAWN_EGG || spawnReason == MobSpawnType.SPAWNER || spawnReason == MobSpawnType.COMMAND) {
if (spawnReason == MobSpawnType.SPAWN_EGG || spawnReason == MobSpawnType.SPAWNER
|| spawnReason == MobSpawnType.COMMAND || spawnReason == MobSpawnType.MOB_SUMMONED) {
return true;
}
if (pos.getY() >= 0) {
return false;
}
BlockState below = level.getBlockState(pos.below());
BlockState above = level.getBlockState(pos.above());
boolean floorSupport = !below.is(Blocks.BEDROCK) && below.isFaceSturdy(level, pos.below(), Direction.UP);
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.content.entity.portal;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.entity.ManticoreEntity;
import com.craisinlord.antarchy.content.entity.royal.QueenEntity;
@@ -11,6 +12,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.sounds.AbstractTickableSoundInstance;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderSet;
@@ -63,6 +66,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
private static final RawAnimation CLOSING_ANIM = RawAnimation.begin().thenPlayAndHold("closing");
private static final int DEFAULT_LIFETIME_TICKS = 20 * 60 * 20;
private static final int OPENING_ANIMATION_TICKS = 20;
private static final int MANTICORE_EMERGENCE_TICKS = OPENING_ANIMATION_TICKS + 20;
private static final int CLOSING_ANIMATION_TICKS = 10;
private static final int EVENT_WARNING_TICKS = 80;
private static final int TELEPORT_COOLDOWN_TICKS = 60;
@@ -72,6 +76,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
private static final Map<UUID, Set<UUID>> QUEEN_TEAR_IDS = new HashMap<>();
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private boolean idleSoundStarted;
private UUID linkedTearId;
@Nullable
private DimensionalTearEntity linkedTear;
@@ -138,13 +143,20 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
super.tick();
if (this.level().isClientSide) {
this.tickClientParticles();
this.tickIdleSound();
return;
}
this.ageTicks++;
if (this.ageTicks == 1) {
this.level().playSound(null, this.blockPosition(), AntarchySoundEvents.DIMENSIONAL_TEAR_OPEN.get(), SoundSource.HOSTILE, 1.0F, 1.0F);
}
if (this.ageTicks < OPENING_ANIMATION_TICKS) {
this.setTearState(TearState.OPENING);
} else if (this.ageTicks >= this.lifetimeTicks - CLOSING_ANIMATION_TICKS) {
if (this.ageTicks == this.lifetimeTicks - CLOSING_ANIMATION_TICKS) {
this.level().playSound(null, this.blockPosition(), AntarchySoundEvents.DIMENSIONAL_TEAR_CLOSE.get(), SoundSource.HOSTILE, 1.0F, 1.0F);
}
this.setTearState(TearState.COLLAPSING);
} else if (this.getTearState() == TearState.OPENING || this.getTearState() == TearState.COLLAPSING) {
this.setTearState(TearState.NORMAL);
@@ -154,11 +166,11 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
return;
}
if (this.queenOwnerId != null && this.ageTicks == OPENING_ANIMATION_TICKS) {
if (this.queenOwnerId != null && this.ageTicks == MANTICORE_EMERGENCE_TICKS) {
this.spawnQueenManticores((ServerLevel) this.level());
}
if (this.staffOwnerId != null && this.ageTicks == OPENING_ANIMATION_TICKS) {
if (this.staffOwnerId != null && this.ageTicks == MANTICORE_EMERGENCE_TICKS) {
this.spawnStaffManticores((ServerLevel) this.level());
}
@@ -219,7 +231,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
mob.setDeltaMovement(this.getViewVector(1.0F).scale(0.35D).add(0.0D, 0.08D, 0.0D));
mob.setNoGravity(true);
level.addFreshEntity(mob);
level.playSound(null, this.blockPosition(), eventState == TearState.LUCID ? SoundEvents.AMETHYST_BLOCK_CHIME : SoundEvents.ENDERMAN_SCREAM, SoundSource.HOSTILE, 0.75F, eventState == TearState.LUCID ? 1.45F : 0.85F);
level.playSound(null, this.blockPosition(), AntarchySoundEvents.DIMENSIONAL_TEAR_CREATURE_LEAVES.get(), SoundSource.HOSTILE, 0.75F, eventState == TearState.LUCID ? 1.15F : 0.9F);
}
private void spawnQueenManticores(ServerLevel level) {
@@ -412,6 +424,14 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
this.entityData.set(STATE, state.ordinal());
}
private void tickIdleSound() {
if (this.idleSoundStarted || this.getTearState() == TearState.OPENING) {
return;
}
this.idleSoundStarted = true;
Minecraft.getInstance().getSoundManager().play(new TearIdleSoundInstance(this));
}
private void tickClientParticles() {
TearState state = this.getTearState();
if (this.random.nextInt(state == TearState.NORMAL ? 5 : 2) != 0) {
@@ -523,4 +543,36 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
private static final class TearIdleSoundInstance extends AbstractTickableSoundInstance {
private final DimensionalTearEntity tear;
private TearIdleSoundInstance(DimensionalTearEntity tear) {
super(AntarchySoundEvents.DIMENSIONAL_TEAR_IDLE.get(), SoundSource.HOSTILE, tear.random);
this.tear = tear;
this.looping = true;
this.delay = 0;
this.volume = 0.6F;
this.pitch = 1.0F;
this.x = tear.getX();
this.y = tear.getY();
this.z = tear.getZ();
}
@Override
public void tick() {
if (this.tear.isRemoved() || this.tear.getTearState() == TearState.COLLAPSING) {
this.stop();
return;
}
this.x = this.tear.getX();
this.y = this.tear.getY();
this.z = this.tear.getZ();
}
@Override
public boolean canStartSilent() {
return true;
}
}
}
@@ -68,7 +68,7 @@ public class WindVortexEntity extends Entity {
private static final String HOMING_KEY = "Homing";
private static final double BASE_RADIUS = 0.35D;
private static final double DRIFT_FRICTION = 0.96D;
private static final double DRIFT_FRICTION = 0.995D;
private static final int FADE_OUT_TICKS = 8;
public enum VortexMode {
@@ -174,8 +174,8 @@ public class WindVortexEntity extends Entity {
if (--this.travelTicksRemaining <= 0) {
this.travelling = false;
this.noPhysics = false;
this.setDeltaMovement(this.travelVelocity);
this.travelVelocity = Vec3.ZERO;
this.setDeltaMovement(Vec3.ZERO);
}
} else {
Vec3 drift = this.getDeltaMovement().multiply(DRIFT_FRICTION, DRIFT_FRICTION, DRIFT_FRICTION);
@@ -0,0 +1,59 @@
package com.craisinlord.antarchy.content.worldgen.elythia;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.block.GlimmeringReedBlock;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.DoublePlantBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.Heightmap;
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 GlimmeringReedFeature extends Feature<NoneFeatureConfiguration> {
public GlimmeringReedFeature(Codec<NoneFeatureConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
WorldGenLevel level = context.level();
RandomSource random = context.random();
BlockPos origin = context.origin();
BlockState reed = AntarchyObjects.GLIMMERING_REED.get().defaultBlockState();
boolean placedAny = false;
for (int i = 0; i < 18; i++) {
int x = origin.getX() + random.nextInt(17) - 8;
int z = origin.getZ() + random.nextInt(17) - 8;
int surfaceY = level.getHeight(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, x, z) - 1;
BlockPos groundPos = new BlockPos(x, surfaceY, z);
BlockPos reedPos = groundPos.above();
if (!level.getBlockState(groundPos).isSolid() || !level.isEmptyBlock(reedPos)
|| !level.isEmptyBlock(reedPos.above()) || !reed.canSurvive(level, reedPos)) {
continue;
}
boolean besideLumen = false;
for (Direction direction : Direction.Plane.HORIZONTAL) {
if (level.getFluidState(groundPos.relative(direction)).is(AntarchyTags.Fluids.LUMEN)
&& level.getFluidState(groundPos.relative(direction)).isSource()) {
besideLumen = true;
break;
}
}
if (!besideLumen) {
continue;
}
DoublePlantBlock.placeAt(level, reed, reedPos, 2);
placedAny = true;
}
return placedAny;
}
}
@@ -18,6 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LivingEntityRenderer.class)
public abstract class HoverboardRiderPoseMixin<T extends LivingEntity, M extends EntityModel<T>> {
private static final float HOVERBOARD_RIDER_RENDER_YAW = -90.0F;
private static final float HOVERBOARD_RIDER_TORSO_ROLL = -15.0F;
@Shadow
public abstract M getModel();
@@ -60,6 +61,7 @@ public abstract class HoverboardRiderPoseMixin<T extends LivingEntity, M extends
float correction = (float) Math.toRadians(HOVERBOARD_RIDER_RENDER_YAW);
humanoidModel.head.yRot += correction;
humanoidModel.hat.yRot += correction;
humanoidModel.body.zRot += (float) Math.toRadians(HOVERBOARD_RIDER_TORSO_ROLL);
}
}
}