diff --git a/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java b/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java index 887a91ab7..f2c14ab9c 100644 --- a/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java +++ b/src/main/java/net/id/paradiselost/client/model/ParadiseLostModelLayers.java @@ -27,7 +27,6 @@ public class ParadiseLostModelLayers { public static final EntityModelLayer ENVOY = register("envoy", "main", EnvoyEntityModel.getTexturedModelData()); public static final EntityModelLayer ENVOY_INNER_ARMOR = register("envoy", "inner_armor", INNER_ARMOR_MODEL_DATA); public static final EntityModelLayer ENVOY_OUTER_ARMOR = register("envoy", "outer_armor", OUTER_ARMOR_MODEL_DATA); - public static final EntityModelLayer PARADISE_HARE = register("corsican_hare", "main", ParadiseHareModel.getTexturedModelData()); public static final EntityModelLayer MOA = register("moa", "main", MoaModel.getTexturedModelData()); public static final EntityModelLayer AMBYST = register("ambyst", "main", AmbystModel.getTexturedModelData()); public static final EntityModelLayer PHOENIX_ARMOR = register("phoenix_armor", "main", PhoenixArmorModel.getTexturedModelData()); diff --git a/src/main/java/net/id/paradiselost/client/model/entity/ParadiseHareModel.java b/src/main/java/net/id/paradiselost/client/model/entity/ParadiseHareModel.java deleted file mode 100644 index 7cc1d8793..000000000 --- a/src/main/java/net/id/paradiselost/client/model/entity/ParadiseHareModel.java +++ /dev/null @@ -1,83 +0,0 @@ -// Made with Model Converter by Globox_Z -// Generate all required imports -// Made with Blockbench 3.8.3 -// Exported for Minecraft version 1.15 -// Paste this class into your mod and generate all required imports -package net.id.paradiselost.client.model.entity; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.id.paradiselost.entities.passive.ParadiseHareEntity; -import net.minecraft.client.model.*; -import net.minecraft.client.render.VertexConsumer; -import net.minecraft.client.render.entity.model.EntityModel; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.util.math.MathHelper; - -@Environment(EnvType.CLIENT) -public class ParadiseHareModel extends EntityModel { - private final ModelPart body; - private final ModelPart fluff; - private final ModelPart head; - private final ModelPart tail; - private final ModelPart left_front_leg; - private final ModelPart right_front_leg; - private final ModelPart back_right_leg; - private final ModelPart back_left_leg; - - private float fluff_scale = 1; - - public ParadiseHareModel(ModelPart root) { - this.body = root.getChild("body"); - this.tail = this.body.getChild("tail"); - this.back_left_leg = this.body.getChild("back_left_leg"); - this.back_right_leg = this.body.getChild("back_right_leg"); - this.right_front_leg = this.body.getChild("right_front_leg"); - this.left_front_leg = this.body.getChild("left_front_leg"); - this.head = this.body.getChild("head"); - this.fluff = root.getChild("fluff"); - } - - public static TexturedModelData getTexturedModelData() { - ModelData modelData = new ModelData(); - ModelPartData modelPartData = modelData.getRoot(); - ModelPartData modelPartData1 = modelPartData.addChild("body", ModelPartBuilder.create(), ModelTransform.pivot(0.0F, 22.8889F, 1.0F)); - modelPartData.addChild("fluff", ModelPartBuilder.create().uv(0, 0).cuboid(-4.0F, -3.5F, -3.5F, 8.0F, 7.0F, 7.0F), ModelTransform.pivot(0.0F, 0F, 0F)); - modelPartData1.addChild("head", ModelPartBuilder.create().uv(18, 26).cuboid(-2.0F, -1.5F, -3.0F, 4.0F, 3.0F, 3.0F).uv(0, 0).cuboid(-2.0F, -5.5F, -2.0F, 1.0F, 4.0F, 1.0F).uv(0, 0).cuboid(1.0F, -5.5F, -2.0F, 1.0F, 4.0F, 1.0F).uv(0, 14).cuboid(-4.0F, -0.5F, -2.0F, 2.0F, 2.0F, 0.0F).uv(0, 14).cuboid(2.0F, -0.5F, -2.0F, 2.0F, 2.0F, 0.0F, true), ModelTransform.pivot(0.0F, -2.3889F, -4.5F)); - modelPartData1.addChild("left_front_leg", ModelPartBuilder.create().uv(0, 21).cuboid(-1.0F, -1.0F, -2.25F, 2.0F, 1.0F, 3.0F), ModelTransform.pivot(-4.0F, 1.1111F, -3.25F)); - modelPartData1.addChild("right_front_leg", ModelPartBuilder.create().uv(0, 21).cuboid(-1.0F, -1.0F, -2.5F, 2.0F, 1.0F, 3.0F), ModelTransform.pivot(4.0F, 1.1111F, -3.0F)); - modelPartData1.addChild("back_right_leg", ModelPartBuilder.create().uv(10, 20).cuboid(-1.0F, 0.0F, -3.0F, 2.0F, 1.0F, 4.0F).uv(22, 20).cuboid(-1.0F, -2.0F, -2.0F, 2.0F, 2.0F, 3.0F), ModelTransform.pivot(4.0F, 0.1111F, 2.5F)); - modelPartData1.addChild("back_left_leg", ModelPartBuilder.create().uv(22, 20).cuboid(-1.0F, -2.0F, -2.0F, 2.0F, 2.0F, 3.0F).uv(10, 20).cuboid(-1.0F, 0.0F, -3.0F, 2.0F, 1.0F, 4.0F), ModelTransform.pivot(-4.0F, 0.1111F, 2.5F)); - modelPartData1.addChild("tail", ModelPartBuilder.create().uv(0, 25).cuboid(-2.0F, -2.0F, 0.0F, 4.0F, 4.0F, 3.0F), ModelTransform.pivot(0.0F, -2.8889F, 2.5F)); - return TexturedModelData.of(modelData, 32, 32); - } - - @Override - public void setAngles(ParadiseHareEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { - head.pitch = headPitch * 0.017453F; - head.yaw = netHeadYaw * 0.017453292F; - back_right_leg.pitch = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; - back_left_leg.pitch = MathHelper.cos(limbSwing * 0.6662F + 3.1415927F) * 1.4F * limbSwingAmount; - right_front_leg.pitch = MathHelper.cos(limbSwing * 0.6662F + 3.1415927F) * 1.4F * limbSwingAmount; - left_front_leg.pitch = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; - float targetFloof = entity.getPuffiness() / 2F; - if (entity.floof < targetFloof) { - entity.floof += 0.025F; - } else if (entity.floof > targetFloof) { - entity.floof -= 0.025F; - } - if (Math.abs(targetFloof - entity.floof) <= 0.03) { - entity.floof = targetFloof; - } - - fluff_scale = entity.floof + 1; - } - - @Override - public void render(MatrixStack matrixStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { - body.render(matrixStack, buffer, packedLight, packedOverlay); - matrixStack.translate(0, 1.28, 0); - matrixStack.scale(fluff_scale, fluff_scale, fluff_scale); - fluff.render(matrixStack, buffer, packedLight, packedOverlay); - } -} diff --git a/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java b/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java index c73fba28d..e9b127e8f 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java +++ b/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java @@ -5,7 +5,6 @@ import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; import net.id.incubus_core.blocklikeentities.api.client.BlockLikeEntityRenderer; import net.id.paradiselost.client.rendering.entity.hostile.EnvoyEntityRenderer; -import net.id.paradiselost.client.rendering.entity.passive.ParadiseHareRenderer; import net.id.paradiselost.client.rendering.entity.passive.MoaEntityRenderer; import net.id.paradiselost.entities.ParadiseLostEntityTypes; import net.minecraft.client.render.entity.EntityRendererFactory; @@ -24,7 +23,6 @@ public static void initClient() { // passive register(ParadiseLostEntityTypes.MOA, MoaEntityRenderer::new); - register(ParadiseLostEntityTypes.PARADISE_HARE, ParadiseHareRenderer::new); // register(ParadiseLostEntityTypes.AMBYST, AmbystRenderer::new); } diff --git a/src/main/java/net/id/paradiselost/client/rendering/entity/passive/ParadiseHareRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/entity/passive/ParadiseHareRenderer.java deleted file mode 100644 index 329600440..000000000 --- a/src/main/java/net/id/paradiselost/client/rendering/entity/passive/ParadiseHareRenderer.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.id.paradiselost.client.rendering.entity.passive; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.id.paradiselost.ParadiseLost; -import net.id.paradiselost.client.model.ParadiseLostModelLayers; -import net.id.paradiselost.client.model.entity.ParadiseHareModel; -import net.id.paradiselost.entities.passive.ParadiseHareEntity; -import net.minecraft.client.render.entity.EntityRendererFactory; -import net.minecraft.client.render.entity.MobEntityRenderer; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.util.Identifier; - -@Environment(EnvType.CLIENT) -public class ParadiseHareRenderer extends MobEntityRenderer { - - private static final Identifier TEXTURE = ParadiseLost.locate("textures/entity/corsican_hare.png"); - - public ParadiseHareRenderer(EntityRendererFactory.Context context) { - super(context, new ParadiseHareModel(context.getPart(ParadiseLostModelLayers.PARADISE_HARE)), 0.3F); - } - - @Override - public ParadiseHareModel getModel() { - return super.getModel(); - } - - @Override - protected void setupTransforms(ParadiseHareEntity entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta) { - super.setupTransforms(entity, matrices, animationProgress, bodyYaw, tickDelta); - if (entity.isBaby()) { - matrices.scale(0.6F, 0.6F, 0.6F); - } - } - - @Override - public Identifier getTexture(ParadiseHareEntity entity) { - return TEXTURE; - } -} diff --git a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityExtensions.java b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityExtensions.java index 1659cde15..271ed84bc 100644 --- a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityExtensions.java +++ b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityExtensions.java @@ -4,7 +4,6 @@ public interface ParadiseLostEntityExtensions { boolean flipped = false; boolean paradiseLostFallen = false; - boolean corsican_hareFallen = false; int gravFlipTime = 0; default int getFlipTime() { @@ -22,13 +21,6 @@ default boolean isParadiseLostFallen() { default void setParadiseLostFallen(boolean value) { } - default boolean isParadiseHareFallen() { - return corsican_hareFallen; - } - - default void setParadiseHareFallen(boolean corsican_hareFallen) { - } - void setFlipped(); default void tick() { diff --git a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java index 610ed76bd..0a4c83275 100644 --- a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java +++ b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java @@ -8,7 +8,6 @@ import net.id.paradiselost.entities.block.FloatingBlockEntity; import net.id.paradiselost.entities.block.SliderEntity; import net.id.paradiselost.entities.hostile.EnvoyEntity; -import net.id.paradiselost.entities.passive.ParadiseHareEntity; import net.id.paradiselost.entities.passive.ParadiseLostAnimalEntity; import net.id.paradiselost.entities.passive.ambyst.FindLogSensor; import net.id.paradiselost.entities.passive.moa.MoaEntity; @@ -54,8 +53,6 @@ public class ParadiseLostEntityTypes { // passive public static final EntityType MOA = add("moa", of(MoaEntity::new, CREATURE, changing(1.0F, 2.0F), 5), attributes(MoaEntity::createMoaAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn)); - public static final EntityType PARADISE_HARE = add("corsican_hare", of(ParadiseHareEntity::new, CREATURE, changing(0.55F, 0.55F), 5), - attributes(ParadiseHareEntity::createParadiseHareAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn)); // public static final EntityType AMBYST = add("ambyst", of(AmbystEntity::new, CREATURE, changing(0.6F, 0.42F), 5), // attributes(AmbystEntity::createAmbystAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn)); diff --git a/src/main/java/net/id/paradiselost/entities/hostile/EnvoyEntity.java b/src/main/java/net/id/paradiselost/entities/hostile/EnvoyEntity.java index 6356e3232..5ddf1f450 100644 --- a/src/main/java/net/id/paradiselost/entities/hostile/EnvoyEntity.java +++ b/src/main/java/net/id/paradiselost/entities/hostile/EnvoyEntity.java @@ -1,23 +1,29 @@ package net.id.paradiselost.entities.hostile; +import net.id.paradiselost.util.ParadiseLostSoundEvents; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.data.DataTracker; import net.minecraft.entity.data.TrackedData; import net.minecraft.entity.data.TrackedDataHandlerRegistry; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.entity.mob.GuardianEntity; import net.minecraft.entity.mob.SkeletonEntity; import net.minecraft.nbt.NbtCompound; import net.minecraft.particle.ParticleTypes; +import net.minecraft.sound.SoundEvent; +import net.minecraft.sound.SoundEvents; import net.minecraft.util.math.random.Random; import net.minecraft.world.LocalDifficulty; import net.minecraft.world.World; public class EnvoyEntity extends SkeletonEntity { + private static final TrackedData ENLIGHTENED; public EnvoyEntity(EntityType entityType, World world) { @@ -51,6 +57,18 @@ public void tick() { super.tick(); } + protected SoundEvent getHurtSound(DamageSource source) { + return this.getEnlightened() ? ParadiseLostSoundEvents.ENTITY_ENVOY_DAMAGE : super.getHurtSound(source); + } + + public boolean damage(DamageSource source, float amount) { + float dmg = amount; + if (this.getEnlightened()) { + dmg /= 2; + } + return super.damage(source, dmg); + } + public boolean tryAttack(Entity target) { if (!super.tryAttack(target)) { return false; diff --git a/src/main/java/net/id/paradiselost/entities/passive/ParadiseHareEntity.java b/src/main/java/net/id/paradiselost/entities/passive/ParadiseHareEntity.java deleted file mode 100644 index f5c3bed64..000000000 --- a/src/main/java/net/id/paradiselost/entities/passive/ParadiseHareEntity.java +++ /dev/null @@ -1,284 +0,0 @@ -package net.id.paradiselost.entities.passive; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.id.paradiselost.blocks.ParadiseLostBlocks; -import net.id.paradiselost.entities.ParadiseLostEntityExtensions; -import net.id.paradiselost.entities.ParadiseLostEntityTypes; -import net.id.paradiselost.items.ParadiseLostItems; -import net.id.paradiselost.util.ParadiseLostSoundEvents; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.SweetBerryBushBlock; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.MovementType; -import net.minecraft.entity.ai.goal.*; -import net.minecraft.entity.ai.pathing.Path; -import net.minecraft.entity.attribute.DefaultAttributeContainer; -import net.minecraft.entity.attribute.EntityAttributes; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.data.DataTracker; -import net.minecraft.entity.data.TrackedData; -import net.minecraft.entity.data.TrackedDataHandlerRegistry; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.entity.passive.PassiveEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.particle.ParticleTypes; -import net.minecraft.recipe.Ingredient; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.sound.SoundCategory; -import net.minecraft.sound.SoundEvent; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import net.minecraft.world.WorldView; - -public class ParadiseHareEntity extends ParadiseLostAnimalEntity { - - public static final TrackedData PUFF = DataTracker.registerData(ParadiseHareEntity.class, TrackedDataHandlerRegistry.BYTE); - public float floof; - - public ParadiseHareEntity(EntityType entityType, World world) { - super(entityType, world); - } - - public static DefaultAttributeContainer.Builder createParadiseHareAttributes() { - return createMobAttributes() - .add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25D) - .add(EntityAttributes.GENERIC_MAX_HEALTH, 5.0D); - } - - @Override - protected void initGoals() { - this.goalSelector.add(0, new SwimGoal(this)); - this.goalSelector.add(1, new EscapeDangerGoal(this, 1.25D)); - this.goalSelector.add(2, new WanderAroundFarGoal(this, 1.0D, 20)); - this.goalSelector.add(2, new WanderAroundGoal(this, 1.0D, 15)); - this.goalSelector.add(3, new EatBlueberriesGoal(0.9D, 40, 8)); - this.goalSelector.add(4, new AnimalMateGoal(this, 1.0D)); - this.goalSelector.add(5, new TemptGoal(this, 1.15D, Ingredient.ofItems(ParadiseLostItems.BLACKCURRANT), false)); - this.goalSelector.add(6, new LookAroundGoal(this)); - this.goalSelector.add(7, new LookAtEntityGoal(this, PlayerEntity.class, 4.0F, 32)); - //this.goalSelector.add(6, new EntityAIBunnyHop(this)); - } - - @Override - protected void initDataTracker() { - super.initDataTracker(); - this.dataTracker.startTracking(PUFF, (byte) 0); - } - - @Override - @Environment(EnvType.CLIENT) - public boolean shouldRender(double par1) { - return true; - } - - @Override - public double getHeightOffset() { - return 0.4D; - } - - @Override - public void playSpawnEffects() { - if (this.world.isClient) { - for (int i = 0; i < 5; ++i) { - double double_1 = this.random.nextGaussian() * 0.02D; - double double_2 = this.random.nextGaussian() * 0.02D; - double double_3 = this.random.nextGaussian() * 0.02D; - - this.world.addParticle(ParticleTypes.POOF, this.getX() + (double) (this.random.nextFloat() * this.getWidth() * 2.0F) - (double) this.getWidth() - double_1 * 10.0D, this.getY() + (double) (this.random.nextFloat() * this.getHeight()) - double_2 * 10.0D, this.getZ() + (double) (this.random.nextFloat() * this.getWidth() * 2.0F) - (double) this.getWidth() - double_3 * 10.0D, double_1, double_2, double_3); - } - } else { - this.world.sendEntityStatus(this, (byte) 20); - } - } - - //@Override public boolean canRiderInteract() { return true; } - - public int getPuffiness() { - return (int) this.dataTracker.get(PUFF); - } - - public void setPuffiness(int i) { - this.dataTracker.set(PUFF, (byte) i); - } - - @Override - public void tick() { - super.tick(); - int puff = getPuffiness(); - if (puff > 0 && world.getTime() % 4 == 0) { - Vec3d pos = getPos(); - world.addParticle(ParticleTypes.CLOUD, pos.x, pos.y + 0.2, pos.z, 0, 0, 0); - } else if (isOnGround() && puff > 0) { - setPuffiness(0); - } - - if (random.nextFloat() <= 0.03F) { - playSound(ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_SNIFF, 1.0F, 2.0F); - } - - if (this.hasVehicle() && (this.getVehicle().isSneaking() || this.getVehicle().getVelocity().y < -0.7)) { - ((ParadiseLostEntityExtensions) this.getVehicle()).setParadiseHareFallen(true); - this.dismountVehicle(); - } - } - - @Override - public void tickMovement() { - super.tickMovement(); - if (this.isOnGround() && ((getVelocity().x > 0.025 || getVelocity().z > 0.025) && random.nextInt(4) == 0)) { - jump(); - } - // Slows down ParadiseHare while falling - if (!this.isOnGround() && getVelocity().y < 0.0D) { - this.setVelocity(getVelocity().multiply(1.0D, 0.65D, 1.0D)); - } - } - - @Override - protected float getJumpVelocity() { - if (!this.horizontalCollision && (!this.moveControl.isMoving() || !(this.moveControl.getTargetY() > this.getY() + 0.5D))) { - Path path = this.navigation.getCurrentPath(); - if (path != null && !path.isFinished()) { - Vec3d vec3d = path.getNodePosition(this); - if (vec3d.y > this.getY() + 0.5D) { - return 0.45F; - } - } - return this.moveControl.getSpeed() <= 0.6D ? 0.3F : 0.4F; - } else { - return 0.45F; - } - } - - @Override - protected void jump() { - setPuffiness(1); - Vec3d pos = getPos(); - for (int i = 0; i < 4; i++) { - world.addParticle(ParticleTypes.CLOUD, pos.x + (random.nextGaussian() * 0.2), pos.y + (random.nextGaussian() * 0.2), pos.z + (random.nextGaussian() * 0.2), 0, 0, 0); - } - world.playSoundFromEntity(null, this, ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_JUMP, SoundCategory.NEUTRAL, 1, 1); - super.jump(); - } - - @Override - public boolean shouldSpawnSprintingParticles() { - return false; - } - - @Override - public void move(MovementType type, Vec3d movement) { - super.move(type, isOnGround() ? movement : movement.multiply(3.5, (movement.y < 0 && getPuffiness() > 0) ? 0.15 : 1, 3.5)); - } - - @Override - public boolean handleFallDamage(float distance, float damageMultiplier, DamageSource damageSource) { - return false; - } - - @Override - public ActionResult interactMob(PlayerEntity player, Hand hand) { - ItemStack stack = player.getStackInHand(hand); - - if (!stack.isEmpty()) { - return super.interactMob(player, hand); - } else { -// this.world.playSound(this.getX(), this.getY(), this.getZ(), ParadiseLostSounds.PARADISE_HARE_LIFT, SoundCategory.NEUTRAL, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F, false); - - if (getPrimaryPassenger() != null) { - stopRiding(); - } else { - startRiding(player); - } - - return ActionResult.SUCCESS; - } - } - - @Override - public boolean damage(DamageSource source, float damage) { - return (this.getPrimaryPassenger() == null || source.getAttacker() != this.getPrimaryPassenger()) && super.damage(source, damage); - } - - @Override - protected SoundEvent getHurtSound(DamageSource source) { - return ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_HURT; - } - - @Override - protected SoundEvent getDeathSound() { - return ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_DEATH; - } - - @Override - public PassiveEntity createChild(ServerWorld world, PassiveEntity mate) { - return ParadiseLostEntityTypes.PARADISE_HARE.create(world); - } - - public class EatBlueberriesGoal extends MoveToTargetPosGoal { - protected int timer; - - public EatBlueberriesGoal(double speed, int range, int maxYDifference) { - super(ParadiseHareEntity.this, speed, range, maxYDifference); - } - - public double getDesiredSquaredDistanceToTarget() { - return 2.0D; - } - - @Override - public boolean shouldResetPath() { - return this.tryingTime % 100 == 0; - } - - @Override - protected boolean isTargetPos(WorldView world, BlockPos pos) { - BlockState blockState = world.getBlockState(pos); - return blockState.isOf(ParadiseLostBlocks.BLACKCURRANT_BUSH) && blockState.get(SweetBerryBushBlock.AGE) >= 3; - } - - @Override - public void tick() { - if (this.hasReached()) { - if (this.timer >= 40) { - this.eatSweetBerry(); - } else { - ++this.timer; - } - } else if (!this.hasReached() && ParadiseHareEntity.this.random.nextFloat() < 0.05F) { - ParadiseHareEntity.this.playSound(ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_SNIFF, 1.0F, 2.0F); - } - super.tick(); - } - - protected void eatSweetBerry() { - BlockState blockState = ParadiseHareEntity.this.world.getBlockState(this.targetPos); - if (blockState.isOf(ParadiseLostBlocks.BLACKCURRANT_BUSH) && blockState.get(SweetBerryBushBlock.AGE) == 3) { - ParadiseHareEntity.this.setLoveTicks(40); - ParadiseHareEntity.this.addStatusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 10, 2)); - ParadiseHareEntity.this.playSound(ParadiseLostSoundEvents.BLOCK_BLACKCURRANT_BUSH_PICK_BLUEBERRIES, 1.0F, 1.0F); - ParadiseHareEntity.this.playSound(ParadiseLostSoundEvents.ENTITY_PARADISE_HARE_EAT, 0.8F, 2.0F); - ParadiseHareEntity.this.world.setBlockState(this.targetPos, blockState.with(SweetBerryBushBlock.AGE, 1), Block.NOTIFY_LISTENERS); - } - } - - @Override - public boolean shouldContinue() { - return true; - } - - @Override - public void start() { - this.timer = 0; - super.start(); - } - } - -} diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index 9e2e1c2d0..b4244a502 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -190,7 +190,6 @@ private static Settings misc() { public static final AurelBucketItem AUREL_MILK_BUCKET = add("aurel_milk_bucket", new AurelBucketItem(aurelBucket)); public static final SpawnEggItem ENVOY_SPAWN_EGG = add("envoy_spawn_egg", new SpawnEggItem(ParadiseLostEntityTypes.ENVOY, 0xc5b1af, 0x993c3c, misc), spawnEggBehavior); - public static final SpawnEggItem PARADISE_HARE_SPAWN_EGG = add("corsican_hare_spawn_egg", new SpawnEggItem(ParadiseLostEntityTypes.PARADISE_HARE, 0xC5D6ED, 0x82A6D9, misc), spawnEggBehavior); public static final SpawnEggItem MOA_SPAWN_EGG = add("moa_spawn_egg", new SpawnEggItem(ParadiseLostEntityTypes.MOA, 0xC55C2E4, 0xB3A8BB, misc), spawnEggBehavior); private static FabricItemSettings building_block() { diff --git a/src/main/java/net/id/paradiselost/mixin/block/BlockMixin.java b/src/main/java/net/id/paradiselost/mixin/block/BlockMixin.java index 36eee151b..726076d07 100644 --- a/src/main/java/net/id/paradiselost/mixin/block/BlockMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/block/BlockMixin.java @@ -17,7 +17,6 @@ public class BlockMixin { public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance, CallbackInfo ci) { if (entity instanceof ParadiseLostEntityExtensions extendedEntity) { extendedEntity.setParadiseLostFallen(false); - extendedEntity.setParadiseHareFallen(false); } } } diff --git a/src/main/java/net/id/paradiselost/mixin/entity/LivingEntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/LivingEntityMixin.java index 96651353e..3bb549eed 100644 --- a/src/main/java/net/id/paradiselost/mixin/entity/LivingEntityMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/entity/LivingEntityMixin.java @@ -69,10 +69,6 @@ private double changeGravity(double gravity) { if (isWearingParachute) { gravity -= 0.07; this.fallDistance = 0; - } else if (entity.hasPassengers() && entity.getPassengerList().stream().anyMatch(passenger -> - passenger.getType().equals(ParadiseLostEntityTypes.PARADISE_HARE))) { - gravity -= 0.05; - this.fallDistance = 0; // alternatively, remove & replace with fall damage dampener } } diff --git a/src/main/java/net/id/paradiselost/mixin/entity/PlayerEntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/PlayerEntityMixin.java index f88d42c7d..ca02d7e47 100644 --- a/src/main/java/net/id/paradiselost/mixin/entity/PlayerEntityMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/entity/PlayerEntityMixin.java @@ -30,7 +30,6 @@ public abstract class PlayerEntityMixin extends LivingEntity implements ParadiseLostEntityExtensions { private boolean paradise_lost$fallen = false; - public boolean paradise_lost$corsican_hareFallen = false; public PlayerEntityMixin(EntityType type, World world) { super(type, world); @@ -82,14 +81,6 @@ public void setParadiseLostFallen(boolean value) { paradise_lost$fallen = value; } - public boolean isParadise_lost$corsican_hareFallen() { - return paradise_lost$corsican_hareFallen; - } - - public void setPARADISE_HAREFallen(boolean value) { - paradise_lost$corsican_hareFallen = value; - } - @Inject( method = "handleFallDamage", at = @At("HEAD"), @@ -108,17 +99,5 @@ public void handleFallDamage(float fallDistance, float damageMultiplier, DamageS } cir.cancel(); } - if (paradise_lost$corsican_hareFallen) { - paradise_lost$corsican_hareFallen = false; - if (getAbilities().allowFlying) { - cir.setReturnValue(false); - } else { - if (fallDistance >= 2.0F) { - increaseStat(Stats.FALL_ONE_CM, (int) Math.round((double) fallDistance * 100.0D)); - } - cir.setReturnValue(super.handleFallDamage(fallDistance, damageMultiplier, ParadiseLostDamageSources.PARADISE_HARE_FALL)); - } - cir.cancel(); - } } } diff --git a/src/main/java/net/id/paradiselost/mixin/world/gen/structure/JigsawStructureMixin.java b/src/main/java/net/id/paradiselost/mixin/world/gen/structure/JigsawStructureMixin.java new file mode 100644 index 000000000..3109511d8 --- /dev/null +++ b/src/main/java/net/id/paradiselost/mixin/world/gen/structure/JigsawStructureMixin.java @@ -0,0 +1,38 @@ +package net.id.paradiselost.mixin.world.gen.structure; + +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.gen.HeightContext; +import net.minecraft.world.gen.heightprovider.HeightProvider; +import net.minecraft.world.gen.structure.JigsawStructure; +import net.minecraft.world.gen.structure.Structure; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.Optional; + +@Mixin(JigsawStructure.class) +public class JigsawStructureMixin { + + @Shadow + @Final + private HeightProvider startHeight; + + @Inject( + method = "getStructurePosition", + at = @At("HEAD"), + cancellable = true + ) + public void getStructurePosition(Structure.Context context, CallbackInfoReturnable> cir) { + ChunkPos chunkPos = context.chunkPos(); + int i = this.startHeight.get(context.random(), new HeightContext(context.chunkGenerator(), context.world())); + if (i <= context.world().getBottomY()) { + cir.setReturnValue(Optional.empty()); + } + + } + +} diff --git a/src/main/java/net/id/paradiselost/tag/ParadiseLostStructureTags.java b/src/main/java/net/id/paradiselost/tag/ParadiseLostStructureTags.java index dc9663cf6..988f9e76a 100644 --- a/src/main/java/net/id/paradiselost/tag/ParadiseLostStructureTags.java +++ b/src/main/java/net/id/paradiselost/tag/ParadiseLostStructureTags.java @@ -10,6 +10,9 @@ public class ParadiseLostStructureTags { public static final TagKey AUREL_TOWER_HAS_STRUCTURE = register("has_structure/aurel_tower"); public static final TagKey WELL_HAS_STRUCTURE = register("has_structure/well"); + // dungeon + public static final TagKey VAULT_HAS_STRUCTURE = register("has_structure/vault"); + private static TagKey register(String id) { return TagKey.of(Registry.BIOME_KEY, ParadiseLost.locate(id)); } diff --git a/src/main/java/net/id/paradiselost/util/ParadiseLostDamageSources.java b/src/main/java/net/id/paradiselost/util/ParadiseLostDamageSources.java index 3b1ef1848..a8f441d8f 100644 --- a/src/main/java/net/id/paradiselost/util/ParadiseLostDamageSources.java +++ b/src/main/java/net/id/paradiselost/util/ParadiseLostDamageSources.java @@ -5,7 +5,6 @@ public class ParadiseLostDamageSources extends DamageSource { public static final DamageSource PARADISE_LOST_FALL = (new ParadiseLostDamageSources("paradise_lost_fall")).setBypassesArmor().setFromFalling(); - public static final DamageSource PARADISE_HARE_FALL = (new ParadiseLostDamageSources("corsican_hare_fall")).setBypassesArmor().setFromFalling(); public static final DamageSource NIGHTMARE = (new ParadiseLostDamageSources("paradise_lost_nightmare").setBypassesArmor().setUsesMagic().setScaledWithDifficulty()); diff --git a/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java b/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java index 83c9ee4c6..8a3cd7370 100644 --- a/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java +++ b/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java @@ -66,16 +66,12 @@ private ParadiseLostSoundEvents() { public static final SoundEvent ENTITY_MOA_EGG_HATCH = childEvent("entity.moa.egg_hatch", SoundEvents.ENTITY_TURTLE_EGG_HATCH); public static final SoundEvent ENTITY_MOA_STEP = childEvent("entity.moa.step", SoundEvents.ENTITY_PIG_STEP); - public static final SoundEvent ENTITY_PARADISE_HARE_SNIFF = childEvent("entity.corsican_hare.sniff", SoundEvents.ENTITY_FOX_SNIFF); - public static final SoundEvent ENTITY_PARADISE_HARE_JUMP = childEvent("entity.corsican_hare.jump", SoundEvents.ENTITY_RABBIT_JUMP); - public static final SoundEvent ENTITY_PARADISE_HARE_HURT = childEvent("entity.corsican_hare.hurt", SoundEvents.ENTITY_RABBIT_HURT); - public static final SoundEvent ENTITY_PARADISE_HARE_DEATH = childEvent("entity.corsican_hare.death", SoundEvents.ENTITY_RABBIT_DEATH); - public static final SoundEvent ENTITY_PARADISE_HARE_EAT = childEvent("entity.corsican_hare.eat", SoundEvents.ENTITY_LLAMA_EAT); - public static final SoundEvent ENTITY_NIGHTMARE_HURT = event("entity.nightmare.hurt"); public static final SoundEvent ENTITY_NIGHTMARE_DEATH = event("entity.nightmare.death"); public static final SoundEvent ENTITY_NIGHTMARE_AMBIENT = event("entity.nightmare.ambient"); + public static final SoundEvent ENTITY_ENVOY_DAMAGE = childEvent("entity.envoy.damage", SoundEvents.BLOCK_AMETHYST_BLOCK_BREAK); + public static final SoundEvent ITEM_ARMOR_EQUIP_OLVITE = childEvent("item.armor.equip.olvite", SoundEvents.ITEM_ARMOR_EQUIP_IRON); public static final SoundEvent ITEM_ARMOR_EQUIP_GLAZED_GOLD = childEvent("item.armor.equip.glazed_gold", SoundEvents.ITEM_ARMOR_EQUIP_GOLD); diff --git a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java index d38045b63..9d60c8172 100644 --- a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java +++ b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java @@ -265,7 +265,6 @@ private static Biome createHighlandsPlains() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -312,7 +311,6 @@ private static Biome createHighlandsForest() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -357,7 +355,6 @@ private static Biome createTradewinds() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -407,7 +404,6 @@ private static Biome createHighlandsThicket() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -455,7 +451,6 @@ private static Biome createHighlandsGrandGlade() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -500,7 +495,6 @@ private static Biome createWisteriaWoods() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) @@ -551,9 +545,7 @@ private static Biome createAutumnalTundra() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 6, 1, 3) + new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) ), @@ -601,9 +593,7 @@ private static Biome createContinentalPlateau() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 6, 1, 3) + new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) ), @@ -660,9 +650,7 @@ private static Biome createHighlandsShield() { new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) ), SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 12, 4, 4), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13), - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.PARADISE_HARE, 6, 1, 3) + new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) ) ) ), diff --git a/src/main/resources/assets/paradise_lost/lang/en_us.json b/src/main/resources/assets/paradise_lost/lang/en_us.json index e879f640c..080b1d8e3 100644 --- a/src/main/resources/assets/paradise_lost/lang/en_us.json +++ b/src/main/resources/assets/paradise_lost/lang/en_us.json @@ -244,7 +244,6 @@ "entity.paradise_lost.floating_block": "Floating Block", "entity.paradise_lost.hellenrose": "Hellenrose", "entity.paradise_lost.moa": "Moa", - "entity.paradise_lost.corsican_hare": "Corsican Hare", "entity.paradise_lost.rook": "Rook", "entity.paradise_lost.poison_dart": "Poison Dart", "entity.paradise_lost.poison_needle": "Poison Needle", @@ -339,7 +338,6 @@ "item.paradise_lost.hellenrose_spawn_egg": "Hellenrose Spawn Egg", "item.paradise_lost.envoy_spawn_egg": "Envoy Spawn Egg", - "item.paradise_lost.corsican_hare_spawn_egg": "Corsican Hare Spawn Egg", "item.paradise_lost.moa_spawn_egg": "Moa Spawn Egg", "item.paradise_lost.aurel_boat": "Aurel Boat", @@ -359,8 +357,6 @@ "death.attack.fall": "%1$s plummeted from the heavens", "death.attack.fall.player": "%1$s was thrown off the heavens above by %2$s", - "death.attack.corsican_hare_fall": "%1$s got dumped", - "death.attack.corsican_hare_fall.player": "%1$s got dumped whilst trying to escape %2$s", "death.attack.nightmare": "%1$s was consumed by shifting shadows", "death.attack.nightmare.player": "%1$s was fed to the shadows by %2$s", @@ -464,15 +460,11 @@ "subtitles.paradise_lost.entity.moa.egg_hatch": "Moa egg hatches", "subtitles.paradise_lost.entity.moa.step": "Moa walks", - "subtitles.paradise_lost.entity.corsican_hare.sniff": "Corsican Hare sniffs", - "subtitles.paradise_lost.entity.corsican_hare.jump": "Corsican Hare hops", - "subtitles.paradise_lost.entity.corsican_hare.hurt": "Corsican Hare hurts", - "subtitles.paradise_lost.entity.corsican_hare.death": "Corsican Hare dies", - "subtitles.paradise_lost.entity.corsican_hare.eat": "Corsican Hare eats", - "subtitles.paradise_lost.entity.nightmare.hurt": "Nightmare hurts", "subtitles.paradise_lost.entity.nightmare.ambient": "Magpie coos", "subtitles.paradise_lost.entity.nightmare.death": "Nightmare dissipates", + + "subtitles.paradise_lost.entity.envoy.damage": "Envoy Chimes", "subtitles.paradise_lost.item.armor.equip.olvite": "Olvite armor clanks", "subtitles.paradise_lost.item.armor.equip.glazed_gold": "Glazed Gold armor clinks", diff --git a/src/main/resources/assets/paradise_lost/models/item/corsican_hare_spawn_egg.json b/src/main/resources/assets/paradise_lost/models/item/corsican_hare_spawn_egg.json deleted file mode 100644 index cbd5c36b9..000000000 --- a/src/main/resources/assets/paradise_lost/models/item/corsican_hare_spawn_egg.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "paradise_lost:item/template_spawn_egg" -} diff --git a/src/main/resources/assets/paradise_lost/textures/entity/corsican_hare.png b/src/main/resources/assets/paradise_lost/textures/entity/corsican_hare.png deleted file mode 100644 index 8a33934ce..000000000 Binary files a/src/main/resources/assets/paradise_lost/textures/entity/corsican_hare.png and /dev/null differ diff --git a/src/main/resources/data/paradise_lost/loot_tables/entities/corsican_hare.json b/src/main/resources/data/paradise_lost/loot_tables/entities/corsican_hare.json deleted file mode 100644 index a82326d45..000000000 --- a/src/main/resources/data/paradise_lost/loot_tables/entities/corsican_hare.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "type": "minecraft:entity", - "pools": [ - { - "rolls": 1.0, - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:item", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "type": "minecraft:uniform", - "min": 0.0, - "max": 2.0 - }, - "add": false - }, - { - "function": "minecraft:looting_enchant", - "count": { - "type": "minecraft:uniform", - "min": 0.0, - "max": 1.0 - } - } - ], - "name": "paradise_lost:blue_cloud" - } - ] - }, - { - "rolls": 1.0, - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:item", - "functions": [ - { - "function": "minecraft:furnace_smelt", - "conditions": [ - { - "condition": "minecraft:entity_properties", - "predicate": { - "flags": { - "is_on_fire": true - } - }, - "entity": "this" - } - ] - }, - { - "function": "minecraft:looting_enchant", - "count": { - "type": "minecraft:uniform", - "min": 0.0, - "max": 1.0 - } - } - ], - "name": "minecraft:rabbit" - } - ] - }, - { - "rolls": 1.0, - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:rabbit_foot" - } - ], - "conditions": [ - { - "condition": "minecraft:killed_by_player" - }, - { - "condition": "minecraft:random_chance_with_looting", - "chance": 0.1, - "looting_multiplier": 0.03 - } - ] - } - ] -} diff --git a/src/main/resources/data/paradise_lost/structures/vault/armored_envoy.nbt b/src/main/resources/data/paradise_lost/structures/vault/armored_envoy.nbt new file mode 100644 index 000000000..566c971ce Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/armored_envoy.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_1.nbt b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_1.nbt new file mode 100644 index 000000000..fe7feb823 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_1.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_2.nbt b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_2.nbt new file mode 100644 index 000000000..2807d3735 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_2.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_3.nbt b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_3.nbt new file mode 100644 index 000000000..b18bb6ad1 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_3.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_clean.nbt b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_clean.nbt new file mode 100644 index 000000000..15b3df9fb Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/crossways/crossway_clean.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/enlightened_envoy.nbt b/src/main/resources/data/paradise_lost/structures/vault/enlightened_envoy.nbt new file mode 100644 index 000000000..7c60277e3 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/enlightened_envoy.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_1.nbt b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_1.nbt new file mode 100644 index 000000000..0d4a8479b Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_1.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_2.nbt b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_2.nbt new file mode 100644 index 000000000..e0365d001 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_2.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_3.nbt b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_3.nbt new file mode 100644 index 000000000..408b656c9 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_3.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_clean.nbt b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_clean.nbt new file mode 100644 index 000000000..3754c7ab0 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_clean.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_special.nbt b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_special.nbt new file mode 100644 index 000000000..3229ae077 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/lobbies/lobby_special.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_1.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_1.nbt new file mode 100644 index 000000000..abe70e104 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_1.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_2.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_2.nbt new file mode 100644 index 000000000..fc940de67 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_2.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_3.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_3.nbt new file mode 100644 index 000000000..3bfd4bcbf Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_armory_3.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_clean.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_clean.nbt new file mode 100644 index 000000000..afad98f54 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_clean.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_1.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_1.nbt new file mode 100644 index 000000000..0d81fa482 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_1.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_2.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_2.nbt new file mode 100644 index 000000000..bacb28ac1 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_2.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_3.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_3.nbt new file mode 100644 index 000000000..85b85bbe6 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_stable_3.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_1.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_1.nbt new file mode 100644 index 000000000..be1823960 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_1.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_2.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_2.nbt new file mode 100644 index 000000000..f9f4e329e Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_2.nbt differ diff --git a/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_3.nbt b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_3.nbt new file mode 100644 index 000000000..10354ba60 Binary files /dev/null and b/src/main/resources/data/paradise_lost/structures/vault/storage_rooms/storage_valuable_3.nbt differ diff --git a/src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/orange_ruin.json b/src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/vault.json similarity index 87% rename from src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/orange_ruin.json rename to src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/vault.json index eaaf3d46a..ff11399f3 100644 --- a/src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/orange_ruin.json +++ b/src/main/resources/data/paradise_lost/tags/worldgen/biome/has_structure/vault.json @@ -4,6 +4,7 @@ "paradise_lost:highlands", "paradise_lost:highlands_forest", "paradise_lost:highlands_thicket", + "paradise_lost:highlands_grand_glade", "paradise_lost:wisteria_woods", "paradise_lost:autumnal_tundra", "paradise_lost:continental_plateau", diff --git a/src/main/resources/data/paradise_lost/worldgen/structure/vault.json b/src/main/resources/data/paradise_lost/worldgen/structure/vault.json new file mode 100644 index 000000000..49e9e2ad8 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/structure/vault.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:jigsaw", + "biomes": "#paradise_lost:has_structure/vault", + "step": "underground_structures", + "spawn_overrides": {}, + "terrain_adaptation": "bury", + "start_pool": "paradise_lost:vault/lobbies", + "size": 7, + "start_height": { + "absolute": -25 + }, + "project_start_to_heightmap": "WORLD_SURFACE_WG", + "max_distance_from_center": 116, + "use_expansion_hack": false +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/structure_set/vault.json b/src/main/resources/data/paradise_lost/worldgen/structure_set/vault.json new file mode 100644 index 000000000..b9bb2f1f7 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/structure_set/vault.json @@ -0,0 +1,14 @@ +{ + "structures": [ + { + "structure": "paradise_lost:vault", + "weight": 1 + } + ], + "placement": { + "salt": 60000, + "spacing": 40, + "separation": 25, + "type": "minecraft:random_spread" + } +} diff --git a/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/armored_envoy.json b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/armored_envoy.json new file mode 100644 index 000000000..ddd7e7140 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/armored_envoy.json @@ -0,0 +1,15 @@ +{ + "name": "paradise_lost:vault/lobbies", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/armored_envoy", + "projection": "rigid", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/crossways.json b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/crossways.json new file mode 100644 index 000000000..22b0fa2ff --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/crossways.json @@ -0,0 +1,33 @@ +{ + "name": "paradise_lost:vault/lobbies", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/crossways/crossway_1", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/crossways/crossway_2", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/crossways/crossway_3", + "projection": "rigid", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/enlightened_envoy.json b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/enlightened_envoy.json new file mode 100644 index 000000000..94e528b0d --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/enlightened_envoy.json @@ -0,0 +1,15 @@ +{ + "name": "paradise_lost:vault/lobbies", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/enlightened_envoy", + "projection": "rigid", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/lobbies.json b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/lobbies.json new file mode 100644 index 000000000..b056dad53 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/lobbies.json @@ -0,0 +1,42 @@ +{ + "name": "paradise_lost:vault/lobbies", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 4, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/lobbies/lobby_1", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 4, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/lobbies/lobby_2", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 4, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/lobbies/lobby_3", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/lobbies/lobby_special", + "projection": "rigid", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/storage_rooms.json b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/storage_rooms.json new file mode 100644 index 000000000..bdd11dc6e --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/template_pool/vault/storage_rooms.json @@ -0,0 +1,87 @@ +{ + "name": "paradise_lost:vault/lobbies", + "fallback": "minecraft:empty", + "elements": [ + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_armory_1", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_armory_2", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_armory_3", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_stable_1", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_stable_2", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 2, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_stable_3", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_valuable_1", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_valuable_2", + "projection": "rigid", + "processors": "minecraft:empty" + } + }, + { + "weight": 1, + "element": { + "element_type": "minecraft:single_pool_element", + "location": "paradise_lost:vault/storage_rooms/storage_valuable_3", + "projection": "rigid", + "processors": "minecraft:empty" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/paradise_lost.mixins.json b/src/main/resources/paradise_lost.mixins.json index 6baabdab8..bb870cb5c 100644 --- a/src/main/resources/paradise_lost.mixins.json +++ b/src/main/resources/paradise_lost.mixins.json @@ -34,6 +34,7 @@ "server.PlayerManagerMixin", "server.ServerPlayerEntityMixin", "server.ServerPlayNetworkHandlerMixin", + "world.gen.structure.JigsawStructureMixin", "world.ExplosionMixin", "util.DefaultedRegistryMixin", "util.NbtCompoundAccessor",