Skip to content

Commit

Permalink
slightly clean up linux easter egg
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Feb 20, 2025
1 parent dfcf0bb commit 25484d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import net.frozenblock.lib.entity.api.rendering.EntityTextureOverride;
import net.frozenblock.wilderwild.WWConstants;
import net.frozenblock.wilderwild.client.animation.definitions.impl.WilderWarden;
import net.frozenblock.wilderwild.registry.WWEntityTypes;
import net.minecraft.world.entity.EntityType;

@Environment(EnvType.CLIENT)
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/frozenblock/wilderwild/entity/Penguin.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

package net.frozenblock.wilderwild.entity;

import com.google.common.collect.ImmutableList;
import com.mojang.serialization.Dynamic;
import java.util.Arrays;
import java.util.stream.Stream;
import net.frozenblock.wilderwild.config.WWEntityConfig;
import net.frozenblock.wilderwild.entity.ai.penguin.PenguinAi;
import net.frozenblock.wilderwild.registry.WWEntityTypes;
Expand Down Expand Up @@ -68,6 +70,7 @@
import org.jetbrains.annotations.Nullable;

public class Penguin extends Animal {
private static final Stream<String> VALID_LINUX_NAMES = ImmutableList.of("Linux", "Tux", "Treetrain", "Treetrain1").stream();
public static final double BOAT_BOOST_SPEED = 1.7D;
public AnimationState layDownAnimationState = new AnimationState();
public AnimationState standUpAnimationState = new AnimationState();
Expand Down Expand Up @@ -341,6 +344,6 @@ public void readAdditionalSaveData(CompoundTag compoundTag) {

public boolean isLinux() {
String string = ChatFormatting.stripFormatting(this.getName().getString());
return string.equalsIgnoreCase("Linux") || string.equalsIgnoreCase("Tux") || string.equalsIgnoreCase("Treetrain1") || string.equalsIgnoreCase("Treetrain");
return VALID_LINUX_NAMES.anyMatch(string::equalsIgnoreCase);
}
}

0 comments on commit 25484d4

Please sign in to comment.