diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/VeryTallGrassBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/VeryTallGrassBlock.java new file mode 100644 index 00000000..1bf0808a --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/VeryTallGrassBlock.java @@ -0,0 +1,170 @@ +package com.craisinlord.antarchy.content.block; + +import com.mojang.serialization.MapCodec; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.util.StringRepresentable; +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.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.BushBlock; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.Nullable; + +public class VeryTallGrassBlock extends BushBlock implements BonemealableBlock { + public static final MapCodec CODEC = Block.simpleCodec(VeryTallGrassBlock::new); + public static final EnumProperty PART = EnumProperty.create("part", Part.class); + + public VeryTallGrassBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState(this.stateDefinition.any().setValue(PART, Part.LOWER)); + } + + @Override + public MapCodec codec() { + return CODEC; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(PART); + } + + @Override + protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { + return switch (state.getValue(PART)) { + case LOWER -> super.canSurvive(state, level, pos); + case MIDDLE -> level.getBlockState(pos.below()).is(this) + && level.getBlockState(pos.below()).getValue(PART) == Part.LOWER + && level.getBlockState(pos.above()).is(this) + && level.getBlockState(pos.above()).getValue(PART) == Part.UPPER; + case UPPER -> level.getBlockState(pos.below()).is(this) + && level.getBlockState(pos.below()).getValue(PART) == Part.MIDDLE; + }; + } + + @Override + protected BlockState updateShape( + BlockState state, + Direction direction, + BlockState neighborState, + LevelAccessor level, + BlockPos pos, + BlockPos neighborPos + ) { + Part part = state.getValue(PART); + if (part == Part.LOWER && direction == Direction.UP && (!neighborState.is(this) || neighborState.getValue(PART) != Part.MIDDLE)) { + return Blocks.AIR.defaultBlockState(); + } + if (part == Part.MIDDLE) { + if (direction == Direction.DOWN && (!neighborState.is(this) || neighborState.getValue(PART) != Part.LOWER)) { + return Blocks.AIR.defaultBlockState(); + } + if (direction == Direction.UP && (!neighborState.is(this) || neighborState.getValue(PART) != Part.UPPER)) { + return Blocks.AIR.defaultBlockState(); + } + } + if (part == Part.UPPER && direction == Direction.DOWN && (!neighborState.is(this) || neighborState.getValue(PART) != Part.MIDDLE)) { + return Blocks.AIR.defaultBlockState(); + } + return state.canSurvive(level, pos) ? super.updateShape(state, direction, neighborState, level, pos, neighborPos) : Blocks.AIR.defaultBlockState(); + } + + @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 false; + } + + @Override + public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) { + return false; + } + + @Override + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { + } + + @Override + protected boolean canBeReplaced(BlockState state, BlockPlaceContext context) { + return false; + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockPos pos = context.getClickedPos(); + Level level = context.getLevel(); + if (!level.getBlockState(pos.above()).canBeReplaced(context) || !level.getBlockState(pos.above(2)).canBeReplaced(context)) { + return null; + } + return super.getStateForPlacement(context); + } + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable net.minecraft.world.entity.LivingEntity placer, ItemStack stack) { + placeAt(level, pos, Block.UPDATE_ALL); + } + + public static void placeAt(LevelAccessor level, BlockPos pos, int flags) { + level.setBlock(pos, defaultState(Part.LOWER), flags); + level.setBlock(pos.above(), defaultState(Part.MIDDLE), flags); + level.setBlock(pos.above(2), defaultState(Part.UPPER), flags); + } + + private static BlockState defaultState(Part part) { + return net.minecraft.core.registries.BuiltInRegistries.BLOCK + .get(net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("antarchy", "very_tall_grass")) + .defaultBlockState() + .setValue(PART, part); + } + + public enum Part implements StringRepresentable { + LOWER("lower"), + MIDDLE("middle"), + UPPER("upper"); + + private final String name; + + Part(String name) { + this.name = name; + } + + @Override + public String getSerializedName() { + return this.name; + } + } +} diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/AlphaVertexConsumerProxy.java b/common/src/main/java/com/craisinlord/antarchy/content/client/AlphaVertexConsumerProxy.java new file mode 100644 index 00000000..e52de828 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/AlphaVertexConsumerProxy.java @@ -0,0 +1,39 @@ +package com.craisinlord.antarchy.content.client; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import com.mojang.blaze3d.vertex.VertexConsumer; + +public final class AlphaVertexConsumerProxy { + private AlphaVertexConsumerProxy() { + } + + public static VertexConsumer wrap(VertexConsumer delegate, float alphaScale) { + if (alphaScale >= 0.999F) { + return delegate; + } + + final VertexConsumer[] proxyHolder = new VertexConsumer[1]; + InvocationHandler handler = new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + Object[] forwardedArgs = args; + if ("setColor".equals(method.getName()) && args != null && args.length == 4 && args[3] instanceof Integer alpha) { + forwardedArgs = args.clone(); + forwardedArgs[3] = Math.max(0, Math.min(255, Math.round(alpha * alphaScale))); + } + + Object result = method.invoke(delegate, forwardedArgs); + return result == delegate ? proxyHolder[0] : result; + } + }; + + proxyHolder[0] = (VertexConsumer) Proxy.newProxyInstance( + VertexConsumer.class.getClassLoader(), + new Class[] { VertexConsumer.class }, + handler + ); + return proxyHolder[0]; + } +} diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/model/RollyPollyModel.java b/common/src/main/java/com/craisinlord/antarchy/content/client/model/RollyPollyModel.java index 8bbdb463..1c9fab89 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/client/model/RollyPollyModel.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/model/RollyPollyModel.java @@ -8,8 +8,6 @@ import software.bernie.geckolib.model.GeoModel; public class RollyPollyModel extends GeoModel { private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/rolly_polly/rolly_polly.png"); - private static final ResourceLocation TEXTURE_SADDLED = - ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/rolly_polly/rolly_polly_saddled.png"); @Override public ResourceLocation getModelResource(RollyPollyEntity animatable) { @@ -18,7 +16,7 @@ public class RollyPollyModel extends GeoModel { @Override public ResourceLocation getTextureResource(RollyPollyEntity animatable) { - return animatable.hasSaddle() ? TEXTURE_SADDLED : TEXTURE; + return TEXTURE; } @Override diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/RollyPollyEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/RollyPollyEntity.java index 64150d3a..85643b28 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/RollyPollyEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/RollyPollyEntity.java @@ -2,11 +2,14 @@ package com.craisinlord.antarchy.content.entity; import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.content.AntarchyTags; + +import java.util.EnumSet; +import net.minecraft.core.BlockPos; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; -import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.BlockTags; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.InteractionHand; @@ -18,11 +21,11 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Mob; -import net.minecraft.world.entity.MoverType; import net.minecraft.world.entity.TamableAnimal; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.goal.FloatGoal; +import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; @@ -30,9 +33,10 @@ import net.minecraft.world.entity.ai.goal.TemptGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BedBlock; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; import software.bernie.geckolib.animatable.GeoEntity; @@ -47,14 +51,13 @@ import software.bernie.geckolib.util.GeckoLibUtil; public class RollyPollyEntity extends TamableAnimal implements GeoEntity { private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); - private static final RawAnimation ROLL_UP_ANIM = RawAnimation.begin().thenPlay("wheel_mode"); + private static final RawAnimation ROLL_UP_ANIM = RawAnimation.begin().thenPlayAndHold("wheel_mode"); private static final RawAnimation ROLLING_ANIM = RawAnimation.begin().thenLoop("roll"); private static final RawAnimation UNROLL_ANIM = RawAnimation.begin().thenPlay("normal_mode"); - private static final int ANIM_IDLE = 0; - private static final int ANIM_WALK = 1; + // ANIMATION_STATE only syncs the roll transitions; idle/walk/rolling are derived client-side + private static final int ANIM_NONE = 0; private static final int ANIM_ROLL_UP = 2; - private static final int ANIM_ROLLING = 3; private static final int ANIM_UNROLL = 4; // wheel_mode is 0.75s, normal_mode is ~0.42s @@ -65,8 +68,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { private static final EntityDataAccessor ANIMATION_STATE = SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.INT); - private static final EntityDataAccessor SADDLED = - SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.BOOLEAN); private static final EntityDataAccessor ROLLED = SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.BOOLEAN); @@ -91,8 +92,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); - builder.define(ANIMATION_STATE, ANIM_IDLE); - builder.define(SADDLED, false); + builder.define(ANIMATION_STATE, ANIM_NONE); builder.define(ROLLED, false); } @@ -106,20 +106,21 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isTame() && super.canUse(); } }); - this.goalSelector.addGoal(2, new TemptGoal(this, 1.1D, Ingredient.of(AntarchyTags.Items.ROLLY_POLLY_FOOD), false) { + this.goalSelector.addGoal(2, new SnuggleOnBedGoal()); + this.goalSelector.addGoal(3, new TemptGoal(this, 1.1D, Ingredient.of(AntarchyTags.Items.ROLLY_POLLY_FOOD), false) { @Override public boolean canUse() { return !RollyPollyEntity.this.isRolled() && super.canUse(); } }); - this.goalSelector.addGoal(3, new WaterAvoidingRandomStrollGoal(this, 1.0D) { + this.goalSelector.addGoal(4, new WaterAvoidingRandomStrollGoal(this, 1.0D) { @Override public boolean canUse() { return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isVehicle() && super.canUse(); } }); - this.goalSelector.addGoal(4, new LookAtPlayerGoal(this, Player.class, 8.0F)); - this.goalSelector.addGoal(5, new RandomLookAroundGoal(this)); + this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 8.0F)); + this.goalSelector.addGoal(6, new RandomLookAroundGoal(this)); } @Override @@ -154,33 +155,11 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { return InteractionResult.sidedSuccess(this.level().isClientSide); } - if (this.isTame()) { - if (!this.hasSaddle() && stack.is(Items.SADDLE) && this.isOwnedBy(player)) { - if (!this.level().isClientSide) { - this.setSaddled(true); - if (!player.getAbilities().instabuild) { - stack.shrink(1); - } - this.playSound(SoundEvents.HORSE_SADDLE, 1.0F, 1.2F); - } - return InteractionResult.sidedSuccess(this.level().isClientSide); - } - - if (this.hasSaddle() && stack.isEmpty() && player.isShiftKeyDown() && this.isOwnedBy(player) && !player.isPassengerOfSameVehicle(this)) { - if (!this.level().isClientSide) { - this.setSaddled(false); - this.spawnAtLocation(new ItemStack(Items.SADDLE)); - this.playSound(SoundEvents.HORSE_SADDLE, 1.0F, 0.9F); - } - return InteractionResult.sidedSuccess(this.level().isClientSide); - } - - if (this.hasSaddle() && stack.isEmpty() && !player.isPassengerOfSameVehicle(this)) { - if (!this.level().isClientSide) { - player.startRiding(this); - } - return InteractionResult.sidedSuccess(this.level().isClientSide); + if (this.isTame() && stack.isEmpty() && !player.isShiftKeyDown() && !player.isPassengerOfSameVehicle(this)) { + if (!this.level().isClientSide) { + player.startRiding(this); } + return InteractionResult.sidedSuccess(this.level().isClientSide); } return super.mobInteract(player, hand); @@ -192,14 +171,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { return null; } - public boolean hasSaddle() { - return this.entityData.get(SADDLED); - } - - public void setSaddled(boolean saddled) { - this.entityData.set(SADDLED, saddled); - } - public boolean isRolled() { return this.entityData.get(ROLLED); } @@ -210,7 +181,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { /** Toggles wheel mode; called from the ridden-roll keybind payload. */ public void handleRollToggle(ServerPlayer player) { - if (!this.isTame() || !this.hasSaddle() || this.getControllingPassenger() != player) { + if (!this.isTame() || this.getControllingPassenger() != player) { return; } if (this.rollTransitionTicks > 0) { @@ -273,10 +244,8 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { if (this.unrolling) { this.setRolled(false); this.unrolling = false; - this.setAnimationState(ANIM_IDLE); - } else { - this.setAnimationState(ANIM_ROLLING); } + this.setAnimationState(ANIM_NONE); } } @@ -289,7 +258,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { } this.tickTumbleDamage(); - this.updateAnimationState(); } private void tickTumbleDamage() { @@ -309,16 +277,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { } } - private void updateAnimationState() { - // Roll states are driven by the transition/tick logic above - int state = this.getAnimationState(); - if (state == ANIM_ROLL_UP || state == ANIM_ROLLING || state == ANIM_UNROLL) { - return; - } - boolean moving = this.getDeltaMovement().horizontalDistanceSqr() > 1.0E-4D; - this.setAnimationState(moving ? ANIM_WALK : ANIM_IDLE); - } - private int getAnimationState() { return this.entityData.get(ANIMATION_STATE); } @@ -330,7 +288,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { @Override @Nullable public LivingEntity getControllingPassenger() { - if (!this.isTame() || !this.hasSaddle()) { + if (!this.isTame()) { return null; } Entity passenger = this.getFirstPassenger(); @@ -353,27 +311,28 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { @Override public void travel(Vec3 travelVector) { - if (!(this.getControllingPassenger() instanceof Player rider) || !this.isVehicle()) { - if (this.defensiveCurlTicks > 0) { - super.travel(Vec3.ZERO); - return; - } - super.travel(travelVector); - return; - } - - if (this.rollTransitionTicks > 0) { - // Hold still while rolling up / unrolling + if (this.defensiveCurlTicks > 0 && !this.isVehicle()) { super.travel(Vec3.ZERO); return; } + super.travel(travelVector); + } - this.setYRot(rider.getYHeadRot()); - this.yBodyRot = this.getYRot(); - this.yHeadRot = this.getYRot(); + @Override + protected void tickRidden(Player player, Vec3 travelVector) { + super.tickRidden(player, travelVector); + this.setRot(player.getYHeadRot(), player.getXRot() * 0.5F); + this.yRotO = this.yBodyRot = this.yHeadRot = this.getYRot(); + } - float forward = rider.zza; - float strafe = rider.xxa * 0.5F; + @Override + protected Vec3 getRiddenInput(Player player, Vec3 travelVector) { + if (this.rollTransitionTicks > 0) { + // Hold still while rolling up / unrolling + return Vec3.ZERO; + } + float forward = player.zza; + float strafe = player.xxa * 0.5F; if (forward < 0.0F) { forward *= 0.4F; } @@ -381,16 +340,13 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { // Rolling is fast but drifty strafe *= 0.35F; } + return new Vec3(strafe, 0.0D, forward); + } - double speed = this.getAttributeValue(Attributes.MOVEMENT_SPEED) - * (this.isRolled() ? AntarchySettings.rollyPollyRollSpeedMultiplier() : 1.0D); - this.setSpeed((float) speed); - - Vec3 input = new Vec3(strafe, 0.0D, forward); - Vec3 motion = new Vec3(0.0D, this.getDeltaMovement().y, 0.0D); - this.moveRelative(this.getSpeed(), input); - this.setDeltaMovement(motion.add(this.getDeltaMovement().x, 0.0D, this.getDeltaMovement().z)); - this.move(MoverType.SELF, this.getDeltaMovement()); + @Override + protected float getRiddenSpeed(Player player) { + return (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED) + * (this.isRolled() ? AntarchySettings.rollyPollyRollSpeedMultiplier() : 1.0D)); } @Override @@ -401,44 +357,128 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity { return super.causeFallDamage(fallDistance, multiplier, damageSource); } - @Override - protected void dropEquipment() { - super.dropEquipment(); - if (this.hasSaddle()) { - this.spawnAtLocation(new ItemStack(Items.SADDLE)); - this.setSaddled(false); - } - } - - @Override - public void addAdditionalSaveData(CompoundTag tag) { - super.addAdditionalSaveData(tag); - tag.putBoolean("Saddled", this.hasSaddle()); - } - - @Override - public void readAdditionalSaveData(CompoundTag tag) { - super.readAdditionalSaveData(tag); - this.setSaddled(tag.getBoolean("Saddled")); - } - @Override public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { controllers.add(new AnimationController<>(this, "main_controller", 2, this::mainAnimController)); } private PlayState mainAnimController(AnimationState state) { - return switch (this.getAnimationState()) { - case ANIM_WALK -> state.setAndContinue(WALK_ANIM); - case ANIM_ROLL_UP -> state.setAndContinue(ROLL_UP_ANIM); - case ANIM_ROLLING -> state.setAndContinue(ROLLING_ANIM); - case ANIM_UNROLL -> state.setAndContinue(UNROLL_ANIM); - default -> state.setAndContinue(IDLE_ANIM); - }; + AnimationController controller = state.getController(); + int transition = this.getAnimationState(); + + if (transition == ANIM_ROLL_UP) { + controller.setAnimationSpeed(1.0D); + return state.setAndContinue(ROLL_UP_ANIM); + } + if (transition == ANIM_UNROLL) { + controller.setAnimationSpeed(1.0D); + return state.setAndContinue(UNROLL_ANIM); + } + + if (this.isRolled()) { + if (state.isMoving()) { + controller.setAnimationSpeed(1.0D); + return state.setAndContinue(ROLLING_ANIM); + } + if (controller.getCurrentAnimation() == null) { + // Just loaded in while rolled — snap into the held ball pose + controller.setAnimationSpeed(1.0D); + return state.setAndContinue(ROLL_UP_ANIM); + } + // Stationary while rolled: freeze on the current ball frame instead of spinning in place + controller.setAnimationSpeed(0.0D); + return PlayState.CONTINUE; + } + + controller.setAnimationSpeed(1.0D); + return state.setAndContinue(state.isMoving() ? WALK_ANIM : IDLE_ANIM); } @Override public AnimatableInstanceCache getAnimatableInstanceCache() { return this.geoCache; } + + /** Like a cat, a tamed rolly polly wanders over and curls up on the bed while its owner sleeps. */ + private class SnuggleOnBedGoal extends Goal { + @Nullable + private Player ownerPlayer; + @Nullable + private BlockPos bedPos; + private int onBedTicks; + + SnuggleOnBedGoal() { + this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK, Goal.Flag.JUMP)); + } + + @Override + public boolean canUse() { + if (!RollyPollyEntity.this.isTame() || RollyPollyEntity.this.isVehicle()) { + return false; + } + if (!(RollyPollyEntity.this.getOwner() instanceof Player player) || !player.isSleeping()) { + return false; + } + if (RollyPollyEntity.this.distanceToSqr(player) > 100.0D) { + return false; + } + BlockPos pos = player.blockPosition(); + BlockState stateAt = RollyPollyEntity.this.level().getBlockState(pos); + if (!stateAt.is(BlockTags.BEDS)) { + return false; + } + this.ownerPlayer = player; + // Aim for the pillow end of the bed, next to the sleeper's head + this.bedPos = stateAt.getOptionalValue(BedBlock.FACING) + .map(direction -> pos.relative(direction.getOpposite())) + .orElse(pos); + return true; + } + + @Override + public boolean canContinueToUse() { + return RollyPollyEntity.this.isTame() + && !RollyPollyEntity.this.isVehicle() + && this.ownerPlayer != null + && this.ownerPlayer.isSleeping() + && this.bedPos != null; + } + + @Override + public void start() { + this.onBedTicks = 0; + } + + @Override + public void stop() { + this.ownerPlayer = null; + this.bedPos = null; + this.onBedTicks = 0; + RollyPollyEntity.this.getNavigation().stop(); + if (RollyPollyEntity.this.isRolled() && RollyPollyEntity.this.rollTransitionTicks <= 0) { + RollyPollyEntity.this.startUnroll(); + } + } + + @Override + public void tick() { + if (this.ownerPlayer == null || this.bedPos == null) { + return; + } + if (RollyPollyEntity.this.distanceToSqr(this.ownerPlayer) > 2.5D) { + this.onBedTicks = 0; + if (!RollyPollyEntity.this.isRolled()) { + RollyPollyEntity.this.getNavigation().moveTo( + this.bedPos.getX() + 0.5D, this.bedPos.getY() + 1.0D, this.bedPos.getZ() + 0.5D, 1.1D); + } + return; + } + RollyPollyEntity.this.getNavigation().stop(); + if (++this.onBedTicks > this.adjustedTickDelay(16) + && !RollyPollyEntity.this.isRolled() + && RollyPollyEntity.this.rollTransitionTicks <= 0) { + RollyPollyEntity.this.startRollUp(); + } + } + } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/ElythiaFloraFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/ElythiaFloraFeature.java index a958749d..d6ae046b 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/ElythiaFloraFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/ElythiaFloraFeature.java @@ -1,10 +1,17 @@ package com.craisinlord.antarchy.content.worldgen.elythia; +import com.craisinlord.antarchy.Antarchy; import com.craisinlord.antarchy.content.AntarchyObjects; +import com.craisinlord.antarchy.content.block.BigBushBlock; +import com.craisinlord.antarchy.content.block.VeryTallGrassBlock; 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.tags.BlockTags; import net.minecraft.util.RandomSource; +import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -29,8 +36,8 @@ public class ElythiaFloraFeature extends Feature { RandomSource random = context.random(); BlockPos origin = context.origin(); int attempts = switch (this.variant) { - case FOREST -> 32; - case MEADOW -> 80; + case FOREST -> 240; + case MEADOW -> 110; case TORCHFLOWER_FIELDS -> 60; case BUTTERFLY_FIELDS -> 150; case FLOWER_FOREST_MILKWEED -> 14; @@ -90,6 +97,10 @@ public class ElythiaFloraFeature extends Feature { placedAny |= this.placeMilkweedPatch(level, origin, random, AntarchyObjects.PINK_MILKWEED.get()); } + if (this.variant == Variant.FOREST) { + placedAny |= this.placeBigBushes(level, origin, random, radius); + } + for (int i = 0; i < attempts; i++) { int x = origin.getX() + random.nextInt(radius * 2 + 1) - radius; int z = origin.getZ() + random.nextInt(radius * 2 + 1) - radius; @@ -121,13 +132,10 @@ public class ElythiaFloraFeature extends Feature { if (roll < 0.58F) { return placeSingle(level, plantPos, Blocks.TORCHFLOWER); } - if (roll < 0.82F) { + if (roll < 0.94F) { return placeSingle(level, plantPos, Blocks.SHORT_GRASS); } - if (roll < 0.94F) { - return placeSingle(level, plantPos, Blocks.FERN); - } - return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState()); + return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState()); } if (this.variant == Variant.BUTTERFLY_FIELDS) { @@ -138,14 +146,8 @@ public class ElythiaFloraFeature extends Feature { if (roll < 0.36F) { return placeDouble(level, plantPos, AntarchyObjects.PINK_MILKWEED.get().defaultBlockState()); } - if (roll < 0.62F) { - return placeSingle(level, plantPos, Blocks.SHORT_GRASS); - } if (roll < 0.84F) { - return placeSingle(level, plantPos, Blocks.FERN); - } - if (roll < 0.94F) { - return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState()); + return placeSingle(level, plantPos, Blocks.SHORT_GRASS); } return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState()); } @@ -168,16 +170,118 @@ public class ElythiaFloraFeature extends Feature { } float roll = random.nextFloat(); - if (roll < 0.46F) { + if (this.variant == Variant.MEADOW) { + if (roll < 0.40F) { + return placeSingle(level, plantPos, Blocks.SHORT_GRASS); + } + if (roll < 0.80F) { + return placeSingle(level, plantPos, veryShortGrass()); + } + if (roll < 0.88F) { + return placeVeryTall(level, plantPos, veryTallGrass()); + } + if (roll < 0.98F) { + return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState()); + } return placeSingle(level, plantPos, Blocks.SHORT_GRASS); } - if (roll < 0.84F) { + if (roll < 0.24F) { + return placeSingle(level, plantPos, Blocks.SHORT_GRASS); + } + if (roll < 0.60F) { + return placeSingle(level, plantPos, veryShortGrass()); + } + if (roll < 0.74F) { return placeSingle(level, plantPos, Blocks.FERN); } - if (roll < 0.94F) { - return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState()); + if (roll < 0.84F) { + return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState()); } - return this.variant != Variant.FOREST && random.nextFloat() < 0.4F && isValidGround(level, groundPos) && placeSingle(level, plantPos, Blocks.SHORT_GRASS); + if (roll < 0.96F) { + return placeVeryTall(level, plantPos, veryTallGrass()); + } + return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState()); + } + + private static Block veryShortGrass() { + Block block = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "very_short_grass")); + return block == Blocks.AIR ? Blocks.SHORT_GRASS : block; + } + + private static Block veryTallGrass() { + Block block = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "very_tall_grass")); + return block == Blocks.AIR ? Blocks.TALL_GRASS : block; + } + + private boolean placeBigBushes(WorldGenLevel level, BlockPos origin, RandomSource random, int radius) { + Block bushBlock = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "big_bush")); + if (!(bushBlock instanceof BigBushBlock)) { + return false; + } + + boolean placed = false; + int bushAttempts = 10 + random.nextInt(6); + for (int i = 0; i < bushAttempts; i++) { + int x = origin.getX() + random.nextInt(radius * 2 + 1) - radius; + int z = origin.getZ() + random.nextInt(radius * 2 + 1) - radius; + int y = level.getHeight(Heightmap.Types.WORLD_SURFACE_WG, x, z); + BlockPos plantPos = new BlockPos(x, y, z); + + if (!isValidPlantSpot(level, plantPos, plantPos.below())) { + continue; + } + + float roll = random.nextFloat(); + int age = roll < 0.4F ? 0 : roll < 0.75F ? 1 : 2; + BlockState bushState = bushBlock.defaultBlockState().setValue(BigBushBlock.AGE, age); + if (age > 0) { + bushState = bushState.setValue(BigBushBlock.FACING, Direction.Plane.HORIZONTAL.getRandomDirection(random)); + } + + if (!isFootprintInsideChunk(origin, plantPos, bushState) || !canPlaceBigBush(level, plantPos, bushState)) { + continue; + } + + BigBushBlock.placeBushBlocks(level, plantPos, bushState, 2); + placed = true; + } + return placed; + } + + private static boolean isFootprintInsideChunk(BlockPos featureOrigin, BlockPos bushOrigin, BlockState bushState) { + ChunkPos chunk = new ChunkPos(featureOrigin); + int minX = chunk.getMinBlockX() + 1; + int maxX = chunk.getMaxBlockX() - 1; + int minZ = chunk.getMinBlockZ() + 1; + int maxZ = chunk.getMaxBlockZ() - 1; + if (!isWithin(bushOrigin, minX, maxX, minZ, maxZ)) { + return false; + } + for (BlockPos partPos : BigBushBlock.partPositions(bushState, bushOrigin)) { + if (!isWithin(partPos, minX, maxX, minZ, maxZ)) { + return false; + } + } + return true; + } + + private static boolean isWithin(BlockPos pos, int minX, int maxX, int minZ, int maxZ) { + return pos.getX() >= minX && pos.getX() <= maxX && pos.getZ() >= minZ && pos.getZ() <= maxZ; + } + + private static boolean canPlaceBigBush(WorldGenLevel level, BlockPos originPos, BlockState bushState) { + if (bushState.getValue(BigBushBlock.AGE) == 0) { + return bushState.canSurvive(level, originPos); + } + if (!BigBushBlock.hasFullSupport(bushState, level, originPos)) { + return false; + } + for (BlockPos partPos : BigBushBlock.partPositions(bushState, originPos)) { + if (!isOpenPlantSpot(level, partPos)) { + return false; + } + } + return true; } private static boolean placeSingle(WorldGenLevel level, BlockPos pos, Block block) { @@ -197,6 +301,21 @@ public class ElythiaFloraFeature extends Feature { return true; } + private static boolean placeVeryTall(WorldGenLevel level, BlockPos pos, Block block) { + if (!(block instanceof VeryTallGrassBlock)) { + return placeDouble(level, pos, Blocks.TALL_GRASS.defaultBlockState()); + } + BlockState state = block.defaultBlockState(); + if (!isOpenPlantSpot(level, pos) + || !isOpenPlantSpot(level, pos.above()) + || !isOpenPlantSpot(level, pos.above(2)) + || !state.canSurvive(level, pos)) { + return false; + } + VeryTallGrassBlock.placeAt(level, pos, 2); + return true; + } + private boolean placeTorchflowerPatch(WorldGenLevel level, BlockPos origin, RandomSource random) { BlockPos patchCenter = sampleSurface(level, origin, random, this.variant == Variant.FOREST ? 8 : 12); if (patchCenter == null) { diff --git a/common/src/main/java/com/craisinlord/antarchy/mixins/BoneMealItemVeryTallGrassMixin.java b/common/src/main/java/com/craisinlord/antarchy/mixins/BoneMealItemVeryTallGrassMixin.java new file mode 100644 index 00000000..72b7b415 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/mixins/BoneMealItemVeryTallGrassMixin.java @@ -0,0 +1,65 @@ +package com.craisinlord.antarchy.mixins; + +import com.craisinlord.antarchy.content.block.VeryTallGrassBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.BoneMealItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.DoublePlantBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; +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.CallbackInfoReturnable; + +@Mixin(BoneMealItem.class) +public abstract class BoneMealItemVeryTallGrassMixin { + @Inject(method = "useOn", at = @At("HEAD"), cancellable = true) + private void antarchy$growVeryTallGrass(UseOnContext context, CallbackInfoReturnable cir) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + BlockState clickedState = level.getBlockState(pos); + if (!clickedState.is(Blocks.TALL_GRASS)) { + return; + } + + BlockPos basePos = clickedState.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.LOWER ? pos : pos.below(); + BlockState baseState = level.getBlockState(basePos); + BlockState middleState = level.getBlockState(basePos.above()); + if (!baseState.is(Blocks.TALL_GRASS) + || baseState.getValue(DoublePlantBlock.HALF) != DoubleBlockHalf.LOWER + || !middleState.is(Blocks.TALL_GRASS) + || middleState.getValue(DoublePlantBlock.HALF) != DoubleBlockHalf.UPPER) { + return; + } + + Block block = BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath("antarchy", "very_tall_grass")); + if (!(block instanceof VeryTallGrassBlock)) { + return; + } + + BlockState veryTallState = block.defaultBlockState(); + if (!level.getBlockState(basePos.above(2)).canBeReplaced() + || !veryTallState.canSurvive(level, basePos)) { + return; + } + + if (!level.isClientSide) { + VeryTallGrassBlock.placeAt(level, basePos, Block.UPDATE_ALL); + if (context.getPlayer() == null || !context.getPlayer().getAbilities().instabuild) { + ItemStack stack = context.getItemInHand(); + stack.shrink(1); + } + level.levelEvent(1505, basePos, 15); + } + + cir.setReturnValue(InteractionResult.sidedSuccess(level.isClientSide)); + } +} diff --git a/common/src/main/resources/antarchy-common.mixins.json b/common/src/main/resources/antarchy-common.mixins.json index fb56a509..6376b525 100644 --- a/common/src/main/resources/antarchy-common.mixins.json +++ b/common/src/main/resources/antarchy-common.mixins.json @@ -5,6 +5,7 @@ "compatibilityLevel": "JAVA_21", "mixins": [ "AccessorRangedAttribute", + "BoneMealItemVeryTallGrassMixin", "BlockEntityTypeSignMixin", "BloodglassMixin", "DreamFireBlockMixin", @@ -48,10 +49,12 @@ "multipart.EntityMultipartLifecycleMixin" ], "client": [ + "client.BlockRenderDispatcherBigBushMixin", "client.CavarynSkyMixin", "client.ElythiaSkyMixin", "client.ElytraModelAccessor", "client.LightningBoltRendererMixin", + "client.LivingEntityRendererBigBushMixin", "client.MountedVehicleCameraMixin", "client.ParalyzedMouseTurnMixin", "client.ScreenEffectRendererFireVisualMixin", diff --git a/common/src/main/resources/assets/antarchy/animations/easter_bunny.animation.json b/common/src/main/resources/assets/antarchy/animations/easter_bunny.animation.json index 8f3db664..4a29f105 100644 --- a/common/src/main/resources/assets/antarchy/animations/easter_bunny.animation.json +++ b/common/src/main/resources/assets/antarchy/animations/easter_bunny.animation.json @@ -2,7 +2,7 @@ "format_version": "1.8.0", "animations": { "lay": { - "loop": true, + "loop": false, "animation_length": 2, "bones": { "head": { @@ -1192,4 +1192,4 @@ } } } -} \ No newline at end of file +} diff --git a/common/src/main/resources/assets/antarchy/animations/flying_squirrel.animation.json b/common/src/main/resources/assets/antarchy/animations/flying_squirrel.animation.json index c53b013a..bf140a83 100644 --- a/common/src/main/resources/assets/antarchy/animations/flying_squirrel.animation.json +++ b/common/src/main/resources/assets/antarchy/animations/flying_squirrel.animation.json @@ -333,37 +333,57 @@ }, "walking": { "loop": true, - "animation_length": 1, + "animation_length": 0.5, "bones": { - "squirrel": { + "body": { "position": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + 0, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, - "0.25": { + "0.0833": { "post": { - "vector": [0, 0.1, 0] + "vector": [ + 0, + 2, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [ + 0, + 2, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 0, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, 0.1, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] + "vector": [ + 0, + 0, + 0 + ] }, "lerp_mode": "catmullrom" } @@ -372,32 +392,272 @@ "left_leg": { "rotation": { "0.0": { + "vector": [ + 0, + 0, + 0 + ] + }, + "0.0833": { + "pre": { + "vector": [ + 40, + -5, + 0 + ] + }, "post": { - "vector": [0, 0, 0] + "vector": [ + 40, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [ + 47.5, + -15, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [ + -20, + -10, + -15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [ + 0, + 0, + 0 + ] + } + }, + "position": { + "0.0": { + "vector": [ + 0, + 0, + 0 + ] + }, + "0.125": { + "pre": { + "vector": [ + 0, + 1, + 1 + ] + }, + "post": { + "vector": [ + 0, + 1, + 1 + ] }, "lerp_mode": "catmullrom" }, "0.25": { "post": { - "vector": [10, 0, 0] + "vector": [ + 0, + 2.5, + -1.22 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [ + 0, + 1, + -0.58 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [ + 0, + 0, + 0 + ] + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "vector": [ + -11.39, + 2.41, + 5 + ] + }, + "0.0417": { + "vector": [ + 0, + 0, + 0 + ] + }, + "0.125": { + "pre": { + "vector": [ + 40, + 5, + 0 + ] + }, + "post": { + "vector": [ + 40, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + 47.5, + 15, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + -20, + 10, + 15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [ + -11.39, + 2.41, + 5 + ] + } + }, + "position": { + "0.0": { + "vector": [ + 0, + 0.17, + -0.22 + ] + }, + "0.0417": { + "vector": [ + 0, + 0, + 0 + ] + }, + "0.1667": { + "pre": { + "vector": [ + 0, + 1, + 1 + ] + }, + "post": { + "vector": [ + 0, + 1, + 1 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [ + 0, + 2.5, + -1.22 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 0, + 1, + -0.58 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [ + 0, + 0.17, + -0.22 + ] + } + } + }, + "torso": { + "rotation": { + "0.0": { + "post": { + "vector": [ + -5, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [ + -10, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [ + 7.5, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [-10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] + "vector": [ + -5, + 0, + 0 + ] }, "lerp_mode": "catmullrom" } @@ -405,165 +665,41 @@ "position": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + 0, + -0.71, + 0 + ] }, "lerp_mode": "catmullrom" }, - "0.25": { + "0.0833": { "post": { - "vector": [0, -0.3, 0.3] + "vector": [ + 0, + -1, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [ + 0, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, -0.3, -0.3] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "body": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [0, 0, -2.5] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, 0, 2.5] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "left_arm": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [-10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - }, - "position": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [0, -0.5, -0.5] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, -0.5, 0.5] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "tail": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [-5, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [-5, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] + "vector": [ + 0, + -0.71, + 0 + ] }, "lerp_mode": "catmullrom" } @@ -573,186 +709,505 @@ "rotation": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + 10, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, - "0.25": { + "0.125": { "post": { - "vector": [0, 0, 2.5] + "vector": [ + 7.5, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [ + -7.5, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, 0, 0] + "vector": [ + 10, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_ear": { + "rotation": { + "0.0": { + "post": { + "vector": [ + 0, + 0, + 37.5 + ] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.0833": { "post": { - "vector": [0, 0, -2.5] + "vector": [ + 0, + 0, + 55 + ] }, "lerp_mode": "catmullrom" }, - "1.0": { + "0.25": { "post": { - "vector": [0, 0, 0] + "vector": [ + 0, + 0, + 7.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 0, + 0, + 7.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 0, + 0, + 17.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 0, + 0, + 37.5 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_ear": { + "rotation": { + "0.0": { + "post": { + "vector": [ + 0, + 0, + -37.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [ + 0, + 0, + -55 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + 0, + 0, + -7.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 0, + 0, + -7.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 0, + 0, + -17.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 0, + 0, + -37.5 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "0.0": { + "post": { + "vector": [ + 5.56, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [ + -10, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 10, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 5.56, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_arm": { + "rotation": { + "0.0": { + "vector": [ + 5, + -5, + 2.5 + ] + }, + "0.0833": { + "pre": { + "vector": [ + 27.73, + -7.5, + 10 + ] + }, + "post": { + "vector": [ + 27.73, + -7.5, + 10 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [ + -80, + -12.5, + 15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + -35, + -7.5, + 10 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + -10, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [ + 5, + -5, + 2.5 + ] + } + }, + "position": { + "0.0": { + "post": { + "vector": [ + 0.5, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [ + 0.86, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [ + 0.8, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 0.55, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 0, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 0.5, + 0, + 0 + ] }, "lerp_mode": "catmullrom" } } }, "left_flying_part": { - "scale": { - "vector": [0, 0, 0] + "rotation": { + "vector": [ + 32.5, + 0, + 0 + ] } }, "right_arm": { "rotation": { "0.0": { + "vector": [ + -2.36, + 1.88, + -0.16 + ] + }, + "0.0417": { + "vector": [ + 5, + 5, + -2.5 + ] + }, + "0.125": { + "pre": { + "vector": [ + 27.73, + 7.5, + -10 + ] + }, "post": { - "vector": [0, 0, 0] + "vector": [ + 27.73, + 7.5, + -10 + ] }, "lerp_mode": "catmullrom" }, "0.25": { "post": { - "vector": [10, 0, 0] + "vector": [ + -80, + 12.5, + -15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [ + -35, + 7.5, + -10 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [ + -10, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [-10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" + "vector": [ + -2.36, + 1.88, + -0.16 + ] } }, "position": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + -0.19, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [ + -0.5, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [ + -0.86, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.25": { "post": { - "vector": [0, -0.5, 0.5] + "vector": [ + -0.8, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [ + -0.55, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [ + 0, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, -0.5, -0.5] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] + "vector": [ + -0.19, + 0, + 0 + ] }, "lerp_mode": "catmullrom" } } }, "right_flying_part": { - "scale": { - "vector": [0, 0, 0] - } - }, - "right_leg": { "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [-10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [10, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - }, - "position": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.25": { - "post": { - "vector": [0, -0.3, -0.3] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.75": { - "post": { - "vector": [0, -0.3, 0.3] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "left_cheeks": { - "scale": { - "vector": [0, 0, 0] - } - }, - "right_cheeks": { - "scale": { - "vector": [0, 0, 0] + "vector": [ + 32.5, + 0, + 0 + ] } } } @@ -761,133 +1216,106 @@ "loop": true, "animation_length": 1, "bones": { - "squirrel": { - "position": { + "body": { + "rotation": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + 7.5, + 0, + -2.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + 10, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "0.5": { "post": { - "vector": [0, -0.1, 0] + "vector": [ + 7.5, + 0, + 2.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + 5, + 0, + 0 + ] }, "lerp_mode": "catmullrom" }, "1.0": { "post": { - "vector": [0, 0, 0] + "vector": [ + 7.5, + 0, + -2.5 + ] }, "lerp_mode": "catmullrom" } + }, + "position": { + "vector": [ + 0, + 0, + 0 + ] } }, "left_leg": { "rotation": { "0.0": { "post": { - "vector": [0, 0, -90] + "vector": [ + 92.5, + 12.5, + -15 + ] }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.25": { "post": { - "vector": [0, 0, -85] + "vector": [ + 85, + 12.5, + -15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + 100, + 12.5, + -15 + ] }, "lerp_mode": "catmullrom" }, "1.0": { "post": { - "vector": [0, 0, -90] - }, - "lerp_mode": "catmullrom" - } - } - }, - "left_arm": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, -90] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, -82.5] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, -90] - }, - "lerp_mode": "catmullrom" - } - } - }, - "tail": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [-3, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "head": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [-3, 0, 0] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 0] - }, - "lerp_mode": "catmullrom" - } - } - }, - "right_arm": { - "rotation": { - "0.0": { - "post": { - "vector": [0, 0, 90] - }, - "lerp_mode": "catmullrom" - }, - "0.5": { - "post": { - "vector": [0, 0, 82.5] - }, - "lerp_mode": "catmullrom" - }, - "1.0": { - "post": { - "vector": [0, 0, 90] + "vector": [ + 92.5, + 12.5, + -15 + ] }, "lerp_mode": "catmullrom" } @@ -897,32 +1325,525 @@ "rotation": { "0.0": { "post": { - "vector": [0, 0, 90] + "vector": [ + 95.83, + -12.5, + 15 + ] }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.0833": { "post": { - "vector": [0, 0, 85] + "vector": [ + 92.5, + -12.5, + 15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 85, + -12.5, + 15 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [ + 100, + -12.5, + 15 + ] }, "lerp_mode": "catmullrom" }, "1.0": { "post": { - "vector": [0, 0, 90] + "vector": [ + 95.83, + -12.5, + 15 + ] }, "lerp_mode": "catmullrom" } } }, - "right_cheeks": { - "scale": { - "vector": [0, 0, 0] + "head": { + "rotation": { + "0.0": { + "post": { + "vector": [ + -1.84, + 0, + 1.84 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [ + 2.5, + 0, + -2.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "post": { + "vector": [ + -2.5, + 0, + 2.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + -1.84, + 0, + 1.84 + ] + }, + "lerp_mode": "catmullrom" + } } }, - "left_cheeks": { - "scale": { - "vector": [0, 0, 0] + "tail": { + "rotation": { + "0.0": { + "post": { + "vector": [ + -79.17, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + -67.5, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [ + -85, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + -79.17, + 0, + 0 + ] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "vector": [ + 0, + 3, + 0 + ] + } + }, + "left_arm": { + "rotation": { + "0.0": { + "post": { + "vector": [ + -27.5, + 0, + -92.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + -27.5, + 0, + -90 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + -27.5, + 0, + -92.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + -27.5, + 0, + -90 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + -27.5, + 0, + -92.5 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_flying_part": { + "rotation": { + "0.0": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5833": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_arm": { + "rotation": { + "0.0": { + "post": { + "vector": [ + -27.5, + 0, + 92.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + -27.5, + 0, + 90 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + -27.5, + 0, + 92.5 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + -27.5, + 0, + 90 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + -27.5, + 0, + 92.5 + ] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_flying_part": { + "rotation": { + "0.0": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.5833": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [ + 27.5, + -5, + 0 + ] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [ + 27.5, + 5, + 0 + ] + }, + "lerp_mode": "catmullrom" + } } } } diff --git a/common/src/main/resources/assets/antarchy/blockstates/very_tall_grass.json b/common/src/main/resources/assets/antarchy/blockstates/very_tall_grass.json new file mode 100644 index 00000000..65ddba9e --- /dev/null +++ b/common/src/main/resources/assets/antarchy/blockstates/very_tall_grass.json @@ -0,0 +1,7 @@ +{ + "variants": { + "part=lower": { "model": "antarchy:block/very_tall_grass_bottom" }, + "part=middle": { "model": "antarchy:block/very_tall_grass_middle" }, + "part=upper": { "model": "antarchy:block/very_tall_grass_top" } + } +} diff --git a/common/src/main/resources/assets/antarchy/lang/en_us.json b/common/src/main/resources/assets/antarchy/lang/en_us.json index 44d41ea1..fb9a11cc 100644 --- a/common/src/main/resources/assets/antarchy/lang/en_us.json +++ b/common/src/main/resources/assets/antarchy/lang/en_us.json @@ -22,6 +22,10 @@ "block.antarchy.orange_milkweed": "Orange Milkweed", "block.antarchy.pink_milkweed": "Pink Milkweed", "block.antarchy.hushweed": "Hushweed", + "block.antarchy.big_bush": "Big Bush", + "block.antarchy.big_bush_part": "Big Bush", + "block.antarchy.very_short_grass": "Very Short Grass", + "block.antarchy.very_tall_grass": "Very Tall Grass", "block.antarchy.umbral_moss_block": "Umbral Moss Block", "block.antarchy.umbral_moss_carpet": "Umbral Moss Carpet", "block.antarchy.amber_moss_block": "Amber Moss Block", @@ -270,6 +274,10 @@ "item.antarchy.ouranwood_acorn": "Ouranwood Acorn", "item.antarchy.ouranwood_boat": "Ouranwood Boat", "item.antarchy.ouranwood_chest_boat": "Ouranwood Chest Boat", + "item.antarchy.big_bush": "Big Bush", + "item.antarchy.big_bush.tooltip": "Can be bonemealed", + "item.antarchy.very_short_grass": "Very Short Grass", + "item.antarchy.very_tall_grass": "Very Tall Grass", "item.antarchy.orange_milkweed": "Orange Milkweed", "item.antarchy.pink_milkweed": "Pink Milkweed", "item.antarchy.hushweed": "Hushweed", diff --git a/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_bottom.json b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_bottom.json new file mode 100644 index 00000000..c571f76e --- /dev/null +++ b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_bottom.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/tinted_cross", + "textures": { + "cross": "antarchy:block/very_tall_grass/very_tall_grass_bottom" + } +} diff --git a/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_middle.json b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_middle.json new file mode 100644 index 00000000..5854e53a --- /dev/null +++ b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_middle.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/tinted_cross", + "textures": { + "cross": "antarchy:block/very_tall_grass/very_tall_grass_middle" + } +} diff --git a/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_top.json b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_top.json new file mode 100644 index 00000000..44d2ee41 --- /dev/null +++ b/common/src/main/resources/assets/antarchy/models/block/very_tall_grass_top.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/tinted_cross", + "textures": { + "cross": "antarchy:block/very_tall_grass/very_tall_grass_top" + } +} diff --git a/common/src/main/resources/assets/antarchy/models/item/very_tall_grass.json b/common/src/main/resources/assets/antarchy/models/item/very_tall_grass.json new file mode 100644 index 00000000..541bc2be --- /dev/null +++ b/common/src/main/resources/assets/antarchy/models/item/very_tall_grass.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "antarchy:block/very_tall_grass/very_tall_grass_bottom" + } +} diff --git a/common/src/main/resources/assets/antarchy/textures/entity/rolly_polly/rolly_polly_saddled.png b/common/src/main/resources/assets/antarchy/textures/entity/rolly_polly/rolly_polly_saddled.png deleted file mode 100644 index 566655bd..00000000 Binary files a/common/src/main/resources/assets/antarchy/textures/entity/rolly_polly/rolly_polly_saddled.png and /dev/null differ diff --git a/common/src/main/resources/data/antarchy/loot_table/blocks/very_tall_grass.json b/common/src/main/resources/data/antarchy/loot_table/blocks/very_tall_grass.json new file mode 100644 index 00000000..e710fdd2 --- /dev/null +++ b/common/src/main/resources/data/antarchy/loot_table/blocks/very_tall_grass.json @@ -0,0 +1,65 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "block": "antarchy:very_tall_grass", + "condition": "minecraft:block_state_property", + "properties": { + "part": "lower" + } + } + ], + "name": "antarchy:very_tall_grass" + } + ], + "rolls": 1.0 + }, + { + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "block": "antarchy:very_tall_grass", + "condition": "minecraft:block_state_property", + "properties": { + "part": "lower" + } + }, + { + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune", + "chances": [ + 0.125, + 0.14285715, + 0.16666667, + 0.2 + ] + } + ], + "name": "minecraft:wheat_seeds", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "antarchy:blocks/very_tall_grass" +} diff --git a/common/src/main/resources/data/antarchy/loot_table/chests/ruined_arena/generic.json b/common/src/main/resources/data/antarchy/loot_table/chests/ruined_arena/generic.json new file mode 100644 index 00000000..5f5a748e --- /dev/null +++ b/common/src/main/resources/data/antarchy/loot_table/chests/ruined_arena/generic.json @@ -0,0 +1,336 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:iron_sword", + "weight": 18, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 5.0, + "max": 18.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:bow", + "weight": 16, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 6.0, + "max": 20.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:crossbow", + "weight": 15, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 6.0, + "max": 20.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "antarchy:battle_axe", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "antarchy:scorpion_whip", + "weight": 8 + }, + { + "type": "minecraft:item", + "name": "minecraft:shield", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "minecraft:arrow", + "weight": 18, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 12.0, + "max": 32.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:spectral_arrow", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 6.0, + "max": 14.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:bread", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 6.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:emerald", + "weight": 9, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 4.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:lapis_lazuli", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 4.0, + "max": 10.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:amethyst_shard", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 6.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:experience_bottle", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 5.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 7, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:swiftness" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 7, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:strength" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:regeneration" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:enchanted_book", + "weight": 5, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 10.0, + "max": 24.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:golden_apple", + "weight": 5 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond", + "weight": 3, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 2.0 + } + } + ] + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 4.0, + "max": 7.0 + } + }, + { + "entries": [ + { + "type": "minecraft:item", + "name": "antarchy:ultimate_sword", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_bow", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_crossbow", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond_sword", + "weight": 4, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 18.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:crossbow", + "weight": 4, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 18.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:enchanted_book", + "weight": 6, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 20.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 0.0, + "max": 1.0 + } + } + ], + "random_sequence": "antarchy:chests/ruined_arena/generic" +} diff --git a/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/hard.json b/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/hard.json new file mode 100644 index 00000000..fabf7cf7 --- /dev/null +++ b/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/hard.json @@ -0,0 +1,306 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "entries": [ + { + "type": "minecraft:item", + "name": "antarchy:ultimate_sword", + "weight": 8 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_bow", + "weight": 8 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_crossbow", + "weight": 8 + }, + { + "type": "minecraft:item", + "name": "antarchy:battle_axe", + "weight": 14 + }, + { + "type": "minecraft:item", + "name": "antarchy:scorpion_whip", + "weight": 12 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond_sword", + "weight": 10, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:crossbow", + "weight": 10, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:bow", + "weight": 8, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:shield", + "weight": 8 + }, + { + "type": "minecraft:item", + "name": "minecraft:arrow", + "weight": 18, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 48.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:spectral_arrow", + "weight": 12, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 12.0, + "max": 24.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:experience_bottle", + "weight": 12, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 5.0, + "max": 10.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:strength" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:swiftness" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:regeneration" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:enchanted_book", + "weight": 10, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:golden_apple", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 4.0 + } + } + ] + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 5.0, + "max": 8.0 + } + }, + { + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:diamond_sword", + "weight": 8, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:crossbow", + "weight": 8, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 24.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:enchanted_book", + "weight": 10, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 25.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:netherite_scrap", + "weight": 4, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 2.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 3.0 + } + } + ] + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 2.0 + } + } + ], + "random_sequence": "antarchy:spawners/ruined_arena/hard" +} diff --git a/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/medium.json b/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/medium.json new file mode 100644 index 00000000..7e3adfb0 --- /dev/null +++ b/common/src/main/resources/data/antarchy/loot_table/spawners/ruined_arena/medium.json @@ -0,0 +1,269 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:iron_sword", + "weight": 18, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 8.0, + "max": 20.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:crossbow", + "weight": 16, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 10.0, + "max": 22.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:bow", + "weight": 14, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 10.0, + "max": 22.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "antarchy:battle_axe", + "weight": 12 + }, + { + "type": "minecraft:item", + "name": "minecraft:shield", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "minecraft:arrow", + "weight": 20, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 16.0, + "max": 36.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:spectral_arrow", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 8.0, + "max": 20.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:experience_bottle", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 3.0, + "max": 7.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:swiftness" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:strength" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:potion", + "weight": 6, + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:potion_contents": { + "potion": "minecraft:healing" + } + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:emerald", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 6.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:gold_ingot", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 2.0, + "max": 7.0 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:lapis_lazuli", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 5.0, + "max": 12.0 + } + } + ] + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 4.0, + "max": 7.0 + } + }, + { + "entries": [ + { + "type": "minecraft:item", + "name": "antarchy:ultimate_sword", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_bow", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "antarchy:ultimate_crossbow", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond_sword", + "weight": 4, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 20.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:enchanted_book", + "weight": 6, + "functions": [ + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "min": 20.0, + "max": 30.0 + }, + "options": "#minecraft:on_random_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:golden_apple", + "weight": 6 + } + ], + "rolls": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 1.0 + } + } + ], + "random_sequence": "antarchy:spawners/ruined_arena/medium" +} diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/butterfly_fields.json b/common/src/main/resources/data/antarchy/worldgen/biome/butterfly_fields.json index d5b02036..e876c597 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/butterfly_fields.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/butterfly_fields.json @@ -59,6 +59,7 @@ "antarchy:elythia_tuff_boulders", "antarchy:butterfly_fields_flora", "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests", "antarchy:ouranwood_cocoon_trees" ], [] diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json index 124875e2..45b2e3f3 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json @@ -63,6 +63,7 @@ "antarchy:elythia_tuff_boulders", "antarchy:elythia_meadow_flora", "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests", "minecraft:patch_sugar_cane" ], [] @@ -94,12 +95,6 @@ "minCount": 1, "maxCount": 1 }, - { - "type": "minecraft:sniffer", - "weight": 18, - "minCount": 1, - "maxCount": 2 - }, { "type": "minecraft:rabbit", "weight": 16, diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/fungal_ouranwood_forest.json b/common/src/main/resources/data/antarchy/worldgen/biome/fungal_ouranwood_forest.json index 56fe8dc0..364f96e2 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/fungal_ouranwood_forest.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/fungal_ouranwood_forest.json @@ -63,6 +63,7 @@ "antarchy:ouranwood_trees_sparse", "antarchy:elythia_forest_flora", "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests", "antarchy:fallen_ouranwood_tree", "antarchy:fungal_mushroom" ], diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json b/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json index 0a1aa928..04131d23 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json @@ -67,7 +67,8 @@ [ "antarchy:ouranwood_trees", "antarchy:elythia_forest_flora", - "antarchy:elythia_brown_ant_nests" + "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests" ], [ "antarchy:triffid_patch" diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/sparse_ouranwood_forest.json b/common/src/main/resources/data/antarchy/worldgen/biome/sparse_ouranwood_forest.json index 55655a56..a1c23e95 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/sparse_ouranwood_forest.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/sparse_ouranwood_forest.json @@ -63,6 +63,7 @@ "antarchy:ouranwood_trees_sparse", "antarchy:elythia_forest_flora", "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests", "antarchy:termite_nest" ], [] diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/torchflower_fields.json b/common/src/main/resources/data/antarchy/worldgen/biome/torchflower_fields.json index 5f912469..3d3c7ff9 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/torchflower_fields.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/torchflower_fields.json @@ -55,7 +55,8 @@ [], [ "antarchy:elythia_torchflower_fields_flora", - "antarchy:elythia_brown_ant_nests" + "antarchy:elythia_brown_ant_nests", + "antarchy:elythia_rainbow_ant_nests" ], [] ], diff --git a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_brown_ant_nests.json b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_brown_ant_nests.json index 55fdcfa7..4c5f9517 100644 --- a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_brown_ant_nests.json +++ b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_brown_ant_nests.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 24 + "chance": 20 }, { "type": "minecraft:in_square" diff --git a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_rainbow_ant_nests.json b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_rainbow_ant_nests.json new file mode 100644 index 00000000..b47b16a7 --- /dev/null +++ b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_rainbow_ant_nests.json @@ -0,0 +1,19 @@ +{ + "feature": "antarchy:rainbow_ant_nest", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 512 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:biome" + } + ] +} diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java index 4af2287e..bd6ed820 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java @@ -526,6 +526,27 @@ public final class AntarchyFabricContent { public static final DeferredBlock TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush", () -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY) .lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0))); + public static final DeferredBlock VERY_SHORT_GRASS = BLOCKS.register("very_short_grass", + () -> new VeryShortGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SHORT_GRASS))); + public static final DeferredBlock VERY_TALL_GRASS = BLOCKS.register("very_tall_grass", + () -> new VeryTallGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TALL_GRASS))); + public static final DeferredBlock BIG_BUSH = BLOCKS.register("big_bush", + () -> new BigBushBlock(BlockBehaviour.Properties.of() + .mapColor(net.minecraft.world.level.material.MapColor.PLANT) + .noCollission() + .instabreak() + .sound(net.minecraft.world.level.block.SoundType.GRASS) + .ignitedByLava() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY))); + public static final DeferredBlock BIG_BUSH_PART = BLOCKS.register("big_bush_part", + () -> new BigBushPartBlock(BlockBehaviour.Properties.of() + .mapColor(net.minecraft.world.level.material.MapColor.PLANT) + .noCollission() + .instabreak() + .sound(net.minecraft.world.level.block.SoundType.GRASS) + .ignitedByLava() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY) + .noLootTable())); public static final DeferredBlock OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", () -> new net.minecraft.world.level.block.StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); public static final DeferredBlock OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", @@ -1171,6 +1192,10 @@ public final class AntarchyFabricContent { public static final DeferredItem OURANWOOD_BUTTON_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_BUTTON); public static final DeferredItem OURANWOOD_LEAVES_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_LEAVES); public static final DeferredItem OURANWOOD_ACORN = ITEMS.registerSimpleBlockItem(OURANWOOD_ACORN_BLOCK); + public static final DeferredItem VERY_SHORT_GRASS_ITEM = ITEMS.registerSimpleBlockItem(VERY_SHORT_GRASS); + public static final DeferredItem VERY_TALL_GRASS_ITEM = ITEMS.registerSimpleBlockItem(VERY_TALL_GRASS); + public static final DeferredItem BIG_BUSH_ITEM = ITEMS.register("big_bush", + () -> new com.craisinlord.antarchy.content.item.BigBushBlockItem(BIG_BUSH.get(), new Item.Properties())); public static final DeferredItem ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(ORANGE_MILKWEED); public static final DeferredItem PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(PINK_MILKWEED); public static final DeferredItem TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(TORCHFLOWER_BUSH); @@ -2080,7 +2105,7 @@ public final class AntarchyFabricContent { "smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab", "cut_dream_sandstone_slab" -> 4; case "umbral_moss_block", "umbral_moss_carpet" -> 4; - case "torchflower_bush", "hushweed", "orange_milkweed", "pink_milkweed", "amber_lichen", "creepvine" -> 6; + case "torchflower_bush", "big_bush", "very_short_grass", "very_tall_grass", "hushweed", "orange_milkweed", "pink_milkweed", "amber_lichen", "creepvine" -> 6; case "blood_crystal_block", "budding_blood_crystal", "small_blood_crystal_bud", "medium_blood_crystal_bud", "large_blood_crystal_bud", "blood_crystal_cluster" -> 7; diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java index 3a8d22b4..ce72a88e 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java @@ -132,7 +132,22 @@ public final class AntarchyFabricClientBootstrap { AntarchyFabricContent.OURANWOOD_LEAVES.get() ); ColorProviderRegistry.BLOCK.register((state, level, pos, tintIndex) -> 0xFF4A0000, AntarchyFabricContent.ANTIWATER_BLOCK.get()); + ColorProviderRegistry.BLOCK.register( + (state, level, pos, tintIndex) -> level != null && pos != null + ? BiomeColors.getAverageGrassColor(level, pos) + : net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyFabricContent.BIG_BUSH.get(), + AntarchyFabricContent.BIG_BUSH_PART.get(), + AntarchyFabricContent.VERY_SHORT_GRASS.get(), + AntarchyFabricContent.VERY_TALL_GRASS.get() + ); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> FoliageColor.getDefaultColor(), AntarchyFabricContent.OURANWOOD_LEAVES_ITEM.get()); + ColorProviderRegistry.ITEM.register( + (stack, tintIndex) -> net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyFabricContent.BIG_BUSH_ITEM.get(), + AntarchyFabricContent.VERY_SHORT_GRASS_ITEM.get(), + AntarchyFabricContent.VERY_TALL_GRASS_ITEM.get() + ); } private static void registerFluids() { @@ -212,6 +227,10 @@ public final class AntarchyFabricClientBootstrap { BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.ORANGE_MILKWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.PINK_MILKWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.TORCHFLOWER_BUSH.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.BIG_BUSH.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.BIG_BUSH_PART.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.VERY_SHORT_GRASS.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.VERY_TALL_GRASS.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.HUSHWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.CORNEA_STALK.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.FALLEN_KING_CROWN_BLOCK.get(), RenderType.cutout()); @@ -345,6 +364,7 @@ public final class AntarchyFabricClientBootstrap { MogglesClientRenderer.register(); StinkySoundHandler.register(); ReverieTrailHandler.register(); + ClientTickEvents.END_CLIENT_TICK.register(com.craisinlord.antarchy.content.client.BigBushCameraHider::update); HudRenderCallback.EVENT.register((guiGraphics, partialTick) -> { DreadHudRenderer.render(guiGraphics); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java index 16926e00..cfa2c872 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java @@ -198,6 +198,15 @@ public final class AntarchyNeoForgeClient { (state, level, pos, tintIndex) -> 0xFF4A0000, AntarchyNeoforgeBlocks.ANTIWATER_BLOCK.get() ); + event.register( + (state, level, pos, tintIndex) -> level != null && pos != null + ? BiomeColors.getAverageGrassColor(level, pos) + : net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyNeoforgeBlocks.BIG_BUSH.get(), + AntarchyNeoforgeBlocks.BIG_BUSH_PART.get(), + AntarchyNeoforgeBlocks.VERY_SHORT_GRASS.get(), + AntarchyNeoforgeBlocks.VERY_TALL_GRASS.get() + ); } @SubscribeEvent @@ -206,6 +215,12 @@ public final class AntarchyNeoForgeClient { (stack, tintIndex) -> FoliageColor.getDefaultColor(), AntarchyNeoforgeItems.OURANWOOD_LEAVES_ITEM.get() ); + event.register( + (stack, tintIndex) -> net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyNeoforgeItems.BIG_BUSH_ITEM.get(), + AntarchyNeoforgeItems.VERY_SHORT_GRASS_ITEM.get(), + AntarchyNeoforgeItems.VERY_TALL_GRASS_ITEM.get() + ); event.register(new DynamicFluidContainerModel.Colors(), AntarchyNeoforgeItems.ICHOR_BUCKET.get()); event.register(new DynamicFluidContainerModel.Colors(), AntarchyNeoforgeItems.ANTIWATER_BUCKET.get()); } @@ -422,6 +437,10 @@ public final class AntarchyNeoForgeClient { ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.ORANGE_MILKWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PINK_MILKWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.TORCHFLOWER_BUSH.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.BIG_BUSH.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.BIG_BUSH_PART.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.VERY_SHORT_GRASS.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.VERY_TALL_GRASS.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.HUSHWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CORNEA_STALK.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout()); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java index dc087556..e35c1613 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java @@ -81,6 +81,27 @@ public final class AntarchyNeoforgeBlocks { public static final DeferredBlock TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush", () -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY) .lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0))); + public static final DeferredBlock VERY_SHORT_GRASS = BLOCKS.register("very_short_grass", + () -> new VeryShortGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SHORT_GRASS))); + public static final DeferredBlock VERY_TALL_GRASS = BLOCKS.register("very_tall_grass", + () -> new VeryTallGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TALL_GRASS))); + public static final DeferredBlock BIG_BUSH = BLOCKS.register("big_bush", + () -> new BigBushBlock(BlockBehaviour.Properties.of() + .mapColor(net.minecraft.world.level.material.MapColor.PLANT) + .noCollission() + .instabreak() + .sound(SoundType.GRASS) + .ignitedByLava() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY))); + public static final DeferredBlock BIG_BUSH_PART = BLOCKS.register("big_bush_part", + () -> new BigBushPartBlock(BlockBehaviour.Properties.of() + .mapColor(net.minecraft.world.level.material.MapColor.PLANT) + .noCollission() + .instabreak() + .sound(SoundType.GRASS) + .ignitedByLava() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY) + .noLootTable())); public static final DeferredBlock OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", () -> new StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); public static final DeferredBlock OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java index dff98240..c8d8e664 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java @@ -96,6 +96,8 @@ public class AntarchyNeoforgeCreativeModeTabs { event.accept(AntarchyNeoforgeItems.ORANGE_MILKWEED_ITEM.get()); event.accept(AntarchyNeoforgeItems.PINK_MILKWEED_ITEM.get()); event.accept(AntarchyNeoforgeItems.TORCHFLOWER_BUSH_ITEM.get()); + event.accept(AntarchyNeoforgeItems.BIG_BUSH_ITEM.get()); + event.accept(AntarchyNeoforgeItems.VERY_SHORT_GRASS_ITEM.get()); event.accept(AntarchyNeoforgeItems.HUSHWEED_ITEM.get()); event.accept(AntarchyNeoforgeItems.AMBER_LICHEN_ITEM.get()); event.accept(AntarchyNeoforgeItems.CREEPVINE_ITEM.get()); @@ -393,7 +395,7 @@ public class AntarchyNeoforgeCreativeModeTabs { case "duplicator_sapling", "ouranwood_acorn" -> 10; // 11 - Plants and flowers - case "orange_milkweed", "pink_milkweed", "torchflower_bush", "hushweed", "amber_lichen", "bile_vein", "creepvine", + case "orange_milkweed", "pink_milkweed", "torchflower_bush", "big_bush", "very_short_grass", "very_tall_grass", "hushweed", "amber_lichen", "bile_vein", "creepvine", "triffid_goo_block", "wasp_nest", "red_ant_nest", "brown_ant_nest", "rainbow_ant_nest", "termite_nest" -> 11; diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java index 3c3043a2..ec229b03 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java @@ -161,6 +161,10 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.ORANGE_MILKWEED); public static final DeferredItem PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.PINK_MILKWEED); public static final DeferredItem TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TORCHFLOWER_BUSH); + public static final DeferredItem VERY_SHORT_GRASS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.VERY_SHORT_GRASS); + public static final DeferredItem VERY_TALL_GRASS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.VERY_TALL_GRASS); + public static final DeferredItem BIG_BUSH_ITEM = ITEMS.register("big_bush", + () -> new com.craisinlord.antarchy.content.item.BigBushBlockItem(AntarchyNeoforgeBlocks.BIG_BUSH.get(), new Item.Properties())); public static final DeferredItem OURANWOOD_SIGN_ITEM = ITEMS.register("ouranwood_sign", () -> new net.minecraft.world.item.SignItem(new Item.Properties().stacksTo(16), AntarchyNeoforgeBlocks.OURANWOOD_SIGN.get(), AntarchyNeoforgeBlocks.OURANWOOD_WALL_SIGN.get())); public static final DeferredItem OURANWOOD_HANGING_SIGN_ITEM = ITEMS.register("ouranwood_hanging_sign",