Skip to content

Commit

Permalink
Fix deer glow applying outside christmas
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Dec 24, 2021
1 parent 5cc1ec7 commit c161d22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import dev.itsmeow.betteranimalsplus.client.renderer.entity.layers.GooseItemLayerRenderer;
import dev.itsmeow.betteranimalsplus.client.renderer.entity.layers.LayerEyes;
import dev.itsmeow.betteranimalsplus.client.renderer.entity.layers.LayerEyesCondition;
import dev.itsmeow.betteranimalsplus.common.entity.EntityDeer;
import dev.itsmeow.betteranimalsplus.init.ModBlockEntities;
import dev.itsmeow.betteranimalsplus.init.ModEntities;
import dev.itsmeow.betteranimalsplus.init.ModResources;
Expand Down Expand Up @@ -53,7 +54,7 @@ public static void clientInit() {
public static void registerEntityRenders() {
R.addRender(ModEntities.BROWN_BEAR::getEntityType, 1F, r -> r.tCondition(AgeableMob::isBaby, "brownbear_baby", "brownbear").mSingle(ModelBrownBear::new, "brown_bear").childScale(0.5F));
R.addRender(ModEntities.BLACK_BEAR::getEntityType, 1F, r -> r.tVariant().mSingle(ModelBlackBear::new, "black_bear").childScale(0.5F));
R.addRender(ModEntities.DEER::getEntityType, 1F, r -> r.tBabyVariant("deer_baby").mSingle(ModelDeer::new, "deer").childScale(0.6F).layer(t -> new LayerEyes<>(t, ModResources.deer_christmas_glow)));
R.addRender(ModEntities.DEER::getEntityType, 1F, r -> r.tBabyVariant("deer_baby").mSingle(ModelDeer::new, "deer").childScale(0.6F).layer(t -> new LayerEyesCondition<>(t, ModResources.deer_christmas_glow, e -> EntityDeer.EntityDeerVariant.isChristmas)));
R.addRender(ModEntities.LAMMERGEIER::getEntityType, 0.3F, r -> r.tVariant().mSingle(ModelLammergeier::new, "lammergeier"));
R.addRender(ModEntities.FERAL_WOLF::getEntityType, 0.5F, r -> r.tVariant().mSingle(ModelFeralWolf::new, "feral_wolf").handleRotation((e, p) -> e.getTailRotation()).childScale(0.5F).layer(t -> new LayerEyesCondition<>(t, ModResources.wolf_eyes, e -> !e.isTame())));
R.addRender(ModEntities.COYOTE::getEntityType, 0.5F, r -> r.tMapped(e -> e.isTame() || (e.isDaytime() && !e.isHostileDaytime()) ? "coyote" : "coyote_hostile").mSingle(ModelCoyote::new, "coyote").handleRotation((e, p) -> e.getTailRotation()).childScale(0.5F).layer(t -> new LayerEyesCondition<>(t, ModResources.coyote_eyes, e -> !e.isTame() && !(e.isDaytime() && !e.isHostileDaytime()))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public IVariant getRandomType() {

public static class EntityDeerVariant extends EntityVariant {

private static boolean isChristmas = false;
public static boolean isChristmas = false;

static {
Calendar calendar = Calendar.getInstance();
Expand Down

0 comments on commit c161d22

Please sign in to comment.