@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
EndermanEntity eman = new EndermanEntity(null, world);
eman.setPosition(pos.getX(), pos.getY()+3, pos.getZ());
if (!world.isRemote) world.addEntity(eman);
return ActionResultType.SUCCESS;
}
Can someone tell me why this code crashes? Thanks!