Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash cancelling EntityMoveHook #156

Open
svdragster opened this issue Dec 13, 2013 · 0 comments
Open

Server crash cancelling EntityMoveHook #156

svdragster opened this issue Dec 13, 2013 · 0 comments

Comments

@svdragster
Copy link

2013-12-13 18:27:27 [SEVERE] Encountered an unexpected exception ReportedException
net.minecraft.server.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:510)
at net.minecraft.server.DedicatedServer.t(DedicatedServer.java:204)
at net.minecraft.server.MinecraftServer.s(MinecraftServer.java:432)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:13)
Caused by: java.lang.NullPointerException
at net.minecraft.server.Entity.V(Entity.java:1199)
at net.minecraft.server.EntityLivingBase.V(EntityLivingBase.java:1537)
at net.minecraft.server.EntityLivingBase.c(EntityLivingBase.java:1497)
at net.minecraft.server.EntityLiving.c(EntityLiving.java:276)
at net.minecraft.server.EntityAgeable.c(EntityAgeable.java:85)
at net.minecraft.server.EntityLivingBase.l_(EntityLivingBase.java:1280)
at net.minecraft.server.EntityLiving.l_(EntityLiving.java:146)
at net.minecraft.server.World.a(World.java:1335)
at net.minecraft.server.WorldServer.a(WorldServer.java:493)
at net.minecraft.server.World.g(World.java:1315)
at net.minecraft.server.World.h(World.java:1213)
at net.minecraft.server.WorldServer.h(WorldServer.java:363)
at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:505)
... 4 more

public void onEntityMove(EntityMoveHook hook) {
    if (hook.getEntity().getEntityType().equals(EntityType.VILLAGER)) {
            hook.setCanceled();
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant