mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 02:34:30 +01:00
Changed resolution order in CraftWorld.toCraftEntity() to give CraftMappable precedence.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
79b394a914
commit
a4aca48cb4
1 changed files with 3 additions and 3 deletions
|
@ -166,7 +166,9 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public CraftEntity toCraftEntity(net.minecraft.server.Entity entity) {
|
||||
if (entity instanceof EntityArrow) {
|
||||
if (entity instanceof CraftMappable) {
|
||||
return ((CraftMappable)entity).getCraftEntity();
|
||||
} else if (entity instanceof EntityArrow) {
|
||||
return new CraftArrow(world.getServer(), (EntityArrow)entity);
|
||||
} else if (entity instanceof EntityEgg) {
|
||||
return new CraftEgg(world.getServer(), (EntityEgg)entity);
|
||||
|
@ -178,8 +180,6 @@ public class CraftWorld implements World {
|
|||
return new CraftHumanEntity(world.getServer(), (EntityPlayer)entity);
|
||||
} else if (entity instanceof EntityLiving) {
|
||||
return new CraftLivingEntity(world.getServer(), (EntityLiving)entity);
|
||||
} else if (entity instanceof CraftMappable) {
|
||||
return ((CraftMappable)entity).getCraftEntity();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue