giant lilypad lotus etc

This commit is contained in:
craisinlord committed 2026-07-16 21:08:01 -05:00
1 parent f192574150
commit bf101845f5
184 files changed
+3007 -3932

No files matched your search

@@ -55,7 +55,7 @@ public final class AntarchySettings {
private static double bigBerthaAttackSpeed = -3.0D;
private static double krakensGraspAttackDamage = 16.0D;
private static double krakensGraspAttackSpeed = -2.9D;
private static double krakensGraspThrownDamage = 16.0D;
private static double krakensGraspThrownDamage = 32.0D;
private static double krakensGraspLightningDamage = 6.0D;
private static boolean krakensGraspInnateLoyalty = true;
private static int krakensGraspInnateLoyaltyLevel = 3;
@@ -128,9 +128,9 @@ public final class AntarchySettings {
private static double squidzookaCooldownSeconds = 1.0D;
private static double squidzookaLaunchVelocity = 2.1D;
private static double rpoLauncherCooldownSeconds = 1.0D;
private static double rpoLauncherLaunchVelocity = 2.1D;
private static double rpoLauncherExplosionDamage = 14.0D;
private static double rpoLauncherExplosionRadius = 4.0D;
private static double rpoLauncherLaunchVelocity = 1.8D;
private static double rpoLauncherExplosionDamage = 30.0D;
private static double rpoLauncherExplosionRadius = 13.5D;
private static double sizeRayCooldownSeconds = 1.0D;
private static boolean invertProjectilesFromInvertedPlayers = false;
private static boolean gravityGunEnabled = true;
@@ -141,6 +141,8 @@ public final class AntarchySettings {
private static double gravityGunBlastStrength = 1.4D;
private static double gravityGunCooldownSeconds = 0.35D;
private static double gravityGunMaxHoldDistance = 10.0D;
private static double critterCageMaxCapturableWidth = 1.15D;
private static double critterCageMaxCapturableHeight = 1.15D;
private static boolean minersDreamEnabled = true;
private static int minersDreamMinimumRange = 48;
private static int minersDreamMaximumRange = 96;
@@ -988,6 +990,14 @@ public final class AntarchySettings {
return gravityGunMaxHoldDistance;
}
public static double critterCageMaxCapturableWidth() {
return critterCageMaxCapturableWidth;
}
public static double critterCageMaxCapturableHeight() {
return critterCageMaxCapturableHeight;
}
public static boolean minersDreamEnabled() {
return minersDreamEnabled;
}
@@ -1470,6 +1480,14 @@ public final class AntarchySettings {
gravityGunMaxHoldDistance = value;
}
public static void setCritterCageMaxCapturableWidth(double value) {
critterCageMaxCapturableWidth = value;
}
public static void setCritterCageMaxCapturableHeight(double value) {
critterCageMaxCapturableHeight = value;
}
public static void setMinersDreamEnabled(boolean value) {
minersDreamEnabled = value;
}
@@ -233,6 +233,8 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked")
public static Supplier<Item> REVERIE_BOTTLE = (Supplier<Item>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Item> CRITTER_CAGE = (Supplier<Item>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Item> STINK_BUG_ITEM = (Supplier<Item>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Holder<MobEffect>> DREAD = (Supplier<Holder<MobEffect>>) UNBOUND;
@@ -297,6 +299,8 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked")
public static Supplier<Block> SEASHELL = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Block> CRITTER_CAGE_BLOCK = (Supplier<Block>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<BlockEntityType<AntNestBlockEntity>> ANT_NEST_BLOCK_ENTITY = (Supplier<BlockEntityType<AntNestBlockEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<BlockEntityType<DreamCampfireBlockEntity>> DREAM_CAMPFIRE_BLOCK_ENTITY = (Supplier<BlockEntityType<DreamCampfireBlockEntity>>) UNBOUND;
@@ -307,14 +311,31 @@ public final class AntarchyObjects {
@SuppressWarnings("unchecked")
public static Supplier<BlockEntityType<SeashellBlockEntity>> SEASHELL_BLOCK_ENTITY = (Supplier<BlockEntityType<SeashellBlockEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity>> CRITTER_CAGE_BLOCK_ENTITY =
(Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<SimpleParticleType> STINKY_GAS = (Supplier<SimpleParticleType>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<SimpleParticleType> STINKY_FLY = (Supplier<SimpleParticleType>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<SimpleParticleType> PEACH_LEAVES_PARTICLE = (Supplier<SimpleParticleType>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<SimpleParticleType> LOTUS_POLLEN = (Supplier<SimpleParticleType>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.util.Unit>> AMERICAN_COMPONENT =
(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.util.Unit>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<net.minecraft.world.entity.EntityType<com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity>> CRITTER_CAGE_PROJECTILE =
(Supplier<net.minecraft.world.entity.EntityType<com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.resources.ResourceLocation>> CRITTER_CAGE_ENTITY_TYPE_COMPONENT =
(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.resources.ResourceLocation>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<net.minecraft.core.component.DataComponentType<Integer>> CRITTER_CAGE_PRIMARY_COLOR_COMPONENT =
(Supplier<net.minecraft.core.component.DataComponentType<Integer>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<net.minecraft.core.component.DataComponentType<Integer>> CRITTER_CAGE_SECONDARY_COLOR_COMPONENT =
(Supplier<net.minecraft.core.component.DataComponentType<Integer>>) UNBOUND;
private AntarchyObjects() {
}
@@ -607,6 +628,10 @@ public final class AntarchyObjects {
WILD_CORN = supplier;
}
public static void setCritterCageBlock(Supplier<Block> supplier) {
CRITTER_CAGE_BLOCK = supplier;
}
public static void setStarCoralBlock(Supplier<Block> supplier) {
STAR_CORAL_BLOCK = supplier;
}
@@ -635,6 +660,14 @@ public final class AntarchyObjects {
GLIMMER_BOTTLE = supplier;
}
public static void setCritterCage(Supplier<Item> supplier) {
CRITTER_CAGE = supplier;
}
public static void setLotusPollen(Supplier<SimpleParticleType> supplier) {
LOTUS_POLLEN = supplier;
}
public static void setPeachLeavesParticle(Supplier<SimpleParticleType> supplier) {
PEACH_LEAVES_PARTICLE = supplier;
}
@@ -651,6 +684,26 @@ public final class AntarchyObjects {
AMERICAN_COMPONENT = supplier;
}
public static void setCritterCageBlockEntity(Supplier<BlockEntityType<com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity>> supplier) {
CRITTER_CAGE_BLOCK_ENTITY = supplier;
}
public static void setCritterCageProjectile(Supplier<net.minecraft.world.entity.EntityType<com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity>> supplier) {
CRITTER_CAGE_PROJECTILE = supplier;
}
public static void setCritterCageEntityTypeComponent(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.resources.ResourceLocation>> supplier) {
CRITTER_CAGE_ENTITY_TYPE_COMPONENT = supplier;
}
public static void setCritterCagePrimaryColorComponent(Supplier<net.minecraft.core.component.DataComponentType<Integer>> supplier) {
CRITTER_CAGE_PRIMARY_COLOR_COMPONENT = supplier;
}
public static void setCritterCageSecondaryColorComponent(Supplier<net.minecraft.core.component.DataComponentType<Integer>> supplier) {
CRITTER_CAGE_SECONDARY_COLOR_COMPONENT = supplier;
}
public static BlockBehaviour.Properties shellstoneProperties() {
return BlockBehaviour.Properties.ofFullCopy(Blocks.STONE).requiresCorrectToolForDrops();
}
@@ -59,6 +59,7 @@ public final class AntarchyTags {
public static final TagKey<EntityType<?>> DUCT_TAPE_STICK_BLACKLIST = TagKey.create(Registries.ENTITY_TYPE, id("duct_tape_stick_blacklist"));
public static final TagKey<EntityType<?>> NIGHTMARE_NO_ATTACK = TagKey.create(Registries.ENTITY_TYPE, id("nightmare_no_attack"));
public static final TagKey<EntityType<?>> SIZE_CHANGING_IMMUNE = TagKey.create(Registries.ENTITY_TYPE, id("size_changing_immune"));
public static final TagKey<EntityType<?>> CRITTER_CAGE_BLACKLIST = TagKey.create(Registries.ENTITY_TYPE, id("critter_cage_blacklist"));
public static final TagKey<EntityType<?>> PARALYSIS_IMMUNE = TagKey.create(Registries.ENTITY_TYPE, id("paralysis_immune"));
public static final TagKey<EntityType<?>> HUSHWEED_TARGETS = TagKey.create(Registries.ENTITY_TYPE, id("hushweed_targets"));
public static final TagKey<EntityType<?>> TRIFFID_PREY = TagKey.create(Registries.ENTITY_TYPE, id("triffid_prey"));
@@ -0,0 +1,61 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.RenderShape;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
public class CritterCageBlock extends BaseEntityBlock {
private final MapCodec<CritterCageBlock> codec;
public CritterCageBlock(BlockBehaviour.Properties properties) {
super(properties);
this.codec = Block.simpleCodec(ignored -> this);
}
@Override
public MapCodec<CritterCageBlock> codec() {
return this.codec;
}
@Override
protected RenderShape getRenderShape(BlockState state) {
return RenderShape.MODEL;
}
@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new CritterCageBlockEntity(pos, state);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
}
@Override
public ItemStack getCloneItemStack(net.minecraft.world.level.LevelReader level, BlockPos pos, BlockState state) {
if (level instanceof Level actualLevel && actualLevel.getBlockEntity(pos) instanceof CritterCageBlockEntity blockEntity) {
return blockEntity.toItemStack();
}
return super.getCloneItemStack(level, pos, state);
}
@Override
public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack stack) {
super.playerDestroy(level, player, pos, state, blockEntity, stack);
if (level instanceof ServerLevel serverLevel && blockEntity instanceof CritterCageBlockEntity critterCageBlockEntity) {
Block.popResource(serverLevel, pos, critterCageBlockEntity.toItemStack());
}
}
}
@@ -3,14 +3,18 @@ package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.mojang.serialization.MapCodec;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.EnumMap;
import java.util.Map;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundSource;
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.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
@@ -23,27 +27,30 @@ import net.minecraft.world.level.block.RenderShape;
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.BooleanProperty;
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.Nullable;
public final class GiantLilyPadBlock extends Block implements BonemealableBlock {
public static final MapCodec<GiantLilyPadBlock> CODEC = Block.simpleCodec(GiantLilyPadBlock::new);
public static final EnumProperty<Shape> SHAPE = EnumProperty.create("shape", Shape.class);
public static final EnumProperty<TilePosition> TILE_POSITION = EnumProperty.create("tile_position", TilePosition.class);
public static final EnumProperty<PadRotation> ROTATION = EnumProperty.create("rotation", PadRotation.class);
public static final BooleanProperty HAS_LOTUS = BooleanProperty.create("has_lotus");
private static final VoxelShape SHAPE_BOX = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 0.5D, 16.0D);
private static final int SEARCH_RADIUS = 2;
private static final ThreadLocal<Integer> RESTRUCTURING_DEPTH = ThreadLocal.withInitial(() -> 0);
private static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 0.5D, 16.0D);
private static final ThreadLocal<Boolean> REMOVING_STRUCTURE = ThreadLocal.withInitial(() -> false);
private static final Map<TilePosition, Vec2> OFFSETS = createOffsets();
public GiantLilyPadBlock(BlockBehaviour.Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any()
.setValue(SHAPE, Shape.SINGLE)
.setValue(TILE_POSITION, TilePosition.SINGLE)
.setValue(ROTATION, PadRotation.DEG_0));
.setValue(TILE_POSITION, TilePosition.CENTER)
.setValue(ROTATION, PadRotation.DEG_0)
.setValue(HAS_LOTUS, false));
}
@Override
@@ -53,12 +60,7 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(SHAPE, TILE_POSITION, ROTATION);
}
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
return canSurvive(defaultBlockState(), context.getLevel(), context.getClickedPos()) ? defaultBlockState() : null;
builder.add(TILE_POSITION, ROTATION, HAS_LOTUS);
}
@Override
@@ -68,7 +70,7 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock
@Override
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
return SHAPE_BOX;
return SHAPE;
}
@Override
@@ -77,12 +79,15 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock
}
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state) {
if (isThreeByThreeCenter(state)) {
return level.isEmptyBlock(pos.above());
public @Nullable BlockState getStateForPlacement(BlockPlaceContext context) {
return this.defaultBlockState()
.setValue(TILE_POSITION, TilePosition.CENTER)
.setValue(ROTATION, rotationForPlacement(context.getClickedPos()));
}
return state.getValue(SHAPE) != Shape.THREE_BY_THREE;
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state) {
return !structureHasLotus(level, centerFrom(pos, state));
}
@Override
@@ -92,282 +97,161 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
if (isThreeByThreeCenter(state)) {
growLotus(level, pos);
BlockPos center = centerFrom(pos, state);
if (structureHasLotus(level, center)) {
return;
}
if (state.getValue(SHAPE) == Shape.THREE_BY_THREE) {
return;
}
spreadNearby(level, random, pos);
}
private static boolean isThreeByThreeCenter(BlockState state) {
return state.getValue(SHAPE) == Shape.THREE_BY_THREE && state.getValue(TILE_POSITION) == TilePosition.CENTER;
}
private static void growLotus(ServerLevel level, BlockPos padPos) {
BlockPos abovePos = padPos.above();
if (!level.isEmptyBlock(abovePos)) {
return;
}
BlockState lotusState = AntarchyObjects.LOTUS.get().defaultBlockState();
if (lotusState.canSurvive(level, abovePos)) {
level.setBlock(abovePos, lotusState, Block.UPDATE_ALL);
}
}
private static void spreadNearby(ServerLevel level, RandomSource random, BlockPos origin) {
for (int attempt = 0; attempt < 6; attempt++) {
int dx = random.nextInt(5) - 2;
int dz = random.nextInt(5) - 2;
if (dx == 0 && dz == 0) {
continue;
}
BlockPos candidate = origin.offset(dx, 0, dz);
if (!level.isEmptyBlock(candidate) || !isSupported(level, candidate)) {
continue;
}
level.setBlock(candidate, AntarchyObjects.GIANT_LILY_PAD.get().defaultBlockState(), Block.UPDATE_ALL);
return;
}
level.setBlock(pos, state.setValue(HAS_LOTUS, true), Block.UPDATE_CLIENTS);
}
@Override
protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor level, BlockPos pos, BlockPos neighborPos) {
if (!state.canSurvive(level, pos)) {
if (level instanceof ServerLevel serverLevel) {
recalculateNearbyPads(serverLevel, pos);
}
return Blocks.AIR.defaultBlockState();
}
if (level instanceof ServerLevel serverLevel) {
recalculateNearbyPads(serverLevel, pos);
}
return super.updateShape(state, direction, neighborState, level, pos, neighborPos);
}
@Override
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
super.onPlace(state, level, pos, oldState, movedByPiston);
if (!level.isClientSide && !oldState.is(state.getBlock()) && level instanceof ServerLevel serverLevel) {
recalculateNearbyPads(serverLevel, pos);
protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) {
if (!state.is(newState.getBlock()) && !REMOVING_STRUCTURE.get()) {
removeStructure(level, pos, state);
}
super.onRemove(state, level, pos, newState, movedByPiston);
}
@Override
protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) {
super.onRemove(state, level, pos, newState, movedByPiston);
if (!level.isClientSide && !state.is(newState.getBlock()) && level instanceof ServerLevel serverLevel) {
recalculateNearbyPads(serverLevel, pos);
}
protected ItemInteractionResult useItemOn(
ItemStack stack,
BlockState state,
Level level,
BlockPos pos,
Player player,
InteractionHand hand,
BlockHitResult hitResult
) {
if (!stack.is(AntarchyObjects.LOTUS.get().asItem()) || structureHasLotus(level, centerFrom(pos, state))) {
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
private static boolean isSupported(LevelReader level, BlockPos pos) {
return level.getFluidState(pos).is(AntarchyTags.Fluids.GIANT_LILY_PAD_SUPPORTING_FLUIDS)
|| level.getFluidState(pos.below()).is(AntarchyTags.Fluids.GIANT_LILY_PAD_SUPPORTING_FLUIDS);
if (level.isClientSide) {
return ItemInteractionResult.SUCCESS;
}
private static void recalculateNearbyPads(ServerLevel level, BlockPos center) {
if (isRestructuring()) {
level.setBlock(pos, state.setValue(HAS_LOTUS, true), Block.UPDATE_CLIENTS);
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
level.playSound(null, pos, net.minecraft.sounds.SoundEvents.LILY_PAD_PLACE, SoundSource.BLOCKS, 1.0F, 1.0F);
return ItemInteractionResult.CONSUME;
}
@Override
public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) {
if (!state.getValue(HAS_LOTUS) || random.nextInt(10) != 0) {
return;
}
withRestructuringGuard(() -> {
int minX = center.getX() - SEARCH_RADIUS;
int maxX = center.getX() + SEARCH_RADIUS;
int minZ = center.getZ() - SEARCH_RADIUS;
int maxZ = center.getZ() + SEARCH_RADIUS;
int y = center.getY();
List<ShapeCandidate> candidates = new ArrayList<>();
collectCandidates(level, y, minX, maxX, minZ, maxZ, candidates);
candidates.sort(Comparator
.comparingInt(ShapeCandidate::area).reversed()
.thenComparingInt(candidate -> candidate.anchor().getX())
.thenComparingInt(candidate -> candidate.anchor().getZ())
.thenComparingInt(candidate -> candidate.shape().ordinal()));
List<BlockPos> assigned = new ArrayList<>();
for (ShapeCandidate candidate : candidates) {
boolean blocked = false;
for (BlockPos pos : candidate.positions()) {
if (assigned.contains(pos)) {
blocked = true;
break;
}
}
if (blocked) {
continue;
double x = pos.getX() + 0.5D + (random.nextDouble() - 0.5D) * 0.6D;
double z = pos.getZ() + 0.5D + (random.nextDouble() - 0.5D) * 0.6D;
double y = pos.getY() + 0.55D;
level.addParticle(AntarchyObjects.LOTUS_POLLEN.get(), x, y, z, 0.0D, 0.015D, 0.0D);
}
PadRotation rotation = rotationFor(level, candidate.anchor());
for (TileAssignment tile : candidate.tiles()) {
BlockPos pos = tile.pos();
BlockState newState = level.getBlockState(pos);
if (!newState.is(candidate.block())) {
continue;
}
BlockState shapedState = candidate.block().defaultBlockState()
.setValue(SHAPE, candidate.shape())
.setValue(TILE_POSITION, tile.tilePosition())
.setValue(ROTATION, rotation);
if (!newState.equals(shapedState)) {
level.setBlock(pos, shapedState, Block.UPDATE_CLIENTS);
}
assigned.add(pos);
public static boolean canPlaceStructure(LevelAccessor level, BlockPos centerPos) {
for (TilePosition tilePosition : TilePosition.values()) {
BlockPos partPos = positionFor(centerPos, tilePosition);
if (!level.isEmptyBlock(partPos) || !isSupported(level, partPos)) {
return false;
}
}
});
return true;
}
private static void collectCandidates(ServerLevel level, int y, int minX, int maxX, int minZ, int maxZ, List<ShapeCandidate> out) {
addRectCandidates(level, y, minX, maxX, minZ, maxZ, Shape.THREE_BY_THREE, GridLayouts.THREE_BY_THREE, out);
addRectCandidates(level, y, minX, maxX, minZ, maxZ, Shape.TWO_BY_TWO, GridLayouts.TWO_BY_TWO, out);
addRectCandidates(level, y, minX, maxX, minZ, maxZ, Shape.TWO_BY_ONE, GridLayouts.TWO_BY_ONE_HORIZONTAL, out);
addRectCandidates(level, y, minX, maxX, minZ, maxZ, Shape.TWO_BY_ONE, GridLayouts.TWO_BY_ONE_VERTICAL, out);
addRectCandidates(level, y, minX, maxX, minZ, maxZ, Shape.SINGLE, GridLayouts.SINGLE, out);
}
private static void addRectCandidates(ServerLevel level, int y, int minX, int maxX, int minZ, int maxZ, Shape shape, GridLayout layout, List<ShapeCandidate> out) {
int width = layout.width();
int height = layout.height();
for (int anchorX = minX; anchorX <= maxX - width + 1; anchorX++) {
for (int anchorZ = minZ; anchorZ <= maxZ - height + 1; anchorZ++) {
BlockPos anchor = new BlockPos(anchorX, y, anchorZ);
ShapeCandidate candidate = createCandidate(level, anchor, shape, layout);
if (candidate != null) {
out.add(candidate);
}
}
public static void placeStructure(LevelAccessor level, BlockPos centerPos, PadRotation rotation) {
for (TilePosition tilePosition : TilePosition.values()) {
BlockPos partPos = positionFor(centerPos, tilePosition);
BlockState partState = AntarchyObjects.GIANT_LILY_PAD.get().defaultBlockState()
.setValue(TILE_POSITION, tilePosition)
.setValue(ROTATION, rotation)
.setValue(HAS_LOTUS, false);
level.setBlock(partPos, partState, Block.UPDATE_CLIENTS);
}
}
@Nullable
private static ShapeCandidate createCandidate(ServerLevel level, BlockPos anchor, Shape shape, GridLayout layout) {
BlockState anchorState = level.getBlockState(anchor);
if (!(anchorState.getBlock() instanceof GiantLilyPadBlock giantLilyPadBlock)) {
return null;
public static PadRotation rotationForPlacement(BlockPos pos) {
long seed = pos.asLong() ^ Long.rotateLeft(pos.asLong(), 17);
RandomSource random = RandomSource.create(seed);
return PadRotation.values()[random.nextInt(4)];
}
List<TileAssignment> tiles = new ArrayList<>(layout.width() * layout.height());
for (int row = 0; row < layout.height(); row++) {
for (int column = 0; column < layout.width(); column++) {
BlockPos pos = anchor.offset(column, 0, row);
if (!level.getBlockState(pos).is(giantLilyPadBlock)) {
return null;
}
TilePosition tilePosition = layout.tiles()[row][column];
tiles.add(new TileAssignment(pos, tilePosition));
}
private static boolean isSupported(LevelReader level, BlockPos pos) {
return level.getFluidState(pos.below()).is(AntarchyTags.Fluids.GIANT_LILY_PAD_SUPPORTING_FLUIDS)
&& level.getFluidState(pos).isEmpty();
}
return new ShapeCandidate(giantLilyPadBlock, shape, anchor, tiles);
}
private static void removeStructure(Level level, BlockPos pos, BlockState state) {
BlockPos center = centerFrom(pos, state);
boolean shouldDropLotus = structureHasLotus(level, center) && !state.getValue(HAS_LOTUS);
private static boolean isRestructuring() {
return RESTRUCTURING_DEPTH.get() > 0;
}
private static void withRestructuringGuard(Runnable action) {
RESTRUCTURING_DEPTH.set(RESTRUCTURING_DEPTH.get() + 1);
REMOVING_STRUCTURE.set(true);
try {
action.run();
for (TilePosition tilePosition : TilePosition.values()) {
BlockPos partPos = positionFor(center, tilePosition);
if (partPos.equals(pos)) {
continue;
}
BlockState partState = level.getBlockState(partPos);
if (partState.is(AntarchyObjects.GIANT_LILY_PAD.get())) {
level.removeBlock(partPos, false);
}
}
} finally {
RESTRUCTURING_DEPTH.set(Math.max(0, RESTRUCTURING_DEPTH.get() - 1));
REMOVING_STRUCTURE.set(false);
}
if (shouldDropLotus && !level.isClientSide) {
popResource(level, pos, new ItemStack(AntarchyObjects.LOTUS.get()));
}
}
private static PadRotation rotationFor(ServerLevel level, BlockPos anchor) {
long seed = level.getSeed();
long mix = seed
^ anchor.asLong()
^ Long.rotateLeft(seed, 17)
^ Long.rotateLeft(anchor.asLong(), 31);
int index = (int) Math.floorMod(mix, 4L);
return PadRotation.values()[index];
}
private record ShapeCandidate(GiantLilyPadBlock block, Shape shape, BlockPos anchor, List<TileAssignment> tiles) {
int area() {
return this.tiles.size();
}
List<BlockPos> positions() {
return this.tiles.stream().map(TileAssignment::pos).toList();
private static boolean structureHasLotus(LevelReader level, BlockPos center) {
for (TilePosition tilePosition : TilePosition.values()) {
BlockState state = level.getBlockState(positionFor(center, tilePosition));
if (state.is(AntarchyObjects.GIANT_LILY_PAD.get()) && state.getValue(HAS_LOTUS)) {
return true;
}
}
private record TileAssignment(BlockPos pos, TilePosition tilePosition) {
return false;
}
private record GridLayout(TilePosition[][] tiles) {
int width() {
return this.tiles[0].length;
private static BlockPos centerFrom(BlockPos pos, BlockState state) {
Vec2 offset = OFFSETS.get(state.getValue(TILE_POSITION));
return pos.offset((int) -offset.x, 0, (int) -offset.y);
}
int height() {
return this.tiles.length;
}
private static BlockPos positionFor(BlockPos center, TilePosition tilePosition) {
Vec2 offset = OFFSETS.get(tilePosition);
return center.offset((int) offset.x, 0, (int) offset.y);
}
private static final class GridLayouts {
private static final GridLayout SINGLE = new GridLayout(new TilePosition[][]{
{TilePosition.SINGLE}
});
private static final GridLayout TWO_BY_ONE_HORIZONTAL = new GridLayout(new TilePosition[][]{
{TilePosition.MIDDLE_LEFT, TilePosition.MIDDLE_RIGHT}
});
private static final GridLayout TWO_BY_ONE_VERTICAL = new GridLayout(new TilePosition[][]{
{TilePosition.TOP_MIDDLE},
{TilePosition.BOTTOM_MIDDLE}
});
private static final GridLayout TWO_BY_TWO = new GridLayout(new TilePosition[][]{
{TilePosition.TOP_LEFT, TilePosition.TOP_RIGHT},
{TilePosition.BOTTOM_LEFT, TilePosition.BOTTOM_RIGHT}
});
private static final GridLayout THREE_BY_THREE = new GridLayout(new TilePosition[][]{
{TilePosition.TOP_LEFT, TilePosition.TOP_MIDDLE, TilePosition.TOP_RIGHT},
{TilePosition.MIDDLE_LEFT, TilePosition.CENTER, TilePosition.MIDDLE_RIGHT},
{TilePosition.BOTTOM_LEFT, TilePosition.BOTTOM_MIDDLE, TilePosition.BOTTOM_RIGHT}
});
private GridLayouts() {
}
}
public enum Shape implements StringRepresentable {
SINGLE("single"),
TWO_BY_ONE("two_by_one"),
TWO_BY_TWO("two_by_two"),
THREE_BY_THREE("three_by_three");
private final String name;
Shape(String name) {
this.name = name;
}
@Override
public String getSerializedName() {
return this.name;
}
private static Map<TilePosition, Vec2> createOffsets() {
Map<TilePosition, Vec2> offsets = new EnumMap<>(TilePosition.class);
offsets.put(TilePosition.TOP_LEFT, new Vec2(-1, -1));
offsets.put(TilePosition.TOP_MIDDLE, new Vec2(0, -1));
offsets.put(TilePosition.TOP_RIGHT, new Vec2(1, -1));
offsets.put(TilePosition.MIDDLE_LEFT, new Vec2(-1, 0));
offsets.put(TilePosition.CENTER, new Vec2(0, 0));
offsets.put(TilePosition.MIDDLE_RIGHT, new Vec2(1, 0));
offsets.put(TilePosition.BOTTOM_LEFT, new Vec2(-1, 1));
offsets.put(TilePosition.BOTTOM_MIDDLE, new Vec2(0, 1));
offsets.put(TilePosition.BOTTOM_RIGHT, new Vec2(1, 1));
return offsets;
}
public enum TilePosition implements StringRepresentable {
SINGLE("single"),
TOP_LEFT("top_left"),
TOP_MIDDLE("top_middle"),
TOP_RIGHT("top_right"),
@@ -1,9 +1,9 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.particles.DustParticleOptions;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
@@ -20,13 +20,12 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.joml.Vector3f;
public class LotusBlock extends Block {
public static final MapCodec<LotusBlock> CODEC = simpleCodec(LotusBlock::new);
public static final BooleanProperty HANGING = BlockStateProperties.HANGING;
private static final VoxelShape SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 13.0D, 13.0D);
private static final Vector3f POLLEN_COLOR = new Vector3f(1.0F, 0.85F, 0.2F);
private static final VoxelShape SHAPE_STANDING = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 6.5D, 13.0D);
private static final VoxelShape SHAPE_HANGING = Block.box(3.0D, 9.5D, 3.0D, 13.0D, 16.0D, 13.0D);
public LotusBlock(BlockBehaviour.Properties properties) {
super(properties);
@@ -68,7 +67,7 @@ public class LotusBlock extends Block {
@Override
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
return SHAPE;
return state.getValue(HANGING) ? SHAPE_HANGING : SHAPE_STANDING;
}
@Override
@@ -102,6 +101,6 @@ public class LotusBlock extends Block {
double z = pos.getZ() + 0.5D + (random.nextDouble() - 0.5D) * 0.6D;
double y = state.getValue(HANGING) ? pos.getY() + 0.2D : pos.getY() + 0.8D;
double motionY = state.getValue(HANGING) ? -0.02D : 0.015D;
level.addParticle(new DustParticleOptions(POLLEN_COLOR, 1.0F), x, y, z, 0.0D, motionY, 0.0D);
level.addParticle(AntarchyObjects.LOTUS_POLLEN.get(), x, y, z, 0.0D, motionY, 0.0D);
}
}
@@ -46,7 +46,11 @@ public final class SeashellBlock extends BaseEntityBlock implements SimpleWaterl
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
private static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 5.333333D, 15.0D);
private static final double SHELL_MIN = 1.0D;
private static final double SHELL_MAX = 15.0D;
private static final double SHELL_HEIGHT = 4.333333D;
private static final double COLLISION_FORWARD_OFFSET = 1.0D;
private static final VoxelShape OUTLINE_SHAPE = Block.box(SHELL_MIN, 0.0D, SHELL_MIN, SHELL_MAX, SHELL_HEIGHT, SHELL_MAX);
public SeashellBlock(BlockBehaviour.Properties properties) {
super(properties);
@@ -83,17 +87,17 @@ public final class SeashellBlock extends BaseEntityBlock implements SimpleWaterl
@Override
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
return SHAPE;
return OUTLINE_SHAPE;
}
@Override
protected VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
return SHAPE;
return collisionShape(state.getValue(FACING));
}
@Override
protected VoxelShape getOcclusionShape(BlockState state, BlockGetter level, BlockPos pos) {
return SHAPE;
return OUTLINE_SHAPE;
}
@Override
@@ -185,6 +189,45 @@ public final class SeashellBlock extends BaseEntityBlock implements SimpleWaterl
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
if (player.isShiftKeyDown()) {
if (level.isClientSide) {
return ItemInteractionResult.SUCCESS;
}
if (seashell.closeManually()) {
level.playSound(null, pos, SoundEvents.CHEST_CLOSE, SoundSource.BLOCKS, 0.6F, 0.95F + level.random.nextFloat() * 0.1F);
return ItemInteractionResult.CONSUME;
}
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
if (!seashell.isEffectivelyOpen()) {
if (level.isClientSide) {
return ItemInteractionResult.SUCCESS;
}
if (seashell.openManually()) {
level.playSound(null, pos, SoundEvents.CHEST_OPEN, SoundSource.BLOCKS, 0.6F, 0.95F + level.random.nextFloat() * 0.1F);
return ItemInteractionResult.CONSUME;
}
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
if (stack.isEmpty() && !seashell.hasAnyContents()) {
if (level.isClientSide) {
return ItemInteractionResult.SUCCESS;
}
if (seashell.closeManually()) {
level.playSound(null, pos, SoundEvents.CHEST_CLOSE, SoundSource.BLOCKS, 0.6F, 0.95F + level.random.nextFloat() * 0.1F);
return ItemInteractionResult.CONSUME;
}
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
if (!stack.isEmpty()) {
if (level.isClientSide) {
return seashell.canAcceptItem(player, stack) ? ItemInteractionResult.SUCCESS : ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
@@ -234,7 +277,19 @@ public final class SeashellBlock extends BaseEntityBlock implements SimpleWaterl
BlockState updatedState = state.setValue(POWERED, powered);
level.setBlock(pos, updatedState, Block.UPDATE_ALL);
if (level.getBlockEntity(pos) instanceof SeashellBlockEntity seashell) {
seashell.onPowerStateChanged(powered);
if (seashell.onPowerStateChanged(powered)) {
level.playSound(null, pos, powered ? SoundEvents.CHEST_OPEN : SoundEvents.CHEST_CLOSE, SoundSource.BLOCKS, 0.6F, 0.95F + level.random.nextFloat() * 0.1F);
}
}
}
private static VoxelShape collisionShape(Direction facing) {
return switch (facing) {
case NORTH -> Block.box(SHELL_MIN, 0.0D, SHELL_MIN - COLLISION_FORWARD_OFFSET, SHELL_MAX, SHELL_HEIGHT, SHELL_MAX - COLLISION_FORWARD_OFFSET);
case SOUTH -> Block.box(SHELL_MIN, 0.0D, SHELL_MIN + COLLISION_FORWARD_OFFSET, SHELL_MAX, SHELL_HEIGHT, SHELL_MAX + COLLISION_FORWARD_OFFSET);
case WEST -> Block.box(SHELL_MIN - COLLISION_FORWARD_OFFSET, 0.0D, SHELL_MIN, SHELL_MAX - COLLISION_FORWARD_OFFSET, SHELL_HEIGHT, SHELL_MAX);
case EAST -> Block.box(SHELL_MIN + COLLISION_FORWARD_OFFSET, 0.0D, SHELL_MIN, SHELL_MAX + COLLISION_FORWARD_OFFSET, SHELL_HEIGHT, SHELL_MAX);
default -> OUTLINE_SHAPE;
};
}
}
@@ -0,0 +1,173 @@
package com.craisinlord.antarchy.content.block.entity;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.item.CritterCageItem;
import java.util.UUID;
import net.minecraft.core.BlockPos;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
public class CritterCageBlockEntity extends BlockEntity {
private static final String ENTITY_TYPE_TAG = "EntityType";
private static final String ENTITY_DATA_TAG = "EntityData";
private static final String PRIMARY_COLOR_TAG = "PrimaryColor";
private static final String SECONDARY_COLOR_TAG = "SecondaryColor";
private static final String CUSTOM_NAME_TAG = "CustomName";
private ResourceLocation entityTypeId;
private CompoundTag entityData;
private int primaryColor = -1;
private int secondaryColor = -1;
@Nullable
private Component customName;
private int dataVersion;
private transient int clientVersion = -1;
@Nullable
private transient Entity clientDisplayEntity;
public CritterCageBlockEntity(BlockPos pos, BlockState blockState) {
super(AntarchyObjects.CRITTER_CAGE_BLOCK_ENTITY.get(), pos, blockState);
}
public void loadFromItem(ItemStack stack, HolderLookup.Provider registries) {
this.entityTypeId = stack.get(AntarchyObjects.CRITTER_CAGE_ENTITY_TYPE_COMPONENT.get());
this.entityData = this.extractEntityData(stack);
this.primaryColor = stack.getOrDefault(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get(), -1);
this.secondaryColor = stack.getOrDefault(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get(), -1);
this.customName = stack.has(DataComponents.CUSTOM_NAME) ? stack.get(DataComponents.CUSTOM_NAME) : null;
this.dataVersion++;
this.clientDisplayEntity = null;
this.setChanged();
}
public ItemStack toItemStack() {
ItemStack stack = new ItemStack(AntarchyObjects.CRITTER_CAGE.get());
if (this.entityTypeId != null) {
stack.set(AntarchyObjects.CRITTER_CAGE_ENTITY_TYPE_COMPONENT.get(), this.entityTypeId);
}
if (this.entityData != null) {
CustomData.update(DataComponents.CUSTOM_DATA, stack, customData -> customData.put(ENTITY_DATA_TAG, this.entityData.copy()));
}
if (this.primaryColor >= 0) {
stack.set(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get(), this.primaryColor);
} else {
stack.remove(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get());
}
if (this.secondaryColor >= 0) {
stack.set(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get(), this.secondaryColor);
} else {
stack.remove(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get());
}
if (this.customName != null) {
stack.set(DataComponents.CUSTOM_NAME, this.customName);
}
return stack;
}
public int primaryColor() {
return this.primaryColor;
}
public int secondaryColor() {
return this.secondaryColor;
}
@Nullable
public Entity getOrCreateClientDisplayEntity(Level level) {
if (level == null || level.isClientSide == false) {
return null;
}
if (this.clientDisplayEntity != null && this.clientVersion == this.dataVersion) {
return this.clientDisplayEntity;
}
this.clientVersion = this.dataVersion;
this.clientDisplayEntity = this.createDisplayEntity(level);
return this.clientDisplayEntity;
}
@Nullable
private Entity createDisplayEntity(Level level) {
if (this.entityTypeId == null || this.entityData == null) {
return null;
}
EntityType<?> type = BuiltInRegistries.ENTITY_TYPE.getOptional(this.entityTypeId).orElse(null);
if (type == null) {
return null;
}
CompoundTag savedData = this.entityData.copy();
savedData.putString("id", this.entityTypeId.toString());
Entity entity = EntityType.loadEntityRecursive(savedData, level, loaded -> loaded);
if (entity == null) {
return null;
}
entity.setUUID(UUID.randomUUID());
entity.setNoGravity(true);
entity.noPhysics = true;
entity.setSilent(true);
if (entity instanceof Mob mob) {
mob.setNoAi(true);
}
if (this.customName != null) {
entity.setCustomName(this.customName);
}
entity.setCustomNameVisible(false);
return entity;
}
@Override
protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) {
super.saveAdditional(tag, registries);
if (this.entityTypeId != null) {
tag.putString(ENTITY_TYPE_TAG, this.entityTypeId.toString());
}
if (this.entityData != null) {
tag.put(ENTITY_DATA_TAG, this.entityData.copy());
}
tag.putInt(PRIMARY_COLOR_TAG, this.primaryColor);
tag.putInt(SECONDARY_COLOR_TAG, this.secondaryColor);
if (this.customName != null) {
tag.putString(CUSTOM_NAME_TAG, this.customName.getString());
}
}
@Override
protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) {
super.loadAdditional(tag, registries);
this.entityTypeId = tag.contains(ENTITY_TYPE_TAG, Tag.TAG_STRING) ? ResourceLocation.parse(tag.getString(ENTITY_TYPE_TAG)) : null;
this.entityData = tag.contains(ENTITY_DATA_TAG, Tag.TAG_COMPOUND) ? tag.getCompound(ENTITY_DATA_TAG).copy() : null;
this.primaryColor = tag.getInt(PRIMARY_COLOR_TAG);
this.secondaryColor = tag.getInt(SECONDARY_COLOR_TAG);
this.customName = tag.contains(CUSTOM_NAME_TAG, Tag.TAG_STRING) ? Component.literal(tag.getString(CUSTOM_NAME_TAG)) : null;
this.clientDisplayEntity = null;
this.dataVersion++;
}
private CompoundTag extractEntityData(ItemStack stack) {
CustomData customData = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY);
CompoundTag tag = customData.copyTag();
if (!tag.contains(ENTITY_DATA_TAG, Tag.TAG_COMPOUND)) {
return null;
}
return tag.getCompound(ENTITY_DATA_TAG).copy();
}
}
@@ -10,6 +10,9 @@ import net.minecraft.core.HolderLookup;
import net.minecraft.core.NonNullList;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.ClientGamePacketListener;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.Containers;
import net.minecraft.world.InteractionHand;
@@ -40,23 +43,32 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity
private static final RawAnimation OPEN_ANIM = RawAnimation.begin().thenPlayAndHold("open");
private static final RawAnimation CLOSED_ANIM = RawAnimation.begin().thenPlayAndHold("closed");
private static final Component TITLE = Component.translatable("block.antarchy.seashell");
private static final int OPEN_TRANSITION_TICKS = 8;
private static final int CLOSE_TRANSITION_TICKS = 9;
private final AnimatableInstanceCache animatableCache = GeckoLibUtil.createInstanceCache(this);
private NonNullList<ItemStack> items = NonNullList.withSize(9, ItemStack.EMPTY);
private boolean visualOpen;
private boolean initializedVisualState;
private boolean redstonePowered;
private boolean manuallyOpened;
private boolean transitionTargetOpen;
private int transitionTicksRemaining;
public SeashellBlockEntity(BlockPos pos, BlockState blockState) {
super(AntarchyObjects.SEASHELL_BLOCK_ENTITY.get(), pos, blockState);
this.visualOpen = blockState.getValue(SeashellBlock.POWERED);
this.redstonePowered = blockState.getValue(SeashellBlock.POWERED);
this.visualOpen = this.redstonePowered;
}
public static void serverTick(Level level, BlockPos pos, BlockState state, SeashellBlockEntity seashell) {
seashell.syncVisualState(state.getValue(SeashellBlock.POWERED));
seashell.tickVisualTransition();
}
public static void clientTick(Level level, BlockPos pos, BlockState state, SeashellBlockEntity seashell) {
seashell.syncVisualState(state.getValue(SeashellBlock.POWERED));
seashell.tickVisualTransition();
}
public boolean canAcceptItem(@Nullable Player player, ItemStack stack) {
@@ -111,20 +123,59 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity
this.setChanged();
}
public void onPowerStateChanged(boolean open) {
this.syncVisualState(open);
this.triggerAnim(TRANSITION_CONTROLLER, open ? OPEN_TRIGGER : CLOSE_TRIGGER);
this.setChangedAndSync();
public boolean onPowerStateChanged(boolean powered) {
boolean wasOpen = this.isEffectivelyOpen();
this.redstonePowered = powered;
boolean isOpen = this.isEffectivelyOpen();
if (wasOpen != isOpen) {
this.beginTransition(isOpen);
}
public void syncVisualState(boolean open) {
this.setChangedAndSync();
return wasOpen != isOpen;
}
public boolean openManually() {
if (this.isEffectivelyOpen()) {
return false;
}
this.manuallyOpened = true;
this.beginTransition(true);
this.setChangedAndSync();
return true;
}
public boolean closeManually() {
if (!this.manuallyOpened) {
return false;
}
this.manuallyOpened = false;
boolean stillOpen = this.isEffectivelyOpen();
if (!stillOpen) {
this.beginTransition(false);
}
this.setChangedAndSync();
return true;
}
public boolean isEffectivelyOpen() {
return this.redstonePowered || this.manuallyOpened;
}
public void syncVisualState(boolean powered) {
this.redstonePowered = powered;
if (!this.initializedVisualState) {
this.visualOpen = open;
this.visualOpen = this.isEffectivelyOpen();
this.initializedVisualState = true;
return;
}
this.visualOpen = open;
if (this.transitionTicksRemaining <= 0) {
this.visualOpen = this.isEffectivelyOpen();
}
}
public boolean isVisualOpen() {
@@ -198,15 +249,35 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity
@Override
protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) {
super.saveAdditional(tag, registries);
net.minecraft.world.ContainerHelper.saveAllItems(tag, this.items, registries);
tag.putBoolean("VisualOpen", this.visualOpen);
tag.putBoolean("VisualInitialized", this.initializedVisualState);
tag.putBoolean("ManuallyOpened", this.manuallyOpened);
tag.putBoolean("TransitionTargetOpen", this.transitionTargetOpen);
tag.putInt("TransitionTicksRemaining", this.transitionTicksRemaining);
}
@Override
public CompoundTag getUpdateTag(HolderLookup.Provider registries) {
return this.saveCustomOnly(registries);
}
@Override
public Packet<ClientGamePacketListener> getUpdatePacket() {
return ClientboundBlockEntityDataPacket.create(this);
}
@Override
protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) {
super.loadAdditional(tag, registries);
if (tag.contains("Items")) {
net.minecraft.world.ContainerHelper.loadAllItems(tag, this.items, registries);
}
this.visualOpen = tag.getBoolean("VisualOpen");
this.initializedVisualState = tag.getBoolean("VisualInitialized");
this.manuallyOpened = tag.getBoolean("ManuallyOpened");
this.transitionTargetOpen = tag.getBoolean("TransitionTargetOpen");
this.transitionTicksRemaining = tag.getInt("TransitionTicksRemaining");
}
private void setChangedAndSync() {
@@ -235,6 +306,24 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity
return -1;
}
private void beginTransition(boolean opening) {
this.transitionTargetOpen = opening;
this.transitionTicksRemaining = opening ? OPEN_TRANSITION_TICKS : CLOSE_TRANSITION_TICKS;
this.triggerAnim(TRANSITION_CONTROLLER, opening ? OPEN_TRIGGER : CLOSE_TRIGGER);
}
private void tickVisualTransition() {
if (this.transitionTicksRemaining <= 0) {
return;
}
this.transitionTicksRemaining--;
if (this.transitionTicksRemaining == 0) {
this.visualOpen = this.transitionTargetOpen;
this.setChangedAndSync();
}
}
private static Vec3 displayOffsetFor(int insertionIndex) {
return switch (insertionIndex) {
case 0 -> offset(1, 0);
@@ -1,22 +0,0 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class KrakensGraspThrownTridentModel extends GeoModel<KrakensGraspThrownTrident> {
@Override
public ResourceLocation getModelResource(KrakensGraspThrownTrident animatable) {
return ResourceLocation.fromNamespaceAndPath("antarchy", "geo/krakens_grasp.geo.json");
}
@Override
public ResourceLocation getTextureResource(KrakensGraspThrownTrident animatable) {
return ResourceLocation.fromNamespaceAndPath("antarchy", "textures/item/krakens_grasp/krakens_grasp.png");
}
@Override
public ResourceLocation getAnimationResource(KrakensGraspThrownTrident animatable) {
return ResourceLocation.fromNamespaceAndPath("antarchy", "animations/static_item.animation.json");
}
}
@@ -0,0 +1,62 @@
package com.craisinlord.antarchy.content.client.particle;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleProvider;
import net.minecraft.client.particle.ParticleRenderType;
import net.minecraft.client.particle.SpriteSet;
import net.minecraft.client.particle.TextureSheetParticle;
import net.minecraft.core.particles.SimpleParticleType;
public final class LotusPollenParticle extends TextureSheetParticle {
private static final int LIFETIME = 140;
private LotusPollenParticle(ClientLevel level, double x, double y, double z, double xd, double yd, double zd, SpriteSet sprites) {
super(level, x, y, z, 0.0D, 0.0D, 0.0D);
this.setSprite(sprites.get(this.random));
this.gravity = 0.0F;
this.friction = 0.98F;
this.lifetime = LIFETIME + this.random.nextInt(60);
this.quadSize = 0.06F + this.random.nextFloat() * 0.03F;
this.xd = xd + (this.random.nextDouble() - 0.5D) * 0.01D;
this.yd = yd;
this.zd = zd + (this.random.nextDouble() - 0.5D) * 0.01D;
this.setColor(1.0F, 0.85F, 0.2F);
this.hasPhysics = false;
}
@Override
public void tick() {
this.xo = this.x;
this.yo = this.y;
this.zo = this.z;
if (this.age++ >= this.lifetime) {
this.remove();
return;
}
this.alpha = 1.0F - (float) this.age / (float) this.lifetime;
this.move(this.xd, this.yd, this.zd);
this.xd *= this.friction;
this.zd *= this.friction;
}
@Override
public ParticleRenderType getRenderType() {
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
}
public static final class Provider implements ParticleProvider<SimpleParticleType> {
private final SpriteSet sprites;
public Provider(SpriteSet sprites) {
this.sprites = sprites;
}
@Override
public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xd, double yd, double zd) {
return new LotusPollenParticle(level, x, y, z, xd, yd, zd, this.sprites);
}
}
}
@@ -0,0 +1,60 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
public class CritterCageRenderer implements BlockEntityRenderer<CritterCageBlockEntity> {
public CritterCageRenderer(BlockEntityRendererProvider.Context context) {
}
@Override
public void render(CritterCageBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource buffer, int packedLight, int packedOverlay) {
Level level = blockEntity.getLevel();
if (level == null) {
return;
}
Entity displayEntity = blockEntity.getOrCreateClientDisplayEntity(level);
if (displayEntity == null) {
return;
}
displayEntity.tickCount = (int) (level.getGameTime() & Integer.MAX_VALUE);
float scale = 0.72F / Math.max(Math.max(displayEntity.getBbWidth(), displayEntity.getBbHeight()), 0.5F);
float rotation = ((level.getGameTime() + partialTick) * 4.0F) % 360.0F;
poseStack.pushPose();
poseStack.translate(0.5D, 0.06D, 0.5D);
poseStack.mulPose(Axis.YP.rotationDegrees(rotation));
poseStack.scale(scale, scale, scale);
if (displayEntity instanceof LivingEntity living) {
living.yBodyRot = rotation;
living.yBodyRotO = rotation;
living.yHeadRot = rotation;
living.yHeadRotO = rotation;
}
Minecraft.getInstance().getEntityRenderDispatcher().render(
displayEntity,
0.0D,
0.0D,
0.0D,
rotation,
partialTick,
poseStack,
buffer,
packedLight
);
poseStack.popPose();
}
}
@@ -1,13 +1,45 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.KrakensGraspThrownTridentModel;
import com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.item.ItemDisplayContext;
public class KrakensGraspThrownTridentRenderer extends EntityRenderer<KrakensGraspThrownTrident> {
private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath("antarchy", "textures/item/krakens_grasp/krakens_grasp.png");
public class KrakensGraspThrownTridentRenderer extends GeoEntityRenderer<KrakensGraspThrownTrident> {
public KrakensGraspThrownTridentRenderer(EntityRendererProvider.Context context) {
super(context, new KrakensGraspThrownTridentModel());
this.shadowRadius = 0.0F;
super(context);
}
@Override
public void render(KrakensGraspThrownTrident entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
poseStack.pushPose();
poseStack.mulPose(Axis.YP.rotationDegrees(Mth.lerp(partialTick, entity.yRotO, entity.getYRot()) - 90.0F));
poseStack.mulPose(Axis.ZP.rotationDegrees(Mth.lerp(partialTick, entity.xRotO, entity.getXRot()) + 90.0F));
poseStack.mulPose(Axis.XP.rotationDegrees(180.0F));
Minecraft.getInstance().getItemRenderer().renderStatic(
entity.getItem(),
ItemDisplayContext.NONE,
packedLight,
OverlayTexture.NO_OVERLAY,
poseStack,
bufferSource,
entity.level(),
entity.getId());
poseStack.popPose();
super.render(entity, entityYaw, partialTick, poseStack, bufferSource, packedLight);
}
@Override
public ResourceLocation getTextureLocation(KrakensGraspThrownTrident entity) {
return TEXTURE;
}
}
@@ -3,10 +3,10 @@ package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.block.entity.SeashellBlockEntity;
import com.craisinlord.antarchy.content.client.model.SeashellModel;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
@@ -37,9 +37,8 @@ public final class SeashellRenderer extends GeoBlockRenderer<SeashellBlockEntity
return;
}
float yaw = -animatable.getBlockState().getValue(com.craisinlord.antarchy.content.block.SeashellBlock.FACING).toYRot();
for (SeashellBlockEntity.DisplayedStack displayedStack : animatable.getDisplayedStacks()) {
this.renderDisplayItem(poseStack, bufferSource, displayedStack.stack(), displayedStack.offset(), yaw, packedLight, packedOverlay);
this.renderDisplayItem(poseStack, bufferSource, displayedStack.stack(), displayedStack.offset(), packedLight, packedOverlay);
}
}
@@ -48,15 +47,12 @@ public final class SeashellRenderer extends GeoBlockRenderer<SeashellBlockEntity
MultiBufferSource bufferSource,
ItemStack stack,
Vec3 localOffset,
float yaw,
int packedLight,
int packedOverlay
) {
poseStack.pushPose();
poseStack.translate(0.5D, 0.0D, 0.5D);
poseStack.mulPose(com.mojang.math.Axis.YP.rotationDegrees(yaw));
poseStack.translate(localOffset.x(), localOffset.y(), localOffset.z());
poseStack.mulPose(com.mojang.math.Axis.XP.rotationDegrees(90.0F));
poseStack.mulPose(Axis.XP.rotationDegrees(90.0F));
poseStack.scale(0.22F, 0.22F, 0.22F);
Minecraft.getInstance().getItemRenderer().renderStatic(
stack,
@@ -65,7 +61,7 @@ public final class SeashellRenderer extends GeoBlockRenderer<SeashellBlockEntity
packedOverlay,
poseStack,
bufferSource,
null,
Minecraft.getInstance().level,
0
);
poseStack.popPose();
@@ -106,6 +106,15 @@ public final class AntarchyDamageSources {
);
}
public static DamageSource rpoLauncherBlast(ServerLevel level, Entity attacker) {
return new DamageSource(
level.registryAccess()
.registryOrThrow(Registries.DAMAGE_TYPE)
.getHolderOrThrow(AntarchyDamageTypes.RPO_LAUNCHER_BLAST),
attacker
);
}
public static DamageSource waterSoaked(Level level, @Nullable Entity directEntity, @Nullable Entity causingEntity) {
return new DamageSource(
level.registryAccess()
@@ -79,6 +79,12 @@ public final class AntarchyDamageTypes {
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "water_soaked")
);
public static final ResourceKey<DamageType> RPO_LAUNCHER_BLAST =
ResourceKey.create(
Registries.DAMAGE_TYPE,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "rpo_launcher_blast")
);
private AntarchyDamageTypes() {
}
}
@@ -0,0 +1,82 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.item.CritterCageItem;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult;
public class CritterCageProjectileEntity extends ThrowableItemProjectile {
private static final int MAX_LIFETIME_TICKS = 600;
public CritterCageProjectileEntity(EntityType<? extends CritterCageProjectileEntity> entityType, Level level) {
super(entityType, level);
}
public CritterCageProjectileEntity(EntityType<? extends CritterCageProjectileEntity> entityType, LivingEntity owner, Level level) {
super(entityType, owner, level);
}
@Override
protected Item getDefaultItem() {
return AntarchyObjects.CRITTER_CAGE.get();
}
@Override
public void tick() {
if (!this.level().isClientSide && this.tickCount > MAX_LIFETIME_TICKS) {
this.dropEmptyCage();
this.discard();
return;
}
super.tick();
}
@Override
protected void onHitEntity(EntityHitResult hitResult) {
super.onHitEntity(hitResult);
if (this.level().isClientSide) {
return;
}
Entity target = hitResult.getEntity();
if (!CritterCageItem.canCapture(target)) {
this.dropEmptyCage();
this.discard();
return;
}
ItemStack filledStack = CritterCageItem.createFilledStack(target);
target.discard();
this.dropFilledCage(filledStack);
this.discard();
}
@Override
protected void onHitBlock(BlockHitResult hitResult) {
super.onHitBlock(hitResult);
if (!this.level().isClientSide) {
this.dropEmptyCage();
this.discard();
}
}
private void dropFilledCage(ItemStack filledStack) {
this.level().addFreshEntity(new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), filledStack.copyWithCount(1)));
}
private void dropEmptyCage() {
if (this.level().isClientSide) {
return;
}
this.spawnAtLocation(new ItemStack(AntarchyObjects.CRITTER_CAGE.get()));
}
}
@@ -339,9 +339,9 @@ public class DorrieEntity extends Animal implements GeoEntity {
rideAttempts++;
if (rideAttempts >= RIDES_TO_TAME) {
this.setTamed(true);
this.playSound(SoundEvents.HORSE_BREATHE, 0.8F, 1.0F);
this.playSound(SoundEvents.DOLPHIN_JUMP, 0.8F, 1.0F);
} else {
this.playSound(SoundEvents.HORSE_ANGRY, 0.8F, 1.0F);
this.playSound(SoundEvents.DOLPHIN_HURT, 0.8F, 1.0F);
}
}
} else if (!this.isTamed() && this.getFirstPassenger() == null) {
@@ -504,6 +504,12 @@ public class DorrieEntity extends Animal implements GeoEntity {
return null;
}
@Override
public float getSpeed() {
float base = (float) this.getAttributeValue(Attributes.MOVEMENT_SPEED);
return this.isInWater() ? base * 0.15F : base * 0.04F;
}
@Override
public boolean canBeLeashed() {
return true;
@@ -375,7 +375,7 @@ public class OctopusBombEntity extends Monster implements GeoEntity {
private boolean hasHitExplosiveTarget() {
AABB box = this.getBoundingBox();
return !this.level().getEntitiesOfClass(LivingEntity.class, box,
e -> e.isAlive() && e != this && !e.getUUID().equals(this.explosiveLauncherId)).isEmpty();
e -> e.isAlive() && e != this && !(e instanceof OctopusBombEntity) && !e.getUUID().equals(this.explosiveLauncherId)).isEmpty();
}
private void detonateInkExplosion() {
@@ -394,7 +394,7 @@ public class OctopusBombEntity extends Monster implements GeoEntity {
continue;
}
victim.hurt(this.damageSources().explosion(this, this), damage * falloff);
victim.hurt(AntarchyDamageSources.rpoLauncherBlast(serverLevel, this), damage * falloff);
Vec3 knockback = victim.position().subtract(this.position());
if (knockback.lengthSqr() > 1.0E-4D) {
Vec3 normalized = knockback.normalize().scale(0.6D * falloff);
@@ -405,8 +405,9 @@ public class OctopusBombEntity extends Monster implements GeoEntity {
serverLevel.playSound(null, this.getX(), this.getY(), this.getZ(),
net.minecraft.sounds.SoundEvents.GENERIC_EXPLODE, net.minecraft.sounds.SoundSource.HOSTILE, 2.0F, 0.9F);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, this.getX(), this.getY(), this.getZ(), 60, radius * 0.4D, radius * 0.4D, radius * 0.4D, 0.05D);
serverLevel.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(), this.getZ(), 3, 0.5D, 0.5D, 0.5D, 0.0D);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, this.getX(), this.getY(), this.getZ(), 250, radius * 0.5D, radius * 0.5D, radius * 0.5D, 0.1D);
serverLevel.sendParticles(ParticleTypes.SQUID_INK, this.getX(), this.getY(), this.getZ(), 150, radius * 0.2D, radius * 0.2D, radius * 0.2D, 0.2D);
serverLevel.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(), this.getZ(), 4, 0.5D, 0.5D, 0.5D, 0.0D);
this.discard();
}
@@ -54,7 +54,10 @@ public class OuranwoodDeerEntity extends Animal implements GeoEntity {
SynchedEntityData.defineId(OuranwoodDeerEntity.class, EntityDataSerializers.INT);
private static final String VARIANT_KEY = "Variant";
private static final float ADULT_HITBOX_SCALE = 1.5F;
private static final float ADULT_HITBOX_WIDTH = 1.0F;
private static final float ADULT_HITBOX_HEIGHT = 2.0F;
private static final float BABY_HITBOX_WIDTH = 0.5F;
private static final float BABY_HITBOX_HEIGHT = 1.0F;
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation RUN_ANIM = RawAnimation.begin().thenLoop("run");
@@ -175,13 +178,12 @@ public class OuranwoodDeerEntity extends Animal implements GeoEntity {
@Override
public net.minecraft.world.entity.EntityDimensions getDefaultDimensions(net.minecraft.world.entity.Pose pose) {
net.minecraft.world.entity.EntityDimensions dimensions = super.getDefaultDimensions(pose);
if (this.isBaby()) {
return dimensions;
return net.minecraft.world.entity.EntityDimensions.scalable(BABY_HITBOX_WIDTH, BABY_HITBOX_HEIGHT);
}
return net.minecraft.world.entity.EntityDimensions.scalable(
dimensions.width() * ADULT_HITBOX_SCALE,
dimensions.height() * ADULT_HITBOX_SCALE
ADULT_HITBOX_WIDTH,
ADULT_HITBOX_HEIGHT
);
}
@@ -11,20 +11,17 @@ import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.entity.projectile.ItemSupplier;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.Vec3;
import software.bernie.geckolib.animatable.GeoEntity;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.util.GeckoLibUtil;
public class KrakensGraspThrownTrident extends AbstractArrow implements GeoEntity {
public class KrakensGraspThrownTrident extends AbstractArrow implements ItemSupplier {
private boolean dealtDamage;
private boolean returning;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
public KrakensGraspThrownTrident(EntityType<? extends KrakensGraspThrownTrident> entityType, Level level) {
super(entityType, level);
@@ -36,12 +33,8 @@ public class KrakensGraspThrownTrident extends AbstractArrow implements GeoEntit
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
public ItemStack getItem() {
return new ItemStack(AntarchyObjects.KRAKENS_GRASP.get());
}
@Override
@@ -91,29 +84,54 @@ public class KrakensGraspThrownTrident extends AbstractArrow implements GeoEntit
}
@Override
protected void onHitEntity(EntityHitResult result) {
super.onHitEntity(result);
if (!(result.getEntity() instanceof LivingEntity target) || !(this.level() instanceof ServerLevel serverLevel)) {
return;
public ItemStack getWeaponItem() {
return this.getPickupItemStackOrigin();
}
@Override
protected net.minecraft.world.phys.EntityHitResult findHitEntity(Vec3 startVec, Vec3 endVec) {
return this.dealtDamage ? null : super.findHitEntity(startVec, endVec);
}
@Override
protected void onHitEntity(EntityHitResult result) {
Entity target = result.getEntity();
float damage = (float) this.getBaseDamage();
Entity owner = this.getOwner();
DamageSource damageSource = this.damageSources().trident(this, owner != null ? owner : this);
boolean hurt = target.hurt(damageSource, (float) AntarchySettings.krakensGraspThrownDamage());
if (hurt) {
KrakensGraspItem.strikeLightning(target, serverLevel);
TentacleEntity.spawnAt(serverLevel, new Vec3(target.getX(), target.getY(), target.getZ()),
owner instanceof LivingEntity livingOwner ? livingOwner : null);
if (this.level() instanceof ServerLevel serverLevel) {
damage = EnchantmentHelper.modifyDamage(serverLevel, this.getWeaponItem(), target, damageSource, damage);
}
this.dealtDamage = true;
if (target.hurt(damageSource, damage) && target.getType() != EntityType.ENDERMAN) {
if (this.level() instanceof ServerLevel serverLevel) {
EnchantmentHelper.doPostAttackEffectsWithItemSource(serverLevel, target, damageSource, this.getWeaponItem());
}
if (target instanceof LivingEntity livingTarget) {
this.doKnockback(livingTarget, damageSource);
this.doPostHurtEffects(livingTarget);
}
}
this.setDeltaMovement(this.getDeltaMovement().multiply(-0.01D, -0.1D, -0.01D));
this.playSound(SoundEvents.TRIDENT_HIT, 1.0F, 1.0F);
if (target instanceof LivingEntity livingTarget && this.level() instanceof ServerLevel serverLevel) {
KrakensGraspItem.strikeLightning(livingTarget, serverLevel);
TentacleEntity.spawnAt(serverLevel, new Vec3(target.getX(), target.getY(), target.getZ()),
owner instanceof LivingEntity livingOwner ? livingOwner : null);
}
}
@Override
protected void onHitBlock(BlockHitResult result) {
super.onHitBlock(result);
if (this.level() instanceof ServerLevel serverLevel) {
TentacleEntity.spawnAt(serverLevel, result.getLocation(), this.getOwner() instanceof LivingEntity livingOwner ? livingOwner : null);
Vec3 pos = result.getLocation();
KrakensGraspItem.strikeLightningAt(serverLevel, pos.x, pos.y, pos.z);
TentacleEntity.spawnAt(serverLevel, pos, this.getOwner() instanceof LivingEntity livingOwner ? livingOwner : null);
}
}
}
@@ -54,6 +54,11 @@ public class TentacleEntity extends Mob implements GeoEntity {
public void push(net.minecraft.world.entity.Entity entity) {
}
@Override
public boolean isPickable() {
return false;
}
public static AttributeSupplier.Builder createAttributes() {
return Mob.createMobAttributes()
.add(Attributes.MAX_HEALTH, 20.0D)
@@ -0,0 +1,353 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity;
import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.item.context.BlockPlaceContext;
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.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.tags.TagKey;
public class CritterCageItem extends Item {
public static final String ENTITY_DATA_TAG = "EntityData";
private static final TagKey<EntityType<?>> BOSS_TAG = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.withDefaultNamespace("bosses"));
private static final int EMPTY_STATE = 0;
private static final int FILLED_PLAIN_STATE = 1;
private static final int FILLED_COLORED_STATE = 2;
public CritterCageItem(Properties properties) {
super(properties);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
if (!this.isFilled(stack)) {
if (!level.isClientSide) {
this.launchProjectile(level, player, hand, stack);
}
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide);
}
if (level.isClientSide) {
return InteractionResultHolder.success(stack);
}
if (!(level instanceof ServerLevel serverLevel)) {
return InteractionResultHolder.pass(stack);
}
return this.releaseAtLookTarget(serverLevel, player, hand, stack)
? InteractionResultHolder.consume(player.getItemInHand(hand))
: InteractionResultHolder.fail(stack);
}
@Override
public InteractionResult useOn(UseOnContext context) {
ItemStack stack = context.getItemInHand();
if (!this.isFilled(stack)) {
return InteractionResult.PASS;
}
Player player = context.getPlayer();
if (player != null && player.isShiftKeyDown()) {
return this.placeBlock(context) ? InteractionResult.CONSUME : InteractionResult.FAIL;
}
if (context.getLevel().isClientSide) {
return InteractionResult.SUCCESS;
}
if (!(context.getLevel() instanceof ServerLevel serverLevel)) {
return InteractionResult.PASS;
}
return this.releaseAtBlockHit(serverLevel, context)
? InteractionResult.CONSUME
: InteractionResult.FAIL;
}
@Override
public void appendHoverText(ItemStack stack, TooltipContext context, List<Component> tooltip, TooltipFlag flag) {
if (!this.isFilled(stack)) {
tooltip.add(Component.translatable("tooltip.antarchy.critter_cage.empty").withStyle(ChatFormatting.GRAY));
super.appendHoverText(stack, context, tooltip, flag);
return;
}
tooltip.add(Component.translatable("tooltip.antarchy.critter_cage.contains", this.getDisplayName(stack)).withStyle(ChatFormatting.GRAY));
tooltip.add(Component.translatable("tooltip.antarchy.critter_cage.release").withStyle(ChatFormatting.DARK_GRAY));
tooltip.add(Component.translatable("tooltip.antarchy.critter_cage.place").withStyle(ChatFormatting.DARK_GRAY));
super.appendHoverText(stack, context, tooltip, flag);
}
public boolean isFilled(ItemStack stack) {
return this.getEntityTypeId(stack) != null && this.getEntityData(stack) != null;
}
public int getItemState(ItemStack stack) {
if (!this.isFilled(stack)) {
return EMPTY_STATE;
}
return this.hasSpawnEggColors(stack) ? FILLED_COLORED_STATE : FILLED_PLAIN_STATE;
}
public ResourceLocation getEntityTypeId(ItemStack stack) {
return stack.get(AntarchyObjects.CRITTER_CAGE_ENTITY_TYPE_COMPONENT.get());
}
public CompoundTag getEntityData(ItemStack stack) {
CustomData customData = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY);
CompoundTag tag = customData.copyTag();
if (!tag.contains(ENTITY_DATA_TAG, Tag.TAG_COMPOUND)) {
return null;
}
return tag.getCompound(ENTITY_DATA_TAG).copy();
}
public int getPrimaryColor(ItemStack stack) {
return stack.getOrDefault(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get(), -1);
}
public int getSecondaryColor(ItemStack stack) {
return stack.getOrDefault(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get(), -1);
}
public Component getDisplayName(ItemStack stack) {
if (stack.has(DataComponents.CUSTOM_NAME)) {
return stack.getHoverName();
}
EntityType<?> type = this.getEntityType(stack);
return type != null ? type.getDescription() : Component.literal("Unknown");
}
public EntityType<?> getEntityType(ItemStack stack) {
ResourceLocation id = this.getEntityTypeId(stack);
return id == null ? null : BuiltInRegistries.ENTITY_TYPE.getOptional(id).orElse(null);
}
public static ItemStack createFilledStack(Entity entity) {
ItemStack stack = new ItemStack(AntarchyObjects.CRITTER_CAGE.get());
if (entity == null) {
return stack;
}
EntityType<?> type = entity.getType();
ResourceLocation typeId = BuiltInRegistries.ENTITY_TYPE.getKey(type);
if (typeId != null) {
stack.set(AntarchyObjects.CRITTER_CAGE_ENTITY_TYPE_COMPONENT.get(), typeId);
}
CompoundTag entityData = new CompoundTag();
entity.saveWithoutId(entityData);
CustomData.update(DataComponents.CUSTOM_DATA, stack, customData -> customData.put(ENTITY_DATA_TAG, entityData));
if (entity.hasCustomName()) {
stack.set(DataComponents.CUSTOM_NAME, entity.getCustomName());
}
applySpawnEggColors(stack, type);
return stack;
}
public static boolean canCapture(Entity entity) {
if (entity == null || !entity.isAlive()) {
return false;
}
if (entity instanceof Player) {
return false;
}
if (entity.getType().is(BOSS_TAG)) {
return false;
}
if (entity.isPassenger() || entity.isVehicle() || !entity.getPassengers().isEmpty()) {
return false;
}
if (entity.getType().is(AntarchyTags.Entities.CRITTER_CAGE_BLACKLIST)) {
return false;
}
AABB box = entity.getBoundingBox();
return box.getXsize() <= AntarchySettings.critterCageMaxCapturableWidth()
&& box.getZsize() <= AntarchySettings.critterCageMaxCapturableWidth()
&& box.getYsize() <= AntarchySettings.critterCageMaxCapturableHeight();
}
public static void applySpawnEggColors(ItemStack stack, EntityType<?> entityType) {
SpawnEggItem egg = findSpawnEgg(entityType);
if (egg == null) {
stack.remove(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get());
stack.remove(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get());
return;
}
stack.set(AntarchyObjects.CRITTER_CAGE_PRIMARY_COLOR_COMPONENT.get(), egg.getColor(0));
stack.set(AntarchyObjects.CRITTER_CAGE_SECONDARY_COLOR_COMPONENT.get(), egg.getColor(1));
}
private static SpawnEggItem findSpawnEgg(EntityType<?> entityType) {
@SuppressWarnings("unchecked")
EntityType<? extends LivingEntity> livingType = (EntityType<? extends LivingEntity>) entityType;
return livingType == null ? null : SpawnEggItem.byId(livingType);
}
private boolean releaseAtLookTarget(ServerLevel level, Player player, InteractionHand hand, ItemStack stack) {
HitResult hitResult = player.pick(player.blockInteractionRange(), 0.0F, false);
Vec3 target = hitResult.getType() == HitResult.Type.BLOCK && hitResult instanceof BlockHitResult blockHitResult
? blockHitResult.getLocation().add(Vec3.atLowerCornerOf(blockHitResult.getDirection().getNormal()).scale(0.5D))
: player.getEyePosition().add(player.getLookAngle().scale(2.0D));
return this.releaseAtPosition(level, player, hand, stack, target);
}
private boolean releaseAtBlockHit(ServerLevel level, UseOnContext context) {
BlockPos targetPos = context.getClickedPos().relative(context.getClickedFace());
Vec3 target = Vec3.atCenterOf(targetPos);
return this.releaseAtPosition(level, context.getPlayer(), context.getHand(), context.getItemInHand(), target);
}
private boolean releaseAtPosition(ServerLevel level, Player player, InteractionHand hand, ItemStack stack, Vec3 position) {
EntityType<?> type = this.getEntityType(stack);
if (type == null) {
return false;
}
if (!level.getWorldBorder().isWithinBounds(BlockPos.containing(position))) {
return false;
}
CompoundTag entityData = this.getEntityData(stack);
if (entityData == null) {
return false;
}
CompoundTag savedData = entityData.copy();
ResourceLocation entityId = BuiltInRegistries.ENTITY_TYPE.getKey(type);
if (entityId != null) {
savedData.putString("id", entityId.toString());
}
Entity entity = EntityType.loadEntityRecursive(savedData, level, loaded -> loaded);
if (entity == null) {
return false;
}
entity.setUUID(java.util.UUID.randomUUID());
entity.moveTo(position.x, position.y, position.z, player != null ? player.getYRot() : 0.0F, 0.0F);
if (!level.noCollision(entity)) {
return false;
}
level.addFreshEntity(entity);
this.replaceFilledWithEmpty(player, hand, stack);
return true;
}
private void replaceFilledWithEmpty(Player player, InteractionHand hand, ItemStack stack) {
if (player != null && player.getAbilities().instabuild) {
return;
}
ItemStack emptyCage = new ItemStack(AntarchyObjects.CRITTER_CAGE.get());
if (stack.getCount() <= 1) {
if (player != null) {
player.setItemInHand(hand, emptyCage);
}
return;
}
stack.shrink(1);
if (player == null || !player.getInventory().add(emptyCage)) {
if (player != null) {
player.drop(emptyCage, false);
}
}
}
private boolean placeBlock(UseOnContext context) {
if (!(context.getLevel() instanceof ServerLevel serverLevel)) {
return false;
}
Player player = context.getPlayer();
if (player == null) {
return false;
}
BlockPos placePos = context.getClickedPos().relative(context.getClickedFace());
if (!serverLevel.getBlockState(placePos).canBeReplaced()) {
return false;
}
BlockState state = AntarchyObjects.CRITTER_CAGE_BLOCK.get().defaultBlockState();
if (!serverLevel.setBlock(placePos, state, Block.UPDATE_ALL)) {
return false;
}
BlockEntity blockEntity = serverLevel.getBlockEntity(placePos);
if (!(blockEntity instanceof CritterCageBlockEntity critterCageBlockEntity)) {
serverLevel.setBlock(placePos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL);
return false;
}
critterCageBlockEntity.loadFromItem(context.getItemInHand(), context.getLevel().registryAccess());
if (!player.getAbilities().instabuild) {
context.getItemInHand().shrink(1);
}
return true;
}
private boolean hasSpawnEggColors(ItemStack stack) {
return this.getPrimaryColor(stack) >= 0 && this.getSecondaryColor(stack) >= 0;
}
private void launchProjectile(Level level, Player player, InteractionHand hand, ItemStack stack) {
var projectileType = AntarchyObjects.CRITTER_CAGE_PROJECTILE.get();
var projectile = projectileType.create(level);
if (!(projectile instanceof com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity critterCageProjectile)) {
return;
}
critterCageProjectile.setOwner(player);
critterCageProjectile.setPos(player.getX(), player.getEyeY() - 0.1D, player.getZ());
critterCageProjectile.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F);
level.addFreshEntity(critterCageProjectile);
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
player.awardStat(Stats.ITEM_USED.get(this));
}
}
@@ -0,0 +1,58 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.content.block.GiantLilyPadBlock;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.phys.BlockHitResult;
public final class GiantLilyPadItem extends BlockItem {
public GiantLilyPadItem(Block block, Properties properties) {
super(block, properties);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
BlockHitResult hitResult = getPlayerPOVHitResult(level, player, ClipContext.Fluid.SOURCE_ONLY);
if (hitResult.getType() != net.minecraft.world.phys.HitResult.Type.BLOCK) {
return InteractionResultHolder.pass(stack);
}
BlockPos fluidPos = hitResult.getBlockPos();
BlockPos centerPos = fluidPos.above();
if (!level.mayInteract(player, fluidPos) || !player.mayUseItemAt(centerPos, Direction.UP, stack)) {
return InteractionResultHolder.fail(stack);
}
if (!GiantLilyPadBlock.canPlaceStructure(level, centerPos)) {
return InteractionResultHolder.fail(stack);
}
if (!level.isClientSide) {
GiantLilyPadBlock.placeStructure(level, centerPos, GiantLilyPadBlock.rotationForPlacement(centerPos));
level.playSound(null, centerPos, SoundEvents.LILY_PAD_PLACE, SoundSource.BLOCKS, 1.0F, 1.0F);
if (!player.getAbilities().instabuild) {
stack.shrink(1);
}
player.awardStat(Stats.ITEM_USED.get(this));
}
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide);
}
@Override
public net.minecraft.world.InteractionResult useOn(UseOnContext context) {
return this.use(context.getLevel(), context.getPlayer(), context.getHand()).getResult();
}
}
@@ -2,9 +2,6 @@ package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.client.model.ResourceBackedGeoItemModel;
import com.craisinlord.antarchy.content.client.renderer.AnimatedHeldItemRenderer;
import com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.Registries;
@@ -28,26 +25,13 @@ import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.item.enchantment.ItemEnchantments;
import net.minecraft.world.level.Level;
import net.minecraft.world.entity.Entity;
import software.bernie.geckolib.animatable.GeoItem;
import software.bernie.geckolib.animatable.client.GeoRenderProvider;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.util.GeckoLibUtil;
import java.util.function.Consumer;
public class KrakensGraspItem extends TridentItem implements GeoItem {
private static final ResourceLocation MODEL_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "geo/krakens_grasp.geo.json");
private static final ResourceLocation TEXTURE_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "textures/item/krakens_grasp/krakens_grasp.png");
private static final ResourceLocation ANIMATION_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "animations/static_item.animation.json");
public class KrakensGraspItem extends TridentItem {
private static final ResourceLocation ATTACK_DAMAGE_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "krakens_grasp_attack_damage");
private static final ResourceLocation ATTACK_SPEED_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "krakens_grasp_attack_speed");
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
public KrakensGraspItem(Item.Properties properties) {
super(properties);
GeoItem.registerSyncedAnimatable(this);
}
@Override
@@ -87,20 +71,26 @@ public class KrakensGraspItem extends TridentItem implements GeoItem {
boolean didHurt = super.hurtEnemy(stack, target, attacker);
if (didHurt && attacker.level() instanceof ServerLevel serverLevel) {
strikeLightning(target, serverLevel);
com.craisinlord.antarchy.content.entity.kraken.TentacleEntity.spawnAt(serverLevel,
new net.minecraft.world.phys.Vec3(target.getX(), target.getY(), target.getZ()), attacker);
}
return didHurt;
}
public static void strikeLightning(LivingEntity target, ServerLevel level) {
LightningBolt lightningBolt = new LightningBolt(net.minecraft.world.entity.EntityType.LIGHTNING_BOLT, level);
lightningBolt.moveTo(target.getX(), target.getY(), target.getZ());
lightningBolt.setVisualOnly(true);
level.addFreshEntity(lightningBolt);
strikeLightningAt(level, target.getX(), target.getY(), target.getZ());
target.hurt(target.damageSources().lightningBolt(), (float) AntarchySettings.krakensGraspLightningDamage());
level.sendParticles(ParticleTypes.ELECTRIC_SPARK, target.getX(), target.getY(0.7D), target.getZ(), 10, 0.25D, 0.25D, 0.25D, 0.02D);
}
public static void strikeLightningAt(ServerLevel level, double x, double y, double z) {
LightningBolt lightningBolt = new LightningBolt(net.minecraft.world.entity.EntityType.LIGHTNING_BOLT, level);
lightningBolt.moveTo(x, y, z);
lightningBolt.setVisualOnly(true);
level.addFreshEntity(lightningBolt);
level.sendParticles(ParticleTypes.ELECTRIC_SPARK, x, y + 0.2D, z, 10, 0.25D, 0.25D, 0.25D, 0.02D);
}
@Override
public void releaseUsing(ItemStack stack, Level level, LivingEntity user, int timeLeft) {
if (!(user instanceof Player player)) {
@@ -124,7 +114,8 @@ public class KrakensGraspItem extends TridentItem implements GeoItem {
if (!level.isClientSide) {
stack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(user.getUsedItemHand()));
KrakensGraspThrownTrident trident = new KrakensGraspThrownTrident(AntarchyObjects.KRAKENS_GRASP_TRIDENT.get(), player, level, stack.copy());
com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident trident =
new com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident(AntarchyObjects.KRAKENS_GRASP_TRIDENT.get(), player, level, stack.copy());
trident.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 2.5F, 1.0F);
if (player.hasInfiniteMaterials()) {
trident.pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.CREATIVE_ONLY;
@@ -138,29 +129,4 @@ public class KrakensGraspItem extends TridentItem implements GeoItem {
player.awardStat(Stats.ITEM_USED.get(this));
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
@Override
public void createGeoRenderer(Consumer<GeoRenderProvider> consumer) {
consumer.accept(new GeoRenderProvider() {
private AnimatedHeldItemRenderer<KrakensGraspItem> renderer;
@Override
public net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer getGeoItemRenderer() {
if (this.renderer == null) {
this.renderer = new AnimatedHeldItemRenderer<>(new ResourceBackedGeoItemModel<>(MODEL_LOCATION, TEXTURE_LOCATION, ANIMATION_LOCATION));
}
return this.renderer;
}
});
}
}
@@ -164,7 +164,7 @@ public class RpoLauncherItem extends ProjectileWeaponItem implements GeoItem {
Vec3 direction = Vec3.directionFromRotation(new Vec2(player.getXRot(), yaw));
projectileBomb.moveTo(
player.getX(),
player.getEyeY() - 0.2D,
player.getEyeY() + 0.15D,
player.getZ(),
yaw,
player.getXRot()
@@ -1,10 +1,14 @@
package com.craisinlord.antarchy.content.worldgen.elythia;
import com.craisinlord.antarchy.Antarchy;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SeaPickleBlock;
import net.minecraft.world.level.block.state.BlockState;
@@ -17,17 +21,17 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
public class CoralSpikeFeature extends Feature<NoneFeatureConfiguration> {
private record CoralSet(
net.minecraft.world.level.block.Block block,
net.minecraft.world.level.block.Block coral,
net.minecraft.world.level.block.Block wallFan,
net.minecraft.world.level.block.Block floorFan,
net.minecraft.world.level.block.Block deadBlock,
net.minecraft.world.level.block.Block deadCoral,
net.minecraft.world.level.block.Block deadWallFan,
net.minecraft.world.level.block.Block deadFloorFan
Block block,
Block coral,
Block wallFan,
Block floorFan,
Block deadBlock,
Block deadCoral,
Block deadWallFan,
Block deadFloorFan
) {}
private static final CoralSet[] CORAL_SETS = {
private static final CoralSet[] VANILLA_CORAL_SETS = {
new CoralSet(Blocks.TUBE_CORAL_BLOCK, Blocks.TUBE_CORAL, Blocks.TUBE_CORAL_WALL_FAN, Blocks.TUBE_CORAL_FAN, Blocks.DEAD_TUBE_CORAL_BLOCK, Blocks.DEAD_TUBE_CORAL, Blocks.DEAD_TUBE_CORAL_WALL_FAN, Blocks.DEAD_TUBE_CORAL_FAN),
new CoralSet(Blocks.BRAIN_CORAL_BLOCK, Blocks.BRAIN_CORAL, Blocks.BRAIN_CORAL_WALL_FAN, Blocks.BRAIN_CORAL_FAN, Blocks.DEAD_BRAIN_CORAL_BLOCK, Blocks.DEAD_BRAIN_CORAL, Blocks.DEAD_BRAIN_CORAL_WALL_FAN, Blocks.DEAD_BRAIN_CORAL_FAN),
new CoralSet(Blocks.BUBBLE_CORAL_BLOCK, Blocks.BUBBLE_CORAL, Blocks.BUBBLE_CORAL_WALL_FAN, Blocks.BUBBLE_CORAL_FAN, Blocks.DEAD_BUBBLE_CORAL_BLOCK, Blocks.DEAD_BUBBLE_CORAL, Blocks.DEAD_BUBBLE_CORAL_WALL_FAN, Blocks.DEAD_BUBBLE_CORAL_FAN),
@@ -60,7 +64,8 @@ public class CoralSpikeFeature extends Feature<NoneFeatureConfiguration> {
int floorY = level.getHeight(Heightmap.Types.OCEAN_FLOOR_WG, origin.getX(), origin.getZ());
if (floorY >= seaLevel) return false;
CoralSet coral = CORAL_SETS[random.nextInt(CORAL_SETS.length)];
CoralSet[] coralSets = coralSets();
CoralSet coral = coralSets[random.nextInt(coralSets.length)];
int baseRadius = 2 + random.nextInt(2); // 2-3 wide at base
int totalHeight = 20 + random.nextInt(15); // 20-34 blocks tall
@@ -156,7 +161,7 @@ public class CoralSpikeFeature extends Feature<NoneFeatureConfiguration> {
boolean decorInWater = level.getBlockState(decorPos).is(Blocks.WATER);
float roll = random.nextFloat();
CoralSet randomCoral = CORAL_SETS[random.nextInt(CORAL_SETS.length)];
CoralSet randomCoral = coralSets[random.nextInt(coralSets.length)];
if (roll < 0.35f) {
if (decorInWater) {
@@ -210,4 +215,27 @@ public class CoralSpikeFeature extends Feature<NoneFeatureConfiguration> {
private static boolean canReplace(BlockState state) {
return state.isAir() || state.is(Blocks.WATER) || state.canBeReplaced();
}
private static CoralSet[] coralSets() {
CoralSet starCoral = new CoralSet(
lookupBlock("star_coral_block", Blocks.TUBE_CORAL_BLOCK),
lookupBlock("star_coral", Blocks.TUBE_CORAL),
lookupBlock("star_coral_wall_fan", Blocks.TUBE_CORAL_WALL_FAN),
lookupBlock("star_coral_fan", Blocks.TUBE_CORAL_FAN),
lookupBlock("dead_star_coral_block", Blocks.DEAD_TUBE_CORAL_BLOCK),
lookupBlock("dead_star_coral", Blocks.DEAD_TUBE_CORAL),
lookupBlock("dead_star_coral_wall_fan", Blocks.DEAD_TUBE_CORAL_WALL_FAN),
lookupBlock("dead_star_coral_fan", Blocks.DEAD_TUBE_CORAL_FAN)
);
CoralSet[] combined = new CoralSet[VANILLA_CORAL_SETS.length + 1];
System.arraycopy(VANILLA_CORAL_SETS, 0, combined, 0, VANILLA_CORAL_SETS.length);
combined[VANILLA_CORAL_SETS.length] = starCoral;
return combined;
}
private static Block lookupBlock(String path, Block fallback) {
ResourceLocation id = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path);
return BuiltInRegistries.BLOCK.getOptional(id).orElse(fallback);
}
}
@@ -99,7 +99,7 @@ public class ElythiaFloraFeature extends Feature<NoneFeatureConfiguration> {
}) {
placedAny |= this.placeMilkweedPatch(level, origin, random, AntarchyObjects.PINK_MILKWEED.get());
}
if (this.variant == Variant.PEACH_FOREST && random.nextFloat() < 0.025F) {
if (this.variant == Variant.PEACH_FOREST && random.nextFloat() < 0.035F) {
placedAny |= this.placeMilkweedPatch(level, origin, random, antarchyBlock(CAMELLIA_ID));
}
@@ -1,6 +1,7 @@
package com.craisinlord.antarchy.content.worldgen.elythia;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.GiantLilyPadBlock;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.tags.FluidTags;
@@ -13,9 +14,6 @@ import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import java.util.ArrayList;
import java.util.List;
public final class GiantLilyPadPatchFeature extends Feature<NoneFeatureConfiguration> {
public GiantLilyPadPatchFeature(Codec<NoneFeatureConfiguration> codec) {
super(codec);
@@ -29,73 +27,34 @@ public final class GiantLilyPadPatchFeature extends Feature<NoneFeatureConfigura
boolean placedAny = false;
for (int i = 0; i < 12; i++) {
int anchorX = origin.getX() + random.nextInt(17) - 8;
int anchorZ = origin.getZ() + random.nextInt(17) - 8;
int surfaceY = level.getHeight(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, anchorX, anchorZ) - 1;
BlockPos anchorFluidPos = new BlockPos(anchorX, surfaceY, anchorZ);
if (!level.getFluidState(anchorFluidPos).is(FluidTags.WATER) || !level.getFluidState(anchorFluidPos).isSource()) {
continue;
}
int size = rollFootprintSize(random);
List<BlockPos> footprint = new ArrayList<>(size * size);
boolean valid = true;
for (int row = 0; row < size && valid; row++) {
for (int column = 0; column < size; column++) {
BlockPos fluidPos = new BlockPos(anchorX + column, surfaceY, anchorZ + row);
int x = origin.getX() + random.nextInt(17) - 8;
int z = origin.getZ() + random.nextInt(17) - 8;
int surfaceY = level.getHeight(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, x, z) - 1;
BlockPos fluidPos = new BlockPos(x, surfaceY, z);
if (!level.getFluidState(fluidPos).is(FluidTags.WATER) || !level.getFluidState(fluidPos).isSource()) {
valid = false;
break;
continue;
}
BlockPos padPos = fluidPos.above();
if (!level.isEmptyBlock(padPos)) {
valid = false;
break;
}
footprint.add(padPos);
}
}
if (!valid) {
if (!GiantLilyPadBlock.canPlaceStructure(level, padPos)) {
continue;
}
Block giantLilyPad = AntarchyObjects.GIANT_LILY_PAD.get();
BlockState padState = giantLilyPad.defaultBlockState();
for (BlockPos padPos : footprint) {
level.setBlock(padPos, padState, Block.UPDATE_ALL);
}
GiantLilyPadBlock.placeStructure(level, padPos, GiantLilyPadBlock.PadRotation.values()[random.nextInt(4)]);
placedAny = true;
if (size == 3 && random.nextFloat() < 0.5F) {
BlockPos centerPos = new BlockPos(anchorX + 1, surfaceY, anchorZ + 1).above();
placeLotus(level, centerPos.above());
}
placeLotus(level, padPos);
}
return placedAny;
}
private static int rollFootprintSize(RandomSource random) {
float roll = random.nextFloat();
if (roll < 0.5F) {
return 1;
}
return roll < 0.8F ? 2 : 3;
}
private void placeLotus(WorldGenLevel level, BlockPos pos) {
if (!level.isEmptyBlock(pos)) {
private static void placeLotus(WorldGenLevel level, BlockPos pos) {
BlockState padState = level.getBlockState(pos);
if (!padState.is(AntarchyObjects.GIANT_LILY_PAD.get()) || padState.getValue(GiantLilyPadBlock.HAS_LOTUS)) {
return;
}
BlockState lotusState = AntarchyObjects.LOTUS.get().defaultBlockState();
if (lotusState.canSurvive(level, pos)) {
level.setBlock(pos, lotusState, Block.UPDATE_ALL);
}
level.setBlock(pos, padState.setValue(GiantLilyPadBlock.HAS_LOTUS, true), Block.UPDATE_CLIENTS);
}
}
@@ -0,0 +1,47 @@
package com.craisinlord.antarchy.mixins.client;
import com.craisinlord.antarchy.content.item.KrakensGraspItem;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.layers.ItemInHandLayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.HumanoidArm;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ItemInHandLayer.class)
public class KrakensGraspChargePoseMixin {
@Inject(
method = "renderArmWithItem",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/model/ArmedModel;translateToHand(Lnet/minecraft/world/entity/HumanoidArm;Lcom/mojang/blaze3d/vertex/PoseStack;)V",
shift = At.Shift.AFTER
)
)
private void antarchy$fixKrakensGraspChargePose(
LivingEntity entity, ItemStack stack, ItemDisplayContext displayContext, HumanoidArm arm,
PoseStack poseStack, MultiBufferSource buffer, int light, CallbackInfo ci) {
if (isChargingKrakensGraspWithArm(entity, arm)) {
poseStack.mulPose(Axis.XP.rotationDegrees(162.0F));
}
}
private static boolean isChargingKrakensGraspWithArm(LivingEntity entity, HumanoidArm arm) {
if (!entity.isUsingItem() || !(entity.getUseItem().getItem() instanceof KrakensGraspItem)) {
return false;
}
InteractionHand usedHand = entity.getUsedItemHand();
boolean usedHandIsMain = usedHand == InteractionHand.MAIN_HAND;
HumanoidArm usedArm = usedHandIsMain == (entity.getMainArm() == HumanoidArm.RIGHT) ? HumanoidArm.RIGHT : HumanoidArm.LEFT;
return usedArm == arm;
}
}
@@ -60,6 +60,7 @@
"client.ElytraModelAccessor",
"client.FrogRendererElythiaMixin",
"client.GameRendererSwingThroughGrassMixin",
"client.KrakensGraspChargePoseMixin",
"client.LightningBoltRendererMixin",
"client.MountedVehicleCameraMixin",
"client.ParalyzedMouseTurnMixin",
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/critter_cage_block"
}
}
}
@@ -1,220 +1,394 @@
{
"variants": {
"shape=single,tile_position=single,rotation=0": {
"model": "antarchy:block/giant_lily_pad/single/single/0"
},
"shape=single,tile_position=single,rotation=90": {
"model": "antarchy:block/giant_lily_pad/single/single/90"
},
"shape=single,tile_position=single,rotation=180": {
"model": "antarchy:block/giant_lily_pad/single/single/180"
},
"shape=single,tile_position=single,rotation=270": {
"model": "antarchy:block/giant_lily_pad/single/single/270"
},
"shape=two_by_one,tile_position=middle_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_left/0"
},
"shape=two_by_one,tile_position=middle_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_right/0"
},
"shape=two_by_one,tile_position=top_middle,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_one/top_middle/0"
},
"shape=two_by_one,tile_position=bottom_middle,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_one/bottom_middle/0"
},
"shape=two_by_two,tile_position=top_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_left/0"
},
"shape=two_by_two,tile_position=top_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_right/0"
},
"shape=two_by_two,tile_position=bottom_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_left/0"
},
"shape=two_by_two,tile_position=bottom_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_right/0"
},
"shape=three_by_three,tile_position=top_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_left/0"
},
"shape=three_by_three,tile_position=top_middle,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_middle/0"
},
"shape=three_by_three,tile_position=top_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_right/0"
},
"shape=three_by_three,tile_position=middle_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_left/0"
},
"shape=three_by_three,tile_position=center,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/center/0"
},
"shape=three_by_three,tile_position=middle_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_right/0"
},
"shape=three_by_three,tile_position=bottom_left,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_left/0"
},
"shape=three_by_three,tile_position=bottom_middle,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_middle/0"
},
"shape=three_by_three,tile_position=bottom_right,rotation=0": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_right/0"
},
"shape=two_by_one,tile_position=middle_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_left/90"
},
"shape=two_by_one,tile_position=middle_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_right/90"
},
"shape=two_by_one,tile_position=top_middle,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_one/top_middle/90"
},
"shape=two_by_one,tile_position=bottom_middle,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_one/bottom_middle/90"
},
"shape=two_by_two,tile_position=top_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_left/90"
},
"shape=two_by_two,tile_position=top_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_right/90"
},
"shape=two_by_two,tile_position=bottom_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_left/90"
},
"shape=two_by_two,tile_position=bottom_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_right/90"
},
"shape=three_by_three,tile_position=top_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_left/90"
},
"shape=three_by_three,tile_position=top_middle,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_middle/90"
},
"shape=three_by_three,tile_position=top_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_right/90"
},
"shape=three_by_three,tile_position=middle_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_left/90"
},
"shape=three_by_three,tile_position=center,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/center/90"
},
"shape=three_by_three,tile_position=middle_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_right/90"
},
"shape=three_by_three,tile_position=bottom_left,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_left/90"
},
"shape=three_by_three,tile_position=bottom_middle,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_middle/90"
},
"shape=three_by_three,tile_position=bottom_right,rotation=90": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_right/90"
},
"shape=two_by_one,tile_position=middle_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_left/180"
},
"shape=two_by_one,tile_position=middle_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_right/180"
},
"shape=two_by_one,tile_position=top_middle,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_one/top_middle/180"
},
"shape=two_by_one,tile_position=bottom_middle,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_one/bottom_middle/180"
},
"shape=two_by_two,tile_position=top_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_left/180"
},
"shape=two_by_two,tile_position=top_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_right/180"
},
"shape=two_by_two,tile_position=bottom_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_left/180"
},
"shape=two_by_two,tile_position=bottom_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_right/180"
},
"shape=three_by_three,tile_position=top_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_left/180"
},
"shape=three_by_three,tile_position=top_middle,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_middle/180"
},
"shape=three_by_three,tile_position=top_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_right/180"
},
"shape=three_by_three,tile_position=middle_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_left/180"
},
"shape=three_by_three,tile_position=center,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/center/180"
},
"shape=three_by_three,tile_position=middle_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_right/180"
},
"shape=three_by_three,tile_position=bottom_left,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_left/180"
},
"shape=three_by_three,tile_position=bottom_middle,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_middle/180"
},
"shape=three_by_three,tile_position=bottom_right,rotation=180": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_right/180"
},
"shape=two_by_one,tile_position=middle_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_left/270"
},
"shape=two_by_one,tile_position=middle_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_one/middle_right/270"
},
"shape=two_by_one,tile_position=top_middle,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_one/top_middle/270"
},
"shape=two_by_one,tile_position=bottom_middle,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_one/bottom_middle/270"
},
"shape=two_by_two,tile_position=top_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_left/270"
},
"shape=two_by_two,tile_position=top_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_two/top_right/270"
},
"shape=two_by_two,tile_position=bottom_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_left/270"
},
"shape=two_by_two,tile_position=bottom_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/two_by_two/bottom_right/270"
},
"shape=three_by_three,tile_position=top_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_left/270"
},
"shape=three_by_three,tile_position=top_middle,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_middle/270"
},
"shape=three_by_three,tile_position=top_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/top_right/270"
},
"shape=three_by_three,tile_position=middle_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_left/270"
},
"shape=three_by_three,tile_position=center,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/center/270"
},
"shape=three_by_three,tile_position=middle_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/middle_right/270"
},
"shape=three_by_three,tile_position=bottom_left,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_left/270"
},
"shape=three_by_three,tile_position=bottom_middle,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_middle/270"
},
"shape=three_by_three,tile_position=bottom_right,rotation=270": {
"model": "antarchy:block/giant_lily_pad/three_by_three/bottom_right/270"
{
"multipart": [
{
"when": {
"tile_position": "top_left",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_left"
}
},
{
"when": {
"tile_position": "top_middle",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_middle"
}
},
{
"when": {
"tile_position": "top_right",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_right"
}
},
{
"when": {
"tile_position": "middle_left",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_left"
}
},
{
"when": {
"tile_position": "center",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/center"
}
},
{
"when": {
"tile_position": "middle_right",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_right"
}
},
{
"when": {
"tile_position": "bottom_left",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_left"
}
},
{
"when": {
"tile_position": "bottom_middle",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_middle"
}
},
{
"when": {
"tile_position": "bottom_right",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_right"
}
},
{
"when": {
"tile_position": "top_left",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_left",
"y": 90
}
},
{
"when": {
"tile_position": "top_middle",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_left",
"y": 90
}
},
{
"when": {
"tile_position": "top_right",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_left",
"y": 90
}
},
{
"when": {
"tile_position": "middle_left",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_middle",
"y": 90
}
},
{
"when": {
"tile_position": "center",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/center",
"y": 90
}
},
{
"when": {
"tile_position": "middle_right",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_middle",
"y": 90
}
},
{
"when": {
"tile_position": "bottom_left",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_right",
"y": 90
}
},
{
"when": {
"tile_position": "bottom_middle",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_right",
"y": 90
}
},
{
"when": {
"tile_position": "bottom_right",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_right",
"y": 90
}
},
{
"when": {
"tile_position": "top_left",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_right",
"y": 180
}
},
{
"when": {
"tile_position": "top_middle",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_middle",
"y": 180
}
},
{
"when": {
"tile_position": "top_right",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_left",
"y": 180
}
},
{
"when": {
"tile_position": "middle_left",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_right",
"y": 180
}
},
{
"when": {
"tile_position": "center",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/center",
"y": 180
}
},
{
"when": {
"tile_position": "middle_right",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_left",
"y": 180
}
},
{
"when": {
"tile_position": "bottom_left",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_right",
"y": 180
}
},
{
"when": {
"tile_position": "bottom_middle",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_middle",
"y": 180
}
},
{
"when": {
"tile_position": "bottom_right",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_left",
"y": 180
}
},
{
"when": {
"tile_position": "top_left",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_right",
"y": 270
}
},
{
"when": {
"tile_position": "top_middle",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_right",
"y": 270
}
},
{
"when": {
"tile_position": "top_right",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_right",
"y": 270
}
},
{
"when": {
"tile_position": "middle_left",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_middle",
"y": 270
}
},
{
"when": {
"tile_position": "center",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/center",
"y": 270
}
},
{
"when": {
"tile_position": "middle_right",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_middle",
"y": 270
}
},
{
"when": {
"tile_position": "bottom_left",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/top_left",
"y": 270
}
},
{
"when": {
"tile_position": "bottom_middle",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/middle_left",
"y": 270
}
},
{
"when": {
"tile_position": "bottom_right",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/giant_lily_pad/bottom_left",
"y": 270
}
},
{
"when": {
"has_lotus": "true",
"rotation": "0"
},
"apply": {
"model": "antarchy:block/lotus_on_giant_lily_pad"
}
},
{
"when": {
"has_lotus": "true",
"rotation": "90"
},
"apply": {
"model": "antarchy:block/lotus_on_giant_lily_pad",
"y": 90
}
},
{
"when": {
"has_lotus": "true",
"rotation": "180"
},
"apply": {
"model": "antarchy:block/lotus_on_giant_lily_pad",
"y": 180
}
},
{
"when": {
"has_lotus": "true",
"rotation": "270"
},
"apply": {
"model": "antarchy:block/lotus_on_giant_lily_pad",
"y": 270
}
}
]
}
@@ -1,20 +1,52 @@
{
"variants": {
"facing=north,powered=false,waterlogged=false": { "model": "builtin/entity" },
"facing=north,powered=false,waterlogged=true": { "model": "builtin/entity" },
"facing=north,powered=true,waterlogged=false": { "model": "builtin/entity" },
"facing=north,powered=true,waterlogged=true": { "model": "builtin/entity" },
"facing=south,powered=false,waterlogged=false": { "model": "builtin/entity" },
"facing=south,powered=false,waterlogged=true": { "model": "builtin/entity" },
"facing=south,powered=true,waterlogged=false": { "model": "builtin/entity" },
"facing=south,powered=true,waterlogged=true": { "model": "builtin/entity" },
"facing=east,powered=false,waterlogged=false": { "model": "builtin/entity" },
"facing=east,powered=false,waterlogged=true": { "model": "builtin/entity" },
"facing=east,powered=true,waterlogged=false": { "model": "builtin/entity" },
"facing=east,powered=true,waterlogged=true": { "model": "builtin/entity" },
"facing=west,powered=false,waterlogged=false": { "model": "builtin/entity" },
"facing=west,powered=false,waterlogged=true": { "model": "builtin/entity" },
"facing=west,powered=true,waterlogged=false": { "model": "builtin/entity" },
"facing=west,powered=true,waterlogged=true": { "model": "builtin/entity" }
"facing=north,powered=false,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=north,powered=false,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=north,powered=true,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=north,powered=true,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=south,powered=false,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=south,powered=false,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=south,powered=true,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=south,powered=true,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=east,powered=false,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=east,powered=false,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=east,powered=true,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=east,powered=true,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=west,powered=false,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=west,powered=false,waterlogged=true": {
"model": "antarchy:block/seashell"
},
"facing=west,powered=true,waterlogged=false": {
"model": "antarchy:block/seashell"
},
"facing=west,powered=true,waterlogged=true": {
"model": "antarchy:block/seashell"
}
}
}
@@ -43,8 +43,10 @@
"block.antarchy.spider_lily": "Spider Lily",
"block.antarchy.lotus": "Lotus",
"item.antarchy.lotus": "Lotus",
"item.antarchy.critter_cage": "Critter Cage",
"block.antarchy.giant_lily_pad": "Giant Lily Pad",
"block.antarchy.seashell": "Seashell",
"block.antarchy.critter_cage_block": "Critter Cage",
"block.antarchy.hushweed": "Hushweed",
"block.antarchy.umbral_moss_block": "Umbral Moss Block",
"block.antarchy.umbral_moss_carpet": "Umbral Moss Carpet",
@@ -210,6 +212,10 @@
"item.antarchy.cloud_shark_fin": "Cloud Shark Fin",
"item.antarchy.cloud_shark_fin_soup": "Cloud Shark Fin Soup",
"tooltip.antarchy.cloud_shark_fin_soup": "Grants Strength and Slow Falling.",
"tooltip.antarchy.critter_cage.empty": "Right-click to throw",
"tooltip.antarchy.critter_cage.contains": "Contains: %s",
"tooltip.antarchy.critter_cage.release": "Right-click to release",
"tooltip.antarchy.critter_cage.place": "Shift + right-click to place",
"item.antarchy.kraken_tooth": "Kraken Tooth",
"item.antarchy.kraken_tentacle": "Kraken Tentacle",
"item.antarchy.krakens_grasp": "Kraken's Grasp",
@@ -600,6 +606,8 @@
"death.attack.kraken_mauling.player": "%1$s was dragged under by the Kraken while fighting %2$s",
"death.attack.kraken_lightning": "%1$s was struck down by the Kraken\u0027s storm",
"death.attack.kraken_lightning.player": "%1$s was struck down by the Kraken\u0027s storm while fighting %2$s",
"death.attack.rpo_launcher_blast": "%1$s was RKO-ed by an R.P.O.",
"death.attack.rpo_launcher_blast.player": "%1$s was RKO-ed by an R.P.O. while fighting %2$s",
"death.attack.nightmare_mauling": "%1$s was devoured by the Nightmare",
"death.attack.nightmare_mauling.player": "%1$s was devoured by the Nightmare while fighting %2$s",
"death.attack.basilisk_bite": "%1$s was swallowed by a Basilisk",
@@ -0,0 +1,22 @@
{
"parent": "minecraft:block/block",
"render_type": "cutout",
"textures": {
"cage": "antarchy:block/critter_cage",
"particle": "antarchy:block/critter_cage"
},
"elements": [
{
"from": [1, 0, 1],
"to": [15, 16, 15],
"faces": {
"down": { "texture": "#cage", "cullface": "down" },
"up": { "texture": "#cage", "cullface": "up" },
"north": { "texture": "#cage", "cullface": "north" },
"south": { "texture": "#cage", "cullface": "south" },
"west": { "texture": "#cage", "cullface": "west" },
"east": { "texture": "#cage", "cullface": "east" }
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_left",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_left",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_left"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_middle",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_middle",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_middle"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_right",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_right",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/bottom_right"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/center",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/center",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/center"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_left",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_left",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_left"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_right",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_right",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/middle_right"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_1x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_1x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_1x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_1x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
32,
16,
48
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
32,
16,
48
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
32,
16,
48
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
32,
16,
48
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
32,
16,
48
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
0,
32,
16,
48
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
32,
16,
48
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
0,
32,
16,
48
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
32,
32,
48
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
16,
32,
32,
48
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
32,
32,
48
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
16,
32,
32,
48
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
32,
32,
48
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
16,
32,
32,
48
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
32,
32,
48
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
16,
32,
32,
48
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
32,
48,
48
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
32,
32,
48,
48
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
32,
48,
48
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
32,
32,
48,
48
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
32,
48,
48
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
32,
32,
48,
48
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
32,
48,
48
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
32,
32,
48,
48
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
16,
32,
32
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
16,
16,
32,
32
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
16,
32,
32
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
16,
16,
32,
32
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
16,
32,
32
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
16,
16,
32,
32
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
16,
32,
32
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
16,
16,
32,
32
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
16,
16,
32
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
16,
16,
32
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
16,
16,
32
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
16,
16,
32
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
16,
16,
32
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
0,
16,
16,
32
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
16,
16,
32
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
0,
16,
16,
32
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
16,
48,
32
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
32,
16,
48,
32
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
16,
48,
32
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
32,
16,
48,
32
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
16,
48,
32
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
32,
16,
48,
32
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
16,
48,
32
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
32,
16,
48,
32
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
0,
48,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
32,
0,
48,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
0,
48,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
32,
0,
48,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
0,
48,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
32,
0,
48,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_3x3",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_3x3"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
32,
0,
48,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
32,
0,
48,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/top_left",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/top_left",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/top_left"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/top_middle",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/top_middle",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/top_middle"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -0,0 +1,25 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/tiles/three_by_three/top_right",
"top": "antarchy:block/giant_lilypad/tiles/three_by_three/top_right",
"bottom": "antarchy:block/giant_lilypad/tiles/three_by_three/top_right"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [0, 0, 16, 16],
"texture": "#top"
},
"down": {
"uv": [0, 0, 16, 16],
"texture": "#bottom"
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 270
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 270
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
16,
0,
32,
16
],
"texture": "#top",
"rotation": 90
},
"down": {
"uv": [
16,
0,
32,
16
],
"texture": "#bottom",
"rotation": 90
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 0
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 0
}
}
}
]
}
@@ -1,43 +0,0 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "antarchy:block/giant_lilypad/giant_lilypad_1x1",
"top": "antarchy:block/giant_lilypad/giant_lilypad_2x1",
"bottom": "antarchy:block/giant_lilypad/giant_lilypad_2x1"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [16, 0.25, 16],
"shade": false,
"faces": {
"up": {
"uv": [
0,
0,
16,
16
],
"texture": "#top",
"rotation": 180
},
"down": {
"uv": [
0,
0,
16,
16
],
"texture": "#bottom",
"rotation": 180
}
}
}
]
}
Loaded 100 of 184 files, more files were not shown because too many files have changed in this diff. Show more