mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 21:17:00 +01:00
Fixed magma slimes from being nonspawnable
This commit is contained in:
parent
4b87704c5a
commit
99771b7b72
2 changed files with 10 additions and 2 deletions
|
@ -734,7 +734,11 @@ public class CraftWorld implements World {
|
||||||
} else if (Skeleton.class.isAssignableFrom(clazz)) {
|
} else if (Skeleton.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntitySkeleton(world);
|
entity = new EntitySkeleton(world);
|
||||||
} else if (Slime.class.isAssignableFrom(clazz)) {
|
} else if (Slime.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntitySlime(world);
|
if (MagmaCube.class.isAssignableFrom(clazz)) {
|
||||||
|
entity = new EntityLavaSlime(world);
|
||||||
|
} else {
|
||||||
|
entity = new EntitySlime(world);
|
||||||
|
}
|
||||||
} else if (Spider.class.isAssignableFrom(clazz)) {
|
} else if (Spider.class.isAssignableFrom(clazz)) {
|
||||||
if (CaveSpider.class.isAssignableFrom(clazz)) {
|
if (CaveSpider.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityCaveSpider(world);
|
entity = new EntityCaveSpider(world);
|
||||||
|
|
|
@ -15,6 +15,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.entity.MagmaCube;
|
||||||
|
|
||||||
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
private static final Map<String, CraftPlayer> players = new MapMaker().softValues().makeMap();
|
private static final Map<String, CraftPlayer> players = new MapMaker().softValues().makeMap();
|
||||||
|
@ -79,7 +80,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
else { return new CraftCreature(server, (EntityCreature) entity); }
|
else { return new CraftCreature(server, (EntityCreature) entity); }
|
||||||
}
|
}
|
||||||
// Slimes are a special (and broken) case
|
// Slimes are a special (and broken) case
|
||||||
else if (entity instanceof EntitySlime) { return new CraftSlime(server, (EntitySlime) entity); }
|
else if (entity instanceof EntitySlime) {
|
||||||
|
if (entity instanceof MagmaCube) { return new CraftMagmaCube(server, (EntityLavaSlime) entity); }
|
||||||
|
else { return new CraftSlime(server, (EntitySlime) entity); }
|
||||||
|
}
|
||||||
// Flying
|
// Flying
|
||||||
else if (entity instanceof EntityFlying) {
|
else if (entity instanceof EntityFlying) {
|
||||||
if (entity instanceof EntityGhast) { return new CraftGhast(server, (EntityGhast) entity); }
|
if (entity instanceof EntityGhast) { return new CraftGhast(server, (EntityGhast) entity); }
|
||||||
|
|
Loading…
Reference in a new issue