VERY TALL AND SHORT AND BIG

also made rainbow ant rare in elythia
sniffer died
fyling squireal anim overhual
This commit is contained in:
craisinlord committed 2026-07-07 01:21:44 -05:00
1 parent 2c9fc4f11f
commit 3e25149618
34 files changed
+3034 -554

No files matched your search

@@ -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<VeryTallGrassBlock> CODEC = Block.simpleCodec(VeryTallGrassBlock::new);
public static final EnumProperty<Part> 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<VeryTallGrassBlock> codec() {
return CODEC;
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> 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;
}
}
}
@@ -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];
}
}
@@ -8,8 +8,6 @@ import software.bernie.geckolib.model.GeoModel;
public class RollyPollyModel extends GeoModel<RollyPollyEntity> { public class RollyPollyModel extends GeoModel<RollyPollyEntity> {
private static final ResourceLocation TEXTURE = private static final ResourceLocation TEXTURE =
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/rolly_polly/rolly_polly.png"); 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 @Override
public ResourceLocation getModelResource(RollyPollyEntity animatable) { public ResourceLocation getModelResource(RollyPollyEntity animatable) {
@@ -18,7 +16,7 @@ public class RollyPollyModel extends GeoModel<RollyPollyEntity> {
@Override @Override
public ResourceLocation getTextureResource(RollyPollyEntity animatable) { public ResourceLocation getTextureResource(RollyPollyEntity animatable) {
return animatable.hasSaddle() ? TEXTURE_SADDLED : TEXTURE; return TEXTURE;
} }
@Override @Override
@@ -2,11 +2,14 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyTags; 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.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.BlockTags;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.InteractionHand; 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.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.TamableAnimal; import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.goal.FloatGoal; 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.LookAtPlayerGoal;
import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.PanicGoal;
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; 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.ai.goal.WaterAvoidingRandomStrollGoal;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.Level; 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 net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.animatable.GeoEntity; import software.bernie.geckolib.animatable.GeoEntity;
@@ -47,14 +51,13 @@ import software.bernie.geckolib.util.GeckoLibUtil;
public class RollyPollyEntity extends TamableAnimal implements GeoEntity { public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation 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 ROLLING_ANIM = RawAnimation.begin().thenLoop("roll");
private static final RawAnimation UNROLL_ANIM = RawAnimation.begin().thenPlay("normal_mode"); private static final RawAnimation UNROLL_ANIM = RawAnimation.begin().thenPlay("normal_mode");
private static final int ANIM_IDLE = 0; // ANIMATION_STATE only syncs the roll transitions; idle/walk/rolling are derived client-side
private static final int ANIM_WALK = 1; private static final int ANIM_NONE = 0;
private static final int ANIM_ROLL_UP = 2; private static final int ANIM_ROLL_UP = 2;
private static final int ANIM_ROLLING = 3;
private static final int ANIM_UNROLL = 4; private static final int ANIM_UNROLL = 4;
// wheel_mode is 0.75s, normal_mode is ~0.42s // 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<Integer> ANIMATION_STATE = private static final EntityDataAccessor<Integer> ANIMATION_STATE =
SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.INT); SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> SADDLED =
SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Boolean> ROLLED = private static final EntityDataAccessor<Boolean> ROLLED =
SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.BOOLEAN); SynchedEntityData.defineId(RollyPollyEntity.class, EntityDataSerializers.BOOLEAN);
@@ -91,8 +92,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
@Override @Override
protected void defineSynchedData(SynchedEntityData.Builder builder) { protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder); super.defineSynchedData(builder);
builder.define(ANIMATION_STATE, ANIM_IDLE); builder.define(ANIMATION_STATE, ANIM_NONE);
builder.define(SADDLED, false);
builder.define(ROLLED, false); builder.define(ROLLED, false);
} }
@@ -106,20 +106,21 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isTame() && super.canUse(); 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 @Override
public boolean canUse() { public boolean canUse() {
return !RollyPollyEntity.this.isRolled() && super.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 @Override
public boolean canUse() { public boolean canUse() {
return !RollyPollyEntity.this.isRolled() && !RollyPollyEntity.this.isVehicle() && super.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 LookAtPlayerGoal(this, Player.class, 8.0F));
this.goalSelector.addGoal(5, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
} }
@Override @Override
@@ -154,34 +155,12 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
return InteractionResult.sidedSuccess(this.level().isClientSide); return InteractionResult.sidedSuccess(this.level().isClientSide);
} }
if (this.isTame()) { if (this.isTame() && stack.isEmpty() && !player.isShiftKeyDown() && !player.isPassengerOfSameVehicle(this)) {
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) { if (!this.level().isClientSide) {
player.startRiding(this); player.startRiding(this);
} }
return InteractionResult.sidedSuccess(this.level().isClientSide); return InteractionResult.sidedSuccess(this.level().isClientSide);
} }
}
return super.mobInteract(player, hand); return super.mobInteract(player, hand);
} }
@@ -192,14 +171,6 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
return null; return null;
} }
public boolean hasSaddle() {
return this.entityData.get(SADDLED);
}
public void setSaddled(boolean saddled) {
this.entityData.set(SADDLED, saddled);
}
public boolean isRolled() { public boolean isRolled() {
return this.entityData.get(ROLLED); 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. */ /** Toggles wheel mode; called from the ridden-roll keybind payload. */
public void handleRollToggle(ServerPlayer player) { public void handleRollToggle(ServerPlayer player) {
if (!this.isTame() || !this.hasSaddle() || this.getControllingPassenger() != player) { if (!this.isTame() || this.getControllingPassenger() != player) {
return; return;
} }
if (this.rollTransitionTicks > 0) { if (this.rollTransitionTicks > 0) {
@@ -273,10 +244,8 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
if (this.unrolling) { if (this.unrolling) {
this.setRolled(false); this.setRolled(false);
this.unrolling = 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.tickTumbleDamage();
this.updateAnimationState();
} }
private void tickTumbleDamage() { 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() { private int getAnimationState() {
return this.entityData.get(ANIMATION_STATE); return this.entityData.get(ANIMATION_STATE);
} }
@@ -330,7 +288,7 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
@Override @Override
@Nullable @Nullable
public LivingEntity getControllingPassenger() { public LivingEntity getControllingPassenger() {
if (!this.isTame() || !this.hasSaddle()) { if (!this.isTame()) {
return null; return null;
} }
Entity passenger = this.getFirstPassenger(); Entity passenger = this.getFirstPassenger();
@@ -353,27 +311,28 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
@Override @Override
public void travel(Vec3 travelVector) { public void travel(Vec3 travelVector) {
if (!(this.getControllingPassenger() instanceof Player rider) || !this.isVehicle()) { if (this.defensiveCurlTicks > 0 && !this.isVehicle()) {
if (this.defensiveCurlTicks > 0) {
super.travel(Vec3.ZERO); super.travel(Vec3.ZERO);
return; return;
} }
super.travel(travelVector); super.travel(travelVector);
return;
} }
@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();
}
@Override
protected Vec3 getRiddenInput(Player player, Vec3 travelVector) {
if (this.rollTransitionTicks > 0) { if (this.rollTransitionTicks > 0) {
// Hold still while rolling up / unrolling // Hold still while rolling up / unrolling
super.travel(Vec3.ZERO); return Vec3.ZERO;
return;
} }
float forward = player.zza;
this.setYRot(rider.getYHeadRot()); float strafe = player.xxa * 0.5F;
this.yBodyRot = this.getYRot();
this.yHeadRot = this.getYRot();
float forward = rider.zza;
float strafe = rider.xxa * 0.5F;
if (forward < 0.0F) { if (forward < 0.0F) {
forward *= 0.4F; forward *= 0.4F;
} }
@@ -381,16 +340,13 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
// Rolling is fast but drifty // Rolling is fast but drifty
strafe *= 0.35F; strafe *= 0.35F;
} }
return new Vec3(strafe, 0.0D, forward);
}
double speed = this.getAttributeValue(Attributes.MOVEMENT_SPEED) @Override
* (this.isRolled() ? AntarchySettings.rollyPollyRollSpeedMultiplier() : 1.0D); protected float getRiddenSpeed(Player player) {
this.setSpeed((float) speed); return (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED)
* (this.isRolled() ? AntarchySettings.rollyPollyRollSpeedMultiplier() : 1.0D));
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 @Override
@@ -401,44 +357,128 @@ public class RollyPollyEntity extends TamableAnimal implements GeoEntity {
return super.causeFallDamage(fallDistance, multiplier, damageSource); 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 @Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "main_controller", 2, this::mainAnimController)); controllers.add(new AnimationController<>(this, "main_controller", 2, this::mainAnimController));
} }
private PlayState mainAnimController(AnimationState<RollyPollyEntity> state) { private PlayState mainAnimController(AnimationState<RollyPollyEntity> state) {
return switch (this.getAnimationState()) { AnimationController<RollyPollyEntity> controller = state.getController();
case ANIM_WALK -> state.setAndContinue(WALK_ANIM); int transition = this.getAnimationState();
case ANIM_ROLL_UP -> state.setAndContinue(ROLL_UP_ANIM);
case ANIM_ROLLING -> state.setAndContinue(ROLLING_ANIM); if (transition == ANIM_ROLL_UP) {
case ANIM_UNROLL -> state.setAndContinue(UNROLL_ANIM); controller.setAnimationSpeed(1.0D);
default -> state.setAndContinue(IDLE_ANIM); 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 @Override
public AnimatableInstanceCache getAnimatableInstanceCache() { public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache; 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();
}
}
}
} }
@@ -1,10 +1,17 @@
package com.craisinlord.antarchy.content.worldgen.elythia; package com.craisinlord.antarchy.content.worldgen.elythia;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.AntarchyObjects; 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 com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos; 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.tags.BlockTags;
import net.minecraft.util.RandomSource; import net.minecraft.util.RandomSource;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@@ -29,8 +36,8 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
RandomSource random = context.random(); RandomSource random = context.random();
BlockPos origin = context.origin(); BlockPos origin = context.origin();
int attempts = switch (this.variant) { int attempts = switch (this.variant) {
case FOREST -> 32; case FOREST -> 240;
case MEADOW -> 80; case MEADOW -> 110;
case TORCHFLOWER_FIELDS -> 60; case TORCHFLOWER_FIELDS -> 60;
case BUTTERFLY_FIELDS -> 150; case BUTTERFLY_FIELDS -> 150;
case FLOWER_FOREST_MILKWEED -> 14; case FLOWER_FOREST_MILKWEED -> 14;
@@ -90,6 +97,10 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
placedAny |= this.placeMilkweedPatch(level, origin, random, AntarchyObjects.PINK_MILKWEED.get()); 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++) { for (int i = 0; i < attempts; i++) {
int x = origin.getX() + random.nextInt(radius * 2 + 1) - radius; int x = origin.getX() + random.nextInt(radius * 2 + 1) - radius;
int z = origin.getZ() + 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<NoneFeatureConfiguration> {
if (roll < 0.58F) { if (roll < 0.58F) {
return placeSingle(level, plantPos, Blocks.TORCHFLOWER); return placeSingle(level, plantPos, Blocks.TORCHFLOWER);
} }
if (roll < 0.82F) { if (roll < 0.94F) {
return placeSingle(level, plantPos, Blocks.SHORT_GRASS); return placeSingle(level, plantPos, Blocks.SHORT_GRASS);
} }
if (roll < 0.94F) { return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState());
return placeSingle(level, plantPos, Blocks.FERN);
}
return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState());
} }
if (this.variant == Variant.BUTTERFLY_FIELDS) { if (this.variant == Variant.BUTTERFLY_FIELDS) {
@@ -138,14 +146,8 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
if (roll < 0.36F) { if (roll < 0.36F) {
return placeDouble(level, plantPos, AntarchyObjects.PINK_MILKWEED.get().defaultBlockState()); return placeDouble(level, plantPos, AntarchyObjects.PINK_MILKWEED.get().defaultBlockState());
} }
if (roll < 0.62F) {
return placeSingle(level, plantPos, Blocks.SHORT_GRASS);
}
if (roll < 0.84F) { if (roll < 0.84F) {
return placeSingle(level, plantPos, Blocks.FERN); return placeSingle(level, plantPos, Blocks.SHORT_GRASS);
}
if (roll < 0.94F) {
return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState());
} }
return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState()); return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState());
} }
@@ -168,16 +170,118 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
} }
float roll = random.nextFloat(); float roll = random.nextFloat();
if (roll < 0.46F) { if (this.variant == Variant.MEADOW) {
if (roll < 0.40F) {
return placeSingle(level, plantPos, Blocks.SHORT_GRASS); return placeSingle(level, plantPos, Blocks.SHORT_GRASS);
} }
if (roll < 0.84F) { 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.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); return placeSingle(level, plantPos, Blocks.FERN);
} }
if (roll < 0.94F) { if (roll < 0.84F) {
return placeDouble(level, plantPos, Blocks.TALL_GRASS.defaultBlockState());
}
if (roll < 0.96F) {
return placeVeryTall(level, plantPos, veryTallGrass());
}
return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState()); return placeDouble(level, plantPos, Blocks.LARGE_FERN.defaultBlockState());
} }
return this.variant != Variant.FOREST && random.nextFloat() < 0.4F && isValidGround(level, groundPos) && placeSingle(level, plantPos, Blocks.SHORT_GRASS);
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) { private static boolean placeSingle(WorldGenLevel level, BlockPos pos, Block block) {
@@ -197,6 +301,21 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
return true; 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) { private boolean placeTorchflowerPatch(WorldGenLevel level, BlockPos origin, RandomSource random) {
BlockPos patchCenter = sampleSurface(level, origin, random, this.variant == Variant.FOREST ? 8 : 12); BlockPos patchCenter = sampleSurface(level, origin, random, this.variant == Variant.FOREST ? 8 : 12);
if (patchCenter == null) { if (patchCenter == null) {
@@ -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<InteractionResult> 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));
}
}
@@ -5,6 +5,7 @@
"compatibilityLevel": "JAVA_21", "compatibilityLevel": "JAVA_21",
"mixins": [ "mixins": [
"AccessorRangedAttribute", "AccessorRangedAttribute",
"BoneMealItemVeryTallGrassMixin",
"BlockEntityTypeSignMixin", "BlockEntityTypeSignMixin",
"BloodglassMixin", "BloodglassMixin",
"DreamFireBlockMixin", "DreamFireBlockMixin",
@@ -48,10 +49,12 @@
"multipart.EntityMultipartLifecycleMixin" "multipart.EntityMultipartLifecycleMixin"
], ],
"client": [ "client": [
"client.BlockRenderDispatcherBigBushMixin",
"client.CavarynSkyMixin", "client.CavarynSkyMixin",
"client.ElythiaSkyMixin", "client.ElythiaSkyMixin",
"client.ElytraModelAccessor", "client.ElytraModelAccessor",
"client.LightningBoltRendererMixin", "client.LightningBoltRendererMixin",
"client.LivingEntityRendererBigBushMixin",
"client.MountedVehicleCameraMixin", "client.MountedVehicleCameraMixin",
"client.ParalyzedMouseTurnMixin", "client.ParalyzedMouseTurnMixin",
"client.ScreenEffectRendererFireVisualMixin", "client.ScreenEffectRendererFireVisualMixin",
@@ -2,7 +2,7 @@
"format_version": "1.8.0", "format_version": "1.8.0",
"animations": { "animations": {
"lay": { "lay": {
"loop": true, "loop": false,
"animation_length": 2, "animation_length": 2,
"bones": { "bones": {
"head": { "head": {
File diff suppressed because it is too large. Load diff
@@ -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" }
}
}
@@ -22,6 +22,10 @@
"block.antarchy.orange_milkweed": "Orange Milkweed", "block.antarchy.orange_milkweed": "Orange Milkweed",
"block.antarchy.pink_milkweed": "Pink Milkweed", "block.antarchy.pink_milkweed": "Pink Milkweed",
"block.antarchy.hushweed": "Hushweed", "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_block": "Umbral Moss Block",
"block.antarchy.umbral_moss_carpet": "Umbral Moss Carpet", "block.antarchy.umbral_moss_carpet": "Umbral Moss Carpet",
"block.antarchy.amber_moss_block": "Amber Moss Block", "block.antarchy.amber_moss_block": "Amber Moss Block",
@@ -270,6 +274,10 @@
"item.antarchy.ouranwood_acorn": "Ouranwood Acorn", "item.antarchy.ouranwood_acorn": "Ouranwood Acorn",
"item.antarchy.ouranwood_boat": "Ouranwood Boat", "item.antarchy.ouranwood_boat": "Ouranwood Boat",
"item.antarchy.ouranwood_chest_boat": "Ouranwood Chest 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.orange_milkweed": "Orange Milkweed",
"item.antarchy.pink_milkweed": "Pink Milkweed", "item.antarchy.pink_milkweed": "Pink Milkweed",
"item.antarchy.hushweed": "Hushweed", "item.antarchy.hushweed": "Hushweed",
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/tinted_cross",
"textures": {
"cross": "antarchy:block/very_tall_grass/very_tall_grass_bottom"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/tinted_cross",
"textures": {
"cross": "antarchy:block/very_tall_grass/very_tall_grass_middle"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/tinted_cross",
"textures": {
"cross": "antarchy:block/very_tall_grass/very_tall_grass_top"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "antarchy:block/very_tall_grass/very_tall_grass_bottom"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

@@ -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"
}
@@ -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"
}
@@ -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"
}
@@ -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"
}
@@ -59,6 +59,7 @@
"antarchy:elythia_tuff_boulders", "antarchy:elythia_tuff_boulders",
"antarchy:butterfly_fields_flora", "antarchy:butterfly_fields_flora",
"antarchy:elythia_brown_ant_nests", "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests",
"antarchy:ouranwood_cocoon_trees" "antarchy:ouranwood_cocoon_trees"
], ],
[] []
@@ -63,6 +63,7 @@
"antarchy:elythia_tuff_boulders", "antarchy:elythia_tuff_boulders",
"antarchy:elythia_meadow_flora", "antarchy:elythia_meadow_flora",
"antarchy:elythia_brown_ant_nests", "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests",
"minecraft:patch_sugar_cane" "minecraft:patch_sugar_cane"
], ],
[] []
@@ -94,12 +95,6 @@
"minCount": 1, "minCount": 1,
"maxCount": 1 "maxCount": 1
}, },
{
"type": "minecraft:sniffer",
"weight": 18,
"minCount": 1,
"maxCount": 2
},
{ {
"type": "minecraft:rabbit", "type": "minecraft:rabbit",
"weight": 16, "weight": 16,
@@ -63,6 +63,7 @@
"antarchy:ouranwood_trees_sparse", "antarchy:ouranwood_trees_sparse",
"antarchy:elythia_forest_flora", "antarchy:elythia_forest_flora",
"antarchy:elythia_brown_ant_nests", "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests",
"antarchy:fallen_ouranwood_tree", "antarchy:fallen_ouranwood_tree",
"antarchy:fungal_mushroom" "antarchy:fungal_mushroom"
], ],
@@ -67,7 +67,8 @@
[ [
"antarchy:ouranwood_trees", "antarchy:ouranwood_trees",
"antarchy:elythia_forest_flora", "antarchy:elythia_forest_flora",
"antarchy:elythia_brown_ant_nests" "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests"
], ],
[ [
"antarchy:triffid_patch" "antarchy:triffid_patch"
@@ -63,6 +63,7 @@
"antarchy:ouranwood_trees_sparse", "antarchy:ouranwood_trees_sparse",
"antarchy:elythia_forest_flora", "antarchy:elythia_forest_flora",
"antarchy:elythia_brown_ant_nests", "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests",
"antarchy:termite_nest" "antarchy:termite_nest"
], ],
[] []
@@ -55,7 +55,8 @@
[], [],
[ [
"antarchy:elythia_torchflower_fields_flora", "antarchy:elythia_torchflower_fields_flora",
"antarchy:elythia_brown_ant_nests" "antarchy:elythia_brown_ant_nests",
"antarchy:elythia_rainbow_ant_nests"
], ],
[] []
], ],
@@ -3,7 +3,7 @@
"placement": [ "placement": [
{ {
"type": "minecraft:rarity_filter", "type": "minecraft:rarity_filter",
"chance": 24 "chance": 20
}, },
{ {
"type": "minecraft:in_square" "type": "minecraft:in_square"
@@ -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"
}
]
}
@@ -526,6 +526,27 @@ public final class AntarchyFabricContent {
public static final DeferredBlock<TorchflowerBushBlock> TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush", public static final DeferredBlock<TorchflowerBushBlock> TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush",
() -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY) () -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY)
.lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0))); .lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0)));
public static final DeferredBlock<VeryShortGrassBlock> VERY_SHORT_GRASS = BLOCKS.register("very_short_grass",
() -> new VeryShortGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SHORT_GRASS)));
public static final DeferredBlock<VeryTallGrassBlock> VERY_TALL_GRASS = BLOCKS.register("very_tall_grass",
() -> new VeryTallGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TALL_GRASS)));
public static final DeferredBlock<BigBushBlock> 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<BigBushPartBlock> 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<net.minecraft.world.level.block.StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", public static final DeferredBlock<net.minecraft.world.level.block.StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign",
() -> new net.minecraft.world.level.block.StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); () -> new net.minecraft.world.level.block.StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN)));
public static final DeferredBlock<net.minecraft.world.level.block.WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", public static final DeferredBlock<net.minecraft.world.level.block.WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign",
@@ -1171,6 +1192,10 @@ public final class AntarchyFabricContent {
public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_BUTTON_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_BUTTON); public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_BUTTON_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_BUTTON);
public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_LEAVES_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_LEAVES); public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_LEAVES_ITEM = ITEMS.registerSimpleBlockItem(OURANWOOD_LEAVES);
public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_ACORN = ITEMS.registerSimpleBlockItem(OURANWOOD_ACORN_BLOCK); public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_ACORN = ITEMS.registerSimpleBlockItem(OURANWOOD_ACORN_BLOCK);
public static final DeferredItem<net.minecraft.world.item.BlockItem> VERY_SHORT_GRASS_ITEM = ITEMS.registerSimpleBlockItem(VERY_SHORT_GRASS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> VERY_TALL_GRASS_ITEM = ITEMS.registerSimpleBlockItem(VERY_TALL_GRASS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> BIG_BUSH_ITEM = ITEMS.register("big_bush",
() -> new com.craisinlord.antarchy.content.item.BigBushBlockItem(BIG_BUSH.get(), new Item.Properties()));
public static final DeferredItem<net.minecraft.world.item.BlockItem> ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(ORANGE_MILKWEED); public static final DeferredItem<net.minecraft.world.item.BlockItem> ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(ORANGE_MILKWEED);
public static final DeferredItem<net.minecraft.world.item.BlockItem> PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(PINK_MILKWEED); public static final DeferredItem<net.minecraft.world.item.BlockItem> PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(PINK_MILKWEED);
public static final DeferredItem<net.minecraft.world.item.BlockItem> TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(TORCHFLOWER_BUSH); public static final DeferredItem<net.minecraft.world.item.BlockItem> TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(TORCHFLOWER_BUSH);
@@ -2080,7 +2105,7 @@ public final class AntarchyFabricContent {
"smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab", "smooth_dream_sandstone_stairs", "smooth_dream_sandstone_slab",
"cut_dream_sandstone_slab" -> 4; "cut_dream_sandstone_slab" -> 4;
case "umbral_moss_block", "umbral_moss_carpet" -> 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", case "blood_crystal_block", "budding_blood_crystal",
"small_blood_crystal_bud", "medium_blood_crystal_bud", "small_blood_crystal_bud", "medium_blood_crystal_bud",
"large_blood_crystal_bud", "blood_crystal_cluster" -> 7; "large_blood_crystal_bud", "blood_crystal_cluster" -> 7;
@@ -132,7 +132,22 @@ public final class AntarchyFabricClientBootstrap {
AntarchyFabricContent.OURANWOOD_LEAVES.get() AntarchyFabricContent.OURANWOOD_LEAVES.get()
); );
ColorProviderRegistry.BLOCK.register((state, level, pos, tintIndex) -> 0xFF4A0000, AntarchyFabricContent.ANTIWATER_BLOCK.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) -> 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() { 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.ORANGE_MILKWEED.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.PINK_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.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.HUSHWEED.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.CORNEA_STALK.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.CORNEA_STALK.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.FALLEN_KING_CROWN_BLOCK.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.FALLEN_KING_CROWN_BLOCK.get(), RenderType.cutout());
@@ -345,6 +364,7 @@ public final class AntarchyFabricClientBootstrap {
MogglesClientRenderer.register(); MogglesClientRenderer.register();
StinkySoundHandler.register(); StinkySoundHandler.register();
ReverieTrailHandler.register(); ReverieTrailHandler.register();
ClientTickEvents.END_CLIENT_TICK.register(com.craisinlord.antarchy.content.client.BigBushCameraHider::update);
HudRenderCallback.EVENT.register((guiGraphics, partialTick) -> { HudRenderCallback.EVENT.register((guiGraphics, partialTick) -> {
DreadHudRenderer.render(guiGraphics); DreadHudRenderer.render(guiGraphics);
@@ -198,6 +198,15 @@ public final class AntarchyNeoForgeClient {
(state, level, pos, tintIndex) -> 0xFF4A0000, (state, level, pos, tintIndex) -> 0xFF4A0000,
AntarchyNeoforgeBlocks.ANTIWATER_BLOCK.get() 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 @SubscribeEvent
@@ -206,6 +215,12 @@ public final class AntarchyNeoForgeClient {
(stack, tintIndex) -> FoliageColor.getDefaultColor(), (stack, tintIndex) -> FoliageColor.getDefaultColor(),
AntarchyNeoforgeItems.OURANWOOD_LEAVES_ITEM.get() 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.ICHOR_BUCKET.get());
event.register(new DynamicFluidContainerModel.Colors(), AntarchyNeoforgeItems.ANTIWATER_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.ORANGE_MILKWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PINK_MILKWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PINK_MILKWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.TORCHFLOWER_BUSH.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.HUSHWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CORNEA_STALK.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CORNEA_STALK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout());
@@ -81,6 +81,27 @@ public final class AntarchyNeoforgeBlocks {
public static final DeferredBlock<TorchflowerBushBlock> TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush", public static final DeferredBlock<TorchflowerBushBlock> TORCHFLOWER_BUSH = BLOCKS.register("torchflower_bush",
() -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY) () -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY)
.lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0))); .lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0)));
public static final DeferredBlock<VeryShortGrassBlock> VERY_SHORT_GRASS = BLOCKS.register("very_short_grass",
() -> new VeryShortGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SHORT_GRASS)));
public static final DeferredBlock<VeryTallGrassBlock> VERY_TALL_GRASS = BLOCKS.register("very_tall_grass",
() -> new VeryTallGrassBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TALL_GRASS)));
public static final DeferredBlock<BigBushBlock> 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<BigBushPartBlock> 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<StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", public static final DeferredBlock<StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign",
() -> new StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); () -> new StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN)));
public static final DeferredBlock<WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", public static final DeferredBlock<WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign",
@@ -96,6 +96,8 @@ public class AntarchyNeoforgeCreativeModeTabs {
event.accept(AntarchyNeoforgeItems.ORANGE_MILKWEED_ITEM.get()); event.accept(AntarchyNeoforgeItems.ORANGE_MILKWEED_ITEM.get());
event.accept(AntarchyNeoforgeItems.PINK_MILKWEED_ITEM.get()); event.accept(AntarchyNeoforgeItems.PINK_MILKWEED_ITEM.get());
event.accept(AntarchyNeoforgeItems.TORCHFLOWER_BUSH_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.HUSHWEED_ITEM.get());
event.accept(AntarchyNeoforgeItems.AMBER_LICHEN_ITEM.get()); event.accept(AntarchyNeoforgeItems.AMBER_LICHEN_ITEM.get());
event.accept(AntarchyNeoforgeItems.CREEPVINE_ITEM.get()); event.accept(AntarchyNeoforgeItems.CREEPVINE_ITEM.get());
@@ -393,7 +395,7 @@ public class AntarchyNeoforgeCreativeModeTabs {
case "duplicator_sapling", "ouranwood_acorn" -> 10; case "duplicator_sapling", "ouranwood_acorn" -> 10;
// 11 - Plants and flowers // 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", "triffid_goo_block", "wasp_nest",
"red_ant_nest", "brown_ant_nest", "rainbow_ant_nest", "termite_nest" -> 11; "red_ant_nest", "brown_ant_nest", "rainbow_ant_nest", "termite_nest" -> 11;
@@ -161,6 +161,10 @@ public final class AntarchyNeoforgeItems {
public static final DeferredItem<net.minecraft.world.item.BlockItem> ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.ORANGE_MILKWEED); public static final DeferredItem<net.minecraft.world.item.BlockItem> ORANGE_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.ORANGE_MILKWEED);
public static final DeferredItem<net.minecraft.world.item.BlockItem> PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.PINK_MILKWEED); public static final DeferredItem<net.minecraft.world.item.BlockItem> PINK_MILKWEED_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.PINK_MILKWEED);
public static final DeferredItem<net.minecraft.world.item.BlockItem> TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TORCHFLOWER_BUSH); public static final DeferredItem<net.minecraft.world.item.BlockItem> TORCHFLOWER_BUSH_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TORCHFLOWER_BUSH);
public static final DeferredItem<net.minecraft.world.item.BlockItem> VERY_SHORT_GRASS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.VERY_SHORT_GRASS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> VERY_TALL_GRASS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.VERY_TALL_GRASS);
public static final DeferredItem<net.minecraft.world.item.BlockItem> 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<net.minecraft.world.item.SignItem> OURANWOOD_SIGN_ITEM = ITEMS.register("ouranwood_sign", public static final DeferredItem<net.minecraft.world.item.SignItem> 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())); () -> new net.minecraft.world.item.SignItem(new Item.Properties().stacksTo(16), AntarchyNeoforgeBlocks.OURANWOOD_SIGN.get(), AntarchyNeoforgeBlocks.OURANWOOD_WALL_SIGN.get()));
public static final DeferredItem<net.minecraft.world.item.HangingSignItem> OURANWOOD_HANGING_SIGN_ITEM = ITEMS.register("ouranwood_hanging_sign", public static final DeferredItem<net.minecraft.world.item.HangingSignItem> OURANWOOD_HANGING_SIGN_ITEM = ITEMS.register("ouranwood_hanging_sign",