Skip to content

Commit

Permalink
vault structures + envoy tweaks - hare
Browse files Browse the repository at this point in the history
  • Loading branch information
MBatt1 committed May 3, 2024
1 parent 81ebac7 commit 9dc8ac0
Show file tree
Hide file tree
Showing 51 changed files with 289 additions and 571 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ public interface ParadiseLostEntityExtensions {

boolean flipped = false;
boolean paradiseLostFallen = false;
boolean corsican_hareFallen = false;
int gravFlipTime = 0;

default int getFlipTime() {
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,8 +53,6 @@ public class ParadiseLostEntityTypes {
// passive
public static final EntityType<MoaEntity> MOA = add("moa", of(MoaEntity::new, CREATURE, changing(1.0F, 2.0F), 5),
attributes(MoaEntity::createMoaAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn));
public static final EntityType<ParadiseHareEntity> 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<AmbystEntity> AMBYST = add("ambyst", of(AmbystEntity::new, CREATURE, changing(0.6F, 0.42F), 5),
// attributes(AmbystEntity::createAmbystAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn));

Expand Down
Original file line number Diff line number Diff line change
@@ -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<Boolean> ENLIGHTENED;

public EnvoyEntity(EntityType<? extends EnvoyEntity> entityType, World world) {
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 9dc8ac0

Please sign in to comment.