Skip to content

Commit

Permalink
Add GOLEM category (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
selfslaughter authored and Jikoo committed Sep 29, 2018
1 parent 0ceb68d commit e03e3a3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ChunkSpawnerLimiter</groupId>
<artifactId>ChunkSpawnerLimiter</artifactId>
<version>3.1.2</version>
<version>3.1.3</version>
<name>ChunkSpawnerLimiter</name>
<description>Limit entities in chunks. </description>
<repositories>
Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
<version>1.13.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.bukkit.entity.NPC;
import org.bukkit.entity.Player;
import org.bukkit.entity.WaterMob;
import org.bukkit.entity.Golem;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.java.JavaPlugin;

Expand Down Expand Up @@ -260,23 +261,25 @@ public void debug(String mess) {
public static String getMobGroup(Entity entity) {
// Determine the general group this mob belongs to.
if (entity instanceof Animals) {
// Chicken, Cow, MushroomCow, Ocelot, Pig, Sheep, Wolf
// AbstractHorse, ChestedHorse, Chicken, Cow, Donkey, Horse, Llama, Mule, MushroomCow,
// Ocelot, Parrot, Pig, PolarBear, Rabbit, Sheep, SkeletonHorse, Turtle, Wolf, ZombieHorse
return "ANIMAL";
}

if (entity instanceof Monster) {
// Blaze, CaveSpider, Creeper, Enderman, Giant, PigZombie, Silverfish, Skeleton, Spider,
// Witch, Wither, Zombie
// Blaze, CaveSpider, Creeper, Drowned, ElderGuardian, Enderman, Endermite, Evoker, Giant,
// Guardian, Husk, Illager, Illusioner, PigZombie, Silverfish, Skeleton, Spellcaster, Spider
// Stray, Vex, Vindicator, Witch, Wither, WitherSkeleton, Zombie, ZombieVillager
return "MONSTER";
}

if (entity instanceof Ambient) {
// Bat
// Bat
return "AMBIENT";
}

if (entity instanceof WaterMob) {
// Squid
// Cod, Dolphin, Fish, PufferFish, Salmon, Squid, TropicalFish
return "WATER_MOB";
}

Expand All @@ -285,6 +288,11 @@ public static String getMobGroup(Entity entity) {
return "NPC";
}

if (entity instanceof Golem) {
// IronGolem, Shulker, Snowman
return "GOLEM";
}

// Anything else.
return "OTHER";
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ entities:
MONSTER: 50
NPC: 50
OTHER: 500
# GOLEM: 5
# WATER_MOB: 5
# AMBIENT: 5

# CREEPER: 10
# SHEEP: 10
# OCELOT: 10
Expand Down

0 comments on commit e03e3a3

Please sign in to comment.