portal guns??????????

This commit is contained in:
craisinlord committed 2026-08-19 21:25:06 -05:00
1 parent a9648fb637
commit 5596a9187d
336 files changed
+8278 -64

No files matched your search

@@ -5,6 +5,7 @@ import com.craisinlord.antarchy.content.gravity.GravityWalkNodeEvaluator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation;
import net.minecraft.world.level.pathfinder.NodeEvaluator;
import net.minecraft.world.level.pathfinder.PathFinder;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -20,7 +21,8 @@ public abstract class GroundPathNavigationMixin {
@Inject(method = "createPathFinder", at = @At("HEAD"), cancellable = true)
private void antarchy$useGravityEvaluator(int maxVisitedNodes, CallbackInfoReturnable<PathFinder> cir) {
var mob = ((PathNavigationAccessor) (Object) this).antarchy$getMob();
var accessor = (PathNavigationAccessor) (Object) this;
var mob = accessor.antarchy$getMob();
if (!AntarchyGravityApi.isGravityInverted(mob)) {
return;
}
@@ -31,6 +33,8 @@ public abstract class GroundPathNavigationMixin {
maxVisitedNodes
);
cir.setReturnValue(new PathFinder(new GravityWalkNodeEvaluator(), maxVisitedNodes));
NodeEvaluator evaluator = new GravityWalkNodeEvaluator();
accessor.antarchy$setNodeEvaluator(evaluator);
cir.setReturnValue(new PathFinder(evaluator, maxVisitedNodes));
}
}
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.mixins.gravity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.level.pathfinder.NodeEvaluator;
import net.minecraft.world.level.pathfinder.Path;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@@ -16,4 +17,7 @@ public interface PathNavigationAccessor {
@Accessor("path")
Path antarchy$getPath();
@Accessor("nodeEvaluator")
void antarchy$setNodeEvaluator(NodeEvaluator nodeEvaluator);
}
@@ -358,6 +358,11 @@ public final class AntarchyObjects {
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.world.entity.EntityType<com.craisinlord.antarchy.content.entity.WormHookProjectileEntity>> WORM_HOOK_PROJECTILE =
(Supplier<net.minecraft.world.entity.EntityType<com.craisinlord.antarchy.content.entity.WormHookProjectileEntity>>) UNBOUND;
@SuppressWarnings("unchecked")
public static Supplier<Item> WORM_HOOK = (Supplier<Item>) 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")
@@ -770,6 +775,14 @@ public final class AntarchyObjects {
CRITTER_CAGE_PROJECTILE = supplier;
}
public static void setWormHookProjectile(Supplier<net.minecraft.world.entity.EntityType<com.craisinlord.antarchy.content.entity.WormHookProjectileEntity>> supplier) {
WORM_HOOK_PROJECTILE = supplier;
}
public static void setWormHook(Supplier<Item> supplier) {
WORM_HOOK = supplier;
}
public static void setCritterCageEntityTypeComponent(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.resources.ResourceLocation>> supplier) {
CRITTER_CAGE_ENTITY_TYPE_COMPONENT = supplier;
}
@@ -1,22 +1,37 @@
package com.craisinlord.antarchy.content.block;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.worldgen.thoraxis.NadirTreeGrowers;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.tags.BlockTags;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.TagKey;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BonemealableBlock;
import net.minecraft.world.level.block.BushBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class NadirSaplingBlock extends BushBlock {
public class NadirSaplingBlock extends BushBlock implements BonemealableBlock {
public static final MapCodec<NadirSaplingBlock> CODEC = Block.simpleCodec(NadirSaplingBlock::new);
private static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
private static final TagKey<Block> SUPPORTS = TagKey.create(
Registries.BLOCK,
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "nadir_sapling_supports")
);
private static final VoxelShape SHAPE = Block.box(2.0D, 4.0D, 2.0D, 14.0D, 16.0D, 14.0D);
public NadirSaplingBlock(BlockBehaviour.Properties properties) {
super(properties);
@@ -34,7 +49,21 @@ public class NadirSaplingBlock extends BushBlock {
@Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
return state.is(BlockTags.DIRT) || state.is(Blocks.FARMLAND);
return state.is(SUPPORTS);
}
@Override
protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) {
BlockPos supportPos = pos.above();
BlockState supportState = level.getBlockState(supportPos);
return supportState.is(SUPPORTS) && supportState.isFaceSturdy(level, supportPos, Direction.DOWN);
}
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (random.nextInt(7) == 0) {
this.growConfiguredTree(level, pos, state, random);
}
}
@Override
@@ -50,4 +79,32 @@ public class NadirSaplingBlock extends BushBlock {
? super.updateShape(state, direction, neighborState, level, pos, neighborPos)
: Blocks.AIR.defaultBlockState();
}
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state) {
return true;
}
@Override
public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) {
return random.nextFloat() < 0.45F;
}
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
this.growConfiguredTree(level, pos, state, random);
}
private void growConfiguredTree(ServerLevel level, BlockPos pos, BlockState state, RandomSource random) {
Holder.Reference<ConfiguredFeature<?, ?>> feature = level.registryAccess()
.lookupOrThrow(Registries.CONFIGURED_FEATURE)
.getOrThrow(NadirTreeGrowers.NADIR_TREE);
level.removeBlock(pos, false);
if (feature.value().place(level, level.getChunkSource().getGenerator(), random, pos)) {
return;
}
level.setBlock(pos, state, Block.UPDATE_ALL);
}
}
@@ -0,0 +1,27 @@
package com.craisinlord.antarchy.content.client;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public final class WormHookTetherClientState {
private static final Map<Integer, Integer> TETHERS = new ConcurrentHashMap<>();
private WormHookTetherClientState() {
}
public static void update(int playerId, int hookId) {
if (hookId < 0) {
TETHERS.remove(playerId);
} else {
TETHERS.put(playerId, hookId);
}
}
public static Map<Integer, Integer> snapshot() {
return Map.copyOf(TETHERS);
}
public static void clear() {
TETHERS.clear();
}
}
@@ -0,0 +1,25 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.portalgun.PortalGunBlackHoleEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class PortalGunBlackHoleModel extends GeoModel<PortalGunBlackHoleEntity> {
private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/vfx/portal_gun_black_hole.png");
@Override
public ResourceLocation getModelResource(PortalGunBlackHoleEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/portal_gun_portal.geo.json");
}
@Override
public ResourceLocation getTextureResource(PortalGunBlackHoleEntity animatable) {
return TEXTURE;
}
@Override
public ResourceLocation getAnimationResource(PortalGunBlackHoleEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/portal_gun_portal.animation.json");
}
}
@@ -0,0 +1,26 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.portalgun.PortalGunPortalEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class PortalGunPortalModel extends GeoModel<PortalGunPortalEntity> {
private static final ResourceLocation BLUE_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/vfx/portal_gun_portal_blue.png");
private static final ResourceLocation ORANGE_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/vfx/portal_gun_portal_orange.png");
@Override
public ResourceLocation getModelResource(PortalGunPortalEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/portal_gun_portal.geo.json");
}
@Override
public ResourceLocation getTextureResource(PortalGunPortalEntity animatable) {
return animatable.getPortalSide() == PortalGunPortalEntity.PortalSide.BLUE ? BLUE_TEXTURE : ORANGE_TEXTURE;
}
@Override
public ResourceLocation getAnimationResource(PortalGunPortalEntity animatable) {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/portal_gun_portal.animation.json");
}
}
@@ -0,0 +1,27 @@
package com.craisinlord.antarchy.content.client.model;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.WormEntity;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.model.GeoModel;
public class WormModel extends GeoModel<WormEntity> {
private static final ResourceLocation MODEL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/worm_large.geo.json");
private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/worm/worm_large.png");
private static final ResourceLocation ANIMATION = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/worm_large.animation.json");
@Override
public ResourceLocation getModelResource(WormEntity animatable) {
return MODEL;
}
@Override
public ResourceLocation getTextureResource(WormEntity animatable) {
return TEXTURE;
}
@Override
public ResourceLocation getAnimationResource(WormEntity animatable) {
return ANIMATION;
}
}
@@ -0,0 +1,28 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.PortalGunBlackHoleModel;
import com.craisinlord.antarchy.content.portalgun.PortalGunBlackHoleEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class PortalGunBlackHoleRenderer extends GeoEntityRenderer<PortalGunBlackHoleEntity> {
public PortalGunBlackHoleRenderer(EntityRendererProvider.Context context) {
super(context, new PortalGunBlackHoleModel());
this.shadowRadius = 0.0F;
}
@Override
public void render(PortalGunBlackHoleEntity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
super.render(entity, entityYaw, partialTick, poseStack, bufferSource, 0xF000F0);
}
@Override
public @Nullable RenderType getRenderType(PortalGunBlackHoleEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) {
return RenderType.entityTranslucent(this.getTextureLocation(animatable));
}
}
@@ -0,0 +1,36 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.PortalGunPortalModel;
import com.craisinlord.antarchy.content.portalgun.PortalGunPortalEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class PortalGunPortalRenderer extends GeoEntityRenderer<PortalGunPortalEntity> {
public PortalGunPortalRenderer(EntityRendererProvider.Context context) {
super(context, new PortalGunPortalModel());
this.shadowRadius = 0.0F;
}
@Override
public void render(PortalGunPortalEntity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
Direction facing = entity.getFacingDirection();
poseStack.pushPose();
if (facing.getAxis() == Direction.Axis.Y) {
poseStack.mulPose(Axis.XP.rotationDegrees(facing == Direction.UP ? -90.0F : 90.0F));
}
super.render(entity, entityYaw, partialTick, poseStack, bufferSource, 0xF000F0);
poseStack.popPose();
}
@Override
public @Nullable RenderType getRenderType(PortalGunPortalEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) {
return RenderType.entityTranslucent(this.getTextureLocation(animatable));
}
}
@@ -0,0 +1,13 @@
package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.WormModel;
import com.craisinlord.antarchy.content.entity.WormEntity;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class WormRenderer extends GeoEntityRenderer<WormEntity> {
public WormRenderer(EntityRendererProvider.Context context) {
super(context, new WormModel());
this.shadowRadius = 0.75F;
}
}
@@ -126,6 +126,10 @@ public final class CreativeTabContents {
entry("nyxite_brick_stairs", "building_blocks"),
entry("nyxite_brick_slab", "building_blocks"),
entry("nyxite_brick_wall", "building_blocks"),
entry("mossy_nyxite_bricks", "building_blocks"),
entry("mossy_nyxite_brick_stairs", "building_blocks"),
entry("mossy_nyxite_brick_slab", "building_blocks"),
entry("mossy_nyxite_brick_wall", "building_blocks"),
entry("chiseled_nyxite", "building_blocks"),
entry("nyxite_pillar", "building_blocks"),
entry("pale_nyxite", "building_blocks"),
@@ -167,15 +171,39 @@ public final class CreativeTabContents {
entry("medium_blood_crystal_bud", "building_blocks"),
entry("large_blood_crystal_bud", "building_blocks"),
entry("myrmite", "building_blocks"),
entry("myrmite_stairs", "building_blocks"),
entry("myrmite_slab", "building_blocks"),
entry("myrmite_wall", "building_blocks"),
entry("polished_myrmite", "building_blocks"),
entry("polished_myrmite_stairs", "building_blocks"),
entry("polished_myrmite_slab", "building_blocks"),
entry("polished_myrmite_wall", "building_blocks"),
entry("chiseled_myrmite", "building_blocks"),
entry("myrmite_bricks", "building_blocks"),
entry("myrmite_brick_stairs", "building_blocks"),
entry("myrmite_brick_slab", "building_blocks"),
entry("myrmite_brick_wall", "building_blocks"),
entry("mossy_myrmite_bricks", "building_blocks"),
entry("mossy_myrmite_brick_stairs", "building_blocks"),
entry("mossy_myrmite_brick_slab", "building_blocks"),
entry("mossy_myrmite_brick_wall", "building_blocks"),
entry("myrmite_pillar", "building_blocks"),
entry("biomite", "building_blocks"),
entry("biomite_turf", "building_blocks"),
entry("biowart", "building_blocks"),
entry("biowart_tendrils", "building_blocks"),
entry("loam", "natural_blocks"),
entry("loam", "building_blocks"),
entry("packed_loam", "building_blocks"),
entry("loam_bricks", "building_blocks"),
entry("loam_brick_stairs", "building_blocks"),
entry("loam_brick_slab", "building_blocks"),
entry("loam_brick_wall", "building_blocks"),
entry("chiseled_loam_bricks", "building_blocks"),
entry("broodstone", "building_blocks"),
entry("polished_broodstone", "building_blocks"),
entry("chiseled_broodstone", "building_blocks"),
entry("broodstone_bricks", "building_blocks"),
entry("mossy_broodstone_bricks", "building_blocks"),
entry("broodstone_stairs", "building_blocks"),
entry("broodstone_slab", "building_blocks"),
entry("broodstone_wall", "building_blocks"),
@@ -185,6 +213,9 @@ public final class CreativeTabContents {
entry("broodstone_brick_stairs", "building_blocks"),
entry("broodstone_brick_slab", "building_blocks"),
entry("broodstone_brick_wall", "building_blocks"),
entry("mossy_broodstone_brick_stairs", "building_blocks"),
entry("mossy_broodstone_brick_slab", "building_blocks"),
entry("mossy_broodstone_brick_wall", "building_blocks"),
entry("broodstone_pillar", "building_blocks"),
entry("myrmite_coal_ore", "building_blocks"),
entry("broodstone_uranium_ore", "building_blocks"),
@@ -275,10 +306,12 @@ public final class CreativeTabContents {
entry("antiwater_bucket", "tools_and_utilities"),
entry("lumen_bucket", "tools_and_utilities"),
entry("cloud_bucket", "tools_and_utilities"),
entry("cheep_bucket", "tools_and_utilities"),
entry("lucid_anchor", "tools_and_utilities"),
entry("reverie_bottle", "tools_and_utilities"),
entry("glimmer_bottle", "tools_and_utilities"),
entry("critter_cage", "tools_and_utilities"),
entry("worm_hook", "tools_and_utilities"),
entry("ultimate_pickaxe", "tools_and_utilities"),
entry("ultimate_axe", "tools_and_utilities"),
entry("ultimate_shovel", "tools_and_utilities"),
@@ -299,6 +332,7 @@ public final class CreativeTabContents {
entry("shrink_ray", "combat"),
entry("growth_ray", "combat"),
entry("gravity_gun", "combat"),
entry("portal_gun", "combat"),
entry("water_cannon", "combat"),
entry("attitude_adjuster", "combat"),
entry("lucid_pearl", "combat"),
@@ -340,10 +374,12 @@ public final class CreativeTabContents {
entry("nightmare_scale", "ingredients"),
entry("molevore_nose", "ingredients"),
entry("moleworm", "ingredients"),
entry("worm_tooth", "ingredients"),
entry("mud_pie", "ingredients"),
entry("lucid_eye", "ingredients"),
entry("blood_crystal_shard", "ingredients"),
entry("tigers_eye", "ingredients"),
entry("tigers_eye_block", "building_blocks"),
entry("blood_crystal_apple", "ingredients"),
entry("spirit_apple", "ingredients"),
entry("mantis_claw", "combat"),
@@ -377,6 +413,7 @@ public final class CreativeTabContents {
entry("cooked_bug_meat", "ingredients"),
entry("broodfruit", "ingredients"),
entry("cheep", "ingredients"),
entry("cooked_cheep", "ingredients"),
entry("root_beer", "ingredients"),
entry("rainbow_sugar", "ingredients"),
entry("big_bertha_blade", "ingredients"),
@@ -393,6 +430,7 @@ public final class CreativeTabContents {
entry("rainbow_ant_spawn_egg", "spawn_eggs"),
entry("termite_spawn_egg", "spawn_eggs"),
entry("moleworm_spawn_egg", "spawn_eggs"),
entry("worm_spawn_egg", "spawn_eggs"),
entry("mantis_spawn_egg", "spawn_eggs"),
entry("alpha_mantis_spawn_egg", "spawn_eggs"),
entry("rolly_polly_spawn_egg", "spawn_eggs"),
@@ -2,6 +2,8 @@ package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.config.AntarchySettings;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.damagesource.DamageSource;
@@ -24,6 +26,7 @@ import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public class CheepEntity extends AbstractFish implements GeoEntity {
private static final ResourceLocation CHEEP_BUCKET_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "cheep_bucket");
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation SWIM_ANIM = RawAnimation.begin().thenLoop("swim");
private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenLoop("attack");
@@ -56,7 +59,7 @@ public class CheepEntity extends AbstractFish implements GeoEntity {
@Override
public ItemStack getBucketItemStack() {
return new ItemStack(Items.WATER_BUCKET);
return new ItemStack(BuiltInRegistries.ITEM.getOptional(CHEEP_BUCKET_ID).orElse(Items.WATER_BUCKET));
}
@Override
@@ -0,0 +1,158 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.goal.FloatGoal;
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
import net.minecraft.world.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal;
import net.minecraft.world.entity.ai.goal.RandomStrollGoal;
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.core.BlockPos;
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.animation.AnimationController;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public class WormEntity extends Monster implements GeoEntity {
private static final EntityDataAccessor<Integer> ANIMATION_STATE = SynchedEntityData.defineId(WormEntity.class, EntityDataSerializers.INT);
private static final int ANIM_INGROUND = 0;
private static final int ANIM_CRAWL = 1;
private static final int ANIM_ATTACK = 2;
private static final RawAnimation INGROUND_ANIM = RawAnimation.begin().thenLoop("inground");
private static final RawAnimation CRAWL_ANIM = RawAnimation.begin().thenLoop("crawl");
private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenPlay("attack");
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private int attackAnimationTicks;
public WormEntity(EntityType<? extends WormEntity> entityType, Level level) {
super(entityType, level);
this.xpReward = 8;
}
public static AttributeSupplier.Builder createAttributes() {
return Monster.createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 36.0D)
.add(Attributes.MOVEMENT_SPEED, 0.22D)
.add(Attributes.ATTACK_DAMAGE, 7.0D)
.add(Attributes.FOLLOW_RANGE, 28.0D)
.add(Attributes.KNOCKBACK_RESISTANCE, 0.45D);
}
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
builder.define(ANIMATION_STATE, ANIM_INGROUND);
}
@Override
protected void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this));
this.goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.05D, false));
this.goalSelector.addGoal(3, new RandomStrollGoal(this, 0.8D));
this.goalSelector.addGoal(4, new LookAtPlayerGoal(this, Player.class, 8.0F));
this.goalSelector.addGoal(5, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "main_controller", 0, this::mainAnimController)
.triggerableAnim("attack", ATTACK_ANIM));
}
private PlayState mainAnimController(AnimationState<WormEntity> state) {
return switch (this.entityData.get(ANIMATION_STATE)) {
case ANIM_CRAWL -> state.setAndContinue(CRAWL_ANIM);
case ANIM_ATTACK -> state.setAndContinue(ATTACK_ANIM);
default -> state.setAndContinue(INGROUND_ANIM);
};
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
@Override
public boolean doHurtTarget(Entity target) {
boolean hurt = super.doHurtTarget(target);
if (hurt && target instanceof LivingEntity) {
this.attackAnimationTicks = 45;
this.entityData.set(ANIMATION_STATE, ANIM_ATTACK);
this.triggerAnim("main_controller", "attack");
this.playSound(AntarchySoundEvents.MOLEWORM_ATTACK.get(), 0.45F, 0.85F + this.random.nextFloat() * 0.2F);
}
return hurt;
}
@Override
public void tick() {
super.tick();
if (this.level().isClientSide) {
return;
}
if (this.attackAnimationTicks > 0) {
this.attackAnimationTicks--;
}
this.updateAnimationState();
}
private void updateAnimationState() {
if (this.attackAnimationTicks > 0) {
this.entityData.set(ANIMATION_STATE, ANIM_ATTACK);
return;
}
Vec3 velocity = this.getDeltaMovement();
if (this.getTarget() != null || velocity.horizontalDistanceSqr() > 1.0E-4D || this.walkAnimation.speed() > 0.03F) {
this.entityData.set(ANIMATION_STATE, ANIM_CRAWL);
return;
}
this.entityData.set(ANIMATION_STATE, ANIM_INGROUND);
}
@Override
protected Entity.MovementEmission getMovementEmission() {
return Entity.MovementEmission.EVENTS;
}
@Override
protected SoundEvent getAmbientSound() {
return AntarchySoundEvents.MOLEWORM_AMBIENT.get();
}
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return AntarchySoundEvents.MOLEWORM_HURT.get();
}
@Override
protected SoundEvent getDeathSound() {
return AntarchySoundEvents.MOLEWORM_HURT.get();
}
@Override
protected void playStepSound(BlockPos pos, BlockState state) {
this.playSound(AntarchySoundEvents.MOLEWORM_DIG.get(), 0.15F, 0.9F + this.random.nextFloat() * 0.2F);
}
}
@@ -0,0 +1,91 @@
package com.craisinlord.antarchy.content.entity;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.item.WormHookTetherManager;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;
/**
* Thrown out by the worm hook item. Sticks into the first block it hits and stays there,
* anchoring a swing rope back to the thrower until the player detaches.
*/
public class WormHookProjectileEntity extends ThrowableItemProjectile {
private boolean stuck = false;
public WormHookProjectileEntity(EntityType<? extends WormHookProjectileEntity> entityType, Level level) {
super(entityType, level);
}
public WormHookProjectileEntity(EntityType<? extends WormHookProjectileEntity> entityType, LivingEntity owner, Level level) {
super(entityType, owner, level);
}
@Override
protected Item getDefaultItem() {
return AntarchyObjects.WORM_HOOK.get();
}
@Override
public void tick() {
if (this.stuck) {
this.setDeltaMovement(net.minecraft.world.phys.Vec3.ZERO);
}
super.tick();
if (!this.level().isClientSide && !this.stuck && this.tickCount > 200) {
this.discard();
}
}
@Override
protected void onHit(HitResult hitResult) {
if (this.level().isClientSide || this.stuck) {
return;
}
if (hitResult instanceof EntityHitResult) {
this.discard();
return;
}
if (!(hitResult instanceof BlockHitResult blockHit)) {
return;
}
if (!(this.getOwner() instanceof ServerPlayer player)) {
this.discard();
return;
}
this.stuck = true;
this.setDeltaMovement(net.minecraft.world.phys.Vec3.ZERO);
this.setNoGravity(true);
this.setPos(blockHit.getLocation());
boolean attached = WormHookTetherManager.attach(player, this);
if (!attached) {
this.discard();
return;
}
this.level().playSound(null, this.blockPosition(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.PLAYERS, 0.8F, 1.4F);
}
public boolean isStuck() {
return this.stuck;
}
public void removeHook() {
this.discard();
}
}
@@ -0,0 +1,307 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.model.ResourceBackedGeoItemModel;
import com.craisinlord.antarchy.content.client.renderer.AnimatedHeldItemRenderer;
import com.craisinlord.antarchy.content.network.PortalGunPrimaryPayload;
import com.craisinlord.antarchy.content.portalgun.PortalGunBlackHoleEntity;
import com.craisinlord.antarchy.content.portalgun.PortalGunPortalEntity;
import com.craisinlord.antarchy.content.portalgun.PortalGunSavedData;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.function.Consumer;
import java.util.function.Supplier;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
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.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.EquipmentSlot;
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.TooltipFlag;
import net.minecraft.world.item.UseAnim;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
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.animation.Animation;
import software.bernie.geckolib.animation.AnimationController;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.constant.DataTickets;
import software.bernie.geckolib.util.GeckoLibUtil;
public class PortalGunItem extends Item implements GeoItem {
private static final String LED_CONTROLLER = "led_controller";
private static final String FIRE_CONTROLLER = "fire_controller";
private static final String LAST_SIDE_TAG = "antarchy.portal_gun_last_side";
private static final ResourceLocation MODEL_LOCATION = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/portal_gun.geo.json");
private static final ResourceLocation TEXTURE_LOCATION = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/models/item/portal_gun.png");
private static final ResourceLocation ANIMATION_LOCATION = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/portal_gun.animation.json");
private final Supplier<? extends EntityType<? extends PortalGunPortalEntity>> portalType;
private final Supplier<? extends EntityType<? extends PortalGunBlackHoleEntity>> blackHoleType;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
public PortalGunItem(Item.Properties properties, Supplier<? extends EntityType<? extends PortalGunPortalEntity>> portalType, Supplier<? extends EntityType<? extends PortalGunBlackHoleEntity>> blackHoleType) {
super(properties);
this.portalType = portalType;
this.blackHoleType = blackHoleType;
GeoItem.registerSyncedAnimatable(this);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand usedHand) {
ItemStack stack = player.getItemInHand(usedHand);
if (level.isClientSide) {
return InteractionResultHolder.consume(stack);
}
ServerLevel serverLevel = (ServerLevel) level;
if (player.isShiftKeyDown()) {
PortalGunSavedData.clearAllPortals(serverLevel.getServer(), player.getUUID());
this.setLastSide(stack, null);
level.playSound(null, player.getX(), player.getY(), player.getZ(), PortalGunPortalEntity.sound("portal_fizzle", SoundEvents.ENDER_CHEST_CLOSE), SoundSource.PLAYERS, 0.6F, 1.0F);
return InteractionResultHolder.consume(stack);
}
boolean fired = this.firePortal(serverLevel, player, stack, PortalGunPortalEntity.PortalSide.ORANGE);
return fired ? InteractionResultHolder.consume(stack) : InteractionResultHolder.fail(stack);
}
public void firePrimary(ServerLevel level, ServerPlayer player, ItemStack stack) {
this.firePortal(level, player, stack, PortalGunPortalEntity.PortalSide.BLUE);
}
private boolean firePortal(ServerLevel level, Player player, ItemStack stack, PortalGunPortalEntity.PortalSide side) {
BlockHitResult hitResult = this.raycast(level, player);
if (hitResult.getType() == HitResult.Type.MISS) {
if (this.tryShootMoon(level, player, stack, side)) {
return true;
}
level.playSound(null, player.getX(), player.getY(), player.getZ(), PortalGunPortalEntity.sound("portal_gun_invalid_surface", SoundEvents.DISPENSER_FAIL), SoundSource.PLAYERS, 0.55F, 1.0F);
return false;
}
this.spawnShotTrail(level, player, hitResult.getLocation(), side);
Placement placement = this.findPlacement(level, player, hitResult);
if (placement == null) {
level.playSound(null, player.getX(), player.getY(), player.getZ(), PortalGunPortalEntity.sound("portal_gun_invalid_surface", SoundEvents.DISPENSER_FAIL), SoundSource.PLAYERS, 0.55F, 1.0F);
return false;
}
PortalGunPortalEntity portal = new PortalGunPortalEntity(this.portalType.get(), level);
portal.configure(player.getUUID(), side, placement.facing(), placement.upAxis(), placement.supportOrigin());
portal.moveTo(placement.center().x, placement.center().y, placement.center().z, placement.yaw(), 0.0F);
level.addFreshEntity(portal);
PortalGunSavedData.setPortal(level.getServer(), player.getUUID(), side, portal.getUUID());
PortalGunPortalEntity other = this.findCounterpart(level, player.getUUID(), side);
if (other != null) {
portal.linkTo(other);
other.linkTo(portal);
}
this.setLastSide(stack, side);
this.triggerFireAnimation(level, player, stack);
stack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND);
player.awardStat(Stats.ITEM_USED.get(this));
player.getCooldowns().addCooldown(this, 6);
String firePath = side == PortalGunPortalEntity.PortalSide.BLUE ? "portal_gun_fire_blue" : "portal_gun_fire_orange";
String openPath = side == PortalGunPortalEntity.PortalSide.BLUE ? "portal_open_blue" : "portal_open_orange";
level.playSound(null, player.getX(), player.getY(), player.getZ(), PortalGunPortalEntity.sound(firePath, SoundEvents.BEACON_ACTIVATE), SoundSource.PLAYERS, 0.65F, side == PortalGunPortalEntity.PortalSide.BLUE ? 1.15F : 0.88F);
level.playSound(null, portal.getX(), portal.getY(), portal.getZ(), PortalGunPortalEntity.sound(openPath, SoundEvents.END_PORTAL_SPAWN), SoundSource.PLAYERS, 0.45F, side == PortalGunPortalEntity.PortalSide.BLUE ? 1.05F : 0.92F);
return true;
}
private boolean tryShootMoon(ServerLevel level, Player player, ItemStack stack, PortalGunPortalEntity.PortalSide side) {
if (!level.dimensionType().hasSkyLight() || !level.isNight() || player.getXRot() > -40.0F) {
return false;
}
PortalGunPortalEntity counterpart = this.findCounterpart(level, player.getUUID(), side);
Vec3 spawnPos;
if (counterpart != null) {
spawnPos = counterpart.position();
counterpart.discard();
} else {
spawnPos = player.getEyePosition().add(player.getLookAngle().scale(20.0D));
}
PortalGunBlackHoleEntity blackHole = new PortalGunBlackHoleEntity(this.blackHoleType.get(), level);
blackHole.configure(player.getUUID());
blackHole.moveTo(spawnPos.x, spawnPos.y, spawnPos.z, 0.0F, 0.0F);
level.addFreshEntity(blackHole);
this.setLastSide(stack, side);
this.triggerFireAnimation(level, player, stack);
stack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND);
player.awardStat(Stats.ITEM_USED.get(this));
player.getCooldowns().addCooldown(this, 6);
level.playSound(null, spawnPos.x, spawnPos.y, spawnPos.z, PortalGunPortalEntity.sound("portal_gun_black_hole", SoundEvents.WARDEN_SONIC_BOOM), SoundSource.PLAYERS, 0.6F, 0.6F);
this.spawnShotTrail(level, player, spawnPos, side);
return true;
}
private void spawnShotTrail(ServerLevel level, Player player, Vec3 endPos, PortalGunPortalEntity.PortalSide side) {
Vec3 start = player.getEyePosition();
Vec3 delta = endPos.subtract(start);
double length = delta.length();
int steps = (int) Math.max(4.0D, Math.min(48.0D, length * 2.0D));
net.minecraft.core.particles.ParticleOptions particle = side == PortalGunPortalEntity.PortalSide.BLUE ? ParticleTypes.SOUL_FIRE_FLAME : ParticleTypes.FLAME;
for (int i = 0; i <= steps; i++) {
double t = (double) i / steps;
Vec3 point = start.add(delta.scale(t));
level.sendParticles(particle, point.x, point.y, point.z, 1, 0.0D, 0.0D, 0.0D, 0.0D);
}
}
private PortalGunPortalEntity findCounterpart(ServerLevel level, UUID owner, PortalGunPortalEntity.PortalSide side) {
PortalGunPortalEntity.PortalSide otherSide = side == PortalGunPortalEntity.PortalSide.BLUE ? PortalGunPortalEntity.PortalSide.ORANGE : PortalGunPortalEntity.PortalSide.BLUE;
Optional<UUID> otherId = PortalGunSavedData.getPortalId(level.getServer(), owner, otherSide);
if (otherId.isEmpty()) {
return null;
}
Entity entity = level.getEntity(otherId.get());
return entity instanceof PortalGunPortalEntity portal ? portal : null;
}
private BlockHitResult raycast(Level level, Player player) {
Vec3 start = player.getEyePosition();
Vec3 end = start.add(player.getLookAngle().scale(64.0D));
return level.clip(new ClipContext(start, end, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, player));
}
private Placement findPlacement(Level level, Player player, BlockHitResult hitResult) {
Direction facing = hitResult.getDirection();
Direction heightAxis;
float yaw;
if (facing.getAxis() == Direction.Axis.Y) {
heightAxis = Direction.fromYRot(player.getYRot());
yaw = heightAxis.toYRot();
} else {
heightAxis = Direction.UP;
yaw = facing.toYRot();
}
BlockPos hitPos = hitResult.getBlockPos();
for (int offset = -1; offset <= 0; offset++) {
BlockPos supportOrigin = hitPos.relative(heightAxis, offset);
if (this.canPlaceAt(level, supportOrigin, facing, heightAxis)) {
Vec3 firstCellCenter = supportOrigin.relative(facing).getCenter();
Vec3 halfStep = Vec3.atLowerCornerOf(heightAxis.getNormal()).scale(0.5D);
Vec3 center = firstCellCenter.add(halfStep);
return new Placement(center, facing, heightAxis, yaw, supportOrigin);
}
}
return null;
}
private boolean canPlaceAt(Level level, BlockPos supportOrigin, Direction facing, Direction heightAxis) {
for (int h = 0; h < 2; h++) {
BlockPos supportPos = supportOrigin.relative(heightAxis, h);
BlockPos airPos = supportPos.relative(facing);
BlockState supportState = level.getBlockState(supportPos);
BlockState airState = level.getBlockState(airPos);
FluidState fluidState = level.getFluidState(airPos);
if (!supportState.isFaceSturdy(level, supportPos, facing)) {
return false;
}
if (!airState.isAir() && !airState.canBeReplaced()) {
return false;
}
if (!fluidState.isEmpty()) {
return false;
}
}
return true;
}
private void setLastSide(ItemStack stack, PortalGunPortalEntity.PortalSide side) {
if (side == null) {
net.minecraft.world.item.component.CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> tag.remove(LAST_SIDE_TAG));
return;
}
net.minecraft.world.item.component.CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> tag.putString(LAST_SIDE_TAG, side.name()));
}
private PortalGunPortalEntity.PortalSide getLastSide(ItemStack stack) {
net.minecraft.world.item.component.CustomData customData = stack.get(DataComponents.CUSTOM_DATA);
if (customData == null) {
return null;
}
String sideName = customData.copyTag().getString(LAST_SIDE_TAG);
if (PortalGunPortalEntity.PortalSide.BLUE.name().equals(sideName)) {
return PortalGunPortalEntity.PortalSide.BLUE;
}
if (PortalGunPortalEntity.PortalSide.ORANGE.name().equals(sideName)) {
return PortalGunPortalEntity.PortalSide.ORANGE;
}
return null;
}
private void triggerFireAnimation(ServerLevel level, LivingEntity livingEntity, ItemStack stack) {
long animatableId = GeoItem.getOrAssignId(stack, level);
triggerAnim(livingEntity, animatableId, FIRE_CONTROLLER, "fire");
}
@Override
public UseAnim getUseAnimation(ItemStack stack) {
return UseAnim.NONE;
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.portal_gun.primary").withStyle(ChatFormatting.GRAY));
tooltipComponents.add(Component.translatable("tooltip.antarchy.portal_gun.secondary").withStyle(ChatFormatting.GRAY));
tooltipComponents.add(Component.translatable("tooltip.antarchy.portal_gun.reset").withStyle(ChatFormatting.DARK_GRAY));
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, LED_CONTROLLER, state -> {
ItemStack stack = state.getData(DataTickets.ITEMSTACK);
PortalGunPortalEntity.PortalSide side = stack == null ? null : this.getLastSide(stack);
String animation = side == null ? "off_led" : side == PortalGunPortalEntity.PortalSide.BLUE ? "blue_led" : "orange_led";
return state.setAndContinue(RawAnimation.begin().thenLoop(animation));
}));
controllers.add(new AnimationController<>(this, FIRE_CONTROLLER, state -> PlayState.STOP)
.triggerableAnim("fire", RawAnimation.begin().then("fire", Animation.LoopType.PLAY_ONCE)));
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
@Override
public void createGeoRenderer(Consumer<GeoRenderProvider> consumer) {
consumer.accept(new GeoRenderProvider() {
private AnimatedHeldItemRenderer<PortalGunItem> 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;
}
});
}
private record Placement(Vec3 center, Direction facing, Direction upAxis, float yaw, BlockPos supportOrigin) {
}
}
@@ -0,0 +1,52 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.entity.WormHookProjectileEntity;
import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
public final class WormHookItem extends Item {
public WormHookItem(Item.Properties properties) {
super(properties);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, net.minecraft.world.entity.player.Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
if (!(player instanceof ServerPlayer serverPlayer)) {
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide());
}
if (WormHookTetherManager.hasTether(serverPlayer)) {
WormHookTetherManager.detach(serverPlayer);
return InteractionResultHolder.sidedSuccess(stack, false);
}
WormHookProjectileEntity hook = new WormHookProjectileEntity(AntarchyObjects.WORM_HOOK_PROJECTILE.get(), player, level);
hook.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 2.2F, 0.5F);
level.addFreshEntity(hook);
stack.hurtAndBreak(1, serverPlayer, LivingEntity.getSlotForHand(hand));
level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.PLAYERS, 0.7F, 0.9F);
return InteractionResultHolder.sidedSuccess(stack, false);
}
@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
tooltipComponents.add(Component.translatable("tooltip.antarchy.worm_hook.throw").withStyle(ChatFormatting.GRAY));
tooltipComponents.add(Component.translatable("tooltip.antarchy.worm_hook.reel").withStyle(ChatFormatting.DARK_GRAY));
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
}
}
@@ -0,0 +1,166 @@
package com.craisinlord.antarchy.content.item;
import com.craisinlord.antarchy.content.entity.WormHookProjectileEntity;
import com.craisinlord.antarchy.content.util.WormHookRope;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
/**
* Server-authoritative swing physics for the worm hook: pulls the holding player taut against
* a rope anchored to a stuck {@link WormHookProjectileEntity}, wrapping the rope around block
* corners via {@link WormHookRope} so the swing radius shortens realistically when the player
* swings around an obstacle.
*/
public final class WormHookTetherManager {
private static final double DEFAULT_MAX_LEN = 24.0D;
private static final double MIN_LEN = 2.0D;
private static final double REEL_SPEED = 0.12D;
private static final double BREAK_RANGE_MULTIPLIER = 1.5D;
private static final double SNAP_BUFFER = 4.0D;
private static final double PULL_CORRECTION = 0.35D;
private static final Map<UUID, TetherState> TETHERS = new ConcurrentHashMap<>();
private WormHookTetherManager() {
}
public static boolean hasTether(ServerPlayer player) {
return TETHERS.containsKey(player.getUUID());
}
public static WormHookProjectileEntity getHook(ServerPlayer player) {
TetherState state = TETHERS.get(player.getUUID());
if (state == null) {
return null;
}
Entity hook = player.serverLevel().getEntity(state.hookEntityId);
return hook instanceof WormHookProjectileEntity wormHook ? wormHook : null;
}
public static boolean attach(ServerPlayer player, WormHookProjectileEntity hook) {
clear(player);
double dist = player.getEyePosition().distanceTo(hook.position());
if (dist < MIN_LEN) {
return false;
}
TetherState state = new TetherState(hook.getId(), Math.max(DEFAULT_MAX_LEN, dist));
state.rope = new WormHookRope(hook.position(), player.getEyePosition());
TETHERS.put(player.getUUID(), state);
WormHookTetherSync.send(player, hook.getId());
return true;
}
public static void detach(ServerPlayer player) {
WormHookProjectileEntity hook = getHook(player);
clear(player);
if (hook != null) {
hook.removeHook();
}
player.level().playSound(null, player.blockPosition(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.PLAYERS, 0.7F, 1.2F);
}
private static void clear(ServerPlayer player) {
TetherState removed = TETHERS.remove(player.getUUID());
if (removed != null) {
WormHookTetherSync.send(player, -1);
}
}
public static void tick(ServerPlayer player) {
TetherState state = TETHERS.get(player.getUUID());
if (state == null) {
return;
}
WormHookProjectileEntity hook = getHook(player);
if (!isValid(player, hook, state)) {
clear(player);
if (hook != null) {
hook.removeHook();
}
return;
}
if (player.isShiftKeyDown()) {
state.maxLen = Math.max(MIN_LEN, state.maxLen - REEL_SPEED);
}
Vec3 anchor = hook.position();
Vec3 playerEye = player.getEyePosition();
state.rope.update(hook, anchor, playerEye, state.maxLen);
Vec3 pivot = state.rope.getPivot();
double consumed = state.rope.getConsumedLength();
double remaining = Math.max(0.5D, state.maxLen - consumed);
Vec3 toPlayer = playerEye.subtract(pivot);
double dist = toPlayer.length();
if (dist < 0.001D) {
return;
}
if (dist <= remaining) {
return;
}
double overshoot = dist - remaining;
if (overshoot > SNAP_BUFFER) {
clear(player);
hook.removeHook();
player.level().playSound(null, player.blockPosition(), SoundEvents.ITEM_BREAK, SoundSource.PLAYERS, 0.8F, 0.9F);
return;
}
Vec3 direction = toPlayer.scale(1.0D / dist);
Vec3 motion = player.getDeltaMovement();
double outward = motion.dot(direction);
if (outward > 0) {
motion = motion.subtract(direction.scale(outward));
}
Vec3 correction = direction.scale(-overshoot * PULL_CORRECTION);
Vec3 newMotion = motion.add(correction);
newMotion = new Vec3(newMotion.x, Mth.clamp(newMotion.y, -1.0D, 1.0D), newMotion.z);
player.setDeltaMovement(newMotion);
player.hurtMarked = true;
player.fallDistance = 0;
}
private static boolean isValid(ServerPlayer player, WormHookProjectileEntity hook, TetherState state) {
double breakRange = state.maxLen * BREAK_RANGE_MULTIPLIER;
return player.isAlive()
&& hook != null
&& hook.isAlive()
&& !hook.isRemoved()
&& hook.isStuck()
&& player.level() == hook.level()
&& isHoldingHook(player)
&& player.distanceToSqr(hook) <= breakRange * breakRange;
}
private static boolean isHoldingHook(ServerPlayer player) {
return player.getMainHandItem().getItem() instanceof WormHookItem
|| player.getOffhandItem().getItem() instanceof WormHookItem;
}
private static final class TetherState {
private final int hookEntityId;
private double maxLen;
private WormHookRope rope;
private TetherState(int hookEntityId, double maxLen) {
this.hookEntityId = hookEntityId;
this.maxLen = maxLen;
}
}
}
@@ -0,0 +1,22 @@
package com.craisinlord.antarchy.content.item;
import java.util.function.BiConsumer;
import net.minecraft.server.level.ServerPlayer;
public final class WormHookTetherSync {
private static final BiConsumer<ServerPlayer, Integer> NOOP = (player, hookId) -> {
};
private static volatile BiConsumer<ServerPlayer, Integer> sink = NOOP;
private WormHookTetherSync() {
}
public static void setSink(BiConsumer<ServerPlayer, Integer> sink) {
WormHookTetherSync.sink = sink == null ? NOOP : sink;
}
public static void send(ServerPlayer player, int hookId) {
sink.accept(player, hookId);
}
}
@@ -0,0 +1,17 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record PortalGunPrimaryPayload() implements CustomPacketPayload {
public static final Type<PortalGunPrimaryPayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "portal_gun_primary"));
public static final StreamCodec<ByteBuf, PortalGunPrimaryPayload> STREAM_CODEC = StreamCodec.unit(new PortalGunPrimaryPayload());
@Override
public Type<PortalGunPrimaryPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,26 @@
package com.craisinlord.antarchy.content.network;
import com.craisinlord.antarchy.Antarchy;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record WormHookTetherPayload(int playerId, int hookId) implements CustomPacketPayload {
public static final Type<WormHookTetherPayload> TYPE =
new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "worm_hook_tether"));
public static final StreamCodec<ByteBuf, WormHookTetherPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.VAR_INT,
WormHookTetherPayload::playerId,
ByteBufCodecs.VAR_INT,
WormHookTetherPayload::hookId,
WormHookTetherPayload::new
);
@Override
public Type<WormHookTetherPayload> type() {
return TYPE;
}
}
@@ -0,0 +1,197 @@
package com.craisinlord.antarchy.content.portalgun;
import java.util.List;
import java.util.UUID;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.damagesource.DamageSource;
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.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
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.animation.AnimationController;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public class PortalGunBlackHoleEntity extends Entity implements GeoEntity {
private static final RawAnimation OPEN_ANIM = RawAnimation.begin().thenPlay("open");
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation CLOSE_ANIM = RawAnimation.begin().thenPlay("close");
private static final int OPEN_TICKS = 10;
private static final int CLOSE_TICKS = 12;
private static final int LIFETIME_TICKS = 20 * 12;
private static final double PULL_RADIUS = 6.0D;
private static final double CONSUME_RADIUS = 0.6D;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private UUID ownerId;
private int ageTicks;
private boolean closing;
public PortalGunBlackHoleEntity(EntityType<? extends PortalGunBlackHoleEntity> entityType, Level level) {
super(entityType, level);
this.setInvulnerable(true);
this.noPhysics = true;
this.noCulling = true;
}
@Override
protected void defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) {
}
public void configure(UUID ownerId) {
this.ownerId = ownerId;
}
@Override
public void tick() {
super.tick();
this.ageTicks++;
this.setYRot(this.getYRot() + 6.0F);
if (this.level().isClientSide) {
return;
}
if (!(this.level() instanceof ServerLevel serverLevel)) {
return;
}
if (this.ageTicks >= LIFETIME_TICKS - CLOSE_TICKS) {
this.closing = true;
}
if (this.ageTicks >= LIFETIME_TICKS) {
this.discard();
return;
}
this.pullNearby(serverLevel);
if (this.ageTicks % 10 == 0) {
serverLevel.playSound(null, this.blockPosition(), SoundEvents.PORTAL_AMBIENT, SoundSource.HOSTILE, 0.5F, 0.6F);
}
}
private void pullNearby(ServerLevel level) {
AABB pullBox = this.getBoundingBox().inflate(PULL_RADIUS);
List<Entity> nearby = level.getEntities(this, pullBox, this::canAffect);
for (Entity entity : nearby) {
Vec3 toCenter = this.position().subtract(entity.position());
double distance = toCenter.length();
if (distance < 1.0E-4D) {
continue;
}
if (distance <= CONSUME_RADIUS) {
this.consume(entity);
continue;
}
double strength = 0.09D * (1.0D - Math.min(distance / PULL_RADIUS, 1.0D)) + 0.02D;
Vec3 pull = toCenter.normalize().scale(strength);
entity.setDeltaMovement(entity.getDeltaMovement().add(pull));
entity.hasImpulse = true;
entity.fallDistance = 0.0F;
}
}
private boolean canAffect(Entity entity) {
if (!entity.isAlive() || entity instanceof PortalGunPortalEntity || entity instanceof PortalGunBlackHoleEntity) {
return false;
}
if (entity instanceof Player player && player.isCreative()) {
return false;
}
return entity instanceof ItemEntity || entity instanceof LivingEntity;
}
private void consume(Entity entity) {
if (entity instanceof ItemEntity itemEntity) {
itemEntity.discard();
} else if (entity instanceof Player) {
entity.teleportTo(this.getX(), this.getY(), this.getZ());
entity.setDeltaMovement(Vec3.ZERO);
} else if (entity instanceof LivingEntity living) {
living.hurt(this.damageSources().magic(), 4.0F);
entity.setDeltaMovement(entity.getDeltaMovement().scale(0.1D));
}
}
@Override
public AABB getBoundingBoxForCulling() {
return this.getBoundingBox().inflate(2.0D);
}
@Override
protected AABB makeBoundingBox() {
return new AABB(this.getX() - 0.6D, this.getY() - 0.6D, this.getZ() - 0.6D, this.getX() + 0.6D, this.getY() + 0.6D, this.getZ() + 0.6D);
}
@Override
public void addAdditionalSaveData(CompoundTag tag) {
if (this.ownerId != null) {
tag.putUUID("OwnerId", this.ownerId);
}
tag.putInt("AgeTicks", this.ageTicks);
}
@Override
public void readAdditionalSaveData(CompoundTag tag) {
if (tag.hasUUID("OwnerId")) {
this.ownerId = tag.getUUID("OwnerId");
}
this.ageTicks = tag.getInt("AgeTicks");
}
@Override
public boolean isInvulnerableTo(DamageSource damageSource) {
return true;
}
@Override
public boolean fireImmune() {
return true;
}
@Override
public void lavaHurt() {
}
@Override
public boolean isPushable() {
return false;
}
@Override
public boolean canBeCollidedWith() {
return false;
}
@Override
public boolean isPickable() {
return false;
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "black_hole_controller", 0, this::blackHoleController));
}
private PlayState blackHoleController(AnimationState<PortalGunBlackHoleEntity> state) {
if (this.closing) {
return state.setAndContinue(CLOSE_ANIM);
}
if (this.ageTicks < OPEN_TICKS) {
return state.setAndContinue(OPEN_ANIM);
}
return state.setAndContinue(IDLE_ANIM);
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
}
@@ -0,0 +1,343 @@
package com.craisinlord.antarchy.content.portalgun;
import com.craisinlord.antarchy.Antarchy;
import java.util.List;
import java.util.UUID;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.phys.AABB;
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.animation.AnimationController;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.util.GeckoLibUtil;
public class PortalGunPortalEntity extends Entity implements GeoEntity {
public enum PortalSide {
BLUE,
ORANGE
}
private static final EntityDataAccessor<Integer> SIDE = SynchedEntityData.defineId(PortalGunPortalEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Integer> FACING = SynchedEntityData.defineId(PortalGunPortalEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Integer> UP_AXIS = SynchedEntityData.defineId(PortalGunPortalEntity.class, EntityDataSerializers.INT);
private static final EntityDataAccessor<Boolean> CLOSING = SynchedEntityData.defineId(PortalGunPortalEntity.class, EntityDataSerializers.BOOLEAN);
private static final RawAnimation OPEN_ANIM = RawAnimation.begin().thenPlay("open");
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation CLOSE_ANIM = RawAnimation.begin().thenPlay("close");
private static final int OPEN_TICKS = 10;
private static final int CLOSE_TICKS = 10;
private static final int MAX_LIFETIME_TICKS = 20 * 60 * 20;
private static final int TELEPORT_COOLDOWN_TICKS = 15;
private static final double HALF_WIDTH = 0.5D;
private static final double HALF_HEIGHT = 1.0D;
private static final double HALF_DEPTH = 0.35D;
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
private UUID ownerId;
private UUID linkedPortalId;
private int ageTicks;
private BlockPos supportOrigin = BlockPos.ZERO;
private static final java.util.Map<UUID, Long> TELEPORT_COOLDOWNS = new java.util.HashMap<>();
public PortalGunPortalEntity(EntityType<? extends PortalGunPortalEntity> entityType, Level level) {
super(entityType, level);
this.setInvulnerable(true);
this.noPhysics = true;
this.noCulling = true;
}
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(SIDE, PortalSide.BLUE.ordinal());
builder.define(FACING, Direction.NORTH.get3DDataValue());
builder.define(UP_AXIS, Direction.UP.get3DDataValue());
builder.define(CLOSING, false);
}
public void configure(UUID ownerId, PortalSide side, Direction facing, Direction upAxis, BlockPos supportOrigin) {
this.ownerId = ownerId;
this.entityData.set(SIDE, side.ordinal());
this.entityData.set(FACING, facing.get3DDataValue());
this.entityData.set(UP_AXIS, upAxis.get3DDataValue());
this.supportOrigin = supportOrigin.immutable();
}
public void linkTo(PortalGunPortalEntity other) {
this.linkedPortalId = other.getUUID();
}
public PortalSide getPortalSide() {
int ordinal = this.entityData.get(SIDE);
return ordinal == PortalSide.ORANGE.ordinal() ? PortalSide.ORANGE : PortalSide.BLUE;
}
public Direction getFacingDirection() {
return Direction.from3DDataValue(this.entityData.get(FACING));
}
public Direction getUpAxis() {
return Direction.from3DDataValue(this.entityData.get(UP_AXIS));
}
public Vec3 getNormalVec() {
return Vec3.atLowerCornerOf(this.getFacingDirection().getNormal());
}
public Vec3 getUpVec() {
return Vec3.atLowerCornerOf(this.getUpAxis().getNormal());
}
public Vec3 getWidthVec() {
return this.getNormalVec().cross(this.getUpVec()).normalize();
}
@Override
public void tick() {
super.tick();
this.ageTicks++;
if (this.level().isClientSide) {
return;
}
if (!(this.level() instanceof ServerLevel serverLevel)) {
return;
}
if (this.ownerId == null || !this.isStillRegistered(serverLevel)) {
this.discard();
return;
}
if (!this.hasValidSurface()) {
this.discard();
return;
}
if (this.ageTicks >= MAX_LIFETIME_TICKS - CLOSE_TICKS) {
this.entityData.set(CLOSING, true);
}
if (this.ageTicks >= MAX_LIFETIME_TICKS) {
this.discard();
return;
}
PortalGunPortalEntity linked = this.findLinkedPortal(serverLevel);
if (linked == null || !linked.isAlive()) {
return;
}
this.tickTeleport(linked);
}
private boolean isStillRegistered(ServerLevel level) {
return this.ownerId != null && PortalGunSavedData.isRegistered(level.getServer(), this.ownerId, this.getPortalSide(), this.getUUID());
}
private boolean hasValidSurface() {
Direction facing = this.getFacingDirection();
Direction heightAxis = this.getUpAxis();
for (int h = 0; h < 2; h++) {
BlockPos supportPos = this.supportOrigin.relative(heightAxis, h);
BlockPos airPos = supportPos.relative(facing);
BlockState supportState = this.level().getBlockState(supportPos);
BlockState airState = this.level().getBlockState(airPos);
FluidState fluidState = this.level().getFluidState(airPos);
if (!supportState.isFaceSturdy(this.level(), supportPos, facing)) {
return false;
}
if (!airState.isAir() && !airState.canBeReplaced()) {
return false;
}
if (!fluidState.isEmpty()) {
return false;
}
}
return true;
}
private void tickTeleport(PortalGunPortalEntity linked) {
List<Entity> entities = this.level().getEntities(this, this.getBoundingBox().inflate(0.75D), this::canTeleportEntity);
for (Entity entity : entities) {
if (this.isInsidePortal(entity.position())) {
this.teleportEntity(entity, linked);
}
}
}
private boolean canTeleportEntity(Entity entity) {
if (!entity.isAlive() || entity instanceof PortalGunPortalEntity || entity.isPassenger() || entity.isVehicle()) {
return false;
}
long gameTime = this.level().getGameTime();
long cooldownUntil = TELEPORT_COOLDOWNS.getOrDefault(entity.getUUID(), 0L);
if (cooldownUntil <= gameTime) {
TELEPORT_COOLDOWNS.remove(entity.getUUID());
return true;
}
return false;
}
private boolean isInsidePortal(Vec3 position) {
Vec3 relative = position.subtract(this.position());
double horizontal = relative.dot(this.getWidthVec());
double vertical = relative.dot(this.getUpVec());
double depth = Math.abs(relative.dot(this.getNormalVec()));
return Math.abs(horizontal) <= HALF_WIDTH && Math.abs(vertical) <= HALF_HEIGHT && depth <= HALF_DEPTH;
}
private void teleportEntity(Entity entity, PortalGunPortalEntity destination) {
Vec3 sourceNormal = this.getNormalVec();
Vec3 sourceUp = this.getUpVec();
Vec3 sourceWidth = this.getWidthVec();
Vec3 destinationNormal = destination.getNormalVec();
Vec3 destinationUp = destination.getUpVec();
Vec3 destinationWidth = destination.getWidthVec();
Vec3 motion = entity.getDeltaMovement();
double widthComponent = motion.dot(sourceWidth);
double upComponent = motion.dot(sourceUp);
double forward = -motion.dot(sourceNormal);
Vec3 transformedMotion = destinationWidth.scale(widthComponent).add(destinationUp.scale(upComponent)).add(destinationNormal.scale(forward));
Vec3 exitPos = destination.position().add(destinationNormal.scale(1.0D));
TELEPORT_COOLDOWNS.put(entity.getUUID(), this.level().getGameTime() + TELEPORT_COOLDOWN_TICKS);
if (entity instanceof ServerPlayer player && destination.level() instanceof ServerLevel destinationLevel) {
player.teleportTo(destinationLevel, exitPos.x, exitPos.y, exitPos.z, player.getYRot(), player.getXRot());
} else {
entity.teleportTo(exitPos.x, exitPos.y, exitPos.z);
}
entity.setDeltaMovement(transformedMotion);
entity.hasImpulse = true;
entity.fallDistance = 0.0F;
}
private PortalGunPortalEntity findLinkedPortal(ServerLevel level) {
if (this.linkedPortalId == null) {
return null;
}
Entity entity = level.getEntity(this.linkedPortalId);
return entity instanceof PortalGunPortalEntity portal ? portal : null;
}
@Override
public AABB getBoundingBoxForCulling() {
return this.getBoundingBox().inflate(1.5D);
}
@Override
protected AABB makeBoundingBox() {
Vec3 widthVec = this.getWidthVec();
Vec3 upVec = this.getUpVec();
Vec3 normalVec = this.getNormalVec();
double halfX = HALF_WIDTH * Math.abs(widthVec.x) + HALF_HEIGHT * Math.abs(upVec.x) + HALF_DEPTH * Math.abs(normalVec.x);
double halfY = HALF_WIDTH * Math.abs(widthVec.y) + HALF_HEIGHT * Math.abs(upVec.y) + HALF_DEPTH * Math.abs(normalVec.y);
double halfZ = HALF_WIDTH * Math.abs(widthVec.z) + HALF_HEIGHT * Math.abs(upVec.z) + HALF_DEPTH * Math.abs(normalVec.z);
return new AABB(this.getX() - halfX, this.getY() - halfY, this.getZ() - halfZ, this.getX() + halfX, this.getY() + halfY, this.getZ() + halfZ);
}
@Override
public void addAdditionalSaveData(CompoundTag tag) {
if (this.ownerId != null) {
tag.putUUID("OwnerId", this.ownerId);
}
if (this.linkedPortalId != null) {
tag.putUUID("LinkedPortalId", this.linkedPortalId);
}
tag.putInt("AgeTicks", this.ageTicks);
tag.putInt("Side", this.getPortalSide().ordinal());
tag.putInt("Facing", this.getFacingDirection().get3DDataValue());
tag.putInt("SupportX", this.supportOrigin.getX());
tag.putInt("SupportY", this.supportOrigin.getY());
tag.putInt("SupportZ", this.supportOrigin.getZ());
}
@Override
public void readAdditionalSaveData(CompoundTag tag) {
if (tag.hasUUID("OwnerId")) {
this.ownerId = tag.getUUID("OwnerId");
}
if (tag.hasUUID("LinkedPortalId")) {
this.linkedPortalId = tag.getUUID("LinkedPortalId");
}
this.ageTicks = tag.getInt("AgeTicks");
this.entityData.set(SIDE, tag.getInt("Side"));
this.entityData.set(FACING, tag.getInt("Facing"));
this.supportOrigin = new BlockPos(tag.getInt("SupportX"), tag.getInt("SupportY"), tag.getInt("SupportZ"));
}
@Override
public void remove(Entity.RemovalReason reason) {
if (!this.level().isClientSide && this.ownerId != null && this.level() instanceof ServerLevel serverLevel) {
PortalGunSavedData.clearPortal(serverLevel.getServer(), this.ownerId, this.getPortalSide(), this.getUUID());
}
super.remove(reason);
}
@Override
public boolean isInvulnerableTo(DamageSource damageSource) {
return true;
}
@Override
public boolean fireImmune() {
return true;
}
@Override
public void lavaHurt() {
}
@Override
public boolean isPushable() {
return false;
}
@Override
public boolean canBeCollidedWith() {
return false;
}
@Override
public boolean isPickable() {
return false;
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add(new AnimationController<>(this, "portal_controller", 0, this::portalController));
}
private PlayState portalController(AnimationState<PortalGunPortalEntity> state) {
state.getController().setAnimationSpeed(this.entityData.get(CLOSING) || this.ageTicks < OPEN_TICKS ? 4.0D : 1.0D);
if (this.entityData.get(CLOSING)) {
return state.setAndContinue(CLOSE_ANIM);
}
if (this.ageTicks < OPEN_TICKS) {
return state.setAndContinue(OPEN_ANIM);
}
return state.setAndContinue(IDLE_ANIM);
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.geoCache;
}
public static SoundEvent sound(String path, SoundEvent fallback) {
return BuiltInRegistries.SOUND_EVENT.getOptional(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path)).orElse(fallback);
}
}
@@ -0,0 +1,136 @@
package com.craisinlord.antarchy.content.portalgun;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import net.minecraft.core.HolderLookup;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.saveddata.SavedData;
public final class PortalGunSavedData extends SavedData {
private static final String ID = "antarchy_portal_gun_pairs";
private static final String ENTRIES_KEY = "Entries";
private static final String OWNER_KEY = "Owner";
private static final String BLUE_KEY = "Blue";
private static final String ORANGE_KEY = "Orange";
private final Map<UUID, PairRecord> pairs = new HashMap<>();
public static PortalGunSavedData create() {
return new PortalGunSavedData();
}
public static PortalGunSavedData load(CompoundTag tag, HolderLookup.Provider registries) {
PortalGunSavedData data = new PortalGunSavedData();
for (net.minecraft.nbt.Tag rawEntry : tag.getList(ENTRIES_KEY, net.minecraft.nbt.Tag.TAG_COMPOUND)) {
CompoundTag entryTag = (CompoundTag) rawEntry;
UUID owner = entryTag.getUUID(OWNER_KEY);
UUID blue = entryTag.hasUUID(BLUE_KEY) ? entryTag.getUUID(BLUE_KEY) : null;
UUID orange = entryTag.hasUUID(ORANGE_KEY) ? entryTag.getUUID(ORANGE_KEY) : null;
data.pairs.put(owner, new PairRecord(blue, orange));
}
return data;
}
@Override
public CompoundTag save(CompoundTag tag, HolderLookup.Provider registries) {
ListTag entries = new ListTag();
for (Map.Entry<UUID, PairRecord> entry : this.pairs.entrySet()) {
CompoundTag entryTag = new CompoundTag();
entryTag.putUUID(OWNER_KEY, entry.getKey());
if (entry.getValue().bluePortalId() != null) {
entryTag.putUUID(BLUE_KEY, entry.getValue().bluePortalId());
}
if (entry.getValue().orangePortalId() != null) {
entryTag.putUUID(ORANGE_KEY, entry.getValue().orangePortalId());
}
entries.add(entryTag);
}
tag.put(ENTRIES_KEY, entries);
return tag;
}
private static PortalGunSavedData get(MinecraftServer server) {
return server.overworld().getDataStorage().computeIfAbsent(
new SavedData.Factory<>(PortalGunSavedData::create, PortalGunSavedData::load, null),
ID
);
}
public static Optional<UUID> getPortalId(MinecraftServer server, UUID owner, PortalGunPortalEntity.PortalSide side) {
PairRecord record = get(server).pairs.get(owner);
if (record == null) {
return Optional.empty();
}
return Optional.ofNullable(side == PortalGunPortalEntity.PortalSide.BLUE ? record.bluePortalId() : record.orangePortalId());
}
public static boolean isRegistered(MinecraftServer server, UUID owner, PortalGunPortalEntity.PortalSide side, UUID portalId) {
return getPortalId(server, owner, side).map(portalId::equals).orElse(false);
}
public static void setPortal(MinecraftServer server, UUID owner, PortalGunPortalEntity.PortalSide side, UUID portalId) {
PortalGunSavedData data = get(server);
PairRecord current = data.pairs.getOrDefault(owner, new PairRecord(null, null));
PairRecord updated = side == PortalGunPortalEntity.PortalSide.BLUE
? new PairRecord(portalId, current.orangePortalId())
: new PairRecord(current.bluePortalId(), portalId);
if (updated.bluePortalId() == null && updated.orangePortalId() == null) {
data.pairs.remove(owner);
} else {
data.pairs.put(owner, updated);
}
data.setDirty();
}
public static void clearPortal(MinecraftServer server, UUID owner, PortalGunPortalEntity.PortalSide side, UUID portalId) {
PortalGunSavedData data = get(server);
PairRecord current = data.pairs.get(owner);
if (current == null) {
return;
}
UUID blue = current.bluePortalId();
UUID orange = current.orangePortalId();
if (side == PortalGunPortalEntity.PortalSide.BLUE && portalId.equals(blue)) {
blue = null;
}
if (side == PortalGunPortalEntity.PortalSide.ORANGE && portalId.equals(orange)) {
orange = null;
}
if (blue == null && orange == null) {
data.pairs.remove(owner);
} else {
data.pairs.put(owner, new PairRecord(blue, orange));
}
data.setDirty();
}
public static void clearAllPortals(MinecraftServer server, UUID owner) {
PortalGunSavedData data = get(server);
PairRecord current = data.pairs.remove(owner);
data.setDirty();
if (current == null) {
return;
}
discardIfLoaded(server, current.bluePortalId());
discardIfLoaded(server, current.orangePortalId());
}
private static void discardIfLoaded(MinecraftServer server, UUID portalId) {
if (portalId == null) {
return;
}
for (ServerLevel level : server.getAllLevels()) {
if (level.getEntity(portalId) instanceof PortalGunPortalEntity portal) {
portal.discard();
return;
}
}
}
private record PairRecord(UUID bluePortalId, UUID orangePortalId) {
}
}
@@ -0,0 +1,200 @@
package com.craisinlord.antarchy.content.util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import java.util.ArrayList;
import java.util.List;
/**
* Tracks the path of a taut rope from a fixed anchor point to a moving end point (the
* player's eyes), bending around block corners when the straight-line path would otherwise
* clip through terrain. The anchor never moves (the worm hook is stuck in a block), so this
* only needs to add/remove bends on the player's side of the rope.
*
* Ported from the corner-wrapping algorithm in Yyon's GrappleMod (GPL-3.0), adapted from a
* custom vector class to vanilla Vec3 and from a moving-hook/moving-player pair to a fixed
* anchor.
*/
public final class WormHookRope {
private static final double BEND_OFFSET = 0.05D;
private static final double INTO_BLOCK = 0.05D;
private static final int MAX_RECURSIONS = 10;
private final List<Vec3> points = new ArrayList<>();
private final List<Direction> bottomSides = new ArrayList<>();
private final List<Direction> topSides = new ArrayList<>();
private Vec3 prevEnd;
private double ropeLength;
public WormHookRope(Vec3 anchor, Vec3 end) {
points.add(anchor);
points.add(end);
bottomSides.add(null);
bottomSides.add(null);
topSides.add(null);
topSides.add(null);
this.prevEnd = end;
}
/** Recomputes the bend list for the current anchor/end positions. Anchor must stay constant. */
public void update(Entity context, Vec3 anchor, Vec3 end, double ropeLength) {
this.ropeLength = ropeLength;
Level level = context.level();
points.set(0, anchor);
points.set(points.size() - 1, end);
// Unwind bends the rope has swung clear of.
while (points.size() > 2) {
int index = points.size() - 2;
Vec3 closest = points.get(index);
Direction bottomSide = bottomSides.get(index);
Direction topSide = topSides.get(index);
Vec3 ropeVec = end.subtract(closest);
Vec3 beforePoint = points.get(index - 1);
Vec3 edgeVec = normal(bottomSide).cross(normal(topSide));
Vec3 planeNormal = beforePoint.subtract(closest).cross(edgeVec);
if (planeNormal.lengthSqr() > 1.0E-9D && ropeVec.dot(planeNormal) > 0) {
remove(index);
} else {
break;
}
}
Vec3 closest = points.get(points.size() - 2);
Vec3 prevClosest = points.size() == 2 ? anchor : closest;
updateSegment(level, context, closest, prevClosest, end, prevEnd, points.size() - 1, 0);
this.prevEnd = end;
}
private void updateSegment(Level level, Entity context, Vec3 top, Vec3 prevTop, Vec3 bottom, Vec3 prevBottom, int index, int recursions) {
BlockHitResult bottomHit = rayTraceBlocks(level, context, bottom, top);
if (bottomHit == null) {
return;
}
if (rayTraceBlocks(level, context, prevBottom, prevTop) != null) {
return;
}
Vec3 bottomHitVec = bottomHit.getLocation();
Direction bottomSide = bottomHit.getDirection();
Vec3 bottomNormal = normal(bottomSide);
double prevRopeLen = prevTop.subtract(prevBottom).length();
Vec3 cornerBound1 = bottomHitVec.add(changeLen(bottomNormal, -INTO_BLOCK));
Vec3 boundOption1 = linePlaneIntersection(prevTop, prevBottom, cornerBound1, bottomNormal);
Vec3 boundOption2 = linePlaneIntersection(top, prevTop, cornerBound1, bottomNormal);
Vec3 boundOption3 = linePlaneIntersection(prevBottom, bottom, cornerBound1, bottomNormal);
for (Vec3 cornerBound2 : new Vec3[]{boundOption1, boundOption2, boundOption3}) {
if (cornerBound2 == null) {
continue;
}
BlockHitResult cornerHit = rayTraceBlocks(level, context, cornerBound2, cornerBound1);
if (cornerHit == null) {
continue;
}
Vec3 cornerHitPos = cornerHit.getLocation();
Direction cornerSide = cornerHit.getDirection();
if (cornerSide == bottomSide || cornerSide.getOpposite() == bottomSide) {
continue;
}
Vec3 actualCorner = cornerHitPos.add(changeLen(bottomNormal, INTO_BLOCK));
Vec3 bend = actualCorner.add(changeLen(bottomNormal, BEND_OFFSET)).add(changeLen(normal(cornerSide), BEND_OFFSET));
Vec3 topRopeVec = bend.subtract(top);
Vec3 bottomRopeVec = bend.subtract(bottom);
if (topRopeVec.length() < 0.05D && bottomSides.get(index - 1) == bottomSide && topSides.get(index - 1) == cornerSide) {
continue;
}
if (bottomRopeVec.length() < 0.05D && bottomSides.get(index) == bottomSide && topSides.get(index) == cornerSide) {
continue;
}
points.add(index, bend);
bottomSides.add(index, bottomSide);
topSides.add(index, cornerSide);
if (getConsumedLength() + 0.2D > this.ropeLength) {
remove(index);
continue;
}
double newRopeLen = topRopeVec.length() + bottomRopeVec.length();
double prevTopToBend = newRopeLen <= 0 ? 0 : topRopeVec.length() * prevRopeLen / newRopeLen;
Vec3 prevBend = prevTop.add(changeLen(prevBottom.subtract(prevTop), prevTopToBend));
if (recursions < MAX_RECURSIONS) {
updateSegment(level, context, top, prevTop, bend, prevBend, index, recursions + 1);
}
break;
}
}
private void remove(int index) {
points.remove(index);
bottomSides.remove(index);
topSides.remove(index);
}
/** The pivot point closest to the moving end: either the anchor, or the last bend before it. */
public Vec3 getPivot() {
return points.get(points.size() - 2);
}
/** Rope length used up getting from the anchor to the pivot (0 if the rope has no bends). */
public double getConsumedLength() {
double dist = 0;
for (int i = 0; i < points.size() - 2; i++) {
dist += points.get(i).subtract(points.get(i + 1)).length();
}
return dist;
}
public List<Vec3> points() {
return points;
}
private static Vec3 normal(Direction direction) {
if (direction == null) {
return Vec3.ZERO;
}
return new Vec3(direction.getStepX(), direction.getStepY(), direction.getStepZ());
}
private static Vec3 changeLen(Vec3 v, double len) {
double oldLen = v.length();
return oldLen == 0 ? v : v.scale(len / oldLen);
}
private static Vec3 linePlaneIntersection(Vec3 linePoint1, Vec3 linePoint2, Vec3 planePoint, Vec3 planeNormal) {
Vec3 lineVec = linePoint2.subtract(linePoint1);
double denom = lineVec.dot(planeNormal);
if (denom == 0) {
return null;
}
double d = planePoint.subtract(linePoint1).dot(planeNormal) / denom;
return linePoint1.add(lineVec.scale(d));
}
private static BlockHitResult rayTraceBlocks(Level level, Entity context, Vec3 from, Vec3 to) {
BlockHitResult result = level.clip(new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, context));
return result.getType() == HitResult.Type.MISS ? null : result;
}
}
@@ -0,0 +1,27 @@
package com.craisinlord.antarchy.content.worldgen.thoraxis;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider;
public record NadirTreeConfiguration(
BlockStateProvider trunkProvider,
BlockStateProvider foliageProvider,
IntProvider height,
IntProvider bottomRadius,
IntProvider branchCount,
IntProvider branchLength,
IntProvider veilRadius
) implements FeatureConfiguration {
public static final Codec<NadirTreeConfiguration> CODEC = RecordCodecBuilder.create(instance -> instance.group(
BlockStateProvider.CODEC.fieldOf("trunk_provider").forGetter(NadirTreeConfiguration::trunkProvider),
BlockStateProvider.CODEC.fieldOf("foliage_provider").forGetter(NadirTreeConfiguration::foliageProvider),
IntProvider.codec(6, 48).fieldOf("height").forGetter(NadirTreeConfiguration::height),
IntProvider.codec(1, 6).fieldOf("bottom_radius").forGetter(NadirTreeConfiguration::bottomRadius),
IntProvider.codec(1, 12).fieldOf("branch_count").forGetter(NadirTreeConfiguration::branchCount),
IntProvider.codec(2, 16).fieldOf("branch_length").forGetter(NadirTreeConfiguration::branchLength),
IntProvider.codec(1, 8).fieldOf("veil_radius").forGetter(NadirTreeConfiguration::veilRadius)
).apply(instance, NadirTreeConfiguration::new));
}
@@ -0,0 +1,281 @@
package com.craisinlord.antarchy.content.worldgen.thoraxis;
import com.mojang.serialization.Codec;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.LevelWriter;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.RotatedPillarBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
public class NadirTreeFeature extends Feature<NadirTreeConfiguration> {
public NadirTreeFeature(Codec<NadirTreeConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<NadirTreeConfiguration> context) {
WorldGenLevel level = context.level();
BlockPos origin = context.origin();
BlockPos supportPos = origin.above();
if (!level.getBlockState(supportPos).isFaceSturdy(level, supportPos, Direction.DOWN)) {
return false;
}
RandomSource random = context.random();
NadirTreeConfiguration config = context.config();
int height = config.height().sample(random);
int bottomRadius = config.bottomRadius().sample(random);
int branchCount = config.branchCount().sample(random);
int branchLength = config.branchLength().sample(random);
int veilRadius = config.veilRadius().sample(random);
List<BlockPos> spine = buildSpine(origin, height, random);
Map<BlockPos, Direction.Axis> logs = new LinkedHashMap<>();
Set<BlockPos> foliage = new LinkedHashSet<>();
placeTrunk(spine, bottomRadius, logs, random);
placeLowerMass(spine, bottomRadius, logs, foliage, random, veilRadius);
placeBranches(spine, branchCount, branchLength, logs, foliage, random, veilRadius);
placeVeilCurtains(spine, foliage, random, veilRadius);
if (logs.isEmpty()) {
return false;
}
if (!canPlace(level, logs.keySet(), foliage)) {
return false;
}
for (Map.Entry<BlockPos, Direction.Axis> entry : logs.entrySet()) {
BlockPos pos = entry.getKey();
BlockState state = config.trunkProvider().getState(random, pos);
if (state.hasProperty(RotatedPillarBlock.AXIS)) {
state = state.setValue(RotatedPillarBlock.AXIS, entry.getValue());
}
setBlock(level, pos, state);
}
for (BlockPos pos : foliage) {
if (!logs.containsKey(pos)) {
setBlock(level, pos, config.foliageProvider().getState(random, pos));
}
}
return true;
}
private List<BlockPos> buildSpine(BlockPos origin, int height, RandomSource random) {
List<BlockPos> spine = new ArrayList<>(height);
BlockPos current = origin;
Direction lateral = Direction.Plane.HORIZONTAL.getRandomDirection(random);
for (int step = 0; step < height; step++) {
if (step > 1 && random.nextFloat() < 0.42F) {
if (random.nextFloat() < 0.3F) {
lateral = lateral.getClockWise();
} else if (random.nextFloat() < 0.3F) {
lateral = lateral.getCounterClockWise();
}
current = current.relative(lateral);
}
if (step > 0) {
current = current.below();
}
spine.add(current);
}
return spine;
}
private void placeTrunk(List<BlockPos> spine, int bottomRadius, Map<BlockPos, Direction.Axis> logs, RandomSource random) {
for (int index = 0; index < spine.size(); index++) {
BlockPos center = spine.get(index);
float progress = spine.size() == 1 ? 1.0F : index / (float) (spine.size() - 1);
int radius = Mth.clamp(Math.round(progress * bottomRadius), 0, bottomRadius);
fillTrunkLayer(center, radius, logs, random);
}
}
private void fillTrunkLayer(BlockPos center, int radius, Map<BlockPos, Direction.Axis> logs, RandomSource random) {
if (radius <= 0) {
putLog(logs, center, Direction.Axis.Y);
return;
}
int radiusSq = radius * radius;
for (int dx = -radius; dx <= radius; dx++) {
for (int dz = -radius; dz <= radius; dz++) {
int dist = dx * dx + dz * dz;
if (dist > radiusSq + 1) {
continue;
}
if (dist > radiusSq - radius && random.nextFloat() < 0.2F) {
continue;
}
putLog(logs, center.offset(dx, 0, dz), Direction.Axis.Y);
}
}
}
private void placeLowerMass(
List<BlockPos> spine,
int bottomRadius,
Map<BlockPos, Direction.Axis> logs,
Set<BlockPos> foliage,
RandomSource random,
int veilRadius
) {
int start = Math.max(0, spine.size() - Math.max(3, bottomRadius + 2));
for (int index = start; index < spine.size(); index++) {
BlockPos center = spine.get(index);
int extraRadius = Math.max(1, bottomRadius - Math.max(0, spine.size() - 1 - index));
for (int dy = 0; dy <= Math.min(2, index - start); dy++) {
fillTrunkLayer(center.below(dy), extraRadius, logs, random);
}
placeVeilCluster(foliage, center.below(), Math.max(1, veilRadius), random, true);
}
}
private void placeBranches(
List<BlockPos> spine,
int branchCount,
int branchLength,
Map<BlockPos, Direction.Axis> logs,
Set<BlockPos> foliage,
RandomSource random,
int veilRadius
) {
int minAttach = Math.min(spine.size() - 1, Math.max(1, spine.size() / 4));
int maxAttach = Math.max(minAttach, spine.size() - 2);
for (int i = 0; i < branchCount; i++) {
int attachIndex = Mth.nextInt(random, minAttach, maxAttach);
BlockPos attach = spine.get(attachIndex);
Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
BlockPos cursor = attach;
BlockPos previous = attach;
int length = Math.max(2, branchLength - random.nextInt(Math.max(1, branchLength / 2 + 1)));
for (int step = 0; step < length; step++) {
cursor = cursor.relative(direction);
if (step > 0 || random.nextFloat() < 0.85F) {
cursor = cursor.below();
}
if (random.nextFloat() < 0.25F) {
direction = random.nextBoolean() ? direction.getClockWise() : direction.getCounterClockWise();
}
putLog(logs, cursor, axisForSegment(previous, cursor));
if (random.nextFloat() < 0.35F) {
putLog(logs, cursor.below(), Direction.Axis.Y);
}
previous = cursor;
}
placeVeilCluster(foliage, cursor, veilRadius + random.nextInt(2), random, true);
placeVeilCluster(foliage, cursor.below(1 + random.nextInt(2)), Math.max(1, veilRadius - 1), random, true);
if (random.nextFloat() < 0.45F) {
BlockPos fork = cursor;
Direction forkDirection = random.nextBoolean() ? direction.getClockWise() : direction.getCounterClockWise();
int forkLength = Math.max(2, length / 2);
for (int step = 0; step < forkLength; step++) {
BlockPos next = fork.relative(forkDirection).below();
putLog(logs, next, axisForSegment(fork, next));
fork = next;
}
placeVeilCluster(foliage, fork, Math.max(1, veilRadius - 1), random, true);
}
}
}
private void placeVeilCurtains(List<BlockPos> spine, Set<BlockPos> foliage, RandomSource random, int veilRadius) {
for (int index = 1; index < spine.size(); index++) {
if (random.nextFloat() > 0.33F) {
continue;
}
BlockPos anchor = spine.get(index);
Direction side = Direction.Plane.HORIZONTAL.getRandomDirection(random);
BlockPos start = anchor.relative(side);
int length = 2 + random.nextInt(Math.max(2, veilRadius + 1));
for (int i = 0; i < length; i++) {
BlockPos pos = start.below(i);
foliage.add(pos);
if (random.nextFloat() < 0.22F) {
foliage.add(pos.relative(side.getClockWise()));
}
}
}
}
private void placeVeilCluster(Set<BlockPos> foliage, BlockPos center, int radius, RandomSource random, boolean stretchDown) {
int radiusSq = radius * radius;
for (int dx = -radius; dx <= radius; dx++) {
for (int dz = -radius; dz <= radius; dz++) {
for (int dy = -radius; dy <= 1; dy++) {
int adjustedDy = stretchDown ? Math.max(0, -dy) : Math.abs(dy);
int dist = dx * dx + dz * dz + adjustedDy * adjustedDy;
if (dist > radiusSq + 1) {
continue;
}
if (dist > radiusSq - radius && random.nextFloat() < 0.28F) {
continue;
}
foliage.add(center.offset(dx, dy, dz));
}
}
}
}
private boolean canPlace(WorldGenLevel level, Set<BlockPos> logs, Set<BlockPos> foliage) {
for (BlockPos pos : logs) {
if (!canReplace(level, pos)) {
return false;
}
}
for (BlockPos pos : foliage) {
if (logs.contains(pos)) {
continue;
}
if (!canReplace(level, pos)) {
return false;
}
}
return true;
}
private void putLog(Map<BlockPos, Direction.Axis> logs, BlockPos pos, Direction.Axis axis) {
Direction.Axis existing = logs.get(pos);
if (existing == null || existing == Direction.Axis.Y) {
logs.put(pos, axis);
}
}
private static Direction.Axis axisForSegment(BlockPos from, BlockPos to) {
int dx = Math.abs(to.getX() - from.getX());
int dy = Math.abs(to.getY() - from.getY());
int dz = Math.abs(to.getZ() - from.getZ());
if (dy >= dx && dy >= dz) {
return Direction.Axis.Y;
}
return dx >= dz ? Direction.Axis.X : Direction.Axis.Z;
}
private static boolean canReplace(WorldGenLevel level, BlockPos pos) {
BlockState state = level.getBlockState(pos);
return state.isAir() || state.canBeReplaced() || state.getBlock() instanceof LeavesBlock;
}
private void setBlock(WorldGenLevel level, BlockPos pos, BlockState state) {
if (level instanceof LevelWriter writer) {
setBlock(writer, pos, state);
}
}
}
@@ -0,0 +1,18 @@
package com.craisinlord.antarchy.content.worldgen.thoraxis;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
public final class NadirTreeGrowers {
public static final ResourceKey<ConfiguredFeature<?, ?>> NADIR_TREE = featureKey("nadir_tree");
private NadirTreeGrowers() {
}
private static ResourceKey<ConfiguredFeature<?, ?>> featureKey(String path) {
return ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path));
}
}
@@ -5,6 +5,7 @@ import com.craisinlord.antarchy.content.gravity.GravityWalkNodeEvaluator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation;
import net.minecraft.world.level.pathfinder.NodeEvaluator;
import net.minecraft.world.level.pathfinder.PathFinder;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -20,7 +21,8 @@ public abstract class GroundPathNavigationMixin {
@Inject(method = "createPathFinder", at = @At("HEAD"), cancellable = true)
private void antarchy$useGravityEvaluator(int maxVisitedNodes, CallbackInfoReturnable<PathFinder> cir) {
var mob = ((PathNavigationAccessor) (Object) this).antarchy$getMob();
var accessor = (PathNavigationAccessor) (Object) this;
var mob = accessor.antarchy$getMob();
if (AntarchyGravityApi.isGravityInverted(mob)) {
LOGGER.debug(
"[Path] swap evaluator mob={} maxVisitedNodes={}",
@@ -29,6 +31,8 @@ public abstract class GroundPathNavigationMixin {
);
}
cir.setReturnValue(new PathFinder(new GravityWalkNodeEvaluator(), maxVisitedNodes));
NodeEvaluator evaluator = new GravityWalkNodeEvaluator();
accessor.antarchy$setNodeEvaluator(evaluator);
cir.setReturnValue(new PathFinder(evaluator, maxVisitedNodes));
}
}
@@ -2,6 +2,7 @@ package com.craisinlord.antarchy.mixins.gravity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.level.pathfinder.NodeEvaluator;
import net.minecraft.world.level.pathfinder.Path;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@@ -16,4 +17,7 @@ public interface PathNavigationAccessor {
@Accessor("path")
Path antarchy$getPath();
@Accessor("nodeEvaluator")
void antarchy$setNodeEvaluator(NodeEvaluator nodeEvaluator);
}
@@ -0,0 +1,48 @@
{
"format_version": "1.8.0",
"animations": {
"idle": {
"loop": true,
"animation_length": 4.0,
"bones": {
"Portal_Layer": {
"rotation": {
"0.0": {"vector": [0, 0, 0]},
"4.0": {"vector": [0, 0, 360]}
}
},
"Portal_Layer2": {
"rotation": {
"0.0": {"vector": [0, 0, 0]},
"4.0": {"vector": [0, 0, -360]}
}
}
}
},
"open": {
"loop": false,
"animation_length": 0.5,
"bones": {
"Root": {
"scale": {
"0.0": {"vector": [0, 0, 0]},
"0.35": {"vector": [1.15, 1.15, 1.15]},
"0.5": {"vector": [1, 1, 1]}
}
}
}
},
"close": {
"loop": false,
"animation_length": 0.4,
"bones": {
"Root": {
"scale": {
"0.0": {"vector": [1, 1, 1]},
"0.4": {"vector": [0, 0, 0]}
}
}
}
}
}
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/chiseled_loam_bricks"
}
}
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/chiseled_myrmite"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/loam_bricks"
},
"type=bottom": {
"model": "antarchy:block/loam_brick_slab"
},
"type=top": {
"model": "antarchy:block/loam_brick_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/loam_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/loam_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/loam_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/loam_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/loam_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/loam_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/loam_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/loam_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/loam_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/loam_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/loam_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/loam_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/loam_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/loam_bricks"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/mossy_broodstone_bricks"
},
"type=bottom": {
"model": "antarchy:block/mossy_broodstone_brick_slab"
},
"type=top": {
"model": "antarchy:block/mossy_broodstone_brick_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_broodstone_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/mossy_broodstone_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/mossy_broodstone_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/mossy_broodstone_bricks"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/mossy_myrmite_bricks"
},
"type=bottom": {
"model": "antarchy:block/mossy_myrmite_brick_slab"
},
"type=top": {
"model": "antarchy:block/mossy_myrmite_brick_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/mossy_myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/mossy_myrmite_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/mossy_myrmite_bricks"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/mossy_nyxite_bricks"
},
"type=bottom": {
"model": "antarchy:block/mossy_nyxite_brick_slab"
},
"type=top": {
"model": "antarchy:block/mossy_nyxite_brick_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/mossy_nyxite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/mossy_nyxite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/mossy_nyxite_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/mossy_nyxite_bricks"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/myrmite_bricks"
},
"type=bottom": {
"model": "antarchy:block/myrmite_brick_slab"
},
"type=top": {
"model": "antarchy:block/myrmite_brick_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/myrmite_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/myrmite_brick_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/myrmite_bricks"
}
}
}
@@ -0,0 +1,17 @@
{
"variants": {
"axis=x": {
"model": "antarchy:block/myrmite_pillar",
"x": 90,
"y": 90
},
"axis=y": {
"model": "antarchy:block/myrmite_pillar"
},
"axis=z": {
"model": "antarchy:block/myrmite_pillar",
"x": 90
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/myrmite"
},
"type=bottom": {
"model": "antarchy:block/myrmite_slab"
},
"type=top": {
"model": "antarchy:block/myrmite_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/myrmite_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/myrmite_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/myrmite_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/myrmite_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/myrmite_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/myrmite_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/myrmite_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/myrmite_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/myrmite_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/packed_loam"
}
}
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/polished_myrmite"
}
}
}
@@ -0,0 +1,14 @@
{
"variants": {
"type=double": {
"model": "antarchy:block/polished_myrmite"
},
"type=bottom": {
"model": "antarchy:block/polished_myrmite_slab"
},
"type=top": {
"model": "antarchy:block/polished_myrmite_slab_top"
}
}
}
@@ -0,0 +1,210 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "antarchy:block/polished_myrmite_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "antarchy:block/polished_myrmite_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "antarchy:block/polished_myrmite_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}
@@ -0,0 +1,41 @@
{
"multipart": [
{
"when": { "up": "true" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_post" }
},
{
"when": { "north": "low" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side", "uvlock": true }
},
{
"when": { "east": "low" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side", "y": 90, "uvlock": true }
},
{
"when": { "south": "low" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side", "y": 180, "uvlock": true }
},
{
"when": { "west": "low" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side", "y": 270, "uvlock": true }
},
{
"when": { "north": "tall" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side_tall", "uvlock": true }
},
{
"when": { "east": "tall" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side_tall", "y": 90, "uvlock": true }
},
{
"when": { "south": "tall" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side_tall", "y": 180, "uvlock": true }
},
{
"when": { "west": "tall" },
"apply": { "model": "antarchy:block/polished_myrmite_wall_side_tall", "y": 270, "uvlock": true }
}
]
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "antarchy:block/tigers_eye_block"
}
}
}
@@ -0,0 +1,51 @@
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.portal_gun_portal",
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 4,
"visible_bounds_height": 4,
"visible_bounds_offset": [0, 0, 0]
},
"bones": [
{
"name": "Root",
"pivot": [0, 0, 0]
},
{
"name": "Portal_Layer",
"parent": "Root",
"pivot": [0, 0, -0.4],
"cubes": [
{
"origin": [-8, -16, -0.4],
"size": [16, 32, 0],
"uv": {
"north": {"uv": [0, 0], "uv_size": [64, 64]},
"south": {"uv": [0, 0], "uv_size": [64, 64]}
}
}
]
},
{
"name": "Portal_Layer2",
"parent": "Root",
"pivot": [0, 0, 0.4],
"cubes": [
{
"origin": [-8, -16, 0.4],
"size": [16, 32, 0],
"uv": {
"north": {"uv": [0, 0], "uv_size": [64, 64]},
"south": {"uv": [0, 0], "uv_size": [64, 64]}
}
}
]
}
]
}
]
}
@@ -233,6 +233,7 @@
"entity.antarchy.wasp": "Wasp",
"entity.antarchy.bomber": "Bomber",
"entity.antarchy.moleworm": "Moleworm",
"entity.antarchy.worm": "Worm",
"entity.antarchy.molevore": "Molevore",
"entity.antarchy.mantis": "Mantis",
"entity.antarchy.alpha_mantis": "Alpha Mantis",
@@ -308,6 +309,10 @@
"attribute.antarchy.bloodglass_max_hearts": "Max Bloodglass Hearts",
"item.antarchy.molevore_nose": "Molevore Nose",
"item.antarchy.moleworm": "Moleworm",
"item.antarchy.worm_tooth": "Worm Tooth",
"item.antarchy.worm_hook": "Worm Hook",
"tooltip.antarchy.worm_hook.throw": "Right-click a block to fire and attach",
"tooltip.antarchy.worm_hook.reel": "Sneak to reel in, right-click again to detach",
"item.antarchy.triffid_spawn_egg": "Triffid Spawn Egg",
"item.antarchy.infested_rooted_dirt": "Infested Rooted Dirt",
"item.antarchy.infested_coarse_dirt": "Infested Coarse Dirt",
@@ -471,6 +476,7 @@
"tooltip.antarchy.reverie_bottle.capture": "Right click a Reverie with a glass bottle to store it.",
"tooltip.antarchy.reverie_bottle.release": "Right click to release the Reverie.",
"item.antarchy.gravity_gun": "Gravity Gun",
"item.antarchy.portal_gun": "Portal Gun",
"item.antarchy.miners_dream": "Miner's Dream",
"tooltip.antarchy.miners_dream.line1": "Use to carve a winding cave.",
"tooltip.antarchy.miners_dream.line2": "Leaves valuable blocks untouched.",
@@ -549,6 +555,7 @@
"item.antarchy.primordial_boots": "Primordial Boots",
"item.antarchy.bed_bug_spawn_egg": "Bed Bug Spawn Egg",
"item.antarchy.moleworm_spawn_egg": "Moleworm Spawn Egg",
"item.antarchy.worm_spawn_egg": "Worm Spawn Egg",
"item.antarchy.molevore_spawn_egg": "Molevore Spawn Egg",
"item.antarchy.reverie_spawn_egg": "Reverie Spawn Egg",
"item.antarchy.mantis_spawn_egg": "Mantis Spawn Egg",
@@ -633,6 +640,9 @@
"tooltip.antarchy.gravity_gun.secondary": "Usage: pull in an entity or a valid block.",
"tooltip.antarchy.gravity_gun.scroll": "Hold Ctrl and scroll to move the held target closer or farther away.",
"tooltip.antarchy.gravity_gun.blacklist": "Does not affect blacklisted blocks or entities.",
"tooltip.antarchy.portal_gun.primary": "Attack: fire a blue portal.",
"tooltip.antarchy.portal_gun.secondary": "Use: fire an orange portal.",
"tooltip.antarchy.portal_gun.reset": "Sneak + use: fizzle your active portals.",
"tooltip.antarchy.antimetal_inversion": "Inverts entites directly below it",
"tooltip.antarchy.diamond_minecart.forward": "Will be implemented later.",
"tooltip.antarchy.diamond_minecart.rails": " ",
@@ -790,6 +800,12 @@
"subtitles.antarchy.gravity_gun_hold_loop": "Gravity Gun hums",
"subtitles.antarchy.gravity_gun_launch": "Gravity Gun launches",
"subtitles.antarchy.gravity_gun_dryfire": "Gravity Gun dry fires",
"subtitles.antarchy.portal_gun_fire_blue": "Portal Gun fires",
"subtitles.antarchy.portal_gun_fire_orange": "Portal Gun fires",
"subtitles.antarchy.portal_gun_invalid_surface": "Portal fizzles",
"subtitles.antarchy.portal_open_blue": "Blue portal opens",
"subtitles.antarchy.portal_open_orange": "Orange portal opens",
"subtitles.antarchy.portal_fizzle": "Portal fizzles",
"subtitles.antarchy.bed_bug_ambient": "Bed Bug chirps",
"subtitles.antarchy.bed_bug_hurt": "Bed Bug hurts",
"subtitles.antarchy.bed_bug_attack": "Bed Bug bites",
@@ -1056,6 +1072,7 @@
"advancements.antarchy.herculean_task.title": "Herculean Task",
"advancements.antarchy.herculean_task.description": "Slay a Hercules Beetle.",
"item.antarchy.tigers_eye": "Tiger's Eye",
"block.antarchy.tigers_eye_block": "Block of Tiger's Eye",
"item.antarchy.tigers_eye_helmet": "Tiger's Eye Helmet",
"item.antarchy.tigers_eye_chestplate": "Tiger's Eye Chestplate",
"item.antarchy.tigers_eye_leggings": "Tiger's Eye Leggings",
@@ -1079,5 +1096,38 @@
"music.antarchy.wistful_wanderings": "Wistful Wanderings",
"music.antarchy.wistful_wanderings.credit": "hewo_",
"tooltip.antarchy.lucid_anchor.pyramid": "Requires an Antimetal Beacon pyramid above it",
"tooltip.antarchy.lucid_anchor.path": "Projects Inverted downward while it has an unobstructed path to the world below"
"tooltip.antarchy.lucid_anchor.path": "Projects Inverted downward while it has an unobstructed path to the world below",
"block.antarchy.myrmite_stairs": "Myrmite Stairs",
"block.antarchy.myrmite_slab": "Myrmite Slab",
"block.antarchy.myrmite_wall": "Myrmite Wall",
"block.antarchy.polished_myrmite": "Polished Myrmite",
"block.antarchy.polished_myrmite_stairs": "Polished Myrmite Stairs",
"block.antarchy.polished_myrmite_slab": "Polished Myrmite Slab",
"block.antarchy.polished_myrmite_wall": "Polished Myrmite Wall",
"block.antarchy.chiseled_myrmite": "Chiseled Myrmite",
"block.antarchy.myrmite_bricks": "Myrmite Bricks",
"block.antarchy.myrmite_brick_stairs": "Myrmite Brick Stairs",
"block.antarchy.myrmite_brick_slab": "Myrmite Brick Slab",
"block.antarchy.myrmite_brick_wall": "Myrmite Brick Wall",
"block.antarchy.mossy_myrmite_bricks": "Mossy Myrmite Bricks",
"block.antarchy.mossy_myrmite_brick_stairs": "Mossy Myrmite Brick Stairs",
"block.antarchy.mossy_myrmite_brick_slab": "Mossy Myrmite Brick Slab",
"block.antarchy.mossy_myrmite_brick_wall": "Mossy Myrmite Brick Wall",
"block.antarchy.myrmite_pillar": "Myrmite Pillar",
"block.antarchy.mossy_broodstone_bricks": "Mossy Broodstone Bricks",
"block.antarchy.mossy_broodstone_brick_stairs": "Mossy Broodstone Brick Stairs",
"block.antarchy.mossy_broodstone_brick_slab": "Mossy Broodstone Brick Slab",
"block.antarchy.mossy_broodstone_brick_wall": "Mossy Broodstone Brick Wall",
"block.antarchy.mossy_nyxite_bricks": "Mossy Nyxite Bricks",
"block.antarchy.mossy_nyxite_brick_stairs": "Mossy Nyxite Brick Stairs",
"block.antarchy.mossy_nyxite_brick_slab": "Mossy Nyxite Brick Slab",
"block.antarchy.mossy_nyxite_brick_wall": "Mossy Nyxite Brick Wall",
"block.antarchy.packed_loam": "Packed Loam",
"block.antarchy.loam_bricks": "Loam Bricks",
"block.antarchy.loam_brick_stairs": "Loam Brick Stairs",
"block.antarchy.loam_brick_slab": "Loam Brick Slab",
"block.antarchy.loam_brick_wall": "Loam Brick Wall",
"block.antarchy.chiseled_loam_bricks": "Chiseled Loam Bricks",
"item.antarchy.cooked_cheep": "Cooked Cheep",
"item.antarchy.cheep_bucket": "Bucket of Cheep"
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/loam/chiseled_loam_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/myrmite/chiseled_myrmite"
}
}
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/loam"
"all": "antarchy:block/loam/loam"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "antarchy:block/loam/loam_bricks",
"side": "antarchy:block/loam/loam_bricks",
"top": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "antarchy:block/loam/loam_bricks",
"side": "antarchy:block/loam/loam_bricks",
"top": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/stairs",
"textures": {
"bottom": "antarchy:block/loam/loam_bricks",
"side": "antarchy:block/loam/loam_bricks",
"top": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/inner_stairs",
"textures": {
"bottom": "antarchy:block/loam/loam_bricks",
"side": "antarchy:block/loam/loam_bricks",
"top": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/outer_stairs",
"textures": {
"bottom": "antarchy:block/loam/loam_bricks",
"side": "antarchy:block/loam/loam_bricks",
"top": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_post",
"textures": {
"wall": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side",
"textures": {
"wall": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side_tall",
"textures": {
"wall": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/loam/loam_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "antarchy:block/broodstone/mossy_broodstone_bricks",
"side": "antarchy:block/broodstone/mossy_broodstone_bricks",
"top": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "antarchy:block/broodstone/mossy_broodstone_bricks",
"side": "antarchy:block/broodstone/mossy_broodstone_bricks",
"top": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/stairs",
"textures": {
"bottom": "antarchy:block/broodstone/mossy_broodstone_bricks",
"side": "antarchy:block/broodstone/mossy_broodstone_bricks",
"top": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/inner_stairs",
"textures": {
"bottom": "antarchy:block/broodstone/mossy_broodstone_bricks",
"side": "antarchy:block/broodstone/mossy_broodstone_bricks",
"top": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/outer_stairs",
"textures": {
"bottom": "antarchy:block/broodstone/mossy_broodstone_bricks",
"side": "antarchy:block/broodstone/mossy_broodstone_bricks",
"top": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_post",
"textures": {
"wall": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side",
"textures": {
"wall": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side_tall",
"textures": {
"wall": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/broodstone/mossy_broodstone_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "antarchy:block/myrmite/mossy_myrmite_bricks",
"side": "antarchy:block/myrmite/mossy_myrmite_bricks",
"top": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "antarchy:block/myrmite/mossy_myrmite_bricks",
"side": "antarchy:block/myrmite/mossy_myrmite_bricks",
"top": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/stairs",
"textures": {
"bottom": "antarchy:block/myrmite/mossy_myrmite_bricks",
"side": "antarchy:block/myrmite/mossy_myrmite_bricks",
"top": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/inner_stairs",
"textures": {
"bottom": "antarchy:block/myrmite/mossy_myrmite_bricks",
"side": "antarchy:block/myrmite/mossy_myrmite_bricks",
"top": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/outer_stairs",
"textures": {
"bottom": "antarchy:block/myrmite/mossy_myrmite_bricks",
"side": "antarchy:block/myrmite/mossy_myrmite_bricks",
"top": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_post",
"textures": {
"wall": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side",
"textures": {
"wall": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_wall_side_tall",
"textures": {
"wall": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "antarchy:block/myrmite/mossy_myrmite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "antarchy:block/mossy_nyxite_bricks",
"side": "antarchy:block/mossy_nyxite_bricks",
"top": "antarchy:block/mossy_nyxite_bricks"
}
}
@@ -0,0 +1,9 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "antarchy:block/mossy_nyxite_bricks",
"side": "antarchy:block/mossy_nyxite_bricks",
"top": "antarchy:block/mossy_nyxite_bricks"
}
}
Loaded 100 of 336 files, more files were not shown because too many files have changed in this diff. Show more